Date: Tue, 19 Jul 2011 15:24:44 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r224220 - head/sys/net80211 Message-ID: <201107191524.p6JFOict077797@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Jul 19 15:24:44 2011 New Revision: 224220 URL: http://svn.freebsd.org/changeset/base/224220 Log: This sets the BSS channel for each VAP for the given interface. It's only relevant in STA mode. The CSA forces a channel switch for the interface, but doesn't update the VAP channel. Approved by: re (bz) Modified: head/sys/net80211/ieee80211_proto.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Tue Jul 19 15:22:35 2011 (r224219) +++ head/sys/net80211/ieee80211_proto.c Tue Jul 19 15:24:44 2011 (r224220) @@ -1501,6 +1501,11 @@ ieee80211_csa_startswitch(struct ieee802 ieee80211_notify_csa(ic, c, mode, count); } +/* + * Complete the channel switch by transitioning all CSA VAPs to RUN. + * This is called by both the completion and cancellation functions + * so each VAP is placed back in the RUN state and can thus transmit. + */ static void csa_completeswitch(struct ieee80211com *ic) { @@ -1518,6 +1523,12 @@ csa_completeswitch(struct ieee80211com * * Complete an 802.11h channel switch started by ieee80211_csa_startswitch. * We clear state and move all vap's in CSA state to RUN state * so they can again transmit. + * + * Although this may not be completely correct, update the BSS channel + * for each VAP to the newly configured channel. The setcurchan sets + * the current operating channel for the interface (so the radio does + * switch over) but the VAP BSS isn't updated, leading to incorrectly + * reported information via ioctl. */ void ieee80211_csa_completeswitch(struct ieee80211com *ic) @@ -1527,6 +1538,10 @@ ieee80211_csa_completeswitch(struct ieee KASSERT(ic->ic_flags & IEEE80211_F_CSAPENDING, ("csa not pending")); ieee80211_setcurchan(ic, ic->ic_csa_newchan); + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + if (vap->iv_state == IEEE80211_S_CSA) + vap->iv_bss->ni_chan = ic->ic_curchan; + csa_completeswitch(ic); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107191524.p6JFOict077797>