diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-04-16 14:51:56 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-22 23:20:15 +0400 |
commit | ecbbed32e7c2ad7d9a6305b02e11502b51f2605c (patch) | |
tree | 0645e1b463290d14376580cec10631879527998c /drivers/net/wireless/ath/hw.c | |
parent | 703a4e5521dcd6624a8740c5be597c4fc8e4b9bb (diff) | |
download | linux-ecbbed32e7c2ad7d9a6305b02e11502b51f2605c.tar.xz |
ath: update hardware mac address with bssid mask
Preparation for updating common->macaddr along with virtual interface
MAC address changes.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/hw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c index 39e8a590d7fc..eae9abf540a7 100644 --- a/drivers/net/wireless/ath/hw.c +++ b/drivers/net/wireless/ath/hw.c @@ -118,6 +118,12 @@ void ath_hw_setbssidmask(struct ath_common *common) { void *ah = common->ah; + u32 id1; + + REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr)); + id1 = REG_READ(ah, AR_STA_ID1) & ~AR_STA_ID1_SADH_MASK; + id1 |= get_unaligned_le16(common->macaddr + 4); + REG_WRITE(ah, AR_STA_ID1, id1); REG_WRITE(ah, AR_BSSMSKL, get_unaligned_le32(common->bssidmask)); REG_WRITE(ah, AR_BSSMSKU, get_unaligned_le16(common->bssidmask + 4)); |