Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314815
b: refs/heads/master
c: 04800ad
h: refs/heads/master
i:
  314813: cc2ee2a
  314811: f033359
  314807: 28b506d
  314799: 94cbe54
  314783: 90a0458
  314751: 93b430e
v: v3
  • Loading branch information
Arik Nemtsov authored and Johannes Berg committed Jun 18, 2012
1 parent 1c889f1 commit 4b696df
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58886a9011f8eae705b9f585ec6c80b34f3c4e6c
refs/heads/master: 04800ada2acc3a9ffc754c1d73576cef326f3311
3 changes: 3 additions & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,9 @@ struct ieee80211_local {
/* device is started */
bool started;

/* device is during a HW reconfig */
bool in_reconfig;

/* wowlan is enabled -- don't reconfig on resume */
bool wowlan;

Expand Down
7 changes: 7 additions & 0 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,13 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)
ieee80211_stop_queues_by_reason(hw,
IEEE80211_QUEUE_STOP_REASON_SUSPEND);

/*
* Stop all Rx during the reconfig. We don't want state changes
* or driver callbacks while this is in progress.
*/
local->in_reconfig = true;
barrier();

schedule_work(&local->restart_work);
}
EXPORT_SYMBOL(ieee80211_restart_hw);
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3027,6 +3027,10 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (unlikely(local->quiescing || local->suspended))
goto drop;

/* We might be during a HW reconfig, prevent Rx for the same reason */
if (unlikely(local->in_reconfig))
goto drop;

/*
* The same happens when we're not even started,
* but that's worth a warning.
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
if (ieee80211_sdata_running(sdata))
ieee80211_enable_keys(sdata);

local->in_reconfig = false;
barrier();

wake_up:
/*
* Clear the WLAN_STA_BLOCK_BA flag so new aggregation
Expand Down

0 comments on commit 4b696df

Please sign in to comment.