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