* [PATCH] mac80211: fix hardware scan completion
@ 2008-03-04 16:54 Johannes Berg
2008-03-05 9:22 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2008-03-04 16:54 UTC (permalink / raw)
To: John Linville; +Cc: Bill Moss, Reinette Chatre, linux-wireless
The mac80211 MLME requires restarting timers after a scan
completes but this wasn't done when hardware scan offload
was added, so add it now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Bill Moss <bmoss@clemson.edu>
---
net/mac80211/ieee80211_sta.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- everything.orig/net/mac80211/ieee80211_sta.c 2008-03-01 19:28:56.000000000 +0100
+++ everything/net/mac80211/ieee80211_sta.c 2008-03-01 19:28:57.000000000 +0100
@@ -3610,25 +3610,28 @@ void ieee80211_scan_completed(struct iee
rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list) {
-
/* No need to wake the master device. */
if (sdata->dev == local->mdev)
continue;
- if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
- if (sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)
- ieee80211_send_nullfunc(local, sdata, 0);
- ieee80211_sta_timer((unsigned long)sdata);
- }
-
- if (sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT)
- ieee80211_sta_timer((unsigned long)sdata);
+ /* Tell AP we're back */
+ if (sdata->vif.type == IEEE80211_IF_TYPE_STA &&
+ sdata->u.sta.flags & IEEE80211_STA_ASSOCIATED)
+ ieee80211_send_nullfunc(local, sdata, 0);
netif_wake_queue(sdata->dev);
}
+
+ done:
+ /* Restart STA timer for both SW and HW scan cases */
+ list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+ if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
+ ieee80211_vif_is_mesh(&sdata->vif))
+ ieee80211_sta_timer((unsigned long)sdata);
+ }
+
rcu_read_unlock();
-done:
sdata = IEEE80211_DEV_TO_SUB_IF(dev);
if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
struct ieee80211_if_sta *ifsta = &sdata->u.sta;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mac80211: fix hardware scan completion
2008-03-04 16:54 [PATCH] mac80211: fix hardware scan completion Johannes Berg
@ 2008-03-05 9:22 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-03-05 9:22 UTC (permalink / raw)
To: John Linville; +Cc: Bill Moss, Reinette Chatre, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
On Tue, 2008-03-04 at 17:54 +0100, Johannes Berg wrote:
> The mac80211 MLME requires restarting timers after a scan
> completes but this wasn't done when hardware scan offload
> was added, so add it now.
hold off on this, I just realized it has a locking error.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-05 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04 16:54 [PATCH] mac80211: fix hardware scan completion Johannes Berg
2008-03-05 9:22 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).