ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
PATCH 1/1 ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
So that a new created IBSS network
doesn't break on the first scan.
---
drivers/net/wireless/ath= renamed from drivers/net/wireless/ath9k/hw.c +0 -0
9k/hw.c
index 2acbb84..cedf00a 100644
drivers/net/wireless/ath9k/hw.c +0 -0
@@ -3696,9 +3696,18 @@ void ath9k_hw_setbssidmask(struct ath_softc *sc)
=20
void ath9k_hw_write_associd(struct ath_softc *sc) {
- REG_WRITE(sc->sc_ah, AR_BSS_ID0, get_unaligned_le32(sc->curbssid));
- REG_WRITE(sc->sc_ah, AR_BSS_ID1, get_unaligned_le16(sc->curbssid + 4)=
|
- ((sc->curaid & 0x3fff) << AR_BSS_ID1_AID_S));
+ const u8 *curbssid =3D sc->curbssid;
+ u16 curaid =3D sc->curaid;
+
+ /* implement FIF_BCN_PRBRESP_PROMISC handling */
+ if(sc->sc_ah->bcn_prbresp_promisc) {
+ curbssid =3D ath_bcast_mac;
+ curaid =3D 0;
+ }
+
+ REG_WRITE(sc->sc_ah, AR_BSS_ID0, get_unaligned_le32(curbssid));
+ REG_WRITE(sc->sc_ah, AR_BSS_ID1, get_unaligned_le16(curbssid + 4) |
+ ((curaid & 0x3fff) << AR_BSS_ID1_AID_S));
}
=20
u64 ath9k_hw_gettsf64(struct ath_hw *ah)
drivers/net/wireless/ath= renamed from drivers/net/wireless/ath9k/hw.h +0 -0
9k/hw.h
index 5ec416b..4d930c7 100644
drivers/net/wireless/ath9k/hw.h +1 -0
@@ -441,6 +441,7 @@ struct ath_hw {u32 btactive_gpio;u32 wlanactive_gpio;u32 ah_flags; +bool bcn_prbresp_promisc;
=20
enum nl80211_iftype opmode;
enum ath9k_power_mode power_mode;
drivers/net/wireless/a= renamed from drivers/net/wireless/ath9k/main.c +0 -0
th9k/main.c
index f5f5739..c0d5336 100644
drivers/net/wireless/ath9k/main.c +0 -0
@@ -2397,11 +2397,12 @@ static void ath9k_configure_filter(struct ieee8=
0211_hw *hw,
ath9k_hw_setrxfilter(sc->sc_ah, rfilt);
=20
if (changed_flags & FIF_BCN_PRBRESP_PROMISC) {
- if (*total_flags & FIF_BCN_PRBRESP_PROMISC) {
- memcpy(sc->curbssid, ath_bcast_mac, ETH_ALEN);
- sc->curaid =3D 0;
- ath9k_hw_write_associd(sc);
- }
+ if (*total_flags & FIF_BCN_PRBRESP_PROMISC)
+ sc->sc_ah->bcn_prbresp_promisc =3D true;
+ else
+ sc->sc_ah->bcn_prbresp_promisc =3D false;
+
+ ath9k_hw_write_associd(sc);
}
=20
DPRINTF(sc, ATH_DBG_CONFIG, "Set HW RX filter: 0x%x\n", sc->rx.rxfilt=
er);
--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
Quoted 22 lines · Alina Friedrichsen
drivers/net/wireless/ath9k/hw.h +1
-0@@ -441,6 +441,7 @@ struct ath_hw {u32 btactive_gpio;u32 wlanactive_gpio;u32 ah_flags; +bool bcn_prbresp_promisc;enum nl80211_iftype opmode;enum ath9k_power_mode power_mode;drivers/net/wireless/ath9k/main.c +0
-2@@ -2397,11 +2397,12 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw,ath9k_hw_setrxfilter (sc->sc_ah, rfilt);if (changed_flags &FIF_BCN_PRBRESP_PROMISC ) { -if (*total_flags &FIF_BCN_PRBRESP_PROMISC ) { -memcpy (sc->curbssid, ath_bcast_mac,ETH_ALEN );
drivers/net/wireless/ath9k/main.c static void ath9k_configure_filter(struct ieee80211_hw *hw, · line 2406
Quoted 10 lines
drivers/net/wireless/ath9k/main.c +6
-3- sc->curaid =0 ; -ath9k_hw_write_associd (sc); - } +if (*total_flags &FIF_BCN_PRBRESP_PROMISC ) + sc->sc_ah->bcn_prbresp_promisc = true; +else + sc->sc_ah->bcn_prbresp_promisc = false; + +ath9k_hw_write_associd (sc); }
You don't need a new variable in ath_hal. The RX filter is already cached in ath_softc during a configure_filter() call.
Sujith
Hallo Sujith!
Quoted 1 line
You don't need a new variable in
ath_hal. The RX filter is already ca=
ched
Quoted 2 lines
in
ath_softcduring aconfigure_filter()call.
I'm asking currently myself, if this code needed at all? Or can it comp= letely removed?
Sending and receiving probe requests and responses works without it, to= o. What is the need for this code?
Regards
Alina
--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html