ath5k: remove duplicate bssid variable 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>
diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h index 52787ea..878609f 100644 --- a/drivers/net/wireless/ath5k/ath5k.h +++ b/drivers/net/wireless/ath5k/ath5k.h
@@ -951,10 +951,6 @@ 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 @@ 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 7a0f111..d3d3728 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c
@@ -2566,10 +2566,10 @@ } 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 6cfb1b8..5623d7d 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c
@@ -262,8 +262,8 @@ 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 @@ * 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 @@ 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);