PERFORCE change 141164 for review

Andrew Thompson thompsa at FreeBSD.org
Mon May 5 01:57:25 UTC 2008


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

Change 141164 by thompsa at 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


More information about the p4-projects mailing list