aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de/dm.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/dm.c241
1 files changed, 109 insertions, 132 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
index 3cd0736fe8e1..181ed6fc90e6 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
@@ -1,6 +1,6 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Copyright(c) 2009-2010 Realtek Corporation. 3 * Copyright(c) 2009-2012 Realtek Corporation.
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify it 5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as 6 * under the terms of version 2 of the GNU General Public License as
@@ -246,23 +246,21 @@ static void rtl92d_dm_false_alarm_counter_statistics(struct ieee80211_hw *hw)
246 rtl_set_bbreg(hw, RCCK0_FALSEALARMREPORT, 0x0000c000, 2); 246 rtl_set_bbreg(hw, RCCK0_FALSEALARMREPORT, 0x0000c000, 2);
247 rtl92d_release_cckandrw_pagea_ctl(hw, &flag); 247 rtl92d_release_cckandrw_pagea_ctl(hw, &flag);
248 } 248 }
249 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("Cnt_Fast_Fsync_fail = %x, " 249 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
250 "Cnt_SB_Search_fail = %x\n", 250 "Cnt_Fast_Fsync_fail = %x, Cnt_SB_Search_fail = %x\n",
251 falsealm_cnt->cnt_fast_fsync_fail, 251 falsealm_cnt->cnt_fast_fsync_fail,
252 falsealm_cnt->cnt_sb_search_fail)); 252 falsealm_cnt->cnt_sb_search_fail);
253 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("Cnt_Parity_Fail = %x, " 253 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
254 "Cnt_Rate_Illegal = %x, Cnt_Crc8_fail = %x, " 254 "Cnt_Parity_Fail = %x, Cnt_Rate_Illegal = %x, Cnt_Crc8_fail = %x, Cnt_Mcs_fail = %x\n",
255 "Cnt_Mcs_fail = %x\n",
256 falsealm_cnt->cnt_parity_fail, 255 falsealm_cnt->cnt_parity_fail,
257 falsealm_cnt->cnt_rate_illegal, 256 falsealm_cnt->cnt_rate_illegal,
258 falsealm_cnt->cnt_crc8_fail, 257 falsealm_cnt->cnt_crc8_fail,
259 falsealm_cnt->cnt_mcs_fail)); 258 falsealm_cnt->cnt_mcs_fail);
260 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 259 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
261 ("Cnt_Ofdm_fail = %x, " "Cnt_Cck_fail = %x, " 260 "Cnt_Ofdm_fail = %x, Cnt_Cck_fail = %x, Cnt_all = %x\n",
262 "Cnt_all = %x\n",
263 falsealm_cnt->cnt_ofdm_fail, 261 falsealm_cnt->cnt_ofdm_fail,
264 falsealm_cnt->cnt_cck_fail, 262 falsealm_cnt->cnt_cck_fail,
265 falsealm_cnt->cnt_all)); 263 falsealm_cnt->cnt_all);
266} 264}
267 265
268static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw) 266static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw)
@@ -275,7 +273,7 @@ static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw)
275 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) { 273 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) {
276 de_digtable.min_undecorated_pwdb_for_dm = 0; 274 de_digtable.min_undecorated_pwdb_for_dm = 0;
277 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 275 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
278 ("Not connected to any\n")); 276 "Not connected to any\n");
279 } 277 }
280 if (mac->link_state >= MAC80211_LINKED) { 278 if (mac->link_state >= MAC80211_LINKED) {
281 if (mac->opmode == NL80211_IFTYPE_AP || 279 if (mac->opmode == NL80211_IFTYPE_AP ||
@@ -283,25 +281,25 @@ static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw)
283 de_digtable.min_undecorated_pwdb_for_dm = 281 de_digtable.min_undecorated_pwdb_for_dm =
284 rtlpriv->dm.UNDEC_SM_PWDB; 282 rtlpriv->dm.UNDEC_SM_PWDB;
285 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 283 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
286 ("AP Client PWDB = 0x%lx\n", 284 "AP Client PWDB = 0x%lx\n",
287 rtlpriv->dm.UNDEC_SM_PWDB)); 285 rtlpriv->dm.UNDEC_SM_PWDB);
288 } else { 286 } else {
289 de_digtable.min_undecorated_pwdb_for_dm = 287 de_digtable.min_undecorated_pwdb_for_dm =
290 rtlpriv->dm.undecorated_smoothed_pwdb; 288 rtlpriv->dm.undecorated_smoothed_pwdb;
291 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 289 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
292 ("STA Default Port PWDB = 0x%x\n", 290 "STA Default Port PWDB = 0x%x\n",
293 de_digtable.min_undecorated_pwdb_for_dm)); 291 de_digtable.min_undecorated_pwdb_for_dm);
294 } 292 }
295 } else { 293 } else {
296 de_digtable.min_undecorated_pwdb_for_dm = 294 de_digtable.min_undecorated_pwdb_for_dm =
297 rtlpriv->dm.UNDEC_SM_PWDB; 295 rtlpriv->dm.UNDEC_SM_PWDB;
298 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 296 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
299 ("AP Ext Port or disconnet PWDB = 0x%x\n", 297 "AP Ext Port or disconnet PWDB = 0x%x\n",
300 de_digtable.min_undecorated_pwdb_for_dm)); 298 de_digtable.min_undecorated_pwdb_for_dm);
301 } 299 }
302 300
303 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("MinUndecoratedPWDBForDM =%d\n", 301 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "MinUndecoratedPWDBForDM =%d\n",
304 de_digtable.min_undecorated_pwdb_for_dm)); 302 de_digtable.min_undecorated_pwdb_for_dm);
305} 303}
306 304
307static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) 305static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
@@ -340,14 +338,14 @@ static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
340 } 338 }
341 de_digtable.pre_cck_pd_state = de_digtable.cur_cck_pd_state; 339 de_digtable.pre_cck_pd_state = de_digtable.cur_cck_pd_state;
342 } 340 }
343 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CurSTAConnectState=%s\n", 341 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CurSTAConnectState=%s\n",
344 (de_digtable.cursta_connectctate == DIG_STA_CONNECT ? 342 de_digtable.cursta_connectctate == DIG_STA_CONNECT ?
345 "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT"))); 343 "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT");
346 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("CCKPDStage=%s\n", 344 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CCKPDStage=%s\n",
347 (de_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ? 345 de_digtable.cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ?
348 "Low RSSI " : "High RSSI "))); 346 "Low RSSI " : "High RSSI ");
349 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("is92d single phy =%x\n", 347 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "is92d single phy =%x\n",
350 IS_92D_SINGLEPHY(rtlpriv->rtlhal.version))); 348 IS_92D_SINGLEPHY(rtlpriv->rtlhal.version));
351 349
352} 350}
353 351
@@ -355,12 +353,12 @@ void rtl92d_dm_write_dig(struct ieee80211_hw *hw)
355{ 353{
356 struct rtl_priv *rtlpriv = rtl_priv(hw); 354 struct rtl_priv *rtlpriv = rtl_priv(hw);
357 355
358 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("cur_igvalue = 0x%x, " 356 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
359 "pre_igvalue = 0x%x, backoff_val = %d\n", 357 "cur_igvalue = 0x%x, pre_igvalue = 0x%x, backoff_val = %d\n",
360 de_digtable.cur_igvalue, de_digtable.pre_igvalue, 358 de_digtable.cur_igvalue, de_digtable.pre_igvalue,
361 de_digtable.backoff_val)); 359 de_digtable.backoff_val);
362 if (de_digtable.dig_enable_flag == false) { 360 if (de_digtable.dig_enable_flag == false) {
363 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("DIG is disabled\n")); 361 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "DIG is disabled\n");
364 de_digtable.pre_igvalue = 0x17; 362 de_digtable.pre_igvalue = 0x17;
365 return; 363 return;
366 } 364 }
@@ -377,22 +375,21 @@ static void rtl92d_early_mode_enabled(struct rtl_priv *rtlpriv)
377{ 375{
378 if ((rtlpriv->mac80211.link_state >= MAC80211_LINKED) && 376 if ((rtlpriv->mac80211.link_state >= MAC80211_LINKED) &&
379 (rtlpriv->mac80211.vendor == PEER_CISCO)) { 377 (rtlpriv->mac80211.vendor == PEER_CISCO)) {
380 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 378 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "IOT_PEER = CISCO\n");
381 ("IOT_PEER = CISCO\n"));
382 if (de_digtable.last_min_undecorated_pwdb_for_dm >= 50 379 if (de_digtable.last_min_undecorated_pwdb_for_dm >= 50
383 && de_digtable.min_undecorated_pwdb_for_dm < 50) { 380 && de_digtable.min_undecorated_pwdb_for_dm < 50) {
384 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00); 381 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00);
385 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 382 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
386 ("Early Mode Off\n")); 383 "Early Mode Off\n");
387 } else if (de_digtable.last_min_undecorated_pwdb_for_dm <= 55 && 384 } else if (de_digtable.last_min_undecorated_pwdb_for_dm <= 55 &&
388 de_digtable.min_undecorated_pwdb_for_dm > 55) { 385 de_digtable.min_undecorated_pwdb_for_dm > 55) {
389 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f); 386 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f);
390 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 387 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
391 ("Early Mode On\n")); 388 "Early Mode On\n");
392 } 389 }
393 } else if (!(rtl_read_byte(rtlpriv, REG_EARLY_MODE_CONTROL) & 0xf)) { 390 } else if (!(rtl_read_byte(rtlpriv, REG_EARLY_MODE_CONTROL) & 0xf)) {
394 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f); 391 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f);
395 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("Early Mode On\n")); 392 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "Early Mode On\n");
396 } 393 }
397} 394}
398 395
@@ -402,7 +399,7 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
402 u8 value_igi = de_digtable.cur_igvalue; 399 u8 value_igi = de_digtable.cur_igvalue;
403 struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt); 400 struct false_alarm_statistics *falsealm_cnt = &(rtlpriv->falsealm_cnt);
404 401
405 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("==>\n")); 402 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "==>\n");
406 if (rtlpriv->rtlhal.earlymode_enable) { 403 if (rtlpriv->rtlhal.earlymode_enable) {
407 rtl92d_early_mode_enabled(rtlpriv); 404 rtl92d_early_mode_enabled(rtlpriv);
408 de_digtable.last_min_undecorated_pwdb_for_dm = 405 de_digtable.last_min_undecorated_pwdb_for_dm =
@@ -421,7 +418,7 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
421 /* Not STA mode return tmp */ 418 /* Not STA mode return tmp */
422 if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION) 419 if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
423 return; 420 return;
424 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("progress\n")); 421 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "progress\n");
425 /* Decide the current status and if modify initial gain or not */ 422 /* Decide the current status and if modify initial gain or not */
426 if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) 423 if (rtlpriv->mac80211.link_state >= MAC80211_LINKED)
427 de_digtable.cursta_connectctate = DIG_STA_CONNECT; 424 de_digtable.cursta_connectctate = DIG_STA_CONNECT;
@@ -438,16 +435,16 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
438 else if (falsealm_cnt->cnt_all >= DM_DIG_FA_TH2) 435 else if (falsealm_cnt->cnt_all >= DM_DIG_FA_TH2)
439 value_igi += 2; 436 value_igi += 2;
440 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 437 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
441 ("dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n", 438 "dm_DIG() Before: large_fa_hit=%d, forbidden_igi=%x\n",
442 de_digtable.large_fa_hit, de_digtable.forbidden_igi)); 439 de_digtable.large_fa_hit, de_digtable.forbidden_igi);
443 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 440 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
444 ("dm_DIG() Before: Recover_cnt=%d, rx_gain_range_min=%x\n", 441 "dm_DIG() Before: Recover_cnt=%d, rx_gain_range_min=%x\n",
445 de_digtable.recover_cnt, de_digtable.rx_gain_range_min)); 442 de_digtable.recover_cnt, de_digtable.rx_gain_range_min);
446 443
447 /* deal with abnorally large false alarm */ 444 /* deal with abnorally large false alarm */
448 if (falsealm_cnt->cnt_all > 10000) { 445 if (falsealm_cnt->cnt_all > 10000) {
449 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 446 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
450 ("dm_DIG(): Abnornally false alarm case.\n")); 447 "dm_DIG(): Abnormally false alarm case\n");
451 448
452 de_digtable.large_fa_hit++; 449 de_digtable.large_fa_hit++;
453 if (de_digtable.forbidden_igi < de_digtable.cur_igvalue) { 450 if (de_digtable.forbidden_igi < de_digtable.cur_igvalue) {
@@ -486,11 +483,11 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
486 } 483 }
487 } 484 }
488 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 485 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
489 ("dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n", 486 "dm_DIG() After: large_fa_hit=%d, forbidden_igi=%x\n",
490 de_digtable.large_fa_hit, de_digtable.forbidden_igi)); 487 de_digtable.large_fa_hit, de_digtable.forbidden_igi);
491 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 488 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
492 ("dm_DIG() After: recover_cnt=%d, rx_gain_range_min=%x\n", 489 "dm_DIG() After: recover_cnt=%d, rx_gain_range_min=%x\n",
493 de_digtable.recover_cnt, de_digtable.rx_gain_range_min)); 490 de_digtable.recover_cnt, de_digtable.rx_gain_range_min);
494 491
495 if (value_igi > DM_DIG_MAX) 492 if (value_igi > DM_DIG_MAX)
496 value_igi = DM_DIG_MAX; 493 value_igi = DM_DIG_MAX;
@@ -500,7 +497,7 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
500 rtl92d_dm_write_dig(hw); 497 rtl92d_dm_write_dig(hw);
501 if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G) 498 if (rtlpriv->rtlhal.current_bandtype != BAND_ON_5G)
502 rtl92d_dm_cck_packet_detection_thresh(hw); 499 rtl92d_dm_cck_packet_detection_thresh(hw);
503 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, ("<<==\n")); 500 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "<<==\n");
504} 501}
505 502
506static void rtl92d_dm_init_dynamic_txpower(struct ieee80211_hw *hw) 503static void rtl92d_dm_init_dynamic_txpower(struct ieee80211_hw *hw)
@@ -528,7 +525,7 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
528 if ((mac->link_state < MAC80211_LINKED) && 525 if ((mac->link_state < MAC80211_LINKED) &&
529 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) { 526 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) {
530 RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE, 527 RT_TRACE(rtlpriv, COMP_POWER, DBG_TRACE,
531 ("Not connected to any\n")); 528 "Not connected to any\n");
532 rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL; 529 rtlpriv->dm.dynamic_txhighpower_lvl = TXHIGHPWRLEVEL_NORMAL;
533 rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL; 530 rtlpriv->dm.last_dtp_lvl = TXHIGHPWRLEVEL_NORMAL;
534 return; 531 return;
@@ -538,40 +535,40 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
538 undecorated_smoothed_pwdb = 535 undecorated_smoothed_pwdb =
539 rtlpriv->dm.UNDEC_SM_PWDB; 536 rtlpriv->dm.UNDEC_SM_PWDB;
540 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 537 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
541 ("IBSS Client PWDB = 0x%lx\n", 538 "IBSS Client PWDB = 0x%lx\n",
542 undecorated_smoothed_pwdb)); 539 undecorated_smoothed_pwdb);
543 } else { 540 } else {
544 undecorated_smoothed_pwdb = 541 undecorated_smoothed_pwdb =
545 rtlpriv->dm.undecorated_smoothed_pwdb; 542 rtlpriv->dm.undecorated_smoothed_pwdb;
546 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 543 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
547 ("STA Default Port PWDB = 0x%lx\n", 544 "STA Default Port PWDB = 0x%lx\n",
548 undecorated_smoothed_pwdb)); 545 undecorated_smoothed_pwdb);
549 } 546 }
550 } else { 547 } else {
551 undecorated_smoothed_pwdb = 548 undecorated_smoothed_pwdb =
552 rtlpriv->dm.UNDEC_SM_PWDB; 549 rtlpriv->dm.UNDEC_SM_PWDB;
553 550
554 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 551 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
555 ("AP Ext Port PWDB = 0x%lx\n", 552 "AP Ext Port PWDB = 0x%lx\n",
556 undecorated_smoothed_pwdb)); 553 undecorated_smoothed_pwdb);
557 } 554 }
558 if (rtlhal->current_bandtype == BAND_ON_5G) { 555 if (rtlhal->current_bandtype == BAND_ON_5G) {
559 if (undecorated_smoothed_pwdb >= 0x33) { 556 if (undecorated_smoothed_pwdb >= 0x33) {
560 rtlpriv->dm.dynamic_txhighpower_lvl = 557 rtlpriv->dm.dynamic_txhighpower_lvl =
561 TXHIGHPWRLEVEL_LEVEL2; 558 TXHIGHPWRLEVEL_LEVEL2;
562 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 559 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
563 ("5G:TxHighPwrLevel_Level2 (TxPwr=0x0)\n")); 560 "5G:TxHighPwrLevel_Level2 (TxPwr=0x0)\n");
564 } else if ((undecorated_smoothed_pwdb < 0x33) 561 } else if ((undecorated_smoothed_pwdb < 0x33)
565 && (undecorated_smoothed_pwdb >= 0x2b)) { 562 && (undecorated_smoothed_pwdb >= 0x2b)) {
566 rtlpriv->dm.dynamic_txhighpower_lvl = 563 rtlpriv->dm.dynamic_txhighpower_lvl =
567 TXHIGHPWRLEVEL_LEVEL1; 564 TXHIGHPWRLEVEL_LEVEL1;
568 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 565 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
569 ("5G:TxHighPwrLevel_Level1 (TxPwr=0x10)\n")); 566 "5G:TxHighPwrLevel_Level1 (TxPwr=0x10)\n");
570 } else if (undecorated_smoothed_pwdb < 0x2b) { 567 } else if (undecorated_smoothed_pwdb < 0x2b) {
571 rtlpriv->dm.dynamic_txhighpower_lvl = 568 rtlpriv->dm.dynamic_txhighpower_lvl =
572 TXHIGHPWRLEVEL_NORMAL; 569 TXHIGHPWRLEVEL_NORMAL;
573 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 570 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
574 ("5G:TxHighPwrLevel_Normal\n")); 571 "5G:TxHighPwrLevel_Normal\n");
575 } 572 }
576 } else { 573 } else {
577 if (undecorated_smoothed_pwdb >= 574 if (undecorated_smoothed_pwdb >=
@@ -579,7 +576,7 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
579 rtlpriv->dm.dynamic_txhighpower_lvl = 576 rtlpriv->dm.dynamic_txhighpower_lvl =
580 TXHIGHPWRLEVEL_LEVEL2; 577 TXHIGHPWRLEVEL_LEVEL2;
581 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 578 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
582 ("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n")); 579 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
583 } else 580 } else
584 if ((undecorated_smoothed_pwdb < 581 if ((undecorated_smoothed_pwdb <
585 (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) 582 (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3))
@@ -589,19 +586,19 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
589 rtlpriv->dm.dynamic_txhighpower_lvl = 586 rtlpriv->dm.dynamic_txhighpower_lvl =
590 TXHIGHPWRLEVEL_LEVEL1; 587 TXHIGHPWRLEVEL_LEVEL1;
591 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 588 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
592 ("TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n")); 589 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
593 } else if (undecorated_smoothed_pwdb < 590 } else if (undecorated_smoothed_pwdb <
594 (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) { 591 (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
595 rtlpriv->dm.dynamic_txhighpower_lvl = 592 rtlpriv->dm.dynamic_txhighpower_lvl =
596 TXHIGHPWRLEVEL_NORMAL; 593 TXHIGHPWRLEVEL_NORMAL;
597 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 594 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
598 ("TXHIGHPWRLEVEL_NORMAL\n")); 595 "TXHIGHPWRLEVEL_NORMAL\n");
599 } 596 }
600 } 597 }
601 if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) { 598 if ((rtlpriv->dm.dynamic_txhighpower_lvl != rtlpriv->dm.last_dtp_lvl)) {
602 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 599 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
603 ("PHY_SetTxPowerLevel8192S() Channel = %d\n", 600 "PHY_SetTxPowerLevel8192S() Channel = %d\n",
604 rtlphy->current_channel)); 601 rtlphy->current_channel);
605 rtl92d_phy_set_txpower_level(hw, rtlphy->current_channel); 602 rtl92d_phy_set_txpower_level(hw, rtlphy->current_channel);
606 } 603 }
607 rtlpriv->dm.last_dtp_lvl = rtlpriv->dm.dynamic_txhighpower_lvl; 604 rtlpriv->dm.last_dtp_lvl = rtlpriv->dm.dynamic_txhighpower_lvl;
@@ -717,7 +714,7 @@ static void rtl92d_dm_rxgain_tracking_thermalmeter(struct ieee80211_hw *hw)
717 u4tmp = (index_mapping[(rtlpriv->efuse.eeprom_thermalmeter - 714 u4tmp = (index_mapping[(rtlpriv->efuse.eeprom_thermalmeter -
718 rtlpriv->dm.thermalvalue_rxgain)]) << 12; 715 rtlpriv->dm.thermalvalue_rxgain)]) << 12;
719 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 716 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
720 ("===> Rx Gain %x\n", u4tmp)); 717 "===> Rx Gain %x\n", u4tmp);
721 for (i = RF90_PATH_A; i < rtlpriv->phy.num_total_rfpath; i++) 718 for (i = RF90_PATH_A; i < rtlpriv->phy.num_total_rfpath; i++)
722 rtl_set_rfreg(hw, i, 0x3C, BRFREGOFFSETMASK, 719 rtl_set_rfreg(hw, i, 0x3C, BRFREGOFFSETMASK,
723 (rtlpriv->phy.reg_rf3c[i] & (~(0xF000))) | u4tmp); 720 (rtlpriv->phy.reg_rf3c[i] & (~(0xF000))) | u4tmp);
@@ -741,27 +738,22 @@ static void rtl92d_bandtype_2_4G(struct ieee80211_hw *hw, long *temp_cckg,
741 if (!memcmp((void *)&temp_cck, 738 if (!memcmp((void *)&temp_cck,
742 (void *)&cckswing_table_ch14[i][2], 4)) { 739 (void *)&cckswing_table_ch14[i][2], 4)) {
743 *cck_index_old = (u8) i; 740 *cck_index_old = (u8) i;
744 RT_TRACE(rtlpriv, 741 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
745 COMP_POWER_TRACKING, 742 "Initial reg0x%x = 0x%lx, cck_index=0x%x, ch 14 %d\n",
746 DBG_LOUD, 743 RCCK0_TXFILTER2, temp_cck,
747 ("Initial reg0x%x = 0x%lx, " 744 *cck_index_old,
748 "cck_index=0x%x, ch 14 %d\n", 745 rtlpriv->dm.cck_inch14);
749 RCCK0_TXFILTER2,
750 temp_cck, *cck_index_old,
751 rtlpriv->dm.cck_inch14));
752 break; 746 break;
753 } 747 }
754 } else { 748 } else {
755 if (!memcmp((void *) &temp_cck, 749 if (!memcmp((void *) &temp_cck,
756 &cckswing_table_ch1ch13[i][2], 4)) { 750 &cckswing_table_ch1ch13[i][2], 4)) {
757 *cck_index_old = (u8) i; 751 *cck_index_old = (u8) i;
758 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, 752 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
759 DBG_LOUD, 753 "Initial reg0x%x = 0x%lx, cck_index = 0x%x, ch14 %d\n",
760 ("Initial reg0x%x = 0x%lx, " 754 RCCK0_TXFILTER2, temp_cck,
761 "cck_index = 0x%x, ch14 %d\n", 755 *cck_index_old,
762 RCCK0_TXFILTER2, 756 rtlpriv->dm.cck_inch14);
763 temp_cck, *cck_index_old,
764 rtlpriv->dm.cck_inch14));
765 break; 757 break;
766 } 758 }
767 } 759 }
@@ -884,12 +876,12 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
884 }; 876 };
885 877
886 rtlpriv->dm.txpower_trackinginit = true; 878 rtlpriv->dm.txpower_trackinginit = true;
887 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, ("\n")); 879 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "\n");
888 thermalvalue = (u8) rtl_get_rfreg(hw, RF90_PATH_A, RF_T_METER, 0xf800); 880 thermalvalue = (u8) rtl_get_rfreg(hw, RF90_PATH_A, RF_T_METER, 0xf800);
889 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 881 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
890 ("Readback Thermal Meter = 0x%x pre thermal meter 0x%x " 882 "Readback Thermal Meter = 0x%x pre thermal meter 0x%x eeprom_thermalmeter 0x%x\n",
891 "eeprom_thermalmeter 0x%x\n", thermalvalue, 883 thermalvalue,
892 rtlpriv->dm.thermalvalue, rtlefuse->eeprom_thermalmeter)); 884 rtlpriv->dm.thermalvalue, rtlefuse->eeprom_thermalmeter);
893 rtl92d_phy_ap_calibrate(hw, (thermalvalue - 885 rtl92d_phy_ap_calibrate(hw, (thermalvalue -
894 rtlefuse->eeprom_thermalmeter)); 886 rtlefuse->eeprom_thermalmeter));
895 if (is2t) 887 if (is2t)
@@ -904,10 +896,9 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
904 ofdm_index_old[0] = (u8) i; 896 ofdm_index_old[0] = (u8) i;
905 897
906 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 898 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
907 ("Initial pathA ele_d reg0x%x = 0x%lx," 899 "Initial pathA ele_d reg0x%x = 0x%lx, ofdm_index=0x%x\n",
908 " ofdm_index=0x%x\n",
909 ROFDM0_XATxIQIMBALANCE, 900 ROFDM0_XATxIQIMBALANCE,
910 ele_d, ofdm_index_old[0])); 901 ele_d, ofdm_index_old[0]);
911 break; 902 break;
912 } 903 }
913 } 904 }
@@ -920,11 +911,9 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
920 ofdm_index_old[1] = (u8) i; 911 ofdm_index_old[1] = (u8) i;
921 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, 912 RT_TRACE(rtlpriv, COMP_POWER_TRACKING,
922 DBG_LOUD, 913 DBG_LOUD,
923 ("Initial pathB ele_d reg " 914 "Initial pathB ele_d reg 0x%x = 0x%lx, ofdm_index = 0x%x\n",
924 "0x%x = 0x%lx, ofdm_index "
925 "= 0x%x\n",
926 ROFDM0_XBTxIQIMBALANCE, ele_d, 915 ROFDM0_XBTxIQIMBALANCE, ele_d,
927 ofdm_index_old[1])); 916 ofdm_index_old[1]);
928 break; 917 break;
929 } 918 }
930 } 919 }
@@ -952,7 +941,7 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
952 rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i]; 941 rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i];
953 rtlpriv->dm.cck_index = cck_index_old; 942 rtlpriv->dm.cck_index = cck_index_old;
954 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 943 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
955 ("reload ofdm index for band switch\n")); 944 "reload ofdm index for band switch\n");
956 } 945 }
957 rtlpriv->dm.thermalvalue_avg 946 rtlpriv->dm.thermalvalue_avg
958 [rtlpriv->dm.thermalvalue_avg_index] = thermalvalue; 947 [rtlpriv->dm.thermalvalue_avg_index] = thermalvalue;
@@ -995,12 +984,10 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
995 (thermalvalue - rtlpriv->dm.thermalvalue_rxgain) : 984 (thermalvalue - rtlpriv->dm.thermalvalue_rxgain) :
996 (rtlpriv->dm.thermalvalue_rxgain - thermalvalue); 985 (rtlpriv->dm.thermalvalue_rxgain - thermalvalue);
997 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 986 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
998 ("Readback Thermal Meter = 0x%x pre thermal meter 0x%x" 987 "Readback Thermal Meter = 0x%x pre thermal meter 0x%x eeprom_thermalmeter 0x%x delta 0x%x delta_lck 0x%x delta_iqk 0x%x\n",
999 " eeprom_thermalmeter 0x%x delta 0x%x " 988 thermalvalue, rtlpriv->dm.thermalvalue,
1000 "delta_lck 0x%x delta_iqk 0x%x\n", 989 rtlefuse->eeprom_thermalmeter, delta, delta_lck,
1001 thermalvalue, rtlpriv->dm.thermalvalue, 990 delta_iqk);
1002 rtlefuse->eeprom_thermalmeter, delta, delta_lck,
1003 delta_iqk));
1004 if ((delta_lck > rtlefuse->delta_lck) && 991 if ((delta_lck > rtlefuse->delta_lck) &&
1005 (rtlefuse->delta_lck != 0)) { 992 (rtlefuse->delta_lck != 0)) {
1006 rtlpriv->dm.thermalvalue_lck = thermalvalue; 993 rtlpriv->dm.thermalvalue_lck = thermalvalue;
@@ -1036,17 +1023,15 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
1036 } 1023 }
1037 if (is2t) { 1024 if (is2t) {
1038 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1025 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1039 ("temp OFDM_A_index=0x%x, OFDM_B_index" 1026 "temp OFDM_A_index=0x%x, OFDM_B_index = 0x%x,cck_index=0x%x\n",
1040 " = 0x%x,cck_index=0x%x\n", 1027 rtlpriv->dm.ofdm_index[0],
1041 rtlpriv->dm.ofdm_index[0], 1028 rtlpriv->dm.ofdm_index[1],
1042 rtlpriv->dm.ofdm_index[1], 1029 rtlpriv->dm.cck_index);
1043 rtlpriv->dm.cck_index));
1044 } else { 1030 } else {
1045 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1031 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1046 ("temp OFDM_A_index=0x%x,cck_index = " 1032 "temp OFDM_A_index=0x%x,cck_index = 0x%x\n",
1047 "0x%x\n", 1033 rtlpriv->dm.ofdm_index[0],
1048 rtlpriv->dm.ofdm_index[0], 1034 rtlpriv->dm.cck_index);
1049 rtlpriv->dm.cck_index));
1050 } 1035 }
1051 for (i = 0; i < rf; i++) { 1036 for (i = 0; i < rf; i++) {
1052 if (ofdm_index[i] > OFDM_TABLE_SIZE_92D - 1) 1037 if (ofdm_index[i] > OFDM_TABLE_SIZE_92D - 1)
@@ -1070,15 +1055,13 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
1070 } 1055 }
1071 if (is2t) { 1056 if (is2t) {
1072 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1057 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1073 ("new OFDM_A_index=0x%x, OFDM_B_index " 1058 "new OFDM_A_index=0x%x, OFDM_B_index = 0x%x, cck_index=0x%x\n",
1074 "= 0x%x, cck_index=0x%x\n",
1075 ofdm_index[0], ofdm_index[1], 1059 ofdm_index[0], ofdm_index[1],
1076 cck_index)); 1060 cck_index);
1077 } else { 1061 } else {
1078 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1062 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1079 ("new OFDM_A_index=0x%x,cck_index = " 1063 "new OFDM_A_index=0x%x,cck_index = 0x%x\n",
1080 "0x%x\n", 1064 ofdm_index[0], cck_index);
1081 ofdm_index[0], cck_index));
1082 } 1065 }
1083 ele_d = (ofdmswing_table[(u8) ofdm_index[0]] & 1066 ele_d = (ofdmswing_table[(u8) ofdm_index[0]] &
1084 0xFFC00000) >> 22; 1067 0xFFC00000) >> 22;
@@ -1124,12 +1107,10 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
1124 } 1107 }
1125 1108
1126 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1109 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1127 ("TxPwrTracking for interface %d path A: X =" 1110 "TxPwrTracking for interface %d path A: X = 0x%lx, Y = 0x%lx ele_A = 0x%lx ele_C = 0x%lx ele_D = 0x%lx 0xe94 = 0x%lx 0xe9c = 0x%lx\n",
1128 " 0x%lx, Y = 0x%lx ele_A = 0x%lx ele_C = " 1111 rtlhal->interfaceindex,
1129 "0x%lx ele_D = 0x%lx 0xe94 = 0x%lx 0xe9c = "
1130 "0x%lx\n", rtlhal->interfaceindex,
1131 val_x, val_y, ele_a, ele_c, ele_d, 1112 val_x, val_y, ele_a, ele_c, ele_d,
1132 val_x, val_y)); 1113 val_x, val_y);
1133 1114
1134 if (rtlhal->current_bandtype == BAND_ON_2_4G) { 1115 if (rtlhal->current_bandtype == BAND_ON_2_4G) {
1135 /* Adjust CCK according to IQK result */ 1116 /* Adjust CCK according to IQK result */
@@ -1232,20 +1213,16 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
1232 BIT(28), 0x00); 1213 BIT(28), 0x00);
1233 } 1214 }
1234 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1215 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1235 ("TxPwrTracking path B: X = 0x%lx, " 1216 "TxPwrTracking path B: X = 0x%lx, Y = 0x%lx ele_A = 0x%lx ele_C = 0x%lx ele_D = 0x%lx 0xeb4 = 0x%lx 0xebc = 0x%lx\n",
1236 "Y = 0x%lx ele_A = 0x%lx ele_C = 0x" 1217 val_x, val_y, ele_a, ele_c,
1237 "%lx ele_D = 0x%lx 0xeb4 = 0x%lx " 1218 ele_d, val_x, val_y);
1238 "0xebc = 0x%lx\n",
1239 val_x, val_y, ele_a, ele_c,
1240 ele_d, val_x, val_y));
1241 } 1219 }
1242 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1220 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1243 ("TxPwrTracking 0xc80 = 0x%x, 0xc94 = " 1221 "TxPwrTracking 0xc80 = 0x%x, 0xc94 = 0x%x RF 0x24 = 0x%x\n",
1244 "0x%x RF 0x24 = 0x%x\n",
1245 rtl_get_bbreg(hw, 0xc80, BMASKDWORD), 1222 rtl_get_bbreg(hw, 0xc80, BMASKDWORD),
1246 rtl_get_bbreg(hw, 0xc94, BMASKDWORD), 1223 rtl_get_bbreg(hw, 0xc94, BMASKDWORD),
1247 rtl_get_rfreg(hw, RF90_PATH_A, 0x24, 1224 rtl_get_rfreg(hw, RF90_PATH_A, 0x24,
1248 BRFREGOFFSETMASK))); 1225 BRFREGOFFSETMASK));
1249 } 1226 }
1250 if ((delta_iqk > rtlefuse->delta_iqk) && 1227 if ((delta_iqk > rtlefuse->delta_iqk) &&
1251 (rtlefuse->delta_iqk != 0)) { 1228 (rtlefuse->delta_iqk != 0)) {
@@ -1262,7 +1239,7 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
1262 rtlpriv->dm.thermalvalue = thermalvalue; 1239 rtlpriv->dm.thermalvalue = thermalvalue;
1263 } 1240 }
1264 1241
1265 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, ("<===\n")); 1242 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "<===\n");
1266} 1243}
1267 1244
1268static void rtl92d_dm_initialize_txpower_tracking(struct ieee80211_hw *hw) 1245static void rtl92d_dm_initialize_txpower_tracking(struct ieee80211_hw *hw)
@@ -1273,8 +1250,8 @@ static void rtl92d_dm_initialize_txpower_tracking(struct ieee80211_hw *hw)
1273 rtlpriv->dm.txpower_trackinginit = false; 1250 rtlpriv->dm.txpower_trackinginit = false;
1274 rtlpriv->dm.txpower_track_control = true; 1251 rtlpriv->dm.txpower_track_control = true;
1275 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1252 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1276 ("pMgntInfo->txpower_tracking = %d\n", 1253 "pMgntInfo->txpower_tracking = %d\n",
1277 rtlpriv->dm.txpower_tracking)); 1254 rtlpriv->dm.txpower_tracking);
1278} 1255}
1279 1256
1280void rtl92d_dm_check_txpower_tracking_thermal_meter(struct ieee80211_hw *hw) 1257void rtl92d_dm_check_txpower_tracking_thermal_meter(struct ieee80211_hw *hw)
@@ -1289,12 +1266,12 @@ void rtl92d_dm_check_txpower_tracking_thermal_meter(struct ieee80211_hw *hw)
1289 rtl_set_rfreg(hw, RF90_PATH_A, RF_T_METER, BIT(17) | 1266 rtl_set_rfreg(hw, RF90_PATH_A, RF_T_METER, BIT(17) |
1290 BIT(16), 0x03); 1267 BIT(16), 0x03);
1291 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1268 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1292 ("Trigger 92S Thermal Meter!!\n")); 1269 "Trigger 92S Thermal Meter!!\n");
1293 tm_trigger = 1; 1270 tm_trigger = 1;
1294 return; 1271 return;
1295 } else { 1272 } else {
1296 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, 1273 RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
1297 ("Schedule TxPowerTracking direct call!!\n")); 1274 "Schedule TxPowerTracking direct call!!\n");
1298 rtl92d_dm_txpower_tracking_callback_thermalmeter(hw); 1275 rtl92d_dm_txpower_tracking_callback_thermalmeter(hw);
1299 tm_trigger = 0; 1276 tm_trigger = 0;
1300 } 1277 }