Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Sep 2011 06:01:06 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        bschmidt@freebsd.org
Cc:        freebsd-wireless@freebsd.org
Subject:   Fwd: [PATCH: iwn(4)] Fix channel switching in monitor mode
Message-ID:  <CAJ-VmonCz2jpGJf0cuknbmnMUekeyF=mc_prLdnz4HJPGmortg@mail.gmail.com>
In-Reply-To: <20110916173745.GA42502@triton8.kn-bremen.de>
References:  <20110916173745.GA42502@triton8.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
---------- Forwarded message ----------
From: Juergen Lock <nox@jelal.kn-bremen.de>
Date: 17 September 2011 01:37
Subject: [PATCH: iwn(4)] Fix channel switching in monitor mode
To: freebsd-current@freebsd.org
Cc: freebsd-mobile@freebsd.org


Hi!

=A0I just got a "Centrino Advanced-N 6230" half-size mini-pcie card
(using iwn6000g2bfw.ko firmware, my Dell Precision M4500 laptop
came with an unsupported Broadcom BCM4313:

=A0 =A0 =A0 =A0https://laptop.bsdgroup.de/freebsd/index.html?action=3Dshow_=
laptop_detail&laptop=3D13061

), and found channel switching didn't work in monitor mode, the
patch below seems to fix it - also at:

=A0 =A0 =A0 =A0http://people.freebsd.org/~nox/tmp/patch-iwn-channel-monitor=
.txt

=A0(I also applied the two patches from the `"Intel Centrino Advanced-N +
WiMAX 6250" doesn't work' thread tho I'm not 100% sure they are needed
for this nic:

=A0 =A0 =A0 =A0http://markmail.org/message/exik7phjs2j7pnsi

and

=A0 =A0 =A0 =A0http://docs.freebsd.org/cgi/mid.cgi?CAAgh0_bL7K3PZVAZxPV8Jwd=
hnopOvdRp0Z+xHU-CfGba5bz1Kw

)

=A0And here is the channel switching patch:

--- src/sys/dev/iwn/if_iwn.c.orig
+++ src/sys/dev/iwn/if_iwn.c
@@ -6984,12 +6984,24 @@ iwn_set_channel(struct ieee80211com *ic)
=A0 =A0 =A0 =A0const struct ieee80211_channel *c =3D ic->ic_curchan;
=A0 =A0 =A0 =A0struct ifnet *ifp =3D ic->ic_ifp;
=A0 =A0 =A0 =A0struct iwn_softc *sc =3D ifp->if_softc;
+ =A0 =A0 =A0 int error;

=A0 =A0 =A0 =A0IWN_LOCK(sc);
=A0 =A0 =A0 =A0sc->sc_rxtap.wr_chan_freq =3D htole16(c->ic_freq);
=A0 =A0 =A0 =A0sc->sc_rxtap.wr_chan_flags =3D htole16(c->ic_flags);
=A0 =A0 =A0 =A0sc->sc_txtap.wt_chan_freq =3D htole16(c->ic_freq);
=A0 =A0 =A0 =A0sc->sc_txtap.wt_chan_flags =3D htole16(c->ic_flags);
+
+ =A0 =A0 =A0 /*
+ =A0 =A0 =A0 =A0* Only need to set the channel in Monitor mode. AP scannin=
g and auth
+ =A0 =A0 =A0 =A0* are already taken care of by their respective firmware c=
ommands.
+ =A0 =A0 =A0 =A0*/
+ =A0 =A0 =A0 if (ic->ic_opmode =3D=3D IEEE80211_M_MONITOR) {
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D iwn_config(sc);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (error !=3D 0)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 device_printf(sc->sc_dev,
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "error %d settting ch=
annel\n", error);
+ =A0 =A0 =A0 }
=A0 =A0 =A0 =A0IWN_UNLOCK(sc);
=A0}

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonCz2jpGJf0cuknbmnMUekeyF=mc_prLdnz4HJPGmortg>