mac80211: add initial support for AR9330
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 564-ath9k-remove-superfluous-parentheses.patch
1 diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
2 index d0af2f2..99f55b3 100644
3 --- a/drivers/net/wireless/ath/ath9k/recv.c
4 +++ b/drivers/net/wireless/ath/ath9k/recv.c
5 @@ -1076,39 +1076,39 @@ static void ath_lnaconf_alt_good_scan(struct ath_ant_comb *antcomb,
6 antcomb->rssi_lna1 = main_rssi_avg;
7
8 switch ((ant_conf.main_lna_conf << 4) | ant_conf.alt_lna_conf) {
9 - case (0x10): /* LNA2 A-B */
10 + case 0x10: /* LNA2 A-B */
11 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
12 antcomb->first_quick_scan_conf =
13 ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
14 antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA1;
15 break;
16 - case (0x20): /* LNA1 A-B */
17 + case 0x20: /* LNA1 A-B */
18 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
19 antcomb->first_quick_scan_conf =
20 ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
21 antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA2;
22 break;
23 - case (0x21): /* LNA1 LNA2 */
24 + case 0x21: /* LNA1 LNA2 */
25 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA2;
26 antcomb->first_quick_scan_conf =
27 ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
28 antcomb->second_quick_scan_conf =
29 ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
30 break;
31 - case (0x12): /* LNA2 LNA1 */
32 + case 0x12: /* LNA2 LNA1 */
33 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1;
34 antcomb->first_quick_scan_conf =
35 ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
36 antcomb->second_quick_scan_conf =
37 ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
38 break;
39 - case (0x13): /* LNA2 A+B */
40 + case 0x13: /* LNA2 A+B */
41 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
42 antcomb->first_quick_scan_conf =
43 ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
44 antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA1;
45 break;
46 - case (0x23): /* LNA1 A+B */
47 + case 0x23: /* LNA1 A+B */
48 antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
49 antcomb->first_quick_scan_conf =
50 ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
51 @@ -1325,40 +1325,40 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
52 /* Adjust the fast_div_bias based on main and alt lna conf */
53 switch ((ant_conf->main_lna_conf << 4) |
54 ant_conf->alt_lna_conf) {
55 - case (0x01): /* A-B LNA2 */
56 + case 0x01: /* A-B LNA2 */
57 ant_conf->fast_div_bias = 0x3b;
58 break;
59 - case (0x02): /* A-B LNA1 */
60 + case 0x02: /* A-B LNA1 */
61 ant_conf->fast_div_bias = 0x3d;
62 break;
63 - case (0x03): /* A-B A+B */
64 + case 0x03: /* A-B A+B */
65 ant_conf->fast_div_bias = 0x1;
66 break;
67 - case (0x10): /* LNA2 A-B */
68 + case 0x10: /* LNA2 A-B */
69 ant_conf->fast_div_bias = 0x7;
70 break;
71 - case (0x12): /* LNA2 LNA1 */
72 + case 0x12: /* LNA2 LNA1 */
73 ant_conf->fast_div_bias = 0x2;
74 break;
75 - case (0x13): /* LNA2 A+B */
76 + case 0x13: /* LNA2 A+B */
77 ant_conf->fast_div_bias = 0x7;
78 break;
79 - case (0x20): /* LNA1 A-B */
80 + case 0x20: /* LNA1 A-B */
81 ant_conf->fast_div_bias = 0x6;
82 break;
83 - case (0x21): /* LNA1 LNA2 */
84 + case 0x21: /* LNA1 LNA2 */
85 ant_conf->fast_div_bias = 0x0;
86 break;
87 - case (0x23): /* LNA1 A+B */
88 + case 0x23: /* LNA1 A+B */
89 ant_conf->fast_div_bias = 0x6;
90 break;
91 - case (0x30): /* A+B A-B */
92 + case 0x30: /* A+B A-B */
93 ant_conf->fast_div_bias = 0x1;
94 break;
95 - case (0x31): /* A+B LNA2 */
96 + case 0x31: /* A+B LNA2 */
97 ant_conf->fast_div_bias = 0x3b;
98 break;
99 - case (0x32): /* A+B LNA1 */
100 + case 0x32: /* A+B LNA1 */
101 ant_conf->fast_div_bias = 0x3d;
102 break;
103 default:
104 @@ -1368,22 +1368,22 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
105 /* Adjust the fast_div_bias based on main and alt_lna_conf */
106 switch ((ant_conf->main_lna_conf << 4) |
107 ant_conf->alt_lna_conf) {
108 - case (0x01): /* A-B LNA2 */
109 + case 0x01: /* A-B LNA2 */
110 ant_conf->fast_div_bias = 0x1;
111 ant_conf->main_gaintb = 0;
112 ant_conf->alt_gaintb = 0;
113 break;
114 - case (0x02): /* A-B LNA1 */
115 + case 0x02: /* A-B LNA1 */
116 ant_conf->fast_div_bias = 0x1;
117 ant_conf->main_gaintb = 0;
118 ant_conf->alt_gaintb = 0;
119 break;
120 - case (0x03): /* A-B A+B */
121 + case 0x03: /* A-B A+B */
122 ant_conf->fast_div_bias = 0x1;
123 ant_conf->main_gaintb = 0;
124 ant_conf->alt_gaintb = 0;
125 break;
126 - case (0x10): /* LNA2 A-B */
127 + case 0x10: /* LNA2 A-B */
128 if (!(antcomb->scan) &&
129 (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
130 ant_conf->fast_div_bias = 0x1;
131 @@ -1392,12 +1392,12 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
132 ant_conf->main_gaintb = 0;
133 ant_conf->alt_gaintb = 0;
134 break;
135 - case (0x12): /* LNA2 LNA1 */
136 + case 0x12: /* LNA2 LNA1 */
137 ant_conf->fast_div_bias = 0x1;
138 ant_conf->main_gaintb = 0;
139 ant_conf->alt_gaintb = 0;
140 break;
141 - case (0x13): /* LNA2 A+B */
142 + case 0x13: /* LNA2 A+B */
143 if (!(antcomb->scan) &&
144 (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
145 ant_conf->fast_div_bias = 0x1;
146 @@ -1406,7 +1406,7 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
147 ant_conf->main_gaintb = 0;
148 ant_conf->alt_gaintb = 0;
149 break;
150 - case (0x20): /* LNA1 A-B */
151 + case 0x20: /* LNA1 A-B */
152 if (!(antcomb->scan) &&
153 (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
154 ant_conf->fast_div_bias = 0x1;
155 @@ -1415,12 +1415,12 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
156 ant_conf->main_gaintb = 0;
157 ant_conf->alt_gaintb = 0;
158 break;
159 - case (0x21): /* LNA1 LNA2 */
160 + case 0x21: /* LNA1 LNA2 */
161 ant_conf->fast_div_bias = 0x1;
162 ant_conf->main_gaintb = 0;
163 ant_conf->alt_gaintb = 0;
164 break;
165 - case (0x23): /* LNA1 A+B */
166 + case 0x23: /* LNA1 A+B */
167 if (!(antcomb->scan) &&
168 (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
169 ant_conf->fast_div_bias = 0x1;
170 @@ -1429,17 +1429,17 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
171 ant_conf->main_gaintb = 0;
172 ant_conf->alt_gaintb = 0;
173 break;
174 - case (0x30): /* A+B A-B */
175 + case 0x30: /* A+B A-B */
176 ant_conf->fast_div_bias = 0x1;
177 ant_conf->main_gaintb = 0;
178 ant_conf->alt_gaintb = 0;
179 break;
180 - case (0x31): /* A+B LNA2 */
181 + case 0x31: /* A+B LNA2 */
182 ant_conf->fast_div_bias = 0x1;
183 ant_conf->main_gaintb = 0;
184 ant_conf->alt_gaintb = 0;
185 break;
186 - case (0x32): /* A+B LNA1 */
187 + case 0x32: /* A+B LNA1 */
188 ant_conf->fast_div_bias = 0x1;
189 ant_conf->main_gaintb = 0;
190 ant_conf->alt_gaintb = 0;
191 @@ -1447,9 +1447,7 @@ static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
192 default:
193 break;
194 }
195 -
196 }
197 -
198 }
199
200 /* Antenna diversity and combining */
201