From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 16 22:01:08 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F836106564A; Fri, 16 Sep 2011 22:01:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id B12FB8FC08; Fri, 16 Sep 2011 22:01:07 +0000 (UTC) Received: by gxk28 with SMTP id 28so4519803gxk.13 for ; Fri, 16 Sep 2011 15:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WOg9K5tAs6yh9P2jGoB20eCralZnar9d79fRw+NK7no=; b=mjpltUpraPG5dXHowksOvy1cQhKa7U88Yuq0/Ct3AKnf94x0bv4V9L2DVZIXQw2eqJ /tdaOAEzU7MsPK1iQ8RhtFWCWbcO5KzjhFlsXYL8ojxmgZ/O/id6ZHy/iW/TGzm55xB0 7a4Kca7A/lK0T2Co678GZ+QRD9Ln0fC0M+YDQ= MIME-Version: 1.0 Received: by 10.236.185.195 with SMTP id u43mr18091462yhm.106.1316210466454; Fri, 16 Sep 2011 15:01:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.111.42 with HTTP; Fri, 16 Sep 2011 15:01:06 -0700 (PDT) In-Reply-To: <20110916173745.GA42502@triton8.kn-bremen.de> References: <20110916173745.GA42502@triton8.kn-bremen.de> Date: Sat, 17 Sep 2011 06:01:06 +0800 X-Google-Sender-Auth: 65y9vSR5VjftRk-Tnnt7ikeiAPU Message-ID: From: Adrian Chadd To: bschmidt@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org Subject: Fwd: [PATCH: iwn(4)] Fix channel switching in monitor mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Sep 2011 22:01:08 -0000 ---------- Forwarded message ---------- From: Juergen Lock 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"