From patchwork Thu Jul 21 17:36:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Roskin X-Patchwork-Id: 996192 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 p6LHaucF030012 for ; Thu, 21 Jul 2011 17:36:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753430Ab1GURgp (ORCPT ); Thu, 21 Jul 2011 13:36:45 -0400 Received: from c60.cesmail.net ([216.154.195.49]:24939 "EHLO c60.cesmail.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753427Ab1GURgo (ORCPT ); Thu, 21 Jul 2011 13:36:44 -0400 Received: from unknown (HELO smtprelay1.cesmail.net) ([192.168.1.111]) by c60.cesmail.net with ESMTP; 21 Jul 2011 13:36:44 -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 5DEA634C8A; Thu, 21 Jul 2011 13:41:04 -0400 (EDT) Subject: [PATCH 3/3] ath5k: use get_unaligned_le32() in ath5k_write_pwr_to_pdadc_table() To: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org, "John W. Linville" From: Pavel Roskin Date: Thu, 21 Jul 2011 13:36:42 -0400 Message-ID: <20110721173642.30989.45021.stgit@mj.roinet.com> In-Reply-To: <20110721173628.30989.19587.stgit@mj.roinet.com> References: <20110721173628.30989.19587.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]); Thu, 21 Jul 2011 17:36:56 +0000 (UTC) Signed-off-by: Pavel Roskin --- drivers/net/wireless/ath/ath5k/phy.c | 9 +++------ 1 files changed, 3 insertions(+), 6 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/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index a0c66cf..81e465e 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -22,6 +22,7 @@ #include #include +#include #include "ath5k.h" #include "reg.h" @@ -2794,12 +2795,8 @@ ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode) * Write TX power values */ for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { - ath5k_hw_reg_write(ah, - ((pdadc_out[4 * i + 0] & 0xff) << 0) | - ((pdadc_out[4 * i + 1] & 0xff) << 8) | - ((pdadc_out[4 * i + 2] & 0xff) << 16) | - ((pdadc_out[4 * i + 3] & 0xff) << 24), - AR5K_PHY_PDADC_TXPOWER(i)); + u32 val = get_unaligned_le32(&pdadc_out[4 * i]); + ath5k_hw_reg_write(ah, val, AR5K_PHY_PDADC_TXPOWER(i)); } }