22ff2609ff63d172d0f9705a09e35b1f011d2051
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 308-pending-p54-zero-out-rx_status.patch
1 From 6e73611e574ea3c8fe5afc67ee29d2c5ff777f4b Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Tue, 11 Dec 2012 14:16:29 +0100
4 Subject: [PATCH 3/3] p54: 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: Christian Lamparter <chunkeey@googlemail.com>
13 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
14 ---
15 Compile tested only.
16 ---
17 drivers/net/wireless/p54/txrx.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20 --- a/drivers/net/wireless/p54/txrx.c
21 +++ b/drivers/net/wireless/p54/txrx.c
22 @@ -345,6 +345,8 @@ static int p54_rx_data(struct p54_common
23 if (!(hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_IN_FCS_GOOD)))
24 return 0;
25
26 + memset(rx_status, 0, sizeof(*rx_status));
27 +
28 if (hdr->decrypt_status == P54_DECRYPT_OK)
29 rx_status->flag |= RX_FLAG_DECRYPTED;
30 if ((hdr->decrypt_status == P54_DECRYPT_FAIL_MICHAEL) ||