Commit bc682b80 authored by Stefan Wahren's avatar Stefan Wahren Committed by Jakub Kicinski

net: vertexcom: mse102x: Use ETH_ZLEN

There is already a define for minimum Ethernet frame length without FCS.
So used this instead of the magic number.
Signed-off-by: default avatarStefan Wahren <wahrenst@gmx.net>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240827191000.3244-6-wahrenst@gmx.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7f37d209
...@@ -377,8 +377,8 @@ static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb, ...@@ -377,8 +377,8 @@ static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb,
int ret; int ret;
bool first = true; bool first = true;
if (txb->len < 60) if (txb->len < ETH_ZLEN)
pad = 60 - txb->len; pad = ETH_ZLEN - txb->len;
while (1) { while (1) {
mse102x_tx_cmd_spi(mse, CMD_RTS | (txb->len + pad)); mse102x_tx_cmd_spi(mse, CMD_RTS | (txb->len + pad));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment