public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 3/4] at76c50x-usb: additional disconnect fixes
Date: Sat, 21 Feb 2009 09:53:29 +0200	[thread overview]
Message-ID: <20090221075329.15991.63657.stgit@tikku> (raw)
In-Reply-To: <20090221075013.15991.66595.stgit@tikku>

From: Jason Andryuk <jandryuk@gmail.com>

Additional attempts to fix Oops on disconnect, that appear to be successful.
However, some may be extraneous.

The cancel_delayed_work call is probably the most necessary.  The
device_unplugged check may not be necessary.  del_timer_sync may not
be necessary either, but the Oops I was receiving was related to
timers.  Hence the addition.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
---

 drivers/net/wireless/at76c50x-usb.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 46ac9e2..64d4192 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1497,6 +1497,9 @@ static void at76_work_set_promisc(struct work_struct *work)
 					      work_set_promisc);
 	int ret = 0;
 
+	if (priv->device_unplugged)
+		return;
+
 	mutex_lock(&priv->mtx);
 
 	priv->mib_buf.type = MIB_LOCAL;
@@ -2290,6 +2293,7 @@ static void at76_delete_device(struct at76_priv *priv)
 	tasklet_kill(&priv->rx_tasklet);
 
 	if (priv->mac80211_registered) {
+		cancel_delayed_work(&priv->dwork_hw_scan);
 		flush_workqueue(priv->hw->workqueue);
 		ieee80211_unregister_hw(priv->hw);
 	}
@@ -2307,6 +2311,8 @@ static void at76_delete_device(struct at76_priv *priv)
 
 	kfree(priv->bulk_out_buffer);
 
+	del_timer_sync(&ledtrig_tx_timer);
+
 	if (priv->rx_skb)
 		kfree_skb(priv->rx_skb);
 


  parent reply	other threads:[~2009-02-21  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  7:53 [PATCH 0/4] at76c50x-usb: disconnect fixes and dma cleanup Kalle Valo
2009-02-21  7:53 ` [PATCH 1/4] at76c50x-usb: fix oops on disconnect Kalle Valo
2009-02-21  7:53 ` [PATCH 2/4] at76c50x-usb: clean up DMA on stack Kalle Valo
2009-02-21  7:53 ` Kalle Valo [this message]
2009-02-21  7:53 ` [PATCH 4/4] at76c50x-usb: add link to the TODO list Kalle Valo

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=20090221075329.15991.63657.stgit@tikku \
    --to=kalle.valo@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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