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>
work_set_promisc);
int ret = 0;
+ if (priv->device_unplugged)
+ return;
+
mutex_lock(&priv->mtx);
priv->mib_buf.type = MIB_LOCAL;
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);
}
kfree(priv->bulk_out_buffer);
+ del_timer_sync(&ledtrig_tx_timer);
+
if (priv->rx_skb)
kfree_skb(priv->rx_skb);