svn commit: r282375 - head/sys/dev/wpi
Adrian Chadd
adrian at FreeBSD.org
Sun May 3 22:34:33 UTC 2015
Author: adrian
Date: Sun May 3 22:34:32 2015
New Revision: 282375
URL: https://svnweb.freebsd.org/changeset/base/282375
Log:
Add wpi_check_bss_filter()
PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios at gmail.com>
Modified:
head/sys/dev/wpi/if_wpi.c
Modified: head/sys/dev/wpi/if_wpi.c
==============================================================================
--- head/sys/dev/wpi/if_wpi.c Sun May 3 22:32:45 2015 (r282374)
+++ head/sys/dev/wpi/if_wpi.c Sun May 3 22:34:32 2015 (r282375)
@@ -1651,6 +1651,12 @@ wpi_node_free(struct ieee80211_node *ni)
sc->sc_node_free(ni);
}
+static __inline int
+wpi_check_bss_filter(struct wpi_softc *sc)
+{
+ return (sc->rxon.filter & htole32(WPI_FILTER_BSS)) != 0;
+}
+
/**
* Called by net80211 when ever there is a change to 80211 state machine
*/
@@ -1681,7 +1687,7 @@ wpi_newstate(struct ieee80211vap *vap, e
switch (nstate) {
case IEEE80211_S_SCAN:
WPI_RXON_LOCK(sc);
- if ((sc->rxon.filter & htole32(WPI_FILTER_BSS)) &&
+ if (wpi_check_bss_filter(sc) != 0 &&
vap->iv_opmode != IEEE80211_M_STA) {
sc->rxon.filter &= ~htole32(WPI_FILTER_BSS);
if ((error = wpi_send_rxon(sc, 0, 1)) != 0) {
@@ -1749,7 +1755,7 @@ wpi_calib_timeout(void *arg)
{
struct wpi_softc *sc = arg;
- if (!(sc->rxon.filter & htole32(WPI_FILTER_BSS)))
+ if (wpi_check_bss_filter(sc) == 0)
return;
wpi_power_calibration(sc);
@@ -3642,7 +3648,7 @@ wpi_send_rxon(struct wpi_softc *sc, int
if (async)
WPI_RXON_LOCK_ASSERT(sc);
- if (assoc && (sc->rxon.filter & htole32(WPI_FILTER_BSS))) {
+ if (assoc && wpi_check_bss_filter(sc) != 0) {
struct wpi_assoc rxon_assoc;
rxon_assoc.flags = sc->rxon.flags;
More information about the svn-src-all
mailing list