diff options
-rw-r--r-- | drivers/net/wireless/ath5k/pcu.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c index d7f0c1017bda..79879f2d426c 100644 --- a/drivers/net/wireless/ath5k/pcu.c +++ b/drivers/net/wireless/ath5k/pcu.c | |||
@@ -267,24 +267,23 @@ void ath5k_hw_get_lladdr(struct ath5k_hw *ah, u8 *mac) | |||
267 | * @mac: The card's mac address | 267 | * @mac: The card's mac address |
268 | * | 268 | * |
269 | * Set station id on hw using the provided mac address | 269 | * Set station id on hw using the provided mac address |
270 | * | ||
271 | * NOTE: This is only called during attach, don't call it | ||
272 | * on reset because it overwrites all AR5K_STA_ID1 settings. | ||
273 | * We have set_opmode (above) for reset. | ||
274 | */ | 270 | */ |
275 | int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac) | 271 | int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac) |
276 | { | 272 | { |
277 | u32 low_id, high_id; | 273 | u32 low_id, high_id; |
274 | u32 pcu_reg; | ||
278 | 275 | ||
279 | ATH5K_TRACE(ah->ah_sc); | 276 | ATH5K_TRACE(ah->ah_sc); |
280 | /* Set new station ID */ | 277 | /* Set new station ID */ |
281 | memcpy(ah->ah_sta_id, mac, ETH_ALEN); | 278 | memcpy(ah->ah_sta_id, mac, ETH_ALEN); |
282 | 279 | ||
280 | pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000; | ||
281 | |||
283 | low_id = AR5K_LOW_ID(mac); | 282 | low_id = AR5K_LOW_ID(mac); |
284 | high_id = AR5K_HIGH_ID(mac); | 283 | high_id = AR5K_HIGH_ID(mac); |
285 | 284 | ||
286 | ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0); | 285 | ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0); |
287 | ath5k_hw_reg_write(ah, high_id, AR5K_STA_ID1); | 286 | ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1); |
288 | 287 | ||
289 | return 0; | 288 | return 0; |
290 | } | 289 | } |