]> err.no Git - linux-2.6/commitdiff
rt2x00: Properly clean up beacon skbs.
authorGertjan van Wingerde <gwingerde@kpnplanet.nl>
Mon, 16 Jun 2008 17:55:18 +0000 (19:55 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 26 Jun 2008 20:49:15 +0000 (16:49 -0400)
The skbs containing the beacons weren't properly cleaned up for rt2400pci, rt2500pci,
rt61pci, and rt73usb. Clean up those skbs in the manner appropriate for each driver.

Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index f9e75319770a6e917e0f7088eb7317b098a1f17a..b8e0c4c3ed0a92a59b35963a8c9d13b42a75b12f 100644 (file)
@@ -474,6 +474,12 @@ static void rt2x00lib_beacondone_iter(void *data, u8 *mac,
            vif->type != IEEE80211_IF_TYPE_IBSS)
                return;
 
+       /*
+        * Clean up the beacon skb.
+        */
+       dev_kfree_skb_irq(intf->beacon->skb);
+       intf->beacon->skb = NULL;
+
        spin_lock(&intf->lock);
        intf->delayed_flags |= DELAYED_UPDATE_BEACON;
        spin_unlock(&intf->lock);
index 5b7267ece1b9f94302eb5ea5933c16d5326ec941..27f30ae8f52b5ef6095b67c72e613682cacab2e4 100644 (file)
@@ -2402,6 +2402,12 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
                                      skb->data, skb->len);
        rt61pci_kick_tx_queue(rt2x00dev, QID_BEACON);
 
+       /*
+        * Clean up beacon skb.
+        */
+       dev_kfree_skb_any(skb);
+       intf->beacon->skb = NULL;
+
        return 0;
 }
 
index fceefd730ab8e5ac796f81cdba50cd11ba748f81..42b7e98b2d277a6fcaf1343f286c84bd1dd53a17 100644 (file)
@@ -2001,6 +2001,12 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
                                 REGISTER_TIMEOUT32(skb->len));
        rt73usb_kick_tx_queue(rt2x00dev, QID_BEACON);
 
+       /*
+        * Clean up the beacon skb.
+        */
+       dev_kfree_skb(skb);
+       intf->beacon->skb = NULL;
+
        return 0;
 }