diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index f9e75319770a..b8e0c4c3ed0a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -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); diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 5b7267ece1b9..27f30ae8f52b 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c @@ -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; } diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index fceefd730ab8..42b7e98b2d27 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c @@ -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; }