aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2012-10-25 14:46:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-30 16:17:54 -0400
commitda17fcffb1dff98463640d1deaeafbc6a7e73a41 (patch)
tree1687b3f8112674f044e87f685c6c75332266641e /drivers/net/wireless/rtlwifi/rtl8192de/dm.c
parent0bd899e76476e0134f7289a003090165adea2611 (diff)
rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: rtl8192de: Shorten some variable names
The private data areas for these drivers contain some very long variable names that cause difficulty in fitting source lines to an 80-character limit. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de/dm.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/dm.c95
1 files changed, 47 insertions, 48 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
index ed868c396c25..fd8df233ff22 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
@@ -35,7 +35,7 @@
35#include "dm.h" 35#include "dm.h"
36#include "fw.h" 36#include "fw.h"
37 37
38#define UNDEC_SM_PWDB entry_min_undecoratedsmoothed_pwdb 38#define UNDEC_SM_PWDB entry_min_undec_sm_pwdb
39 39
40static const u32 ofdmswing_table[OFDM_TABLE_SIZE_92D] = { 40static const u32 ofdmswing_table[OFDM_TABLE_SIZE_92D] = {
41 0x7f8001fe, /* 0, +6.0dB */ 41 0x7f8001fe, /* 0, +6.0dB */
@@ -164,18 +164,18 @@ static void rtl92d_dm_diginit(struct ieee80211_hw *hw)
164 de_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX; 164 de_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
165 de_digtable->cur_igvalue = 0x20; 165 de_digtable->cur_igvalue = 0x20;
166 de_digtable->pre_igvalue = 0x0; 166 de_digtable->pre_igvalue = 0x0;
167 de_digtable->cursta_connectstate = DIG_STA_DISCONNECT; 167 de_digtable->cursta_cstate = DIG_STA_DISCONNECT;
168 de_digtable->presta_connectstate = DIG_STA_DISCONNECT; 168 de_digtable->presta_cstate = DIG_STA_DISCONNECT;
169 de_digtable->curmultista_connectstate = DIG_MULTISTA_DISCONNECT; 169 de_digtable->curmultista_cstate = DIG_MULTISTA_DISCONNECT;
170 de_digtable->rssi_lowthresh = DM_DIG_THRESH_LOW; 170 de_digtable->rssi_lowthresh = DM_DIG_THRESH_LOW;
171 de_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH; 171 de_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH;
172 de_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW; 172 de_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW;
173 de_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH; 173 de_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH;
174 de_digtable->rx_gain_range_max = DM_DIG_FA_UPPER; 174 de_digtable->rx_gain_range_max = DM_DIG_FA_UPPER;
175 de_digtable->rx_gain_range_min = DM_DIG_FA_LOWER; 175 de_digtable->rx_gain_range_min = DM_DIG_FA_LOWER;
176 de_digtable->backoff_val = DM_DIG_BACKOFF_DEFAULT; 176 de_digtable->back_val = DM_DIG_BACKOFF_DEFAULT;
177 de_digtable->backoff_val_range_max = DM_DIG_BACKOFF_MAX; 177 de_digtable->back_range_max = DM_DIG_BACKOFF_MAX;
178 de_digtable->backoff_val_range_min = DM_DIG_BACKOFF_MIN; 178 de_digtable->back_range_min = DM_DIG_BACKOFF_MIN;
179 de_digtable->pre_cck_pd_state = CCK_PD_STAGE_LOWRSSI; 179 de_digtable->pre_cck_pd_state = CCK_PD_STAGE_LOWRSSI;
180 de_digtable->cur_cck_pd_state = CCK_PD_STAGE_MAX; 180 de_digtable->cur_cck_pd_state = CCK_PD_STAGE_MAX;
181 de_digtable->large_fa_hit = 0; 181 de_digtable->large_fa_hit = 0;
@@ -273,35 +273,34 @@ static void rtl92d_dm_find_minimum_rssi(struct ieee80211_hw *hw)
273 /* Determine the minimum RSSI */ 273 /* Determine the minimum RSSI */
274 if ((mac->link_state < MAC80211_LINKED) && 274 if ((mac->link_state < MAC80211_LINKED) &&
275 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) { 275 (rtlpriv->dm.UNDEC_SM_PWDB == 0)) {
276 de_digtable->min_undecorated_pwdb_for_dm = 0; 276 de_digtable->min_undec_pwdb_for_dm = 0;
277 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 277 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
278 "Not connected to any\n"); 278 "Not connected to any\n");
279 } 279 }
280 if (mac->link_state >= MAC80211_LINKED) { 280 if (mac->link_state >= MAC80211_LINKED) {
281 if (mac->opmode == NL80211_IFTYPE_AP || 281 if (mac->opmode == NL80211_IFTYPE_AP ||
282 mac->opmode == NL80211_IFTYPE_ADHOC) { 282 mac->opmode == NL80211_IFTYPE_ADHOC) {
283 de_digtable->min_undecorated_pwdb_for_dm = 283 de_digtable->min_undec_pwdb_for_dm =
284 rtlpriv->dm.UNDEC_SM_PWDB; 284 rtlpriv->dm.UNDEC_SM_PWDB;
285 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 285 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
286 "AP Client PWDB = 0x%lx\n", 286 "AP Client PWDB = 0x%lx\n",
287 rtlpriv->dm.UNDEC_SM_PWDB); 287 rtlpriv->dm.UNDEC_SM_PWDB);
288 } else { 288 } else {
289 de_digtable->min_undecorated_pwdb_for_dm = 289 de_digtable->min_undec_pwdb_for_dm =
290 rtlpriv->dm.undecorated_smoothed_pwdb; 290 rtlpriv->dm.undec_sm_pwdb;
291 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 291 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
292 "STA Default Port PWDB = 0x%x\n", 292 "STA Default Port PWDB = 0x%x\n",
293 de_digtable->min_undecorated_pwdb_for_dm); 293 de_digtable->min_undec_pwdb_for_dm);
294 } 294 }
295 } else { 295 } else {
296 de_digtable->min_undecorated_pwdb_for_dm = 296 de_digtable->min_undec_pwdb_for_dm = rtlpriv->dm.UNDEC_SM_PWDB;
297 rtlpriv->dm.UNDEC_SM_PWDB;
298 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD, 297 RT_TRACE(rtlpriv, COMP_BB_POWERSAVING, DBG_LOUD,
299 "AP Ext Port or disconnect PWDB = 0x%x\n", 298 "AP Ext Port or disconnect PWDB = 0x%x\n",
300 de_digtable->min_undecorated_pwdb_for_dm); 299 de_digtable->min_undec_pwdb_for_dm);
301 } 300 }
302 301
303 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "MinUndecoratedPWDBForDM =%d\n", 302 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "MinUndecoratedPWDBForDM =%d\n",
304 de_digtable->min_undecorated_pwdb_for_dm); 303 de_digtable->min_undec_pwdb_for_dm);
305} 304}
306 305
307static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw) 306static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
@@ -310,16 +309,16 @@ static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
310 struct dig_t *de_digtable = &rtlpriv->dm_digtable; 309 struct dig_t *de_digtable = &rtlpriv->dm_digtable;
311 unsigned long flag = 0; 310 unsigned long flag = 0;
312 311
313 if (de_digtable->cursta_connectstate == DIG_STA_CONNECT) { 312 if (de_digtable->cursta_cstate == DIG_STA_CONNECT) {
314 if (de_digtable->pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) { 313 if (de_digtable->pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) {
315 if (de_digtable->min_undecorated_pwdb_for_dm <= 25) 314 if (de_digtable->min_undec_pwdb_for_dm <= 25)
316 de_digtable->cur_cck_pd_state = 315 de_digtable->cur_cck_pd_state =
317 CCK_PD_STAGE_LOWRSSI; 316 CCK_PD_STAGE_LOWRSSI;
318 else 317 else
319 de_digtable->cur_cck_pd_state = 318 de_digtable->cur_cck_pd_state =
320 CCK_PD_STAGE_HIGHRSSI; 319 CCK_PD_STAGE_HIGHRSSI;
321 } else { 320 } else {
322 if (de_digtable->min_undecorated_pwdb_for_dm <= 20) 321 if (de_digtable->min_undec_pwdb_for_dm <= 20)
323 de_digtable->cur_cck_pd_state = 322 de_digtable->cur_cck_pd_state =
324 CCK_PD_STAGE_LOWRSSI; 323 CCK_PD_STAGE_LOWRSSI;
325 else 324 else
@@ -342,7 +341,7 @@ static void rtl92d_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
342 de_digtable->pre_cck_pd_state = de_digtable->cur_cck_pd_state; 341 de_digtable->pre_cck_pd_state = de_digtable->cur_cck_pd_state;
343 } 342 }
344 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CurSTAConnectState=%s\n", 343 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CurSTAConnectState=%s\n",
345 de_digtable->cursta_connectstate == DIG_STA_CONNECT ? 344 de_digtable->cursta_cstate == DIG_STA_CONNECT ?
346 "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT"); 345 "DIG_STA_CONNECT " : "DIG_STA_DISCONNECT");
347 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CCKPDStage=%s\n", 346 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "CCKPDStage=%s\n",
348 de_digtable->cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ? 347 de_digtable->cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI ?
@@ -358,9 +357,9 @@ void rtl92d_dm_write_dig(struct ieee80211_hw *hw)
358 struct dig_t *de_digtable = &rtlpriv->dm_digtable; 357 struct dig_t *de_digtable = &rtlpriv->dm_digtable;
359 358
360 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 359 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
361 "cur_igvalue = 0x%x, pre_igvalue = 0x%x, backoff_val = %d\n", 360 "cur_igvalue = 0x%x, pre_igvalue = 0x%x, back_val = %d\n",
362 de_digtable->cur_igvalue, de_digtable->pre_igvalue, 361 de_digtable->cur_igvalue, de_digtable->pre_igvalue,
363 de_digtable->backoff_val); 362 de_digtable->back_val);
364 if (de_digtable->dig_enable_flag == false) { 363 if (de_digtable->dig_enable_flag == false) {
365 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "DIG is disabled\n"); 364 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "DIG is disabled\n");
366 de_digtable->pre_igvalue = 0x17; 365 de_digtable->pre_igvalue = 0x17;
@@ -382,13 +381,13 @@ static void rtl92d_early_mode_enabled(struct rtl_priv *rtlpriv)
382 if ((rtlpriv->mac80211.link_state >= MAC80211_LINKED) && 381 if ((rtlpriv->mac80211.link_state >= MAC80211_LINKED) &&
383 (rtlpriv->mac80211.vendor == PEER_CISCO)) { 382 (rtlpriv->mac80211.vendor == PEER_CISCO)) {
384 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "IOT_PEER = CISCO\n"); 383 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "IOT_PEER = CISCO\n");
385 if (de_digtable->last_min_undecorated_pwdb_for_dm >= 50 384 if (de_digtable->last_min_undec_pwdb_for_dm >= 50
386 && de_digtable->min_undecorated_pwdb_for_dm < 50) { 385 && de_digtable->min_undec_pwdb_for_dm < 50) {
387 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00); 386 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x00);
388 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 387 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
389 "Early Mode Off\n"); 388 "Early Mode Off\n");
390 } else if (de_digtable->last_min_undecorated_pwdb_for_dm <= 55 && 389 } else if (de_digtable->last_min_undec_pwdb_for_dm <= 55 &&
391 de_digtable->min_undecorated_pwdb_for_dm > 55) { 390 de_digtable->min_undec_pwdb_for_dm > 55) {
392 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f); 391 rtl_write_byte(rtlpriv, REG_EARLY_MODE_CONTROL, 0x0f);
393 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, 392 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
394 "Early Mode On\n"); 393 "Early Mode On\n");
@@ -409,8 +408,8 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
409 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "==>\n"); 408 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "==>\n");
410 if (rtlpriv->rtlhal.earlymode_enable) { 409 if (rtlpriv->rtlhal.earlymode_enable) {
411 rtl92d_early_mode_enabled(rtlpriv); 410 rtl92d_early_mode_enabled(rtlpriv);
412 de_digtable->last_min_undecorated_pwdb_for_dm = 411 de_digtable->last_min_undec_pwdb_for_dm =
413 de_digtable->min_undecorated_pwdb_for_dm; 412 de_digtable->min_undec_pwdb_for_dm;
414 } 413 }
415 if (!rtlpriv->dm.dm_initialgain_enable) 414 if (!rtlpriv->dm.dm_initialgain_enable)
416 return; 415 return;
@@ -428,9 +427,9 @@ static void rtl92d_dm_dig(struct ieee80211_hw *hw)
428 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "progress\n"); 427 RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "progress\n");
429 /* Decide the current status and if modify initial gain or not */ 428 /* Decide the current status and if modify initial gain or not */
430 if (rtlpriv->mac80211.link_state >= MAC80211_LINKED) 429 if (rtlpriv->mac80211.link_state >= MAC80211_LINKED)
431 de_digtable->cursta_connectstate = DIG_STA_CONNECT; 430 de_digtable->cursta_cstate = DIG_STA_CONNECT;
432 else 431 else
433 de_digtable->cursta_connectstate = DIG_STA_DISCONNECT; 432 de_digtable->cursta_cstate = DIG_STA_DISCONNECT;
434 433
435 /* adjust initial gain according to false alarm counter */ 434 /* adjust initial gain according to false alarm counter */
436 if (falsealm_cnt->cnt_all < DM_DIG_FA_TH0) 435 if (falsealm_cnt->cnt_all < DM_DIG_FA_TH0)
@@ -522,7 +521,7 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
522 struct rtl_phy *rtlphy = &(rtlpriv->phy); 521 struct rtl_phy *rtlphy = &(rtlpriv->phy);
523 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); 522 struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
524 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 523 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
525 long undecorated_smoothed_pwdb; 524 long undec_sm_pwdb;
526 525
527 if ((!rtlpriv->dm.dynamic_txpower_enable) 526 if ((!rtlpriv->dm.dynamic_txpower_enable)
528 || rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) { 527 || rtlpriv->dm.dm_flag & HAL_DM_HIPWR_DISABLE) {
@@ -539,62 +538,62 @@ static void rtl92d_dm_dynamic_txpower(struct ieee80211_hw *hw)
539 } 538 }
540 if (mac->link_state >= MAC80211_LINKED) { 539 if (mac->link_state >= MAC80211_LINKED) {
541 if (mac->opmode == NL80211_IFTYPE_ADHOC) { 540 if (mac->opmode == NL80211_IFTYPE_ADHOC) {
542 undecorated_smoothed_pwdb = 541 undec_sm_pwdb =
543 rtlpriv->dm.UNDEC_SM_PWDB; 542 rtlpriv->dm.UNDEC_SM_PWDB;
544 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 543 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
545 "IBSS Client PWDB = 0x%lx\n", 544 "IBSS Client PWDB = 0x%lx\n",
546 undecorated_smoothed_pwdb); 545 undec_sm_pwdb);
547 } else { 546 } else {
548 undecorated_smoothed_pwdb = 547 undec_sm_pwdb =
549 rtlpriv->dm.undecorated_smoothed_pwdb; 548 rtlpriv->dm.undec_sm_pwdb;
550 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 549 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
551 "STA Default Port PWDB = 0x%lx\n", 550 "STA Default Port PWDB = 0x%lx\n",
552 undecorated_smoothed_pwdb); 551 undec_sm_pwdb);
553 } 552 }
554 } else { 553 } else {
555 undecorated_smoothed_pwdb = 554 undec_sm_pwdb =
556 rtlpriv->dm.UNDEC_SM_PWDB; 555 rtlpriv->dm.UNDEC_SM_PWDB;
557 556
558 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 557 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
559 "AP Ext Port PWDB = 0x%lx\n", 558 "AP Ext Port PWDB = 0x%lx\n",
560 undecorated_smoothed_pwdb); 559 undec_sm_pwdb);
561 } 560 }
562 if (rtlhal->current_bandtype == BAND_ON_5G) { 561 if (rtlhal->current_bandtype == BAND_ON_5G) {
563 if (undecorated_smoothed_pwdb >= 0x33) { 562 if (undec_sm_pwdb >= 0x33) {
564 rtlpriv->dm.dynamic_txhighpower_lvl = 563 rtlpriv->dm.dynamic_txhighpower_lvl =
565 TXHIGHPWRLEVEL_LEVEL2; 564 TXHIGHPWRLEVEL_LEVEL2;
566 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 565 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
567 "5G:TxHighPwrLevel_Level2 (TxPwr=0x0)\n"); 566 "5G:TxHighPwrLevel_Level2 (TxPwr=0x0)\n");
568 } else if ((undecorated_smoothed_pwdb < 0x33) 567 } else if ((undec_sm_pwdb < 0x33)
569 && (undecorated_smoothed_pwdb >= 0x2b)) { 568 && (undec_sm_pwdb >= 0x2b)) {
570 rtlpriv->dm.dynamic_txhighpower_lvl = 569 rtlpriv->dm.dynamic_txhighpower_lvl =
571 TXHIGHPWRLEVEL_LEVEL1; 570 TXHIGHPWRLEVEL_LEVEL1;
572 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 571 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
573 "5G:TxHighPwrLevel_Level1 (TxPwr=0x10)\n"); 572 "5G:TxHighPwrLevel_Level1 (TxPwr=0x10)\n");
574 } else if (undecorated_smoothed_pwdb < 0x2b) { 573 } else if (undec_sm_pwdb < 0x2b) {
575 rtlpriv->dm.dynamic_txhighpower_lvl = 574 rtlpriv->dm.dynamic_txhighpower_lvl =
576 TXHIGHPWRLEVEL_NORMAL; 575 TXHIGHPWRLEVEL_NORMAL;
577 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD, 576 RT_TRACE(rtlpriv, COMP_HIPWR, DBG_LOUD,
578 "5G:TxHighPwrLevel_Normal\n"); 577 "5G:TxHighPwrLevel_Normal\n");
579 } 578 }
580 } else { 579 } else {
581 if (undecorated_smoothed_pwdb >= 580 if (undec_sm_pwdb >=
582 TX_POWER_NEAR_FIELD_THRESH_LVL2) { 581 TX_POWER_NEAR_FIELD_THRESH_LVL2) {
583 rtlpriv->dm.dynamic_txhighpower_lvl = 582 rtlpriv->dm.dynamic_txhighpower_lvl =
584 TXHIGHPWRLEVEL_LEVEL2; 583 TXHIGHPWRLEVEL_LEVEL2;
585 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 584 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
586 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n"); 585 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x0)\n");
587 } else 586 } else
588 if ((undecorated_smoothed_pwdb < 587 if ((undec_sm_pwdb <
589 (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3)) 588 (TX_POWER_NEAR_FIELD_THRESH_LVL2 - 3))
590 && (undecorated_smoothed_pwdb >= 589 && (undec_sm_pwdb >=
591 TX_POWER_NEAR_FIELD_THRESH_LVL1)) { 590 TX_POWER_NEAR_FIELD_THRESH_LVL1)) {
592 591
593 rtlpriv->dm.dynamic_txhighpower_lvl = 592 rtlpriv->dm.dynamic_txhighpower_lvl =
594 TXHIGHPWRLEVEL_LEVEL1; 593 TXHIGHPWRLEVEL_LEVEL1;
595 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, 594 RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD,
596 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n"); 595 "TXHIGHPWRLEVEL_LEVEL1 (TxPwr=0x10)\n");
597 } else if (undecorated_smoothed_pwdb < 596 } else if (undec_sm_pwdb <
598 (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) { 597 (TX_POWER_NEAR_FIELD_THRESH_LVL1 - 5)) {
599 rtlpriv->dm.dynamic_txhighpower_lvl = 598 rtlpriv->dm.dynamic_txhighpower_lvl =
600 TXHIGHPWRLEVEL_NORMAL; 599 TXHIGHPWRLEVEL_NORMAL;
@@ -620,7 +619,7 @@ static void rtl92d_dm_pwdb_monitor(struct ieee80211_hw *hw)
620 return; 619 return;
621 /* Indicate Rx signal strength to FW. */ 620 /* Indicate Rx signal strength to FW. */
622 if (rtlpriv->dm.useramask) { 621 if (rtlpriv->dm.useramask) {
623 u32 temp = rtlpriv->dm.undecorated_smoothed_pwdb; 622 u32 temp = rtlpriv->dm.undec_sm_pwdb;
624 623
625 temp <<= 16; 624 temp <<= 16;
626 temp |= 0x100; 625 temp |= 0x100;
@@ -629,7 +628,7 @@ static void rtl92d_dm_pwdb_monitor(struct ieee80211_hw *hw)
629 rtl92d_fill_h2c_cmd(hw, H2C_RSSI_REPORT, 3, (u8 *) (&temp)); 628 rtl92d_fill_h2c_cmd(hw, H2C_RSSI_REPORT, 3, (u8 *) (&temp));
630 } else { 629 } else {
631 rtl_write_byte(rtlpriv, 0x4fe, 630 rtl_write_byte(rtlpriv, 0x4fe,
632 (u8) rtlpriv->dm.undecorated_smoothed_pwdb); 631 (u8) rtlpriv->dm.undec_sm_pwdb);
633 } 632 }
634} 633}
635 634