aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192cu
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-01-04 22:40:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-24 14:07:40 -0500
commit4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (patch)
tree878d8c265368820db9dd2e24ec834f213ce31063 /drivers/net/wireless/rtlwifi/rtl8192cu
parentf30d7507a8116e2099a9135c873411db8c0a3dc6 (diff)
rtlwifi: Convert RTPRINT macro to use ##__VA_ARGS__
Consolidate printks to avoid possible message interleaving and reduce the object size. Remove unnecessary RTPRINT parentheses. Coalesce formats. Align arguments. $ size drivers/net/wireless/rtlwifi/built-in.o* text data bss dec hex filename 590002 55333 127560 772895 bcb1f drivers/net/wireless/rtlwifi/built-in.o.new 594841 55333 129680 779854 be64e drivers/net/wireless/rtlwifi/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192cu')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/hw.c71
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192cu/rf.c65
2 files changed, 67 insertions, 69 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index 80bd17d85935..de1542f14856 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -162,24 +162,24 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
162 for (rf_path = 0; rf_path < 2; rf_path++) 162 for (rf_path = 0; rf_path < 2; rf_path++)
163 for (i = 0; i < 3; i++) 163 for (i = 0; i < 3; i++)
164 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, 164 RTPRINT(rtlpriv, FINIT, INIT_EEPROM,
165 ("RF(%d) EEPROM CCK Area(%d) = 0x%x\n", rf_path, 165 "RF(%d) EEPROM CCK Area(%d) = 0x%x\n",
166 i, rtlefuse-> 166 rf_path, i,
167 eeprom_chnlarea_txpwr_cck[rf_path][i])); 167 rtlefuse->
168 eeprom_chnlarea_txpwr_cck[rf_path][i]);
168 for (rf_path = 0; rf_path < 2; rf_path++) 169 for (rf_path = 0; rf_path < 2; rf_path++)
169 for (i = 0; i < 3; i++) 170 for (i = 0; i < 3; i++)
170 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, 171 RTPRINT(rtlpriv, FINIT, INIT_EEPROM,
171 ("RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", 172 "RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n",
172 rf_path, i, 173 rf_path, i,
173 rtlefuse-> 174 rtlefuse->
174 eeprom_chnlarea_txpwr_ht40_1s[rf_path][i])); 175 eeprom_chnlarea_txpwr_ht40_1s[rf_path][i]);
175 for (rf_path = 0; rf_path < 2; rf_path++) 176 for (rf_path = 0; rf_path < 2; rf_path++)
176 for (i = 0; i < 3; i++) 177 for (i = 0; i < 3; i++)
177 RTPRINT(rtlpriv, FINIT, INIT_EEPROM, 178 RTPRINT(rtlpriv, FINIT, INIT_EEPROM,
178 ("RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", 179 "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n",
179 rf_path, i, 180 rf_path, i,
180 rtlefuse-> 181 rtlefuse->
181 eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path] 182 eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][i]);
182 [i]));
183 for (rf_path = 0; rf_path < 2; rf_path++) { 183 for (rf_path = 0; rf_path < 2; rf_path++) {
184 for (i = 0; i < 14; i++) { 184 for (i = 0; i < 14; i++) {
185 index = _rtl92c_get_chnl_group((u8) i); 185 index = _rtl92c_get_chnl_group((u8) i);
@@ -205,11 +205,10 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
205 } 205 }
206 for (i = 0; i < 14; i++) { 206 for (i = 0; i < 14; i++) {
207 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 207 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
208 ("RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = " 208 "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", rf_path, i,
209 "[0x%x / 0x%x / 0x%x]\n", rf_path, i, 209 rtlefuse->txpwrlevel_cck[rf_path][i],
210 rtlefuse->txpwrlevel_cck[rf_path][i], 210 rtlefuse->txpwrlevel_ht40_1s[rf_path][i],
211 rtlefuse->txpwrlevel_ht40_1s[rf_path][i], 211 rtlefuse->txpwrlevel_ht40_2s[rf_path][i]);
212 rtlefuse->txpwrlevel_ht40_2s[rf_path][i]));
213 } 212 }
214 } 213 }
215 for (i = 0; i < 3; i++) { 214 for (i = 0; i < 3; i++) {
@@ -242,13 +241,13 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
242 & 0xf0) >> 4); 241 & 0xf0) >> 4);
243 } 242 }
244 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 243 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
245 ("RF-%d pwrgroup_ht20[%d] = 0x%x\n", 244 "RF-%d pwrgroup_ht20[%d] = 0x%x\n",
246 rf_path, i, 245 rf_path, i,
247 rtlefuse->pwrgroup_ht20[rf_path][i])); 246 rtlefuse->pwrgroup_ht20[rf_path][i]);
248 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 247 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
249 ("RF-%d pwrgroup_ht40[%d] = 0x%x\n", 248 "RF-%d pwrgroup_ht40[%d] = 0x%x\n",
250 rf_path, i, 249 rf_path, i,
251 rtlefuse->pwrgroup_ht40[rf_path][i])); 250 rtlefuse->pwrgroup_ht40[rf_path][i]);
252 } 251 }
253 } 252 }
254 for (i = 0; i < 14; i++) { 253 for (i = 0; i < 14; i++) {
@@ -277,26 +276,26 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
277 rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7]; 276 rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][7];
278 for (i = 0; i < 14; i++) 277 for (i = 0; i < 14; i++)
279 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 278 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
280 ("RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", i, 279 "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n",
281 rtlefuse->txpwr_ht20diff[RF90_PATH_A][i])); 280 i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]);
282 for (i = 0; i < 14; i++) 281 for (i = 0; i < 14; i++)
283 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 282 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
284 ("RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", i, 283 "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n",
285 rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i])); 284 i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]);
286 for (i = 0; i < 14; i++) 285 for (i = 0; i < 14; i++)
287 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 286 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
288 ("RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", i, 287 "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n",
289 rtlefuse->txpwr_ht20diff[RF90_PATH_B][i])); 288 i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]);
290 for (i = 0; i < 14; i++) 289 for (i = 0; i < 14; i++)
291 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 290 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
292 ("RF-B Legacy to HT40 Diff[%d] = 0x%x\n", i, 291 "RF-B Legacy to HT40 Diff[%d] = 0x%x\n",
293 rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i])); 292 i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]);
294 if (!autoload_fail) 293 if (!autoload_fail)
295 rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); 294 rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7);
296 else 295 else
297 rtlefuse->eeprom_regulatory = 0; 296 rtlefuse->eeprom_regulatory = 0;
298 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 297 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
299 ("eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory)); 298 "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory);
300 if (!autoload_fail) { 299 if (!autoload_fail) {
301 rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; 300 rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A];
302 rtlefuse->eeprom_tssi[RF90_PATH_B] = hwinfo[EEPROM_TSSI_B]; 301 rtlefuse->eeprom_tssi[RF90_PATH_B] = hwinfo[EEPROM_TSSI_B];
@@ -305,9 +304,9 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
305 rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; 304 rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI;
306 } 305 }
307 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 306 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
308 ("TSSI_A = 0x%x, TSSI_B = 0x%x\n", 307 "TSSI_A = 0x%x, TSSI_B = 0x%x\n",
309 rtlefuse->eeprom_tssi[RF90_PATH_A], 308 rtlefuse->eeprom_tssi[RF90_PATH_A],
310 rtlefuse->eeprom_tssi[RF90_PATH_B])); 309 rtlefuse->eeprom_tssi[RF90_PATH_B]);
311 if (!autoload_fail) 310 if (!autoload_fail)
312 tempval = hwinfo[EEPROM_THERMAL_METER]; 311 tempval = hwinfo[EEPROM_THERMAL_METER];
313 else 312 else
@@ -320,7 +319,7 @@ static void _rtl92cu_read_txpower_info_from_hwpg(struct ieee80211_hw *hw,
320 rtlefuse->apk_thermalmeterignore = true; 319 rtlefuse->apk_thermalmeterignore = true;
321 rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; 320 rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter;
322 RTPRINT(rtlpriv, FINIT, INIT_TxPower, 321 RTPRINT(rtlpriv, FINIT, INIT_TxPower,
323 ("thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter)); 322 "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter);
324} 323}
325 324
326static void _rtl92cu_read_board_type(struct ieee80211_hw *hw, u8 *contents) 325static void _rtl92cu_read_board_type(struct ieee80211_hw *hw, u8 *contents)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
index 7b48ee9acb15..e132cb30a309 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
@@ -140,26 +140,26 @@ void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw,
140 rtl_set_bbreg(hw, RTXAGC_A_CCK1_MCS32, MASKBYTE1, tmpval); 140 rtl_set_bbreg(hw, RTXAGC_A_CCK1_MCS32, MASKBYTE1, tmpval);
141 141
142 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 142 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
143 ("CCK PWR 1M (rf-A) = 0x%x (reg 0x%x)\n", tmpval, 143 "CCK PWR 1M (rf-A) = 0x%x (reg 0x%x)\n",
144 RTXAGC_A_CCK1_MCS32)); 144 tmpval, RTXAGC_A_CCK1_MCS32);
145 145
146 tmpval = tx_agc[RF90_PATH_A] >> 8; 146 tmpval = tx_agc[RF90_PATH_A] >> 8;
147 if (mac->mode == WIRELESS_MODE_B) 147 if (mac->mode == WIRELESS_MODE_B)
148 tmpval = tmpval & 0xff00ffff; 148 tmpval = tmpval & 0xff00ffff;
149 rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, 0xffffff00, tmpval); 149 rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, 0xffffff00, tmpval);
150 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 150 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
151 ("CCK PWR 2~11M (rf-A) = 0x%x (reg 0x%x)\n", tmpval, 151 "CCK PWR 2~11M (rf-A) = 0x%x (reg 0x%x)\n",
152 RTXAGC_B_CCK11_A_CCK2_11)); 152 tmpval, RTXAGC_B_CCK11_A_CCK2_11);
153 tmpval = tx_agc[RF90_PATH_B] >> 24; 153 tmpval = tx_agc[RF90_PATH_B] >> 24;
154 rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, MASKBYTE0, tmpval); 154 rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, MASKBYTE0, tmpval);
155 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 155 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
156 ("CCK PWR 11M (rf-B) = 0x%x (reg 0x%x)\n", tmpval, 156 "CCK PWR 11M (rf-B) = 0x%x (reg 0x%x)\n",
157 RTXAGC_B_CCK11_A_CCK2_11)); 157 tmpval, RTXAGC_B_CCK11_A_CCK2_11);
158 tmpval = tx_agc[RF90_PATH_B] & 0x00ffffff; 158 tmpval = tx_agc[RF90_PATH_B] & 0x00ffffff;
159 rtl_set_bbreg(hw, RTXAGC_B_CCK1_55_MCS32, 0xffffff00, tmpval); 159 rtl_set_bbreg(hw, RTXAGC_B_CCK1_55_MCS32, 0xffffff00, tmpval);
160 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 160 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
161 ("CCK PWR 1~5.5M (rf-B) = 0x%x (reg 0x%x)\n", tmpval, 161 "CCK PWR 1~5.5M (rf-B) = 0x%x (reg 0x%x)\n",
162 RTXAGC_B_CCK1_55_MCS32)); 162 tmpval, RTXAGC_B_CCK1_55_MCS32);
163} 163}
164 164
165static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw, 165static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw,
@@ -181,8 +181,8 @@ static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw,
181 (powerBase0 << 8) | powerBase0; 181 (powerBase0 << 8) | powerBase0;
182 *(ofdmbase + i) = powerBase0; 182 *(ofdmbase + i) = powerBase0;
183 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 183 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
184 (" [OFDM power base index rf(%c) = 0x%x]\n", 184 " [OFDM power base index rf(%c) = 0x%x]\n",
185 ((i == 0) ? 'A' : 'B'), *(ofdmbase + i))); 185 i == 0 ? 'A' : 'B', *(ofdmbase + i));
186 } 186 }
187 for (i = 0; i < 2; i++) { 187 for (i = 0; i < 2; i++) {
188 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20) { 188 if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20) {
@@ -194,8 +194,8 @@ static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw,
194 (powerBase1 << 16) | (powerBase1 << 8) | powerBase1; 194 (powerBase1 << 16) | (powerBase1 << 8) | powerBase1;
195 *(mcsbase + i) = powerBase1; 195 *(mcsbase + i) = powerBase1;
196 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 196 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
197 (" [MCS power base index rf(%c) = 0x%x]\n", 197 " [MCS power base index rf(%c) = 0x%x]\n",
198 ((i == 0) ? 'A' : 'B'), *(mcsbase + i))); 198 i == 0 ? 'A' : 'B', *(mcsbase + i));
199 } 199 }
200} 200}
201 201
@@ -219,8 +219,8 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
219 [chnlgroup][index + (rf ? 8 : 0)] 219 [chnlgroup][index + (rf ? 8 : 0)]
220 + ((index < 2) ? powerBase0[rf] : powerBase1[rf]); 220 + ((index < 2) ? powerBase0[rf] : powerBase1[rf]);
221 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 221 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
222 ("RTK better performance,writeVal(%c) = 0x%x\n", 222 "RTK better performance,writeVal(%c) = 0x%x\n",
223 ((rf == 0) ? 'A' : 'B'), writeVal)); 223 rf == 0 ? 'A' : 'B', writeVal);
224 break; 224 break;
225 case 1: 225 case 1:
226 if (rtlphy->pwrgroup_cnt == 1) 226 if (rtlphy->pwrgroup_cnt == 1)
@@ -244,32 +244,31 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
244 ((index < 2) ? powerBase0[rf] : 244 ((index < 2) ? powerBase0[rf] :
245 powerBase1[rf]); 245 powerBase1[rf]);
246 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 246 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
247 ("Realtek regulatory, 20MHz, " 247 "Realtek regulatory, 20MHz, writeVal(%c) = 0x%x\n",
248 "writeVal(%c) = 0x%x\n", 248 rf == 0 ? 'A' : 'B', writeVal);
249 ((rf == 0) ? 'A' : 'B'), writeVal));
250 break; 249 break;
251 case 2: 250 case 2:
252 writeVal = ((index < 2) ? powerBase0[rf] : 251 writeVal = ((index < 2) ? powerBase0[rf] :
253 powerBase1[rf]); 252 powerBase1[rf]);
254 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 253 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
255 ("Better regulatory,writeVal(%c) = 0x%x\n", 254 "Better regulatory,writeVal(%c) = 0x%x\n",
256 ((rf == 0) ? 'A' : 'B'), writeVal)); 255 rf == 0 ? 'A' : 'B', writeVal);
257 break; 256 break;
258 case 3: 257 case 3:
259 chnlgroup = 0; 258 chnlgroup = 0;
260 if (rtlphy->current_chan_bw == 259 if (rtlphy->current_chan_bw ==
261 HT_CHANNEL_WIDTH_20_40) { 260 HT_CHANNEL_WIDTH_20_40) {
262 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 261 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
263 ("customer's limit, 40MHzrf(%c) = " 262 "customer's limit, 40MHzrf(%c) = 0x%x\n",
264 "0x%x\n", ((rf == 0) ? 'A' : 'B'), 263 rf == 0 ? 'A' : 'B',
265 rtlefuse->pwrgroup_ht40[rf] 264 rtlefuse->pwrgroup_ht40[rf]
266 [channel - 1])); 265 [channel - 1]);
267 } else { 266 } else {
268 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 267 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
269 ("customer's limit, 20MHz rf(%c) = " 268 "customer's limit, 20MHz rf(%c) = 0x%x\n",
270 "0x%x\n", ((rf == 0) ? 'A' : 'B'), 269 rf == 0 ? 'A' : 'B',
271 rtlefuse->pwrgroup_ht20[rf] 270 rtlefuse->pwrgroup_ht20[rf]
272 [channel - 1])); 271 [channel - 1]);
273 } 272 }
274 for (i = 0; i < 4; i++) { 273 for (i = 0; i < 4; i++) {
275 pwr_diff_limit[i] = 274 pwr_diff_limit[i] =
@@ -297,22 +296,22 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw,
297 (pwr_diff_limit[2] << 16) | 296 (pwr_diff_limit[2] << 16) |
298 (pwr_diff_limit[1] << 8) | (pwr_diff_limit[0]); 297 (pwr_diff_limit[1] << 8) | (pwr_diff_limit[0]);
299 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 298 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
300 ("Customer's limit rf(%c) = 0x%x\n", 299 "Customer's limit rf(%c) = 0x%x\n",
301 ((rf == 0) ? 'A' : 'B'), customer_limit)); 300 rf == 0 ? 'A' : 'B', customer_limit);
302 writeVal = customer_limit + ((index < 2) ? 301 writeVal = customer_limit + ((index < 2) ?
303 powerBase0[rf] : powerBase1[rf]); 302 powerBase0[rf] : powerBase1[rf]);
304 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 303 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
305 ("Customer, writeVal rf(%c)= 0x%x\n", 304 "Customer, writeVal rf(%c)= 0x%x\n",
306 ((rf == 0) ? 'A' : 'B'), writeVal)); 305 rf == 0 ? 'A' : 'B', writeVal);
307 break; 306 break;
308 default: 307 default:
309 chnlgroup = 0; 308 chnlgroup = 0;
310 writeVal = rtlphy->mcs_txpwrlevel_origoffset[chnlgroup] 309 writeVal = rtlphy->mcs_txpwrlevel_origoffset[chnlgroup]
311 [index + (rf ? 8 : 0)] + ((index < 2) ? 310 [index + (rf ? 8 : 0)] + ((index < 2) ?
312 powerBase0[rf] : powerBase1[rf]); 311 powerBase0[rf] : powerBase1[rf]);
313 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, ("RTK better " 312 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
314 "performance, writeValrf(%c) = 0x%x\n", 313 "RTK better performance, writeValrf(%c) = 0x%x\n",
315 ((rf == 0) ? 'A' : 'B'), writeVal)); 314 rf == 0 ? 'A' : 'B', writeVal);
316 break; 315 break;
317 } 316 }
318 if (rtlpriv->dm.dynamic_txhighpower_lvl == 317 if (rtlpriv->dm.dynamic_txhighpower_lvl ==
@@ -365,7 +364,7 @@ static void _rtl92c_write_ofdm_power_reg(struct ieee80211_hw *hw,
365 regoffset = regoffset_b[index]; 364 regoffset = regoffset_b[index];
366 rtl_set_bbreg(hw, regoffset, MASKDWORD, writeVal); 365 rtl_set_bbreg(hw, regoffset, MASKDWORD, writeVal);
367 RTPRINT(rtlpriv, FPHY, PHY_TXPWR, 366 RTPRINT(rtlpriv, FPHY, PHY_TXPWR,
368 ("Set 0x%x = %08x\n", regoffset, writeVal)); 367 "Set 0x%x = %08x\n", regoffset, writeVal);
369 if (((get_rf_type(rtlphy) == RF_2T2R) && 368 if (((get_rf_type(rtlphy) == RF_2T2R) &&
370 (regoffset == RTXAGC_A_MCS15_MCS12 || 369 (regoffset == RTXAGC_A_MCS15_MCS12 ||
371 regoffset == RTXAGC_B_MCS15_MCS12)) || 370 regoffset == RTXAGC_B_MCS15_MCS12)) ||