From: Johannes Berg Date: Wed, 10 Sep 2008 22:01:48 +0000 (+0200) Subject: mac80211: dont set REQ_RUN when scan finishes X-Git-Tag: v2.6.28-rc1~717^2~268^2~37 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7c95069522d02ff144cd421be6618dce619caf7e;p=linux-2.6-omap-h63xx.git mac80211: dont set REQ_RUN when scan finishes The timer restart is done wrongly, we shouldn't set the REQ_RUN bit when the scan has finished if it hadn't been set before the scan started. If the timer fires during the scan, it will set REQ_RUN and then we can run the work for it, if it didn't fire then we shouldn't run its work either. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 809fb916089..ef73f895372 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2598,7 +2598,8 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) { if (sdata->vif.type == IEEE80211_IF_TYPE_STA || ieee80211_vif_is_mesh(&sdata->vif)) - ieee80211_sta_timer((unsigned long)sdata); + queue_work(sdata->local->hw.workqueue, + &sdata->u.sta.work); } void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)