From: "Alina Friedrichsen" <x-alina@gmx.net>
To: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
johannes@sipsolutions.net
Subject: [PATCH] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling
Date: Fri, 27 Feb 2009 23:02:15 +0100 [thread overview]
Message-ID: <20090227220215.254900@gmx.net> (raw)
So that a new created IBSS network
doesn't break on the first scan.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath=
9k/hw.c
index 2acbb84..cedf00a 100644
--- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c
@@ -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)
diff --git a/drivers/net/wireless/ath9k/hw.h b/drivers/net/wireless/ath=
9k/hw.h
index 5ec416b..4d930c7 100644
--- a/drivers/net/wireless/ath9k/hw.h
+++ b/drivers/net/wireless/ath9k/hw.h
@@ -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;
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/a=
th9k/main.c
index f5f5739..c0d5336 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2009-02-27 22:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 22:02 Alina Friedrichsen [this message]
2009-02-28 2:01 ` [PATCH] ath9k: Fix FIF_BCN_PRBRESP_PROMISC handling Sujith
2009-02-28 19:19 ` Alina Friedrichsen
-- strict thread matches above, loose matches on Subject: below --
2009-05-06 0:04 Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090227220215.254900@gmx.net \
--to=x-alina@gmx.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).