aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8188ee/dm.c35
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c b/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
index 7ebf6e06871f..d930c1f78721 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
@@ -342,38 +342,6 @@ static void dm_tx_pwr_track_set_pwr(struct ieee80211_hw *hw,
342 } 342 }
343} 343}
344 344
345static void rtl88e_dm_diginit(struct ieee80211_hw *hw)
346{
347 struct rtl_priv *rtlpriv = rtl_priv(hw);
348 struct dig_t *dm_dig = &rtlpriv->dm_digtable;
349
350 dm_dig->dig_enable_flag = true;
351 dm_dig->cur_igvalue = rtl_get_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f);
352 dm_dig->pre_igvalue = 0;
353 dm_dig->cur_sta_cstate = DIG_STA_DISCONNECT;
354 dm_dig->presta_cstate = DIG_STA_DISCONNECT;
355 dm_dig->curmultista_cstate = DIG_MULTISTA_DISCONNECT;
356 dm_dig->rssi_lowthresh = DM_DIG_THRESH_LOW;
357 dm_dig->rssi_highthresh = DM_DIG_THRESH_HIGH;
358 dm_dig->fa_lowthresh = DM_FALSEALARM_THRESH_LOW;
359 dm_dig->fa_highthresh = DM_FALSEALARM_THRESH_HIGH;
360 dm_dig->rx_gain_max = DM_DIG_MAX;
361 dm_dig->rx_gain_min = DM_DIG_MIN;
362 dm_dig->back_val = DM_DIG_BACKOFF_DEFAULT;
363 dm_dig->back_range_max = DM_DIG_BACKOFF_MAX;
364 dm_dig->back_range_min = DM_DIG_BACKOFF_MIN;
365 dm_dig->pre_cck_cca_thres = 0xff;
366 dm_dig->cur_cck_cca_thres = 0x83;
367 dm_dig->forbidden_igi = DM_DIG_MIN;
368 dm_dig->large_fa_hit = 0;
369 dm_dig->recover_cnt = 0;
370 dm_dig->dig_min_0 = 0x25;
371 dm_dig->dig_min_1 = 0x25;
372 dm_dig->media_connect_0 = false;
373 dm_dig->media_connect_1 = false;
374 rtlpriv->dm.dm_initialgain_enable = true;
375}
376
377static u8 rtl88e_dm_initial_gain_min_pwdb(struct ieee80211_hw *hw) 345static u8 rtl88e_dm_initial_gain_min_pwdb(struct ieee80211_hw *hw)
378{ 346{
379 struct rtl_priv *rtlpriv = rtl_priv(hw); 347 struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -1797,9 +1765,10 @@ static void rtl88e_dm_antenna_diversity(struct ieee80211_hw *hw)
1797void rtl88e_dm_init(struct ieee80211_hw *hw) 1765void rtl88e_dm_init(struct ieee80211_hw *hw)
1798{ 1766{
1799 struct rtl_priv *rtlpriv = rtl_priv(hw); 1767 struct rtl_priv *rtlpriv = rtl_priv(hw);
1768 u32 cur_igvalue = rtl_get_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f);
1800 1769
1801 rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER; 1770 rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER;
1802 rtl88e_dm_diginit(hw); 1771 rtl_dm_diginit(hw, cur_igvalue);
1803 rtl88e_dm_init_dynamic_txpower(hw); 1772 rtl88e_dm_init_dynamic_txpower(hw);
1804 rtl88e_dm_init_edca_turbo(hw); 1773 rtl88e_dm_init_edca_turbo(hw);
1805 rtl88e_dm_init_rate_adaptive_mask(hw); 1774 rtl88e_dm_init_rate_adaptive_mask(hw);