Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2008 01:57:25 GMT
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 141164 for review
Message-ID:  <200805050157.m451vP4U009235@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=141164

Change 141164 by thompsa@thompsa_burger on 2008/05/05 01:56:38

	Turn beacon promiscuity off except when scanning. We do not need to see
	other beacons when we are associated and the number of beacons per
	second can get quite high (like in my apartment building :).

Affected files ...

.. //depot/projects/vap/sys/dev/bwi/bwimac.c#6 edit
.. //depot/projects/vap/sys/dev/bwi/if_bwi.c#19 edit

Differences ...

==== //depot/projects/vap/sys/dev/bwi/bwimac.c#6 (text+ko) ====

@@ -1250,7 +1250,6 @@
 
 	CSR_CLRBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_INFRA);
 	CSR_SETBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_INFRA);
-	CSR_SETBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_PASS_BCN);
 
 	/* Set probe resp timeout to infinite */
 	MOBJ_WRITE_2(mac, BWI_COMM_MOBJ, BWI_COMM_MOBJ_PROBE_RESP_TO, 0);
@@ -1262,6 +1261,7 @@
 	mac_status = CSR_READ_4(sc, BWI_MAC_STATUS);
 	mac_status &= ~(BWI_MAC_STATUS_OPMODE_HOSTAP |
 			BWI_MAC_STATUS_PASS_CTL |
+			BWI_MAC_STATUS_PASS_BCN |
 			BWI_MAC_STATUS_PASS_BADPLCP |
 			BWI_MAC_STATUS_PASS_BADFCS |
 			BWI_MAC_STATUS_PROMISC);

==== //depot/projects/vap/sys/dev/bwi/if_bwi.c#19 (text+ko) ====

@@ -1711,6 +1711,12 @@
 static void
 bwi_scan_start(struct ieee80211com *ic)
 {
+	struct bwi_softc *sc = ic->ic_ifp->if_softc;
+
+	BWI_LOCK(sc);
+	/* Enable MAC beacon promiscuity */
+	CSR_SETBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_PASS_BCN);
+	BWI_UNLOCK(sc);
 }
 
 static void
@@ -1742,6 +1748,11 @@
 static void
 bwi_scan_end(struct ieee80211com *ic)
 {
+	struct bwi_softc *sc = ic->ic_ifp->if_softc;
+
+	BWI_LOCK(sc);
+	CSR_CLRBITS_4(sc, BWI_MAC_STATUS, BWI_MAC_STATUS_PASS_BCN);
+	BWI_UNLOCK(sc);
 }
 
 static int


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805050157.m451vP4U009235>