From owner-p4-projects@FreeBSD.ORG Mon May 5 01:57:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 909221065682; Mon, 5 May 2008 01:57:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52D721065672 for ; Mon, 5 May 2008 01:57:25 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 33D1F8FC26 for ; Mon, 5 May 2008 01:57:25 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m451vPrB009237 for ; Mon, 5 May 2008 01:57:25 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m451vP4U009235 for perforce@freebsd.org; Mon, 5 May 2008 01:57:25 GMT (envelope-from thompsa@freebsd.org) Date: Mon, 5 May 2008 01:57:25 GMT Message-Id: <200805050157.m451vP4U009235@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 141164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2008 01:57:25 -0000 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