Drop packets for which the firmware was unable to decrypt it, as we won't be able to decrypt them with the key, too. Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Signed-off-by: Michael Buesch <mb@xxxxxxxxx> Index: wireless-dev/drivers/net/wireless/b43/xmit.c =================================================================== --- wireless-dev.orig/drivers/net/wireless/b43/xmit.c 2007-08-31 17:40:05.000000000 +0200 +++ wireless-dev/drivers/net/wireless/b43/xmit.c 2007-08-31 18:33:38.000000000 +0200 @@ -465,6 +465,12 @@ void b43_rx(struct b43_wldev *dev, struc if (macstat & B43_RX_MAC_FCSERR) dev->wl->ieee_stats.dot11FCSErrorCount++; + if (macstat & B43_RX_MAC_DECERR) { + /* Decryption with the given key failed. + * Drop the packet. We also won't be able to decrypt it with + * the key in software. */ + goto drop; + } /* Skip PLCP and padding */ padding = (macstat & B43_RX_MAC_PADDING) ? 2 : 0; @@ -483,7 +489,7 @@ void b43_rx(struct b43_wldev *dev, struc fctl = le16_to_cpu(wlhdr->frame_control); skb_trim(skb, skb->len - FCS_LEN); - if ((macstat & B43_RX_MAC_DEC) && !(macstat & B43_RX_MAC_DECERR)) { + if (macstat & B43_RX_MAC_DEC) { unsigned int keyidx; int wlhdr_len; int iv_len; @@ -573,7 +579,7 @@ void b43_rx(struct b43_wldev *dev, struc ieee80211_rx_irqsafe(dev->wl->hw, skb, &status); return; - drop: +drop: b43dbg(dev->wl, "RX: Packet dropped\n"); dev_kfree_skb_any(skb); } - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html