diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-15 19:06:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-18 14:29:41 -0400 |
commit | d47d78dff4d6d72eec59dcdf0f6dd44064088112 (patch) | |
tree | 0373a20a02e9ef7d0f6120a095129358242d29f5 /drivers/net | |
parent | c54dcd197c3f9a66b60cb85ca50df06981a45211 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/key.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index a61ef3d6d89c..17b0efd86f9a 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c | |||
@@ -105,11 +105,8 @@ static bool ath_hw_keysetmac(struct ath_common *common, | |||
105 | if (mac[0] & 0x01) | 105 | if (mac[0] & 0x01) |
106 | unicast_flag = 0; | 106 | unicast_flag = 0; |
107 | 107 | ||
108 | macHi = (mac[5] << 8) | mac[4]; | 108 | macLo = get_unaligned_le32(mac); |
109 | macLo = (mac[3] << 24) | | 109 | macHi = get_unaligned_le16(mac + 4); |
110 | (mac[2] << 16) | | ||
111 | (mac[1] << 8) | | ||
112 | mac[0]; | ||
113 | macLo >>= 1; | 110 | macLo >>= 1; |
114 | macLo |= (macHi & 1) << 31; | 111 | macLo |= (macHi & 1) << 31; |
115 | macHi >>= 1; | 112 | macHi >>= 1; |