From patchwork Fri Jul 15 23:06:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 980892 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6FN6V1P025586 for ; Fri, 15 Jul 2011 23:06:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753585Ab1GOXG3 (ORCPT ); Fri, 15 Jul 2011 19:06:29 -0400 Received: from c60.cesmail.net ([216.154.195.49]:30594 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753267Ab1GOXG3 (ORCPT ); Fri, 15 Jul 2011 19:06:29 -0400 Received: from unknown (HELO smtprelay1.cesmail.net) ([192.168.1.111]) by c60.cesmail.net with ESMTP; 15 Jul 2011 19:06:28 -0400 Received: from mj.roinet.com (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay1.cesmail.net (Postfix) with ESMTPSA id 5E6D634C8A; Fri, 15 Jul 2011 19:10:24 -0400 (EDT) Subject: [PATCH 1/4] ath: use get_unaligned_le{16,32} in ath_hw_keysetmac() To: ath9k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, "John W. Linville" From: Pavel Roskin Date: Fri, 15 Jul 2011 19:06:27 -0400 Message-ID: <20110715230627.4461.85730.stgit@mj.roinet.com> User-Agent: StGit/0.15-111-g507b MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 15 Jul 2011 23:06:32 +0000 (UTC) Signed-off-by: Pavel Roskin --- drivers/net/wireless/ath/key.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;