diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-21 13:36:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-22 09:51:16 -0400 |
commit | bb78c71d6c6947322a701580df7865409032dbf6 (patch) | |
tree | 1687d258fd2e525460f4ba0840f8b4c96c496a33 | |
parent | c5f3f45c4934d7e7dc266092debe88628d2cbb5d (diff) |
ath5k: use get_unaligned_le32() in ath5k_write_pwr_to_pdadc_table()
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index a0c66cfe862f..81e465e70175 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
25 | #include <asm/unaligned.h> | ||
25 | 26 | ||
26 | #include "ath5k.h" | 27 | #include "ath5k.h" |
27 | #include "reg.h" | 28 | #include "reg.h" |
@@ -2794,12 +2795,8 @@ ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode) | |||
2794 | * Write TX power values | 2795 | * Write TX power values |
2795 | */ | 2796 | */ |
2796 | for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { | 2797 | for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { |
2797 | ath5k_hw_reg_write(ah, | 2798 | u32 val = get_unaligned_le32(&pdadc_out[4 * i]); |
2798 | ((pdadc_out[4 * i + 0] & 0xff) << 0) | | 2799 | ath5k_hw_reg_write(ah, val, AR5K_PHY_PDADC_TXPOWER(i)); |
2799 | ((pdadc_out[4 * i + 1] & 0xff) << 8) | | ||
2800 | ((pdadc_out[4 * i + 2] & 0xff) << 16) | | ||
2801 | ((pdadc_out[4 * i + 3] & 0xff) << 24), | ||
2802 | AR5K_PHY_PDADC_TXPOWER(i)); | ||
2803 | } | 2800 | } |
2804 | } | 2801 | } |
2805 | 2802 | ||