From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org,
devel@linuxdriverproject.org,
"Luis R. Rodriguez" <lrodriguez@atheros.com>
Subject: [PATCH 01/10] ath9k: make ath9k_hw_setbssidmask() and ath9k_hw_write_associd() use ath_hw
Date: Thu, 10 Sep 2009 15:30:18 -0400 [thread overview]
Message-ID: <1252611027-5285-2-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1252611027-5285-1-git-send-email-lrodriguez@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 14 +++++++-------
drivers/net/wireless/ath/ath9k/hw.h | 4 ++--
drivers/net/wireless/ath/ath9k/main.c | 11 ++++++-----
drivers/net/wireless/ath/ath9k/recv.c | 2 +-
drivers/net/wireless/ath/ath9k/virtual.c | 2 +-
5 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index eeaf77a..f7aaaa1 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3984,17 +3984,17 @@ void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1)
REG_WRITE(ah, AR_MCAST_FIL1, filter1);
}
-void ath9k_hw_setbssidmask(struct ath_softc *sc)
+void ath9k_hw_setbssidmask(struct ath_hw *ah)
{
- REG_WRITE(sc->sc_ah, AR_BSSMSKL, get_unaligned_le32(sc->bssidmask));
- REG_WRITE(sc->sc_ah, AR_BSSMSKU, get_unaligned_le16(sc->bssidmask + 4));
+ REG_WRITE(ah, AR_BSSMSKL, get_unaligned_le32(ah->ah_sc->bssidmask));
+ REG_WRITE(ah, AR_BSSMSKU, get_unaligned_le16(ah->ah_sc->bssidmask + 4));
}
-void ath9k_hw_write_associd(struct ath_softc *sc)
+void ath9k_hw_write_associd(struct ath_hw *ah)
{
- 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));
+ REG_WRITE(ah, AR_BSS_ID0, get_unaligned_le32(ah->ah_sc->curbssid));
+ REG_WRITE(ah, AR_BSS_ID1, get_unaligned_le16(ah->ah_sc->curbssid + 4) |
+ ((ah->ah_sc->curaid & 0x3fff) << AR_BSS_ID1_AID_S));
}
u64 ath9k_hw_gettsf64(struct ath_hw *ah)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 421d2ba..d7b2a35 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -641,8 +641,8 @@ void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit);
void ath9k_hw_setmac(struct ath_hw *ah, const u8 *mac);
void ath9k_hw_setopmode(struct ath_hw *ah);
void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1);
-void ath9k_hw_setbssidmask(struct ath_softc *sc);
-void ath9k_hw_write_associd(struct ath_softc *sc);
+void ath9k_hw_setbssidmask(struct ath_hw *ah);
+void ath9k_hw_write_associd(struct ath_hw *ah);
u64 ath9k_hw_gettsf64(struct ath_hw *ah);
void ath9k_hw_settsf64(struct ath_hw *ah, u64 tsf64);
void ath9k_hw_reset_tsf(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 94ef651..0eeb514 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -975,14 +975,15 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
{
+ struct ath_hw *ah = sc->sc_ah;
if (bss_conf->assoc) {
- DPRINTF(sc->sc_ah, ATH_DBG_CONFIG, "Bss Info ASSOC %d, bssid: %pM\n",
+ DPRINTF(ah, ATH_DBG_CONFIG, "Bss Info ASSOC %d, bssid: %pM\n",
bss_conf->aid, sc->curbssid);
/* New association, store aid */
sc->curaid = bss_conf->aid;
- ath9k_hw_write_associd(sc);
+ ath9k_hw_write_associd(ah);
/*
* Request a re-configuration of Beacon related timers
@@ -999,7 +1000,7 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
ath_start_ani(sc);
} else {
- DPRINTF(sc->sc_ah, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
+ DPRINTF(ah, ATH_DBG_CONFIG, "Bss Info DISASSOC\n");
sc->curaid = 0;
/* Stop ANI */
del_timer_sync(&sc->ani.timer);
@@ -2807,7 +2808,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
ath9k_hw_setopmode(ah);
memcpy(sc->curbssid, sc->sc_ah->macaddr, ETH_ALEN);
sc->curaid = 0;
- ath9k_hw_write_associd(sc);
+ ath9k_hw_write_associd(ah);
/* Request full reset to get hw opmode changed properly */
sc->sc_flags |= SC_OP_FULL_RESET;
}
@@ -2822,7 +2823,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
memcpy(sc->curbssid, bss_conf->bssid, ETH_ALEN);
memcpy(avp->bssid, bss_conf->bssid, ETH_ALEN);
sc->curaid = 0;
- ath9k_hw_write_associd(sc);
+ ath9k_hw_write_associd(ah);
/* Set aggregation protection mode parameters */
sc->config.ath_aggr_prot = 0;
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index ee1e8b4..529cab6 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -280,7 +280,7 @@ static void ath_opmode_init(struct ath_softc *sc)
/* configure bssid mask */
if (ah->caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
- ath9k_hw_setbssidmask(sc);
+ ath9k_hw_setbssidmask(ah);
/* configure operational mode */
ath9k_hw_setopmode(ah);
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c
index 19b88f8..52becd3 100644
--- a/drivers/net/wireless/ath/ath9k/virtual.c
+++ b/drivers/net/wireless/ath/ath9k/virtual.c
@@ -93,7 +93,7 @@ void ath9k_set_bssid_mask(struct ieee80211_hw *hw)
sc->bssidmask[4] = ~mask[4];
sc->bssidmask[5] = ~mask[5];
- ath9k_hw_setbssidmask(sc);
+ ath9k_hw_setbssidmask(sc->sc_ah);
}
int ath9k_wiphy_add(struct ath_softc *sc)
--
1.6.3.3
next prev parent reply other threads:[~2009-09-10 19:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-10 19:30 [PATCH 00/10] atheros: expand common helpers Luis R. Rodriguez
2009-09-10 19:30 ` Luis R. Rodriguez [this message]
2009-09-10 19:30 ` [PATCH 02/10] ath9k: Use ath9k_hw_setbssidmask() on reset Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 03/10] ath9k: use ath9k_hw_write_associd() " Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 04/10] atheros/ath9k: move macaddr, curaid, curbssid and bssidmask to common Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 05/10] ar9170: make use of common macaddr and curbssid Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 06/10] ath5k: use common curbssid, bssidmask and macaddr Luis R. Rodriguez
2009-09-11 6:20 ` Nick Kossifidis
2009-09-10 19:30 ` [PATCH 07/10] ath5k: initialize eeprom struct early on attach Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 08/10] ath9k: move ath_common to ath_hw Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 09/10] ath5k: move ath_common to ath5k_hw Luis R. Rodriguez
2009-09-10 19:30 ` [PATCH 10/10] ath9k: Define bus agnostic bluetooth coex prep helper 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=1252611027-5285-2-git-send-email-lrodriguez@atheros.com \
--to=lrodriguez@atheros.com \
--cc=ath9k-devel@lists.ath9k.org \
--cc=devel@linuxdriverproject.org \
--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