Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122473
b: refs/heads/master
c: f6bac3e
h: refs/heads/master
i:
  122471: 34bc261
v: v3
  • Loading branch information
Bob Copeland authored and John W. Linville committed Dec 5, 2008
1 parent f4a2101 commit 445e665
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51e9bf5d795b8e01e54391f1790974c7b166d286
refs/heads/master: f6bac3ea5990653765700b2c3778b08782abebe5
9 changes: 4 additions & 5 deletions trunk/drivers/net/wireless/ath5k/pcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,24 +267,23 @@ void ath5k_hw_get_lladdr(struct ath5k_hw *ah, u8 *mac)
* @mac: The card's mac address
*
* Set station id on hw using the provided mac address
*
* NOTE: This is only called during attach, don't call it
* on reset because it overwrites all AR5K_STA_ID1 settings.
* We have set_opmode (above) for reset.
*/
int ath5k_hw_set_lladdr(struct ath5k_hw *ah, const u8 *mac)
{
u32 low_id, high_id;
u32 pcu_reg;

ATH5K_TRACE(ah->ah_sc);
/* Set new station ID */
memcpy(ah->ah_sta_id, mac, ETH_ALEN);

pcu_reg = ath5k_hw_reg_read(ah, AR5K_STA_ID1) & 0xffff0000;

low_id = AR5K_LOW_ID(mac);
high_id = AR5K_HIGH_ID(mac);

ath5k_hw_reg_write(ah, low_id, AR5K_STA_ID0);
ath5k_hw_reg_write(ah, high_id, AR5K_STA_ID1);
ath5k_hw_reg_write(ah, pcu_reg | high_id, AR5K_STA_ID1);

return 0;
}
Expand Down

0 comments on commit 445e665

Please sign in to comment.