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>
This commit is contained in:

committed by
John W. Linville

parent
17753748e1
commit
bcd8f54a84
@@ -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);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user