Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2011 15:10:13 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        freebsd-wireless@freebsd.org
Subject:   [PATCH] net80211: Fix bss channel on CSA reception
Message-ID:  <BANLkTimRkak5hNv%2B=y77CGbjX37y0TeVww@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
This patch fixes a strange bug where although the CSA correctly
changes ic_curchan, it doesn't update the VAP BSS channel.
Hence querying the VAP doesn't report the correct channel.

Thanks,

Adrian

Index: ieee80211_proto.c
===================================================================
--- ieee80211_proto.c   (revision 223525)
+++ ieee80211_proto.c   (working copy)
@@ -1522,11 +1522,19 @@
 void
 ieee80211_csa_completeswitch(struct ieee80211com *ic)
 {
+       struct ieee80211vap *vap;
+
        IEEE80211_LOCK_ASSERT(ic);

        KASSERT(ic->ic_flags & IEEE80211_F_CSAPENDING, ("csa not pending"));

        ieee80211_setcurchan(ic, ic->ic_csa_newchan);
+       /*
+        * ic_curchan now matches ic_csa_newchan;
+        * inform all VAPs of the new channel
+        */
+       TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
+               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?BANLkTimRkak5hNv%2B=y77CGbjX37y0TeVww>