From: Lior David Date: Tue, 10 Sep 2019 13:46:41 +0000 (+0300) Subject: wil6210: fix RX short frame check X-Git-Tag: v5.4-rc1~131^2~19^2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=055c8a71eb5ba2f42c387511e86452ef07cd9c09;p=platform%2Fkernel%2Flinux-rpi.git wil6210: fix RX short frame check The short frame check in wil_sring_reap_rx_edma uses skb->len which store the maximum frame length. Fix this to use dmalen which is the actual length of the received frame. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c index f21b2fa..04d576d 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.c +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c @@ -964,8 +964,8 @@ again: } stats = &wil->sta[cid].stats; - if (unlikely(skb->len < ETH_HLEN)) { - wil_dbg_txrx(wil, "Short frame, len = %d\n", skb->len); + if (unlikely(dmalen < ETH_HLEN)) { + wil_dbg_txrx(wil, "Short frame, len = %d\n", dmalen); stats->rx_short_frame++; rxdata->skipping = true; goto skipping;