diff options
author | Stefan Wahren <wahrenst@gmx.net> | 2024-08-27 21:10:00 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-29 11:39:35 -0700 |
commit | bc682b8064be82f5f9d2fda79f5b8a14e3ecc4df (patch) | |
tree | 58d46cbcbb2cc4479aade9c7a2a7a468335b8c59 | |
parent | 7f37d20929c05bf7817b59615b79a0167f3690a3 (diff) | |
download | lwn-bc682b8064be82f5f9d2fda79f5b8a14e3ecc4df.tar.gz lwn-bc682b8064be82f5f9d2fda79f5b8a14e3ecc4df.zip |
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: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240827191000.3244-6-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/vertexcom/mse102x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/vertexcom/mse102x.c b/drivers/net/ethernet/vertexcom/mse102x.c index 8a72d8699b84..a04d4073def9 100644 --- a/drivers/net/ethernet/vertexcom/mse102x.c +++ b/drivers/net/ethernet/vertexcom/mse102x.c @@ -377,8 +377,8 @@ static int mse102x_tx_pkt_spi(struct mse102x_net *mse, struct sk_buff *txb, int ret; bool first = true; - if (txb->len < 60) - pad = 60 - txb->len; + if (txb->len < ETH_ZLEN) + pad = ETH_ZLEN - txb->len; while (1) { mse102x_tx_cmd_spi(mse, CMD_RTS | (txb->len + pad)); |