rtlwifi: rtl8723be: Convert driver to use common DM table initialization
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 6 Jan 2015 15:58:10 +0000 (09:58 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 9 Jan 2015 13:48:17 +0000 (15:48 +0200)
Convert driver rtl8723be to use routine rtl_dm_diginit().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/rtl8723be/dm.c

index ddf45d9fd6eacf118ce8ad3b0d61529a3e30c75d..2367e8f47a5b57bd1c3ee9ce6080ecf4986cf168 100644 (file)
@@ -212,35 +212,6 @@ void rtl8723be_dm_txpower_track_adjust(struct ieee80211_hw *hw, u8 type,
                (pwr_val << 16) | (pwr_val << 24);
 }
 
-static void rtl8723be_dm_diginit(struct ieee80211_hw *hw)
-{
-       struct rtl_priv *rtlpriv = rtl_priv(hw);
-       struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
-
-       dm_digtable->dig_enable_flag = true;
-       dm_digtable->cur_igvalue = rtl_get_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f);
-       dm_digtable->rssi_lowthresh = DM_DIG_THRESH_LOW;
-       dm_digtable->rssi_highthresh = DM_DIG_THRESH_HIGH;
-       dm_digtable->fa_lowthresh = DM_FALSEALARM_THRESH_LOW;
-       dm_digtable->fa_highthresh = DM_FALSEALARM_THRESH_HIGH;
-       dm_digtable->rx_gain_max = DM_DIG_MAX;
-       dm_digtable->rx_gain_min = DM_DIG_MIN;
-       dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT;
-       dm_digtable->back_range_max = DM_DIG_BACKOFF_MAX;
-       dm_digtable->back_range_min = DM_DIG_BACKOFF_MIN;
-       dm_digtable->pre_cck_cca_thres = 0xff;
-       dm_digtable->cur_cck_cca_thres = 0x83;
-       dm_digtable->forbidden_igi = DM_DIG_MIN;
-       dm_digtable->large_fa_hit = 0;
-       dm_digtable->recover_cnt = 0;
-       dm_digtable->dig_min_0 = DM_DIG_MIN;
-       dm_digtable->dig_min_1 = DM_DIG_MIN;
-       dm_digtable->media_connect_0 = false;
-       dm_digtable->media_connect_1 = false;
-       rtlpriv->dm.dm_initialgain_enable = true;
-       dm_digtable->bt30_cur_igi = 0x32;
-}
-
 void rtl8723be_dm_init_rate_adaptive_mask(struct ieee80211_hw *hw)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -294,9 +265,10 @@ static void rtl8723be_dm_init_dynamic_atc_switch(struct ieee80211_hw *hw)
 void rtl8723be_dm_init(struct ieee80211_hw *hw)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
+       u32 cur_igvalue = rtl_get_bbreg(hw, ROFDM0_XAAGCCORE1, 0x7f);
 
        rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER;
-       rtl8723be_dm_diginit(hw);
+       rtl_dm_diginit(hw, cur_igvalue);
        rtl8723be_dm_init_rate_adaptive_mask(hw);
        rtl8723_dm_init_edca_turbo(hw);
        rtl8723_dm_init_dynamic_bb_powersaving(hw);