[patch] net80211: update BSS channel after CSA

Adrian Chadd adrian at freebsd.org
Tue Jul 12 15:24:41 UTC 2011


The BSS channel isn't updated after a CSA has completed.
The BSS channel (iv_bss->ni_chan) is only set during an explicit
channel change (via an ioctl); it isn't at all updated through the CSA
code path.

This patch kicks the channel update after the CSA is complete,
changing the channel of all VAPs in the CSA state.
It does resolve the issue (ie, ifconfig wlanX in STA mode shows the
wrong BSS channel.)

Thanks,


adrian

Index: ieee80211_proto.c
===================================================================
--- ieee80211_proto.c   (revision 223943)
+++ ieee80211_proto.c   (working copy)
@@ -1510,8 +1510,10 @@
        ic->ic_flags &= ~IEEE80211_F_CSAPENDING;

        TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
-               if (vap->iv_state == IEEE80211_S_CSA)
+               if (vap->iv_state == IEEE80211_S_CSA) {
+                       vap->iv_bss->ni_chan = ic->ic_curchan;
                        ieee80211_new_state_locked(vap, IEEE80211_S_RUN, 0);
+               }
 }


More information about the freebsd-wireless mailing list