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
@@ -35,6 +35,9 @@
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "ar9170.h"
|
||||
#include "cmd.h"
|
||||
|
||||
@@ -227,11 +230,8 @@ static int ar9170_set_mac_reg(struct ar9170 *ar, const u32 reg, const u8 *mac)
|
||||
|
||||
ar9170_regwrite_begin(ar);
|
||||
|
||||
ar9170_regwrite(reg,
|
||||
(mac[3] << 24) | (mac[2] << 16) |
|
||||
(mac[1] << 8) | mac[0]);
|
||||
|
||||
ar9170_regwrite(reg + 4, (mac[5] << 8) | mac[4]);
|
||||
ar9170_regwrite(reg, get_unaligned_le32(mac));
|
||||
ar9170_regwrite(reg + 4, get_unaligned_le16(mac + 4));
|
||||
|
||||
ar9170_regwrite_finish();
|
||||
|
||||
|
Reference in New Issue
Block a user