diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-10 13:10:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:26 -0400 |
commit | 8c727e70860dab0cf34a68591cd3f2043a9b9757 (patch) | |
tree | c9da40f71f27d56adad1ada6358893b66034664f | |
parent | 1510718d0fd6e20803aac95fe1d8a44846098a34 (diff) |
ar9170: make use of common macaddr and curbssid
These are provided by ath_common.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ar9170/ar9170.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/mac.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h index 914e4718a9a8..c5576eec12ae 100644 --- a/drivers/net/wireless/ath/ar9170/ar9170.h +++ b/drivers/net/wireless/ath/ar9170/ar9170.h | |||
@@ -172,8 +172,6 @@ struct ar9170 { | |||
172 | 172 | ||
173 | /* interface mode settings */ | 173 | /* interface mode settings */ |
174 | struct ieee80211_vif *vif; | 174 | struct ieee80211_vif *vif; |
175 | u8 mac_addr[ETH_ALEN]; | ||
176 | u8 bssid[ETH_ALEN]; | ||
177 | 175 | ||
178 | /* beaconing */ | 176 | /* beaconing */ |
179 | struct sk_buff *beacon; | 177 | struct sk_buff *beacon; |
diff --git a/drivers/net/wireless/ath/ar9170/mac.c b/drivers/net/wireless/ath/ar9170/mac.c index 0c6273a63d6b..ddc8c09dc79e 100644 --- a/drivers/net/wireless/ath/ar9170/mac.c +++ b/drivers/net/wireless/ath/ar9170/mac.c | |||
@@ -311,13 +311,14 @@ static int ar9170_set_promiscouous(struct ar9170 *ar) | |||
311 | 311 | ||
312 | int ar9170_set_operating_mode(struct ar9170 *ar) | 312 | int ar9170_set_operating_mode(struct ar9170 *ar) |
313 | { | 313 | { |
314 | struct ath_common *common = &ar->common; | ||
314 | u32 pm_mode = AR9170_MAC_REG_POWERMGT_DEFAULTS; | 315 | u32 pm_mode = AR9170_MAC_REG_POWERMGT_DEFAULTS; |
315 | u8 *mac_addr, *bssid; | 316 | u8 *mac_addr, *bssid; |
316 | int err; | 317 | int err; |
317 | 318 | ||
318 | if (ar->vif) { | 319 | if (ar->vif) { |
319 | mac_addr = ar->mac_addr; | 320 | mac_addr = common->macaddr; |
320 | bssid = ar->bssid; | 321 | bssid = common->curbssid; |
321 | 322 | ||
322 | switch (ar->vif->type) { | 323 | switch (ar->vif->type) { |
323 | case NL80211_IFTYPE_MESH_POINT: | 324 | case NL80211_IFTYPE_MESH_POINT: |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index c1f8c69db165..81c6cf1135bc 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -1952,6 +1952,7 @@ static int ar9170_op_add_interface(struct ieee80211_hw *hw, | |||
1952 | struct ieee80211_if_init_conf *conf) | 1952 | struct ieee80211_if_init_conf *conf) |
1953 | { | 1953 | { |
1954 | struct ar9170 *ar = hw->priv; | 1954 | struct ar9170 *ar = hw->priv; |
1955 | struct ath_common *common = &ar->common; | ||
1955 | int err = 0; | 1956 | int err = 0; |
1956 | 1957 | ||
1957 | mutex_lock(&ar->mutex); | 1958 | mutex_lock(&ar->mutex); |
@@ -1962,7 +1963,7 @@ static int ar9170_op_add_interface(struct ieee80211_hw *hw, | |||
1962 | } | 1963 | } |
1963 | 1964 | ||
1964 | ar->vif = conf->vif; | 1965 | ar->vif = conf->vif; |
1965 | memcpy(ar->mac_addr, conf->mac_addr, ETH_ALEN); | 1966 | memcpy(common->macaddr, conf->mac_addr, ETH_ALEN); |
1966 | 1967 | ||
1967 | if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) { | 1968 | if (modparam_nohwcrypt || (ar->vif->type != NL80211_IFTYPE_STATION)) { |
1968 | ar->rx_software_decryption = true; | 1969 | ar->rx_software_decryption = true; |
@@ -2131,12 +2132,13 @@ static void ar9170_op_bss_info_changed(struct ieee80211_hw *hw, | |||
2131 | u32 changed) | 2132 | u32 changed) |
2132 | { | 2133 | { |
2133 | struct ar9170 *ar = hw->priv; | 2134 | struct ar9170 *ar = hw->priv; |
2135 | struct ath_common *common = &ar->common; | ||
2134 | int err = 0; | 2136 | int err = 0; |
2135 | 2137 | ||
2136 | mutex_lock(&ar->mutex); | 2138 | mutex_lock(&ar->mutex); |
2137 | 2139 | ||
2138 | if (changed & BSS_CHANGED_BSSID) { | 2140 | if (changed & BSS_CHANGED_BSSID) { |
2139 | memcpy(ar->bssid, bss_conf->bssid, ETH_ALEN); | 2141 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); |
2140 | err = ar9170_set_operating_mode(ar); | 2142 | err = ar9170_set_operating_mode(ar); |
2141 | if (err) | 2143 | if (err) |
2142 | goto out; | 2144 | goto out; |