Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183908
b: refs/heads/master
c: 723bae7
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jan 25, 2010
1 parent 774efcb commit db9195a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 382b16559d599c4260aeb82a5ea5ba44459d1cd2
refs/heads/master: 723bae7ee44fd79c1cd3c7531ed581d373920774
1 change: 0 additions & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ struct ieee80211_work {
} assoc;
struct {
u32 duration;
bool started;
} remain;
};

Expand Down
17 changes: 10 additions & 7 deletions trunk/net/mac80211/work.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,7 @@ ieee80211_remain_on_channel_timeout(struct ieee80211_work *wk)
* 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,
Expand Down Expand Up @@ -821,15 +820,17 @@ static void ieee80211_work_work(struct work_struct *work)
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
Expand All @@ -842,12 +843,12 @@ static void ieee80211_work_work(struct work_struct *work)
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)) {
Expand Down Expand Up @@ -882,6 +883,8 @@ static void ieee80211_work_work(struct work_struct *work)
break;
}

wk->started = started;

switch (rma) {
case WORK_ACT_NONE:
/* might have changed the timeout */
Expand Down

0 comments on commit db9195a

Please sign in to comment.