summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/reset.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-09 22:43:17 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:25 -0400
commitbcd8f54a84ce99ade91c250a9bc850a9fd3389c1 (patch)
treeb17a29b781c0ea56f567d18f45e2d0cdc29bada2 /drivers/net/wireless/ath/ath5k/reset.c
parent17753748e15eaf29c8db15c5c05b8dde5db6e64d (diff)
atheros: use get_unaligned_le*() for bssid mask setting
Historically some macro helpers have been users for this, AR5K_LOW_ID() and AR5K_HIGH_ID(), use upstream unaligned helpers instead. This applid to ath5k and ar9170. ath9k already uses this. Worth noting is ath5k uses an ah_sta_id but that is already the MAC address combined with the associaiton ID, ah_sta_id is really ETH_ALEN in size. Cc: Bob Copeland <me@bobcopeland.com> Cc: Nick Kossifidis <mick@madwifi-project.org> Cc: Christian Lamparter <chunkeey@web.de> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/reset.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/reset.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index 34e13c700849..3454dacc2af8 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -25,6 +25,8 @@
Reset functions and helpers
\*****************************/
+#include <asm/unaligned.h>
+
#include <linux/pci.h> /* To determine if a card is pci-e */
#include <linux/log2.h>
#include "ath5k.h"
@@ -1171,9 +1173,9 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
ath5k_hw_reg_write(ah, s_led[2], AR5K_GPIODO);
/* Restore sta_id flags and preserve our mac address*/
- ath5k_hw_reg_write(ah, AR5K_LOW_ID(ah->ah_sta_id),
+ ath5k_hw_reg_write(ah, get_unaligned_le32(ah->ah_sta_id),
AR5K_STA_ID0);
- ath5k_hw_reg_write(ah, staid1_flags | AR5K_HIGH_ID(ah->ah_sta_id),
+ ath5k_hw_reg_write(ah, staid1_flags | get_unaligned_le16(ah->ah_sta_id),
AR5K_STA_ID1);