From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Bill Moss <bmoss@CLEMSON.EDU>,
Reinette Chatre <reinette.chatre@intel.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: fix hardware scan completion
Date: Tue, 04 Mar 2008 17:54:35 +0100 [thread overview]
Message-ID: <1204649676.25502.12.camel@johannes.berg> (raw)
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;
next reply other threads:[~2008-03-04 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 16:54 Johannes Berg [this message]
2008-03-05 9:22 ` [PATCH] mac80211: fix hardware scan completion Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1204649676.25502.12.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=bmoss@CLEMSON.EDU \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=reinette.chatre@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox