1

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>
This commit is contained in:
Stefan Wahren 2024-08-27 21:10:00 +02:00 committed by Jakub Kicinski
parent 7f37d20929
commit bc682b8064

View File

@ -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));