aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Randolf <bruno@thinktube.com>2008-01-10 15:06:29 +0900
committerJohn W. Linville <linville@tuxdriver.com>2008-01-16 14:34:41 -0500
commit5b8ca29e11b5bc5142c37050c5b397f9969fb96b (patch)
treef3f767c0fec2efb4840b89e360ae1d2b0a8cad2c
parenta523022dce778f3856d9faf3e8854c449cb19ba5 (diff)
downloadwireless-legacy-ath5k-2008-01-21.tar.gz
ath5k: remove duplicate bssid variableath5k-2008-01-21
struct ath5k_hw included two different variables for caching the bssid. remove one of them. drivers/net/wireless/ath5k/ath5k.h: Changes-licensed-under: ISC drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC Signed-off-by: Bruno Randolf <bruno@thinktube.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath5k/ath5k.h8
-rw-r--r--drivers/net/wireless/ath5k/base.c4
-rw-r--r--drivers/net/wireless/ath5k/hw.c7
3 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h
index 52787eaba7f67..878609f1bf398 100644
--- a/drivers/net/wireless/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath5k/ath5k.h
@@ -951,10 +951,6 @@ struct ath5k_hw {
enum ieee80211_if_types ah_op_mode;
enum ath5k_power_mode ah_power_mode;
struct ieee80211_channel ah_current_channel;
- /* Current BSSID we are trying to assoc to / creating, this
- * comes from ieee80211_if_conf. This is passed by mac80211 on
- * config_interface() */
- u8 bssid[ETH_ALEN];
bool ah_turbo;
bool ah_calibration;
bool ah_running;
@@ -991,6 +987,10 @@ struct ath5k_hw {
bool ah_ant_diversity;
u8 ah_sta_id[ETH_ALEN];
+
+ /* Current BSSID we are trying to assoc to / creating.
+ * This is passed by mac80211 on config_interface() and cached here for
+ * use in resets */
u8 ah_bssid[ETH_ALEN];
u32 ah_gpio[AR5K_MAX_GPIO];
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 7a0f11141ee76..d3d37282f3dce 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2566,10 +2566,10 @@ ath5k_config_interface(struct ieee80211_hw *hw, int if_id,
}
if (conf->bssid) {
/* Cache for later use during resets */
- memcpy(ah->bssid, conf->bssid, ETH_ALEN);
+ memcpy(ah->ah_bssid, conf->bssid, ETH_ALEN);
/* XXX: assoc id is set to 0 for now, mac80211 doesn't have
* a clean way of letting us retrieve this yet. */
- ath5k_hw_set_associd(ah, ah->bssid, 0);
+ ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
}
mutex_unlock(&sc->lock);
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 6cfb1b8febef0..5623d7dc738ef 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -262,8 +262,8 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
ath5k_hw_set_lladdr(ah, mac);
/* Set BSSID to bcast address: ff:ff:ff:ff:ff:ff for now */
- memset(ah->bssid, 0xff, ETH_ALEN);
- ath5k_hw_set_associd(ah, ah->bssid, 0);
+ memset(ah->ah_bssid, 0xff, ETH_ALEN);
+ ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
ath5k_hw_set_opmode(ah);
ath5k_hw_set_rfgain_opt(ah);
@@ -865,7 +865,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode,
* Misc
*/
/* XXX: add ah->aid once mac80211 gives this to us */
- ath5k_hw_set_associd(ah, ah->bssid, 0);
+ ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
ath5k_hw_set_opmode(ah);
/*PISR/SISR Not available on 5210*/
@@ -2285,7 +2285,6 @@ void ath5k_hw_set_associd(struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
ath5k_hw_reg_write(ah, low_id, AR5K_BSS_ID0);
ath5k_hw_reg_write(ah, high_id | ((assoc_id & 0x3fff) <<
AR5K_BSS_ID1_AID_S), AR5K_BSS_ID1);
- memcpy(&ah->ah_bssid, bssid, ETH_ALEN);
if (assoc_id == 0) {
ath5k_hw_disable_pspoll(ah);