Skip to content

Commit

Permalink
net: vertexcom: mse102x: Use ETH_ZLEN
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
lategoodbye authored and kuba-moo committed Aug 29, 2024
1 parent 7f37d20 commit bc682b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/vertexcom/mse102x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit bc682b8

Please sign in to comment.