From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 23:30:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E6521065672; Wed, 3 Jun 2009 23:30:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2268FC18; Wed, 3 Jun 2009 23:30:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n53NUQWl070419; Wed, 3 Jun 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n53NUQFb070418; Wed, 3 Jun 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200906032330.n53NUQFb070418@svn.freebsd.org> From: Sam Leffler Date: Wed, 3 Jun 2009 23:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193413 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 23:30:26 -0000 Author: sam Date: Wed Jun 3 23:30:25 2009 New Revision: 193413 URL: http://svn.freebsd.org/changeset/base/193413 Log: 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. Modified: head/sys/net80211/ieee80211_hostap.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Wed Jun 3 23:28:22 2009 (r193412) +++ head/sys/net80211/ieee80211_hostap.c Wed Jun 3 23:30:25 2009 (r193413) @@ -114,6 +114,19 @@ sta_disassoc(void *arg, struct ieee80211 } } +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 /* 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. */