diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-20 14:02:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:25 -0400 |
commit | 84f6a01ce05fa671f7745b6e041e698a2d1f1341 (patch) | |
tree | 9d27eb23cf2c310b572193cbef290b6b84eb0259 /net/mac80211/pm.c | |
parent | 5eb6ba83aa326e2f2cf9109d20df5d6a497b36bb (diff) |
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: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
Tested-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/pm.c')
-rw-r--r-- | net/mac80211/pm.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index a5d2f1fb441..e535f1c988f 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -107,17 +107,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | /* stop hardware - this must stop RX */ | 109 | /* stop hardware - this must stop RX */ |
110 | if (local->open_count) { | 110 | if (local->open_count) |
111 | ieee80211_led_radio(local, false); | 111 | ieee80211_stop_device(local); |
112 | drv_stop(local); | ||
113 | } | ||
114 | |||
115 | /* | ||
116 | * flush again, in case driver queued work -- it | ||
117 | * shouldn't be doing (or cancel everything in the | ||
118 | * stop callback) that but better safe than sorry. | ||
119 | */ | ||
120 | flush_workqueue(local->workqueue); | ||
121 | 112 | ||
122 | local->suspended = true; | 113 | local->suspended = true; |
123 | /* need suspended to be visible before quiescing is false */ | 114 | /* need suspended to be visible before quiescing is false */ |