linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] ath: use get_unaligned_le{16,32} in ath_hw_keysetmac()
@ 2011-07-15 23:06 Pavel Roskin
  2011-07-15 23:06 ` [PATCH 2/4] ath9k: use get_unaligned_{b16, le16, le32} where possible Pavel Roskin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pavel Roskin @ 2011-07-15 23:06 UTC (permalink / raw)
  To: ath9k-devel, linux-wireless, John W. Linville

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 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 a61ef3d6..17b0efd 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,
 		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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-15 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 23:06 [PATCH 1/4] ath: use get_unaligned_le{16,32} in ath_hw_keysetmac() Pavel Roskin
2011-07-15 23:06 ` [PATCH 2/4] ath9k: use get_unaligned_{b16, le16, le32} where possible Pavel Roskin
2011-07-15 23:06 ` [PATCH 3/4] ath9k: remove defines in reg.h that exist in ../reg.h Pavel Roskin
2011-07-15 23:06 ` [PATCH 4/4] ath9k: use ath_opmode_to_string() Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).