Search Linux Wireless

[PATCH 3/3] p54: 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: Christian Lamparter <chunkeey@xxxxxxxxxxxxxx>
Signed-off-by: Gabor Juhos <juhosg@xxxxxxxxxxx>
---
Compile tested only.
---
 drivers/net/wireless/p54/txrx.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 12f0a34..be2552e 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -345,6 +345,8 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
 	if (!(hdr->flags & cpu_to_le16(P54_HDR_FLAG_DATA_IN_FCS_GOOD)))
 		return 0;
 
+	memset(rx_status, 0, sizeof(*rx_status));
+
 	if (hdr->decrypt_status == P54_DECRYPT_OK)
 		rx_status->flag |= RX_FLAG_DECRYPTED;
 	if ((hdr->decrypt_status == P54_DECRYPT_FAIL_MICHAEL) ||
-- 
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