* First time we run, do nothing -- the generic code will
* have switched to the right channel etc.
*/
- if (!wk->remain.started) {
- wk->remain.started = true;
+ if (!wk->started) {
wk->timeout = jiffies + msecs_to_jiffies(wk->remain.duration);
cfg80211_ready_on_channel(wk->sdata->dev, (unsigned long) wk,
mutex_lock(&local->work_mtx);
list_for_each_entry_safe(wk, tmp, &local->work_list, list) {
+ bool started = wk->started;
+
/* mark work as started if it's on the current off-channel */
- if (!wk->started && local->tmp_channel &&
+ if (!started && local->tmp_channel &&
wk->chan == local->tmp_channel &&
wk->chan_type == local->tmp_channel_type) {
- wk->started = true;
+ started = true;
wk->timeout = jiffies;
}
- if (!wk->started && !local->tmp_channel) {
+ if (!started && !local->tmp_channel) {
/*
* TODO: could optimize this by leaving the
* station vifs in awake mode if they
local->tmp_channel = wk->chan;
local->tmp_channel_type = wk->chan_type;
ieee80211_hw_config(local, 0);
- wk->started = true;
+ started = true;
wk->timeout = jiffies;
}
/* don't try to work with items that aren't started */
- if (!wk->started)
+ if (!started)
continue;
if (time_is_after_jiffies(wk->timeout)) {
break;
}
+ wk->started = started;
+
switch (rma) {
case WORK_ACT_NONE:
/* might have changed the timeout */