mac80211: add support for AR9550
[openwrt/staging/yousong.git] / package / mac80211 / patches / 580-ath9k-fix-XPABIASLEVEL-settings-for-AR9550.patch
1 From a317eaa189d885e53400dc86c131390be17fd760 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Mon, 2 Jul 2012 17:15:58 +0200
4 Subject: [PATCH 11/20] ath9k: fix XPABIASLEVEL settings for AR9550
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
8 ---
9 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
10 drivers/net/wireless/ath/ath9k/ar9003_phy.h | 4 ++--
11 2 files changed, 3 insertions(+), 3 deletions(-)
12
13 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
14 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
15 @@ -3519,7 +3519,7 @@ static void ar9003_hw_xpa_bias_level_app
16
17 if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
18 REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
19 - else if (AR_SREV_9462(ah))
20 + else if (AR_SREV_9462(ah) || AR_SREV_9550(ah))
21 REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
22 else {
23 REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
24 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
25 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
26 @@ -636,8 +636,8 @@
27
28 #define AR_CH0_TOP (AR_SREV_9300(ah) ? 0x16288 : \
29 ((AR_SREV_9462(ah) ? 0x1628c : 0x16280)))
30 -#define AR_CH0_TOP_XPABIASLVL (0x300)
31 -#define AR_CH0_TOP_XPABIASLVL_S (8)
32 +#define AR_CH0_TOP_XPABIASLVL (AR_SREV_9550(ah) ? 0x3c0 : 0x300)
33 +#define AR_CH0_TOP_XPABIASLVL_S (AR_SREV_9550(ah) ? 6 : 8)
34
35 #define AR_CH0_THERM (AR_SREV_9300(ah) ? 0x16290 : \
36 ((AR_SREV_9485(ah) ? 0x1628c : 0x16294)))