openwrt/package/mac80211/patches/307-pending-ath5k-zero-out-rx_status.patch
Gabor Juhos 1a000cfcef mac80211: zero-out rx_status in rt2x00, ath5k, p54
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 34627
2012-12-11 14:16:23 +00:00

32 lines
1.0 KiB
Diff

From 4c0faf816beeb5d4175cff09c96e668a49ad032f Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Tue, 11 Dec 2012 14:16:15 +0100
Subject: [PATCH 2/3] ath5k: zero-out rx_status
In commit 'mac80211: support radiotap vendor namespace RX data'
new fields were added to 'struct ieee80211_rx_status'.
The ath5k driver does not initializes those fields and
this can cause unexpected behaviour. The patch ensures
that each field gets initialized with zeroes.
Cc: <ath5k-devel@lists.ath5k.org>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
---
Compile tested only.
---
drivers/net/wireless/ath/ath5k/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1325,8 +1325,8 @@ ath5k_receive_frame(struct ath5k_hw *ah,
ath5k_remove_padding(skb);
rxs = IEEE80211_SKB_RXCB(skb);
+ memset(rxs, 0, sizeof(*rxs));
- rxs->flag = 0;
if (unlikely(rs->rs_status & AR5K_RXERR_MIC))
rxs->flag |= RX_FLAG_MMIC_ERROR;