1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-26 11:47:31 +00:00

Add wpi_check_bss_filter()

PR:		kern/197143
Submitted by:	 Andriy Voskoboinyk <s3erios@gmail.com>
This commit is contained in:
Adrian Chadd 2015-05-03 22:34:32 +00:00
parent 205cb272ea
commit 621f1a7594
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282375

View File

@ -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, enum ieee80211_state nstate, int arg)
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 assoc, int async)
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;