diff options
Diffstat (limited to 'net/mac80211/work.c')
-rw-r--r-- | net/mac80211/work.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 81bd5d592bb4..7e708d5c88b4 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -535,8 +535,7 @@ ieee80211_remain_on_channel_timeout(struct ieee80211_work *wk) | |||
535 | * First time we run, do nothing -- the generic code will | 535 | * First time we run, do nothing -- the generic code will |
536 | * have switched to the right channel etc. | 536 | * have switched to the right channel etc. |
537 | */ | 537 | */ |
538 | if (!wk->remain.started) { | 538 | if (!wk->started) { |
539 | wk->remain.started = true; | ||
540 | wk->timeout = jiffies + msecs_to_jiffies(wk->remain.duration); | 539 | wk->timeout = jiffies + msecs_to_jiffies(wk->remain.duration); |
541 | 540 | ||
542 | cfg80211_ready_on_channel(wk->sdata->dev, (unsigned long) wk, | 541 | cfg80211_ready_on_channel(wk->sdata->dev, (unsigned long) wk, |
@@ -821,15 +820,17 @@ static void ieee80211_work_work(struct work_struct *work) | |||
821 | mutex_lock(&local->work_mtx); | 820 | mutex_lock(&local->work_mtx); |
822 | 821 | ||
823 | list_for_each_entry_safe(wk, tmp, &local->work_list, list) { | 822 | list_for_each_entry_safe(wk, tmp, &local->work_list, list) { |
823 | bool started = wk->started; | ||
824 | |||
824 | /* mark work as started if it's on the current off-channel */ | 825 | /* mark work as started if it's on the current off-channel */ |
825 | if (!wk->started && local->tmp_channel && | 826 | if (!started && local->tmp_channel && |
826 | wk->chan == local->tmp_channel && | 827 | wk->chan == local->tmp_channel && |
827 | wk->chan_type == local->tmp_channel_type) { | 828 | wk->chan_type == local->tmp_channel_type) { |
828 | wk->started = true; | 829 | started = true; |
829 | wk->timeout = jiffies; | 830 | wk->timeout = jiffies; |
830 | } | 831 | } |
831 | 832 | ||
832 | if (!wk->started && !local->tmp_channel) { | 833 | if (!started && !local->tmp_channel) { |
833 | /* | 834 | /* |
834 | * TODO: could optimize this by leaving the | 835 | * TODO: could optimize this by leaving the |
835 | * station vifs in awake mode if they | 836 | * station vifs in awake mode if they |
@@ -842,12 +843,12 @@ static void ieee80211_work_work(struct work_struct *work) | |||
842 | local->tmp_channel = wk->chan; | 843 | local->tmp_channel = wk->chan; |
843 | local->tmp_channel_type = wk->chan_type; | 844 | local->tmp_channel_type = wk->chan_type; |
844 | ieee80211_hw_config(local, 0); | 845 | ieee80211_hw_config(local, 0); |
845 | wk->started = true; | 846 | started = true; |
846 | wk->timeout = jiffies; | 847 | wk->timeout = jiffies; |
847 | } | 848 | } |
848 | 849 | ||
849 | /* don't try to work with items that aren't started */ | 850 | /* don't try to work with items that aren't started */ |
850 | if (!wk->started) | 851 | if (!started) |
851 | continue; | 852 | continue; |
852 | 853 | ||
853 | if (time_is_after_jiffies(wk->timeout)) { | 854 | if (time_is_after_jiffies(wk->timeout)) { |
@@ -882,6 +883,8 @@ static void ieee80211_work_work(struct work_struct *work) | |||
882 | break; | 883 | break; |
883 | } | 884 | } |
884 | 885 | ||
886 | wk->started = started; | ||
887 | |||
885 | switch (rma) { | 888 | switch (rma) { |
886 | case WORK_ACT_NONE: | 889 | case WORK_ACT_NONE: |
887 | /* might have changed the timeout */ | 890 | /* might have changed the timeout */ |
@@ -1022,8 +1025,6 @@ ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1022 | case IEEE80211_STYPE_PROBE_RESP: | 1025 | case IEEE80211_STYPE_PROBE_RESP: |
1023 | case IEEE80211_STYPE_ASSOC_RESP: | 1026 | case IEEE80211_STYPE_ASSOC_RESP: |
1024 | case IEEE80211_STYPE_REASSOC_RESP: | 1027 | case IEEE80211_STYPE_REASSOC_RESP: |
1025 | case IEEE80211_STYPE_DEAUTH: | ||
1026 | case IEEE80211_STYPE_DISASSOC: | ||
1027 | skb_queue_tail(&local->work_skb_queue, skb); | 1028 | skb_queue_tail(&local->work_skb_queue, skb); |
1028 | ieee80211_queue_work(&local->hw, &local->work_work); | 1029 | ieee80211_queue_work(&local->hw, &local->work_work); |
1029 | return RX_QUEUED; | 1030 | return RX_QUEUED; |