Search Linux Wireless

[PATCH 2/3] ath5k: zero-out rx_status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
Signed-off-by: Gabor Juhos <juhosg@xxxxxxxxxxx>
---
Compile tested only.
---
 drivers/net/wireless/ath/ath5k/base.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 4ad40cf..8adf9c3 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1323,8 +1323,8 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
 	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;
 
-- 
1.7.10

--
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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux