linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: rt2400-devel@lists.sourceforge.net, linux-wireless@vger.kernel.org
Subject: [PATCH 2/9] rt2x00: Properly clean up beacon skbs.
Date: Mon, 16 Jun 2008 19:55:18 +0200	[thread overview]
Message-ID: <200806161955.18775.IvDoorn@gmail.com> (raw)
In-Reply-To: <200806161954.34838.IvDoorn@gmail.com>

From: Gertjan van Wingerde <gwingerde@kpnplanet.nl>

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>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |    6 ++++++
 drivers/net/wireless/rt2x00/rt61pci.c   |    6 ++++++
 drivers/net/wireless/rt2x00/rt73usb.c   |    6 ++++++
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index f9e7531..b8e0c4c 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 5b7267e..27f30ae 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 fceefd7..42b7e98 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;
 }
 
-- 
1.5.5.4


  parent reply	other threads:[~2008-06-16 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200806161954.04241.IvDoorn@gmail.com>
2008-06-16 17:54 ` [PATCH 1/9] rt2x00: Use ieee80211 fc handlers Ivo van Doorn
     [not found] ` <200806161954.34838.IvDoorn@gmail.com>
2008-06-16 17:55   ` Ivo van Doorn [this message]
2008-06-16 17:55     ` [PATCH 3/9] rt2x00: Convert rt2x00 to use generic DMA-mapping API Ivo van Doorn
2008-06-16 17:56       ` [PATCH 4/9] rt2x00: Centralize allocation of RX skbs Ivo van Doorn
2008-06-16 17:56         ` [PATCH 5/9] rt2x00: Replace statically allocated DMA buffers with mapped skb's Ivo van Doorn
2008-06-16 17:56           ` [PATCH 6/9] rt2x00: Cleanup symbol exports Ivo van Doorn
2008-06-16 17:57             ` [PATCH 7/9] rt2x00: Fix sparse warning on nested container_of() Ivo van Doorn
2008-06-16 17:57               ` [PATCH 8/9] rt2x00: Increase queue size Ivo van Doorn
2008-06-16 17:58                 ` [PATCH 9/9] rt2x00: Release rt2x00 2.1.8 Ivo van Doorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806161955.18775.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rt2400-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).