summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/at76c50x-usb.c
diff options
context:
space:
mode:
authorJason Andryuk <jandryuk@gmail.com>2009-02-21 09:53:29 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-02-27 14:53:01 -0500
commit1cc198fee9eb60d9dddbdcb6f32a6e36e5136769 (patch)
tree5266bcb80d8ed0f8c1668a23c00bf6f0ebff62f9 /drivers/net/wireless/at76c50x-usb.c
parent5a2137ddcc4b4d0d9227db433eabaefa3c3bd924 (diff)
downloadblackbird-obmc-linux-1cc198fee9eb60d9dddbdcb6f32a6e36e5136769.tar.gz
blackbird-obmc-linux-1cc198fee9eb60d9dddbdcb6f32a6e36e5136769.zip
at76c50x-usb: additional disconnect fixes
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/at76c50x-usb.c')
-rw-r--r--drivers/net/wireless/at76c50x-usb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 46ac9e278035..64d4192b5d52 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);
OpenPOWER on IntegriCloud