package/mac80211: Add linux 3.0 compatibility
[openwrt/openwrt.git] / package / mac80211 / patches / 546-ath9k-initialize-tx-gain-table-for-AR9330.patch
1 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
3 @@ -328,7 +328,17 @@ static void ar9003_tx_gain_table_apply(s
4 switch (ar9003_hw_get_tx_gain_idx(ah)) {
5 case 0:
6 default:
7 - if (AR_SREV_9340(ah))
8 + if (AR_SREV_9330_12(ah))
9 + INIT_INI_ARRAY(&ah->iniModesTxGain,
10 + ar9331_modes_lowest_ob_db_tx_gain_1p2,
11 + ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p2),
12 + 5);
13 + else if (AR_SREV_9330_11(ah))
14 + INIT_INI_ARRAY(&ah->iniModesTxGain,
15 + ar9331_modes_lowest_ob_db_tx_gain_1p1,
16 + ARRAY_SIZE(ar9331_modes_lowest_ob_db_tx_gain_1p1),
17 + 5);
18 + else if (AR_SREV_9340(ah))
19 INIT_INI_ARRAY(&ah->iniModesTxGain,
20 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
21 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
22 @@ -345,7 +355,17 @@ static void ar9003_tx_gain_table_apply(s
23 5);
24 break;
25 case 1:
26 - if (AR_SREV_9340(ah))
27 + if (AR_SREV_9330_12(ah))
28 + INIT_INI_ARRAY(&ah->iniModesTxGain,
29 + ar9331_modes_high_ob_db_tx_gain_1p2,
30 + ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p2),
31 + 5);
32 + else if (AR_SREV_9330_11(ah))
33 + INIT_INI_ARRAY(&ah->iniModesTxGain,
34 + ar9331_modes_high_ob_db_tx_gain_1p1,
35 + ARRAY_SIZE(ar9331_modes_high_ob_db_tx_gain_1p1),
36 + 5);
37 + else if (AR_SREV_9340(ah))
38 INIT_INI_ARRAY(&ah->iniModesTxGain,
39 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
40 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
41 @@ -362,7 +382,17 @@ static void ar9003_tx_gain_table_apply(s
42 5);
43 break;
44 case 2:
45 - if (AR_SREV_9340(ah))
46 + if (AR_SREV_9330_12(ah))
47 + INIT_INI_ARRAY(&ah->iniModesTxGain,
48 + ar9331_modes_low_ob_db_tx_gain_1p2,
49 + ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p2),
50 + 5);
51 + else if (AR_SREV_9330_11(ah))
52 + INIT_INI_ARRAY(&ah->iniModesTxGain,
53 + ar9331_modes_low_ob_db_tx_gain_1p1,
54 + ARRAY_SIZE(ar9331_modes_low_ob_db_tx_gain_1p1),
55 + 5);
56 + else if (AR_SREV_9340(ah))
57 INIT_INI_ARRAY(&ah->iniModesTxGain,
58 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
59 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
60 @@ -379,7 +409,17 @@ static void ar9003_tx_gain_table_apply(s
61 5);
62 break;
63 case 3:
64 - if (AR_SREV_9340(ah))
65 + if (AR_SREV_9330_12(ah))
66 + INIT_INI_ARRAY(&ah->iniModesTxGain,
67 + ar9331_modes_high_power_tx_gain_1p2,
68 + ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p2),
69 + 5);
70 + else if (AR_SREV_9330_11(ah))
71 + INIT_INI_ARRAY(&ah->iniModesTxGain,
72 + ar9331_modes_high_power_tx_gain_1p1,
73 + ARRAY_SIZE(ar9331_modes_high_power_tx_gain_1p1),
74 + 5);
75 + else if (AR_SREV_9340(ah))
76 INIT_INI_ARRAY(&ah->iniModesTxGain,
77 ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
78 ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),