Commit 84f6a01c authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: fix configure_filter invocation after stop

Since configure_filter can sleep now, any multicast
configuration needed to be postponed to a work struct.
This, however, lead to a problem that we could queue
the work, stop the device and then afterwards invoke
configure_filter which may lead to driver hangs and is
a bug. To fix this, we can just cancel the filter work
since it's unnecessary to do after stopping the hw.

Since there are various places that call drv_stop, and
two of them do very similar things, the code for them
can be put into a shared function at the same time.
Signed-off-by: default avatarJohannes Berg <>
Reported-by: default avatarLennert Buytenhek <>
Tested-by: default avatarLennert Buytenhek <>
Signed-off-by: default avatarJohn W. Linville <>
parent 5eb6ba83
......@@ -1086,6 +1086,7 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
/* Suspend/resume and hw reconfiguration */
int ieee80211_reconfig(struct ieee80211_local *local);
void ieee80211_stop_device(struct ieee80211_local *local);
#ifdef CONFIG_PM
int __ieee80211_suspend(struct ieee80211_hw *hw);
......@@ -552,11 +552,7 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_recalc_ps(local, -1);
if (local->open_count == 0) {
ieee80211_led_radio(local, false);
......@@ -107,17 +107,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw)
/* stop hardware - this must stop RX */
if (local->open_count) {
ieee80211_led_radio(local, false);
* flush again, in case driver queued work -- it
* shouldn't be doing (or cancel everything in the
* stop callback) that but better safe than sorry.
if (local->open_count)
local->suspended = true;
/* need suspended to be visible before quiescing is false */
......@@ -1007,6 +1007,16 @@ u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
return supp_rates;
void ieee80211_stop_device(struct ieee80211_local *local)
ieee80211_led_radio(local, false);
int ieee80211_reconfig(struct ieee80211_local *local)
struct ieee80211_hw *hw = &local->hw;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment