Commit bb78c71d authored by Pavel Roskin's avatar Pavel Roskin Committed by John W. Linville

ath5k: use get_unaligned_le32() in ath5k_write_pwr_to_pdadc_table()

Signed-off-by: default avatarPavel Roskin <proski@gnu.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c5f3f45c
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/unaligned.h>
#include "ath5k.h" #include "ath5k.h"
#include "reg.h" #include "reg.h"
...@@ -2794,12 +2795,8 @@ ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode) ...@@ -2794,12 +2795,8 @@ ath5k_write_pwr_to_pdadc_table(struct ath5k_hw *ah, u8 ee_mode)
* Write TX power values * Write TX power values
*/ */
for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) {
ath5k_hw_reg_write(ah, u32 val = get_unaligned_le32(&pdadc_out[4 * i]);
((pdadc_out[4 * i + 0] & 0xff) << 0) | ath5k_hw_reg_write(ah, val, AR5K_PHY_PDADC_TXPOWER(i));
((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));
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment