Commit 1f6969fb authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: Unify variable naming for all drivers

Some drivers refer to a particular quantity in the driver's private
are by one name, while others use a different name. These differences
are removed.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 8bd61f8d
...@@ -221,7 +221,7 @@ static void rtl92c_dm_diginit(struct ieee80211_hw *hw) ...@@ -221,7 +221,7 @@ static void rtl92c_dm_diginit(struct ieee80211_hw *hw)
dm_digtable->forbidden_igi = DM_DIG_MIN; dm_digtable->forbidden_igi = DM_DIG_MIN;
dm_digtable->large_fa_hit = 0; dm_digtable->large_fa_hit = 0;
dm_digtable->recover_cnt = 0; dm_digtable->recover_cnt = 0;
dm_digtable->dig_dynamic_min = 0x25; dm_digtable->dig_min_0 = 0x25;
} }
static u8 rtl92c_dm_initial_gain_min_pwdb(struct ieee80211_hw *hw) static u8 rtl92c_dm_initial_gain_min_pwdb(struct ieee80211_hw *hw)
......
...@@ -172,8 +172,8 @@ static void rtl92ee_dm_diginit(struct ieee80211_hw *hw) ...@@ -172,8 +172,8 @@ static void rtl92ee_dm_diginit(struct ieee80211_hw *hw)
dm_dig->forbidden_igi = DM_DIG_MIN; dm_dig->forbidden_igi = DM_DIG_MIN;
dm_dig->large_fa_hit = 0; dm_dig->large_fa_hit = 0;
dm_dig->recover_cnt = 0; dm_dig->recover_cnt = 0;
dm_dig->dig_dynamic_min = DM_DIG_MIN; dm_dig->dig_min_0 = DM_DIG_MIN;
dm_dig->dig_dynamic_min_1 = DM_DIG_MIN; dm_dig->dig_min_1 = DM_DIG_MIN;
dm_dig->media_connect_0 = false; dm_dig->media_connect_0 = false;
dm_dig->media_connect_1 = false; dm_dig->media_connect_1 = false;
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
...@@ -298,7 +298,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -298,7 +298,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct dig_t *dm_dig = &rtlpriv->dm_digtable; struct dig_t *dm_dig = &rtlpriv->dm_digtable;
u8 dig_dynamic_min , dig_maxofmin; u8 dig_min_0, dig_maxofmin;
bool bfirstconnect , bfirstdisconnect; bool bfirstconnect , bfirstdisconnect;
u8 dm_dig_max, dm_dig_min; u8 dm_dig_max, dm_dig_min;
u8 current_igi = dm_dig->cur_igvalue; u8 current_igi = dm_dig->cur_igvalue;
...@@ -308,7 +308,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -308,7 +308,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
if (mac->act_scanning) if (mac->act_scanning)
return; return;
dig_dynamic_min = dm_dig->dig_dynamic_min; dig_min_0 = dm_dig->dig_min_0;
bfirstconnect = (mac->link_state >= MAC80211_LINKED) && bfirstconnect = (mac->link_state >= MAC80211_LINKED) &&
!dm_dig->media_connect_0; !dm_dig->media_connect_0;
bfirstdisconnect = (mac->link_state < MAC80211_LINKED) && bfirstdisconnect = (mac->link_state < MAC80211_LINKED) &&
...@@ -329,19 +329,19 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -329,19 +329,19 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
if (rtlpriv->dm.one_entry_only) { if (rtlpriv->dm.one_entry_only) {
offset = 0; offset = 0;
if (dm_dig->rssi_val_min - offset < dm_dig_min) if (dm_dig->rssi_val_min - offset < dm_dig_min)
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
else if (dm_dig->rssi_val_min - offset > else if (dm_dig->rssi_val_min - offset >
dig_maxofmin) dig_maxofmin)
dig_dynamic_min = dig_maxofmin; dig_min_0 = dig_maxofmin;
else else
dig_dynamic_min = dm_dig->rssi_val_min - offset; dig_min_0 = dm_dig->rssi_val_min - offset;
} else { } else {
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
} }
} else { } else {
dm_dig->rx_gain_max = dm_dig_max; dm_dig->rx_gain_max = dm_dig_max;
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "no link\n"); RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "no link\n");
} }
...@@ -368,10 +368,10 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -368,10 +368,10 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
} else { } else {
if (dm_dig->large_fa_hit < 3) { if (dm_dig->large_fa_hit < 3) {
if ((dm_dig->forbidden_igi - 1) < if ((dm_dig->forbidden_igi - 1) <
dig_dynamic_min) { dig_min_0) {
dm_dig->forbidden_igi = dig_dynamic_min; dm_dig->forbidden_igi = dig_min_0;
dm_dig->rx_gain_min = dm_dig->rx_gain_min =
dig_dynamic_min; dig_min_0;
} else { } else {
dm_dig->forbidden_igi--; dm_dig->forbidden_igi--;
dm_dig->rx_gain_min = dm_dig->rx_gain_min =
...@@ -430,7 +430,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw) ...@@ -430,7 +430,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
rtl92ee_dm_write_dig(hw , current_igi); rtl92ee_dm_write_dig(hw , current_igi);
dm_dig->media_connect_0 = ((mac->link_state >= MAC80211_LINKED) ? dm_dig->media_connect_0 = ((mac->link_state >= MAC80211_LINKED) ?
true : false); true : false);
dm_dig->dig_dynamic_min = dig_dynamic_min; dm_dig->dig_min_0 = dig_min_0;
} }
void rtl92ee_dm_write_cck_cca_thres(struct ieee80211_hw *hw, u8 cur_thres) void rtl92ee_dm_write_cck_cca_thres(struct ieee80211_hw *hw, u8 cur_thres)
......
...@@ -232,8 +232,8 @@ static void rtl8723be_dm_diginit(struct ieee80211_hw *hw) ...@@ -232,8 +232,8 @@ static void rtl8723be_dm_diginit(struct ieee80211_hw *hw)
dm_digtable->forbidden_igi = DM_DIG_MIN; dm_digtable->forbidden_igi = DM_DIG_MIN;
dm_digtable->large_fa_hit = 0; dm_digtable->large_fa_hit = 0;
dm_digtable->recover_cnt = 0; dm_digtable->recover_cnt = 0;
dm_digtable->dig_dynamic_min = DM_DIG_MIN; dm_digtable->dig_min_0 = DM_DIG_MIN;
dm_digtable->dig_dynamic_min_1 = DM_DIG_MIN; dm_digtable->dig_min_1 = DM_DIG_MIN;
dm_digtable->media_connect_0 = false; dm_digtable->media_connect_0 = false;
dm_digtable->media_connect_1 = false; dm_digtable->media_connect_1 = false;
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
...@@ -424,7 +424,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw) ...@@ -424,7 +424,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct dig_t *dm_digtable = &rtlpriv->dm_digtable; struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
u8 dig_dynamic_min, dig_maxofmin; u8 dig_min_0, dig_maxofmin;
bool bfirstconnect, bfirstdisconnect; bool bfirstconnect, bfirstdisconnect;
u8 dm_dig_max, dm_dig_min; u8 dm_dig_max, dm_dig_min;
u8 current_igi = dm_digtable->cur_igvalue; u8 current_igi = dm_digtable->cur_igvalue;
...@@ -434,7 +434,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw) ...@@ -434,7 +434,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
if (mac->act_scanning) if (mac->act_scanning)
return; return;
dig_dynamic_min = dm_digtable->dig_dynamic_min; dig_min_0 = dm_digtable->dig_min_0;
bfirstconnect = (mac->link_state >= MAC80211_LINKED) && bfirstconnect = (mac->link_state >= MAC80211_LINKED) &&
!dm_digtable->media_connect_0; !dm_digtable->media_connect_0;
bfirstdisconnect = (mac->link_state < MAC80211_LINKED) && bfirstdisconnect = (mac->link_state < MAC80211_LINKED) &&
...@@ -456,20 +456,20 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw) ...@@ -456,20 +456,20 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
if (rtlpriv->dm.one_entry_only) { if (rtlpriv->dm.one_entry_only) {
offset = 12; offset = 12;
if (dm_digtable->rssi_val_min - offset < dm_dig_min) if (dm_digtable->rssi_val_min - offset < dm_dig_min)
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
else if (dm_digtable->rssi_val_min - offset > else if (dm_digtable->rssi_val_min - offset >
dig_maxofmin) dig_maxofmin)
dig_dynamic_min = dig_maxofmin; dig_min_0 = dig_maxofmin;
else else
dig_dynamic_min = dig_min_0 =
dm_digtable->rssi_val_min - offset; dm_digtable->rssi_val_min - offset;
} else { } else {
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
} }
} else { } else {
dm_digtable->rx_gain_max = dm_dig_max; dm_digtable->rx_gain_max = dm_dig_max;
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "no link\n"); RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, "no link\n");
} }
...@@ -497,11 +497,11 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw) ...@@ -497,11 +497,11 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
} else { } else {
if (dm_digtable->large_fa_hit < 3) { if (dm_digtable->large_fa_hit < 3) {
if ((dm_digtable->forbidden_igi - 1) < if ((dm_digtable->forbidden_igi - 1) <
dig_dynamic_min) { dig_min_0) {
dm_digtable->forbidden_igi = dm_digtable->forbidden_igi =
dig_dynamic_min; dig_min_0;
dm_digtable->rx_gain_min = dm_digtable->rx_gain_min =
dig_dynamic_min; dig_min_0;
} else { } else {
dm_digtable->forbidden_igi--; dm_digtable->forbidden_igi--;
dm_digtable->rx_gain_min = dm_digtable->rx_gain_min =
...@@ -552,7 +552,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw) ...@@ -552,7 +552,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
rtl8723be_dm_write_dig(hw, current_igi); rtl8723be_dm_write_dig(hw, current_igi);
dm_digtable->media_connect_0 = dm_digtable->media_connect_0 =
((mac->link_state >= MAC80211_LINKED) ? true : false); ((mac->link_state >= MAC80211_LINKED) ? true : false);
dm_digtable->dig_dynamic_min = dig_dynamic_min; dm_digtable->dig_min_0 = dig_min_0;
} }
static void rtl8723be_dm_false_alarm_counter_statistics( static void rtl8723be_dm_false_alarm_counter_statistics(
......
...@@ -539,8 +539,8 @@ static void rtl8821ae_dm_diginit(struct ieee80211_hw *hw) ...@@ -539,8 +539,8 @@ static void rtl8821ae_dm_diginit(struct ieee80211_hw *hw)
dm_digtable->forbidden_igi = DM_DIG_MIN; dm_digtable->forbidden_igi = DM_DIG_MIN;
dm_digtable->large_fa_hit = 0; dm_digtable->large_fa_hit = 0;
dm_digtable->recover_cnt = 0; dm_digtable->recover_cnt = 0;
dm_digtable->dig_dynamic_min = DM_DIG_MIN; dm_digtable->dig_min_0 = DM_DIG_MIN;
dm_digtable->dig_dynamic_min_1 = DM_DIG_MIN; dm_digtable->dig_min_1 = DM_DIG_MIN;
dm_digtable->media_connect_0 = false; dm_digtable->media_connect_0 = false;
dm_digtable->media_connect_1 = false; dm_digtable->media_connect_1 = false;
rtlpriv->dm.dm_initialgain_enable = true; rtlpriv->dm.dm_initialgain_enable = true;
...@@ -822,7 +822,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw) ...@@ -822,7 +822,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
struct dig_t *dm_digtable = &rtlpriv->dm_digtable; struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
u8 dig_dynamic_min; u8 dig_min_0;
u8 dig_max_of_min; u8 dig_max_of_min;
bool first_connect, first_disconnect; bool first_connect, first_disconnect;
u8 dm_dig_max, dm_dig_min, offset; u8 dm_dig_max, dm_dig_min, offset;
...@@ -837,7 +837,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw) ...@@ -837,7 +837,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
} }
/*add by Neil Chen to avoid PSD is processing*/ /*add by Neil Chen to avoid PSD is processing*/
dig_dynamic_min = dm_digtable->dig_dynamic_min; dig_min_0 = dm_digtable->dig_min_0;
first_connect = (mac->link_state >= MAC80211_LINKED) && first_connect = (mac->link_state >= MAC80211_LINKED) &&
(!dm_digtable->media_connect_0); (!dm_digtable->media_connect_0);
first_disconnect = (mac->link_state < MAC80211_LINKED) && first_disconnect = (mac->link_state < MAC80211_LINKED) &&
...@@ -876,23 +876,23 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw) ...@@ -876,23 +876,23 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
offset = 0; offset = 0;
if (dm_digtable->rssi_val_min - offset < dm_dig_min) if (dm_digtable->rssi_val_min - offset < dm_dig_min)
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
else if (dm_digtable->rssi_val_min - else if (dm_digtable->rssi_val_min -
offset > dig_max_of_min) offset > dig_max_of_min)
dig_dynamic_min = dig_max_of_min; dig_min_0 = dig_max_of_min;
else else
dig_dynamic_min = dig_min_0 =
dm_digtable->rssi_val_min - offset; dm_digtable->rssi_val_min - offset;
RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
"bOneEntryOnly=TRUE, dig_dynamic_min=0x%x\n", "bOneEntryOnly=TRUE, dig_min_0=0x%x\n",
dig_dynamic_min); dig_min_0);
} else { } else {
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
} }
} else { } else {
dm_digtable->rx_gain_max = dm_dig_max; dm_digtable->rx_gain_max = dm_dig_max;
dig_dynamic_min = dm_dig_min; dig_min_0 = dm_dig_min;
RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
"No Link\n"); "No Link\n");
} }
...@@ -925,11 +925,11 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw) ...@@ -925,11 +925,11 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
} else { } else {
if (dm_digtable->large_fa_hit < 3) { if (dm_digtable->large_fa_hit < 3) {
if ((dm_digtable->forbidden_igi - 1) < if ((dm_digtable->forbidden_igi - 1) <
dig_dynamic_min) { dig_min_0) {
dm_digtable->forbidden_igi = dm_digtable->forbidden_igi =
dig_dynamic_min; dig_min_0;
dm_digtable->rx_gain_min = dm_digtable->rx_gain_min =
dig_dynamic_min; dig_min_0;
RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD, RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
"Normal Case: At Lower Bound\n"); "Normal Case: At Lower Bound\n");
} else { } else {
...@@ -1024,7 +1024,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw) ...@@ -1024,7 +1024,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
rtl8821ae_dm_write_dig(hw, current_igi); rtl8821ae_dm_write_dig(hw, current_igi);
dm_digtable->media_connect_0 = dm_digtable->media_connect_0 =
((mac->link_state >= MAC80211_LINKED) ? true : false); ((mac->link_state >= MAC80211_LINKED) ? true : false);
dm_digtable->dig_dynamic_min = dig_dynamic_min; dm_digtable->dig_min_0 = dig_min_0;
} }
static void rtl8821ae_dm_common_info_self_update(struct ieee80211_hw *hw) static void rtl8821ae_dm_common_info_self_update(struct ieee80211_hw *hw)
......
...@@ -2412,8 +2412,6 @@ struct dig_t { ...@@ -2412,8 +2412,6 @@ struct dig_t {
u8 pre_ccastate; u8 pre_ccastate;
u8 cur_ccasate; u8 cur_ccasate;
u8 large_fa_hit; u8 large_fa_hit;
u8 dig_dynamic_min;
u8 dig_dynamic_min_1;
u8 forbidden_igi; u8 forbidden_igi;
u8 dig_state; u8 dig_state;
u8 dig_highpwrstate; u8 dig_highpwrstate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment