summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-06-03 23:30:25 +0000
committersam <sam@FreeBSD.org>2009-06-03 23:30:25 +0000
commitb4921daa19788bf8b239aaa35eac15086b1f0bb7 (patch)
treef1e21d22d8b3f79b7945f8e5f502a97aa18b2c3b /sys/net80211
parent6b340c06d17352b1fd07ec2fe19a9c83af9e9e5b (diff)
downloadFreeBSD-src-b4921daa19788bf8b239aaa35eac15086b1f0bb7.zip
FreeBSD-src-b4921daa19788bf8b239aaa35eac15086b1f0bb7.tar.gz
After a channel switch mark associated stations so they will immediately
be probed as inactive; this more quickly weeds out stations that don't follow to the new channel.
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_hostap.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index eec52f9..5d9c8e4 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -114,6 +114,19 @@ sta_disassoc(void *arg, struct ieee80211_node *ni)
}
}
+static void
+sta_csa(void *arg, struct ieee80211_node *ni)
+{
+ struct ieee80211vap *vap = arg;
+
+ if (ni->ni_vap == vap && ni->ni_associd != 0)
+ if (ni->ni_inact > vap->iv_inact_init) {
+ ni->ni_inact = vap->iv_inact_init;
+ IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
+ "%s: inact %u", __func__, ni->ni_inact);
+ }
+}
+
/*
* IEEE80211_M_HOSTAP vap state machine handler.
*/
@@ -249,6 +262,11 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg)
/* fall thru... */
case IEEE80211_S_CSA:
/*
+ * Shorten inactivity timer of associated stations
+ * to weed out sta's that don't follow a CSA.
+ */
+ ieee80211_iterate_nodes(&ic->ic_sta, sta_csa, vap);
+ /*
* Update bss node channel to reflect where
* we landed after CSA.
*/
OpenPOWER on IntegriCloud