Subject: [PATCH] d80211: fix softlockup in hw_scan card when rmmod

From: Hong Liu <[email-masked]>
Date: Wed, 20 Dec 2006 14:43:51 +0800

The local->scan_work.data is not clear after scan is completed.

This will cause softlockup when removing driver module because 
the local->scan_work is not initialized for hw_scan card
and we are trying to cancel the scan_work with an uninitialized timer_list.

Signed-off-by: Hong Liu <[email-masked]>

diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c
diff --git a/net/d80211/ieee80211_sta.c b/net/d80211/ieee80211_sta.c
index 507d071..3b55427 100644
--- a/net/d80211/ieee80211_sta.c
+++ b/net/d80211/ieee80211_sta.c
@@ -3641,6 +3641,7 @@ void ieee80211_scan_completed(struct iee
 	printk(KERN_DEBUG "%s: scan completed\n", dev->name);
 	spin_lock_bh(&local->ifsta_data_lock);
 	local->sta_scanning = 0;
+	local->scan_work.data = NULL;
 	local->last_scan_completed = jiffies;
 	spin_unlock_bh(&local->ifsta_data_lock);