From: Sujith Manoharan <sujith.manoha...@atheros.com>

The length of the received SKB could be equal to
HTC_RX_FRAME_HEADER_SIZE in case of packets with phy/crc errors,
in which case they are dropped without being processed.
Fix this check so that the error counters are updated correctly.

Signed-off-by: Sujith Manoharan <sujith.manoha...@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c 
b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 1b629fd..9913ef0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -528,8 +528,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
        int last_rssi = ATH_RSSI_DUMMY_MARKER;
        __le16 fc;
 
-       if (skb->len <= HTC_RX_FRAME_HEADER_SIZE) {
-               ath_err(common, "Corrupted RX frame, dropping\n");
+       if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
+               ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",
+                       skb->len);
                goto rx_next;
        }
 
-- 
1.7.3.5

_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to