ath: use get_unaligned_le{16,32} in ath_hw_keysetmac()
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
c54dcd197c
commit
d47d78dff4
1 changed files with 2 additions and 5 deletions
|
@ -105,11 +105,8 @@ static bool ath_hw_keysetmac(struct ath_common *common,
|
||||||
if (mac[0] & 0x01)
|
if (mac[0] & 0x01)
|
||||||
unicast_flag = 0;
|
unicast_flag = 0;
|
||||||
|
|
||||||
macHi = (mac[5] << 8) | mac[4];
|
macLo = get_unaligned_le32(mac);
|
||||||
macLo = (mac[3] << 24) |
|
macHi = get_unaligned_le16(mac + 4);
|
||||||
(mac[2] << 16) |
|
|
||||||
(mac[1] << 8) |
|
|
||||||
mac[0];
|
|
||||||
macLo >>= 1;
|
macLo >>= 1;
|
||||||
macLo |= (macHi & 1) << 31;
|
macLo |= (macHi & 1) << 31;
|
||||||
macHi >>= 1;
|
macHi >>= 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue