ath: use get_unaligned_le{16,32} in ath_hw_keysetmac()
authorPavel Roskin <proski@gnu.org>
Fri, 15 Jul 2011 23:06:27 +0000 (19:06 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 18 Jul 2011 18:29:41 +0000 (14:29 -0400)
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/key.c

index a61ef3d6d89c7ee50da52b9602071dd88bb9eb5b..17b0efd86f9a49d7b5e049e950a9fcf7802ddaad 100644 (file)
@@ -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;
This page took 0.027139 seconds and 5 git commands to generate.