ath10k: remove support for the obsolete STA firmware
[openwrt/staging/chunkeey.git] / package / kernel / mac80211 / patches / 322-ath9k-ar9271_hw_pa_cal-use-RMW-buffer.patch
1 From: Oleksij Rempel <linux@rempel-privat.de>
2 Date: Sun, 22 Mar 2015 19:29:49 +0100
3 Subject: [PATCH] ath9k: ar9271_hw_pa_cal: use RMW buffer
4
5 Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
6 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
7 ---
8
9 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
10 +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
11 @@ -436,13 +436,14 @@ static void ar9271_hw_pa_cal(struct ath_
12 { AR9285_AN_RF2G2, 0 },
13 { AR9285_AN_TOP2, 0 },
14 { AR9285_AN_RF2G8, 0 },
15 - { AR9285_AN_RF2G7, 0 } ,
16 - { AR9285_AN_RF2G3, 0 } ,
17 + { AR9285_AN_RF2G7, 0 },
18 + { AR9285_AN_RF2G3, 0 },
19 };
20
21 for (i = 0; i < ARRAY_SIZE(regList); i++)
22 regList[i][1] = REG_READ(ah, regList[i][0]);
23
24 + ENABLE_REG_RMW_BUFFER(ah);
25 /* 7834, b1=0 */
26 REG_CLR_BIT(ah, AR9285_AN_RF2G6, 1 << 0);
27 /* 9808, b27=1 */
28 @@ -476,6 +477,7 @@ static void ar9271_hw_pa_cal(struct ath_
29 REG_RMW_FIELD(ah, AR9285_AN_RF2G7, AR9285_AN_RF2G7_PADRVGN2TAB0, 0);
30 /* 7828, b0-11, ccom=fff */
31 REG_RMW_FIELD(ah, AR9285_AN_RF2G3, AR9271_AN_RF2G3_CCOMP, 0xfff);
32 + REG_RMW_BUFFER_FLUSH(ah);
33
34 /* Set:
35 * localmode=1,bmode=1,bmoderxtx=1,synthon=1,
36 @@ -514,10 +516,12 @@ static void ar9271_hw_pa_cal(struct ath_
37 }
38
39
40 + ENABLE_REG_RMW_BUFFER(ah);
41 /* 7834, b1=1 */
42 REG_SET_BIT(ah, AR9285_AN_RF2G6, 1 << 0);
43 /* 9808, b27=0 */
44 REG_CLR_BIT(ah, 0x9808, 1 << 27);
45 + REG_RMW_BUFFER_FLUSH(ah);
46
47 ENABLE_REGWRITE_BUFFER(ah);
48 for (i = 0; i < ARRAY_SIZE(regList); i++)