Skip to content

Commit

Permalink
ath: use get_unaligned_le{16,32} in ath_hw_keysetmac()
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Pavel Roskin authored and John W. Linville committed Jul 18, 2011
1 parent c54dcd1 commit d47d78d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/wireless/ath/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,8 @@ static bool ath_hw_keysetmac(struct ath_common *common,
if (mac[0] & 0x01)
unicast_flag = 0;

macHi = (mac[5] << 8) | mac[4];
macLo = (mac[3] << 24) |
(mac[2] << 16) |
(mac[1] << 8) |
mac[0];
macLo = get_unaligned_le32(mac);
macHi = get_unaligned_le16(mac + 4);
macLo >>= 1;
macLo |= (macHi & 1) << 31;
macHi >>= 1;
Expand Down

0 comments on commit d47d78d

Please sign in to comment.