summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt61pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-06 16:18:22 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:55:17 +0400
commitc22eb87b5723b3d66665ca2ffa87428e0e489b16 (patch)
tree38d3ed78780f6022b434409f1f1139cfb1d0d49e /drivers/net/wireless/rt2x00/rt61pci.c
parent37894473fb0d07e1e015781f7ae1b9b1762d49be (diff)
downloadlinux-c22eb87b5723b3d66665ca2ffa87428e0e489b16.tar.xz
[PATCH] rt2x00: Allways memset memory obtained from skb_push()
When skb_push() is used we should memset the memory before usage. This will prevent bugs which could occur when the data is treated as TX descriptor. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 1a869a5cbe91..01dbef19d651 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2437,6 +2437,8 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
* First we create the beacon.
*/
skb_push(skb, TXD_DESC_SIZE);
+ memset(skb->data, 0, TXD_DESC_SIZE);
+
rt2x00lib_write_tx_desc(rt2x00dev, (struct data_desc *)skb->data,
(struct ieee80211_hdr *)(skb->data +
TXD_DESC_SIZE),