diff options
author | Joe Perches <joe@perches.com> | 2012-01-04 22:40:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:07:40 -0500 |
commit | 4c48869f5d6e4ee4a773fd67a01e1b934faa57f8 (patch) | |
tree | 878d8c265368820db9dd2e24ec834f213ce31063 /drivers/net/wireless/rtlwifi/rtl8192ce | |
parent | f30d7507a8116e2099a9135c873411db8c0a3dc6 (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/rtl8192ce')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 74 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | 77 |
2 files changed, 71 insertions, 80 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 4aa228fe96e9..2d01673a2087 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -1362,25 +1362,24 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1362 | for (rf_path = 0; rf_path < 2; rf_path++) | 1362 | for (rf_path = 0; rf_path < 2; rf_path++) |
1363 | for (i = 0; i < 3; i++) | 1363 | for (i = 0; i < 3; i++) |
1364 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1364 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1365 | ("RF(%d) EEPROM CCK Area(%d) = 0x%x\n", rf_path, | 1365 | "RF(%d) EEPROM CCK Area(%d) = 0x%x\n", |
1366 | i, | 1366 | rf_path, i, |
1367 | rtlefuse-> | 1367 | rtlefuse-> |
1368 | eeprom_chnlarea_txpwr_cck[rf_path][i])); | 1368 | eeprom_chnlarea_txpwr_cck[rf_path][i]); |
1369 | for (rf_path = 0; rf_path < 2; rf_path++) | 1369 | for (rf_path = 0; rf_path < 2; rf_path++) |
1370 | for (i = 0; i < 3; i++) | 1370 | for (i = 0; i < 3; i++) |
1371 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1371 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1372 | ("RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", | 1372 | "RF(%d) EEPROM HT40 1S Area(%d) = 0x%x\n", |
1373 | rf_path, i, | 1373 | rf_path, i, |
1374 | rtlefuse-> | 1374 | rtlefuse-> |
1375 | eeprom_chnlarea_txpwr_ht40_1s[rf_path][i])); | 1375 | eeprom_chnlarea_txpwr_ht40_1s[rf_path][i]); |
1376 | for (rf_path = 0; rf_path < 2; rf_path++) | 1376 | for (rf_path = 0; rf_path < 2; rf_path++) |
1377 | for (i = 0; i < 3; i++) | 1377 | for (i = 0; i < 3; i++) |
1378 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, | 1378 | RTPRINT(rtlpriv, FINIT, INIT_EEPROM, |
1379 | ("RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", | 1379 | "RF(%d) EEPROM HT40 2S Diff Area(%d) = 0x%x\n", |
1380 | rf_path, i, | 1380 | rf_path, i, |
1381 | rtlefuse-> | 1381 | rtlefuse-> |
1382 | eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path] | 1382 | eeprom_chnlarea_txpwr_ht40_2sdiif[rf_path][i]); |
1383 | [i])); | ||
1384 | 1383 | ||
1385 | for (rf_path = 0; rf_path < 2; rf_path++) { | 1384 | for (rf_path = 0; rf_path < 2; rf_path++) { |
1386 | for (i = 0; i < 14; i++) { | 1385 | for (i = 0; i < 14; i++) { |
@@ -1411,11 +1410,11 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1411 | 1410 | ||
1412 | for (i = 0; i < 14; i++) { | 1411 | for (i = 0; i < 14; i++) { |
1413 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1412 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1414 | ("RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = " | 1413 | "RF(%d)-Ch(%d) [CCK / HT40_1S / HT40_2S] = [0x%x / 0x%x / 0x%x]\n", |
1415 | "[0x%x / 0x%x / 0x%x]\n", rf_path, i, | 1414 | rf_path, i, |
1416 | rtlefuse->txpwrlevel_cck[rf_path][i], | 1415 | rtlefuse->txpwrlevel_cck[rf_path][i], |
1417 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], | 1416 | rtlefuse->txpwrlevel_ht40_1s[rf_path][i], |
1418 | rtlefuse->txpwrlevel_ht40_2s[rf_path][i])); | 1417 | rtlefuse->txpwrlevel_ht40_2s[rf_path][i]); |
1419 | } | 1418 | } |
1420 | } | 1419 | } |
1421 | 1420 | ||
@@ -1452,13 +1451,13 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1452 | } | 1451 | } |
1453 | 1452 | ||
1454 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1453 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1455 | ("RF-%d pwrgroup_ht20[%d] = 0x%x\n", | 1454 | "RF-%d pwrgroup_ht20[%d] = 0x%x\n", |
1456 | rf_path, i, | 1455 | rf_path, i, |
1457 | rtlefuse->pwrgroup_ht20[rf_path][i])); | 1456 | rtlefuse->pwrgroup_ht20[rf_path][i]); |
1458 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1457 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1459 | ("RF-%d pwrgroup_ht40[%d] = 0x%x\n", | 1458 | "RF-%d pwrgroup_ht40[%d] = 0x%x\n", |
1460 | rf_path, i, | 1459 | rf_path, i, |
1461 | rtlefuse->pwrgroup_ht40[rf_path][i])); | 1460 | rtlefuse->pwrgroup_ht40[rf_path][i]); |
1462 | } | 1461 | } |
1463 | } | 1462 | } |
1464 | 1463 | ||
@@ -1497,27 +1496,27 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1497 | 1496 | ||
1498 | for (i = 0; i < 14; i++) | 1497 | for (i = 0; i < 14; i++) |
1499 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1498 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1500 | ("RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1499 | "RF-A Ht20 to HT40 Diff[%d] = 0x%x\n", |
1501 | rtlefuse->txpwr_ht20diff[RF90_PATH_A][i])); | 1500 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_A][i]); |
1502 | for (i = 0; i < 14; i++) | 1501 | for (i = 0; i < 14; i++) |
1503 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1502 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1504 | ("RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", i, | 1503 | "RF-A Legacy to Ht40 Diff[%d] = 0x%x\n", |
1505 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i])); | 1504 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_A][i]); |
1506 | for (i = 0; i < 14; i++) | 1505 | for (i = 0; i < 14; i++) |
1507 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1506 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1508 | ("RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", i, | 1507 | "RF-B Ht20 to HT40 Diff[%d] = 0x%x\n", |
1509 | rtlefuse->txpwr_ht20diff[RF90_PATH_B][i])); | 1508 | i, rtlefuse->txpwr_ht20diff[RF90_PATH_B][i]); |
1510 | for (i = 0; i < 14; i++) | 1509 | for (i = 0; i < 14; i++) |
1511 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1510 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1512 | ("RF-B Legacy to HT40 Diff[%d] = 0x%x\n", i, | 1511 | "RF-B Legacy to HT40 Diff[%d] = 0x%x\n", |
1513 | rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i])); | 1512 | i, rtlefuse->txpwr_legacyhtdiff[RF90_PATH_B][i]); |
1514 | 1513 | ||
1515 | if (!autoload_fail) | 1514 | if (!autoload_fail) |
1516 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); | 1515 | rtlefuse->eeprom_regulatory = (hwinfo[RF_OPTION1] & 0x7); |
1517 | else | 1516 | else |
1518 | rtlefuse->eeprom_regulatory = 0; | 1517 | rtlefuse->eeprom_regulatory = 0; |
1519 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1518 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1520 | ("eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory)); | 1519 | "eeprom_regulatory = 0x%x\n", rtlefuse->eeprom_regulatory); |
1521 | 1520 | ||
1522 | if (!autoload_fail) { | 1521 | if (!autoload_fail) { |
1523 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; | 1522 | rtlefuse->eeprom_tssi[RF90_PATH_A] = hwinfo[EEPROM_TSSI_A]; |
@@ -1526,10 +1525,9 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1526 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; | 1525 | rtlefuse->eeprom_tssi[RF90_PATH_A] = EEPROM_DEFAULT_TSSI; |
1527 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; | 1526 | rtlefuse->eeprom_tssi[RF90_PATH_B] = EEPROM_DEFAULT_TSSI; |
1528 | } | 1527 | } |
1529 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1528 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, "TSSI_A = 0x%x, TSSI_B = 0x%x\n", |
1530 | ("TSSI_A = 0x%x, TSSI_B = 0x%x\n", | 1529 | rtlefuse->eeprom_tssi[RF90_PATH_A], |
1531 | rtlefuse->eeprom_tssi[RF90_PATH_A], | 1530 | rtlefuse->eeprom_tssi[RF90_PATH_B]); |
1532 | rtlefuse->eeprom_tssi[RF90_PATH_B])); | ||
1533 | 1531 | ||
1534 | if (!autoload_fail) | 1532 | if (!autoload_fail) |
1535 | tempval = hwinfo[EEPROM_THERMAL_METER]; | 1533 | tempval = hwinfo[EEPROM_THERMAL_METER]; |
@@ -1542,7 +1540,7 @@ static void _rtl92ce_read_txpower_info_from_hwpg(struct ieee80211_hw *hw, | |||
1542 | 1540 | ||
1543 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; | 1541 | rtlefuse->thermalmeter[0] = rtlefuse->eeprom_thermalmeter; |
1544 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, | 1542 | RTPRINT(rtlpriv, FINIT, INIT_TxPower, |
1545 | ("thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter)); | 1543 | "thermalmeter = 0x%x\n", rtlefuse->eeprom_thermalmeter); |
1546 | } | 1544 | } |
1547 | 1545 | ||
1548 | static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | 1546 | static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c index 3ba1a4feeb3f..5ef960499a43 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | |||
@@ -123,8 +123,8 @@ void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | |||
123 | rtl_set_bbreg(hw, RTXAGC_A_CCK1_MCS32, MASKBYTE1, tmpval); | 123 | rtl_set_bbreg(hw, RTXAGC_A_CCK1_MCS32, MASKBYTE1, tmpval); |
124 | 124 | ||
125 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 125 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
126 | ("CCK PWR 1M (rf-A) = 0x%x (reg 0x%x)\n", tmpval, | 126 | "CCK PWR 1M (rf-A) = 0x%x (reg 0x%x)\n", |
127 | RTXAGC_A_CCK1_MCS32)); | 127 | tmpval, RTXAGC_A_CCK1_MCS32); |
128 | 128 | ||
129 | tmpval = tx_agc[RF90_PATH_A] >> 8; | 129 | tmpval = tx_agc[RF90_PATH_A] >> 8; |
130 | 130 | ||
@@ -133,22 +133,22 @@ void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | |||
133 | rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, 0xffffff00, tmpval); | 133 | rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, 0xffffff00, tmpval); |
134 | 134 | ||
135 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 135 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
136 | ("CCK PWR 2~11M (rf-A) = 0x%x (reg 0x%x)\n", tmpval, | 136 | "CCK PWR 2~11M (rf-A) = 0x%x (reg 0x%x)\n", |
137 | RTXAGC_B_CCK11_A_CCK2_11)); | 137 | tmpval, RTXAGC_B_CCK11_A_CCK2_11); |
138 | 138 | ||
139 | tmpval = tx_agc[RF90_PATH_B] >> 24; | 139 | tmpval = tx_agc[RF90_PATH_B] >> 24; |
140 | rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, MASKBYTE0, tmpval); | 140 | rtl_set_bbreg(hw, RTXAGC_B_CCK11_A_CCK2_11, MASKBYTE0, tmpval); |
141 | 141 | ||
142 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 142 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
143 | ("CCK PWR 11M (rf-B) = 0x%x (reg 0x%x)\n", tmpval, | 143 | "CCK PWR 11M (rf-B) = 0x%x (reg 0x%x)\n", |
144 | RTXAGC_B_CCK11_A_CCK2_11)); | 144 | tmpval, RTXAGC_B_CCK11_A_CCK2_11); |
145 | 145 | ||
146 | tmpval = tx_agc[RF90_PATH_B] & 0x00ffffff; | 146 | tmpval = tx_agc[RF90_PATH_B] & 0x00ffffff; |
147 | rtl_set_bbreg(hw, RTXAGC_B_CCK1_55_MCS32, 0xffffff00, tmpval); | 147 | rtl_set_bbreg(hw, RTXAGC_B_CCK1_55_MCS32, 0xffffff00, tmpval); |
148 | 148 | ||
149 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 149 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
150 | ("CCK PWR 1~5.5M (rf-B) = 0x%x (reg 0x%x)\n", tmpval, | 150 | "CCK PWR 1~5.5M (rf-B) = 0x%x (reg 0x%x)\n", |
151 | RTXAGC_B_CCK1_55_MCS32)); | 151 | tmpval, RTXAGC_B_CCK1_55_MCS32); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw, | 154 | static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw, |
@@ -171,8 +171,8 @@ static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw, | |||
171 | (powerBase0 << 8) | powerBase0; | 171 | (powerBase0 << 8) | powerBase0; |
172 | *(ofdmbase + i) = powerBase0; | 172 | *(ofdmbase + i) = powerBase0; |
173 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 173 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
174 | (" [OFDM power base index rf(%c) = 0x%x]\n", | 174 | " [OFDM power base index rf(%c) = 0x%x]\n", |
175 | ((i == 0) ? 'A' : 'B'), *(ofdmbase + i))); | 175 | i == 0 ? 'A' : 'B', *(ofdmbase + i)); |
176 | } | 176 | } |
177 | 177 | ||
178 | for (i = 0; i < 2; i++) { | 178 | for (i = 0; i < 2; i++) { |
@@ -187,8 +187,8 @@ static void rtl92c_phy_get_power_base(struct ieee80211_hw *hw, | |||
187 | *(mcsbase + i) = powerBase1; | 187 | *(mcsbase + i) = powerBase1; |
188 | 188 | ||
189 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 189 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
190 | (" [MCS power base index rf(%c) = 0x%x]\n", | 190 | " [MCS power base index rf(%c) = 0x%x]\n", |
191 | ((i == 0) ? 'A' : 'B'), *(mcsbase + i))); | 191 | i == 0 ? 'A' : 'B', *(mcsbase + i)); |
192 | } | 192 | } |
193 | } | 193 | } |
194 | 194 | ||
@@ -215,9 +215,8 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
215 | + ((index < 2) ? powerBase0[rf] : powerBase1[rf]); | 215 | + ((index < 2) ? powerBase0[rf] : powerBase1[rf]); |
216 | 216 | ||
217 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 217 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
218 | ("RTK better performance, " | 218 | "RTK better performance, writeVal(%c) = 0x%x\n", |
219 | "writeVal(%c) = 0x%x\n", | 219 | rf == 0 ? 'A' : 'B', writeVal); |
220 | ((rf == 0) ? 'A' : 'B'), writeVal)); | ||
221 | break; | 220 | break; |
222 | case 1: | 221 | case 1: |
223 | if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { | 222 | if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { |
@@ -225,9 +224,8 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
225 | powerBase1[rf]); | 224 | powerBase1[rf]); |
226 | 225 | ||
227 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 226 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
228 | ("Realtek regulatory, 40MHz, " | 227 | "Realtek regulatory, 40MHz, writeVal(%c) = 0x%x\n", |
229 | "writeVal(%c) = 0x%x\n", | 228 | rf == 0 ? 'A' : 'B', writeVal); |
230 | ((rf == 0) ? 'A' : 'B'), writeVal)); | ||
231 | } else { | 229 | } else { |
232 | if (rtlphy->pwrgroup_cnt == 1) | 230 | if (rtlphy->pwrgroup_cnt == 1) |
233 | chnlgroup = 0; | 231 | chnlgroup = 0; |
@@ -249,9 +247,8 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
249 | powerBase1[rf]); | 247 | powerBase1[rf]); |
250 | 248 | ||
251 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 249 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
252 | ("Realtek regulatory, 20MHz, " | 250 | "Realtek regulatory, 20MHz, writeVal(%c) = 0x%x\n", |
253 | "writeVal(%c) = 0x%x\n", | 251 | rf == 0 ? 'A' : 'B', writeVal); |
254 | ((rf == 0) ? 'A' : 'B'), writeVal)); | ||
255 | } | 252 | } |
256 | break; | 253 | break; |
257 | case 2: | 254 | case 2: |
@@ -259,27 +256,24 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
259 | ((index < 2) ? powerBase0[rf] : powerBase1[rf]); | 256 | ((index < 2) ? powerBase0[rf] : powerBase1[rf]); |
260 | 257 | ||
261 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 258 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
262 | ("Better regulatory, " | 259 | "Better regulatory, writeVal(%c) = 0x%x\n", |
263 | "writeVal(%c) = 0x%x\n", | 260 | rf == 0 ? 'A' : 'B', writeVal); |
264 | ((rf == 0) ? 'A' : 'B'), writeVal)); | ||
265 | break; | 261 | break; |
266 | case 3: | 262 | case 3: |
267 | chnlgroup = 0; | 263 | chnlgroup = 0; |
268 | 264 | ||
269 | if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { | 265 | if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { |
270 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 266 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
271 | ("customer's limit, 40MHz " | 267 | "customer's limit, 40MHz rf(%c) = 0x%x\n", |
272 | "rf(%c) = 0x%x\n", | 268 | rf == 0 ? 'A' : 'B', |
273 | ((rf == 0) ? 'A' : 'B'), | 269 | rtlefuse->pwrgroup_ht40[rf][channel - |
274 | rtlefuse->pwrgroup_ht40[rf][channel - | 270 | 1]); |
275 | 1])); | ||
276 | } else { | 271 | } else { |
277 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 272 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
278 | ("customer's limit, 20MHz " | 273 | "customer's limit, 20MHz rf(%c) = 0x%x\n", |
279 | "rf(%c) = 0x%x\n", | 274 | rf == 0 ? 'A' : 'B', |
280 | ((rf == 0) ? 'A' : 'B'), | 275 | rtlefuse->pwrgroup_ht20[rf][channel - |
281 | rtlefuse->pwrgroup_ht20[rf][channel - | 276 | 1]); |
282 | 1])); | ||
283 | } | 277 | } |
284 | for (i = 0; i < 4; i++) { | 278 | for (i = 0; i < 4; i++) { |
285 | pwr_diff_limit[i] = | 279 | pwr_diff_limit[i] = |
@@ -311,15 +305,15 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
311 | (pwr_diff_limit[1] << 8) | (pwr_diff_limit[0]); | 305 | (pwr_diff_limit[1] << 8) | (pwr_diff_limit[0]); |
312 | 306 | ||
313 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 307 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
314 | ("Customer's limit rf(%c) = 0x%x\n", | 308 | "Customer's limit rf(%c) = 0x%x\n", |
315 | ((rf == 0) ? 'A' : 'B'), customer_limit)); | 309 | rf == 0 ? 'A' : 'B', customer_limit); |
316 | 310 | ||
317 | writeVal = customer_limit + | 311 | writeVal = customer_limit + |
318 | ((index < 2) ? powerBase0[rf] : powerBase1[rf]); | 312 | ((index < 2) ? powerBase0[rf] : powerBase1[rf]); |
319 | 313 | ||
320 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 314 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
321 | ("Customer, writeVal rf(%c)= 0x%x\n", | 315 | "Customer, writeVal rf(%c)= 0x%x\n", |
322 | ((rf == 0) ? 'A' : 'B'), writeVal)); | 316 | rf == 0 ? 'A' : 'B', writeVal); |
323 | break; | 317 | break; |
324 | default: | 318 | default: |
325 | chnlgroup = 0; | 319 | chnlgroup = 0; |
@@ -329,9 +323,8 @@ static void _rtl92c_get_txpower_writeval_by_regulatory(struct ieee80211_hw *hw, | |||
329 | + ((index < 2) ? powerBase0[rf] : powerBase1[rf]); | 323 | + ((index < 2) ? powerBase0[rf] : powerBase1[rf]); |
330 | 324 | ||
331 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 325 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
332 | ("RTK better performance, writeVal " | 326 | "RTK better performance, writeVal rf(%c) = 0x%x\n", |
333 | "rf(%c) = 0x%x\n", | 327 | rf == 0 ? 'A' : 'B', writeVal); |
334 | ((rf == 0) ? 'A' : 'B'), writeVal)); | ||
335 | break; | 328 | break; |
336 | } | 329 | } |
337 | 330 | ||
@@ -383,7 +376,7 @@ static void _rtl92c_write_ofdm_power_reg(struct ieee80211_hw *hw, | |||
383 | rtl_set_bbreg(hw, regoffset, MASKDWORD, writeVal); | 376 | rtl_set_bbreg(hw, regoffset, MASKDWORD, writeVal); |
384 | 377 | ||
385 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, | 378 | RTPRINT(rtlpriv, FPHY, PHY_TXPWR, |
386 | ("Set 0x%x = %08x\n", regoffset, writeVal)); | 379 | "Set 0x%x = %08x\n", regoffset, writeVal); |
387 | 380 | ||
388 | if (((get_rf_type(rtlphy) == RF_2T2R) && | 381 | if (((get_rf_type(rtlphy) == RF_2T2R) && |
389 | (regoffset == RTXAGC_A_MCS15_MCS12 || | 382 | (regoffset == RTXAGC_A_MCS15_MCS12 || |