Search Linux Wireless

[PATCH] rt2x00: Use correct length in descriptor

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

 



This fixes an important issue where the incorrect length is being
passed to the descriptor initializor. This incorrect initialization will
cause frames to be send out incorrectly.

Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>

---

diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c b/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
index 187076d..537d0c5 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2500usb.c
@@ -1555,8 +1555,7 @@ static int rt2500usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
 
 	skb_push(skb, rt2x00dev->hw->extra_tx_headroom);
 	txd = (struct data_desc*)skb->data;
-	rt2500usb_write_tx_desc(rt2x00dev, txd, ieee80211hdr,
-		skb->len, control);
+	rt2500usb_write_tx_desc(rt2x00dev, txd, ieee80211hdr, length, control);
 	memcpy(&entry->tx_status.control, control, sizeof(*control));
 	entry->skb = skb;
 
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt73usb.c b/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
index 9c9fbce..7b3b878 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt73usb.c
@@ -1714,7 +1714,7 @@ static int rt73usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
 
 	skb_push(skb, rt2x00dev->hw->extra_tx_headroom);
 	txd = (struct data_desc*)skb->data;
-	rt73usb_write_tx_desc(rt2x00dev, txd, ieee80211hdr, skb->len, control);
+	rt73usb_write_tx_desc(rt2x00dev, txd, ieee80211hdr, length, control);
 	memcpy(&entry->tx_status.control, control, sizeof(*control));
 	entry->skb = skb;
 
-
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux