wifi: mac80211: do not drop packets smaller than the LLC-SNAP header on fast-rx
authorFelix Fietkau <nbd@nbd.name>
Fri, 7 Oct 2022 09:05:09 +0000 (11:05 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Oct 2022 12:38:58 +0000 (14:38 +0200)
Since STP TCN frames are only 7 bytes, the pskb_may_pull call returns an error.
Instead of dropping those packets, bump them back to the slow path for proper
processing.

Fixes: 49ddf8e6e234 ("mac80211: add fast-rx path")
Reported-by: Chad Monroe <chad.monroe@smartrg.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index bd215fe3c79693525cd0c01217dc229798e610f0..333adad47482cd1b78bfdf1949d8ee513fe86c67 100644 (file)
@@ -4708,7 +4708,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
 
        if (!(status->rx_flags & IEEE80211_RX_AMSDU)) {
                if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))
-                       goto drop;
+                       return false;
 
                payload = (void *)(skb->data + snap_offs);