rtlwifi: Unify variable naming for all drivers
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 6 Jan 2015 15:58:02 +0000 (09:58 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 9 Jan 2015 13:48:07 +0000 (15:48 +0200)
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: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192ee/dm.c
drivers/net/wireless/rtlwifi/rtl8723be/dm.c
drivers/net/wireless/rtlwifi/rtl8821ae/dm.c
drivers/net/wireless/rtlwifi/wifi.h

index f6cb5aedfdd1ec30fd7046aede5547386723a32d..c3aad76fb47328c393703fb4ce45268b6ca87b51 100644 (file)
@@ -221,7 +221,7 @@ static void rtl92c_dm_diginit(struct ieee80211_hw *hw)
        dm_digtable->forbidden_igi = DM_DIG_MIN;
        dm_digtable->large_fa_hit = 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)
index 77deedf79d1dd3dcf6d4ba69457251912a60037e..2fa4c4551afb4aa95522b0130a2a9d6666be091a 100644 (file)
@@ -172,8 +172,8 @@ static void rtl92ee_dm_diginit(struct ieee80211_hw *hw)
        dm_dig->forbidden_igi = DM_DIG_MIN;
        dm_dig->large_fa_hit = 0;
        dm_dig->recover_cnt = 0;
-       dm_dig->dig_dynamic_min = DM_DIG_MIN;
-       dm_dig->dig_dynamic_min_1 = DM_DIG_MIN;
+       dm_dig->dig_min_0 = DM_DIG_MIN;
+       dm_dig->dig_min_1 = DM_DIG_MIN;
        dm_dig->media_connect_0 = false;
        dm_dig->media_connect_1 = false;
        rtlpriv->dm.dm_initialgain_enable = true;
@@ -298,7 +298,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
        struct dig_t *dm_dig = &rtlpriv->dm_digtable;
-       u8 dig_dynamic_min , dig_maxofmin;
+       u8 dig_min_0, dig_maxofmin;
        bool bfirstconnect , bfirstdisconnect;
        u8 dm_dig_max, dm_dig_min;
        u8 current_igi = dm_dig->cur_igvalue;
@@ -308,7 +308,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
        if (mac->act_scanning)
                return;
 
-       dig_dynamic_min = dm_dig->dig_dynamic_min;
+       dig_min_0 = dm_dig->dig_min_0;
        bfirstconnect = (mac->link_state >= MAC80211_LINKED) &&
                        !dm_dig->media_connect_0;
        bfirstdisconnect = (mac->link_state < MAC80211_LINKED) &&
@@ -329,19 +329,19 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
                if (rtlpriv->dm.one_entry_only) {
                        offset = 0;
                        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 >
                                 dig_maxofmin)
-                               dig_dynamic_min = dig_maxofmin;
+                               dig_min_0 = dig_maxofmin;
                        else
-                               dig_dynamic_min = dm_dig->rssi_val_min - offset;
+                               dig_min_0 = dm_dig->rssi_val_min - offset;
                } else {
-                       dig_dynamic_min = dm_dig_min;
+                       dig_min_0 = dm_dig_min;
                }
 
        } else {
                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");
        }
 
@@ -368,10 +368,10 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
                } else {
                        if (dm_dig->large_fa_hit < 3) {
                                if ((dm_dig->forbidden_igi - 1) <
-                                   dig_dynamic_min) {
-                                       dm_dig->forbidden_igi = dig_dynamic_min;
+                                   dig_min_0) {
+                                       dm_dig->forbidden_igi = dig_min_0;
                                        dm_dig->rx_gain_min =
-                                                               dig_dynamic_min;
+                                                               dig_min_0;
                                } else {
                                        dm_dig->forbidden_igi--;
                                        dm_dig->rx_gain_min =
@@ -430,7 +430,7 @@ static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
        rtl92ee_dm_write_dig(hw , current_igi);
        dm_dig->media_connect_0 = ((mac->link_state >= MAC80211_LINKED) ?
                                   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)
index dd7eb4371f498910476b53635b98a9847c9ac1f6..b92c521e8c6397daa2530412497c3f5d55a73f80 100644 (file)
@@ -232,8 +232,8 @@ static void rtl8723be_dm_diginit(struct ieee80211_hw *hw)
        dm_digtable->forbidden_igi = DM_DIG_MIN;
        dm_digtable->large_fa_hit = 0;
        dm_digtable->recover_cnt = 0;
-       dm_digtable->dig_dynamic_min = DM_DIG_MIN;
-       dm_digtable->dig_dynamic_min_1 = DM_DIG_MIN;
+       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;
@@ -424,7 +424,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
        struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
-       u8 dig_dynamic_min, dig_maxofmin;
+       u8 dig_min_0, dig_maxofmin;
        bool bfirstconnect, bfirstdisconnect;
        u8 dm_dig_max, dm_dig_min;
        u8 current_igi = dm_digtable->cur_igvalue;
@@ -434,7 +434,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
        if (mac->act_scanning)
                return;
 
-       dig_dynamic_min = dm_digtable->dig_dynamic_min;
+       dig_min_0 = dm_digtable->dig_min_0;
        bfirstconnect = (mac->link_state >= MAC80211_LINKED) &&
                        !dm_digtable->media_connect_0;
        bfirstdisconnect = (mac->link_state < MAC80211_LINKED) &&
@@ -456,20 +456,20 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
                if (rtlpriv->dm.one_entry_only) {
                        offset = 12;
                        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 >
                                                        dig_maxofmin)
-                               dig_dynamic_min = dig_maxofmin;
+                               dig_min_0 = dig_maxofmin;
                        else
-                               dig_dynamic_min =
+                               dig_min_0 =
                                        dm_digtable->rssi_val_min - offset;
                } else {
-                       dig_dynamic_min = dm_dig_min;
+                       dig_min_0 = dm_dig_min;
                }
 
        } else {
                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");
        }
 
@@ -497,11 +497,11 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
                } else {
                        if (dm_digtable->large_fa_hit < 3) {
                                if ((dm_digtable->forbidden_igi - 1) <
-                                    dig_dynamic_min) {
+                                    dig_min_0) {
                                        dm_digtable->forbidden_igi =
-                                                       dig_dynamic_min;
+                                                       dig_min_0;
                                        dm_digtable->rx_gain_min =
-                                                       dig_dynamic_min;
+                                                       dig_min_0;
                                } else {
                                        dm_digtable->forbidden_igi--;
                                        dm_digtable->rx_gain_min =
@@ -552,7 +552,7 @@ static void rtl8723be_dm_dig(struct ieee80211_hw *hw)
        rtl8723be_dm_write_dig(hw, current_igi);
        dm_digtable->media_connect_0 =
                ((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(
index ba30b0d250fd7bb75ff7f39edf16b6b225a07395..8b0bfb2bd8f7c310963ceedca53316fa45ed721f 100644 (file)
@@ -539,8 +539,8 @@ static void rtl8821ae_dm_diginit(struct ieee80211_hw *hw)
        dm_digtable->forbidden_igi = DM_DIG_MIN;
        dm_digtable->large_fa_hit = 0;
        dm_digtable->recover_cnt = 0;
-       dm_digtable->dig_dynamic_min = DM_DIG_MIN;
-       dm_digtable->dig_dynamic_min_1 = DM_DIG_MIN;
+       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;
@@ -822,7 +822,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
        struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
        struct rtl_mac *mac = rtl_mac(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;
        bool first_connect, first_disconnect;
        u8 dm_dig_max, dm_dig_min, offset;
@@ -837,7 +837,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
        }
 
        /*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) &&
                        (!dm_digtable->media_connect_0);
        first_disconnect = (mac->link_state < MAC80211_LINKED) &&
@@ -876,23 +876,23 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
                        offset = 0;
 
                        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 > dig_max_of_min)
-                               dig_dynamic_min = dig_max_of_min;
+                               dig_min_0 = dig_max_of_min;
                        else
-                               dig_dynamic_min =
+                               dig_min_0 =
                                        dm_digtable->rssi_val_min - offset;
 
                        RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
-                                "bOneEntryOnly=TRUE, dig_dynamic_min=0x%x\n",
-                                dig_dynamic_min);
+                                "bOneEntryOnly=TRUE, dig_min_0=0x%x\n",
+                                dig_min_0);
                } else {
-                       dig_dynamic_min = dm_dig_min;
+                       dig_min_0 = dm_dig_min;
                }
        } else {
                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");
        }
@@ -925,11 +925,11 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
                } else {
                        if (dm_digtable->large_fa_hit < 3) {
                                if ((dm_digtable->forbidden_igi - 1) <
-                                   dig_dynamic_min) {
+                                   dig_min_0) {
                                        dm_digtable->forbidden_igi =
-                                               dig_dynamic_min;
+                                               dig_min_0;
                                        dm_digtable->rx_gain_min =
-                                               dig_dynamic_min;
+                                               dig_min_0;
                                        RT_TRACE(rtlpriv, COMP_DIG, DBG_LOUD,
                                                 "Normal Case: At Lower Bound\n");
                                } else {
@@ -1024,7 +1024,7 @@ static void rtl8821ae_dm_dig(struct ieee80211_hw *hw)
        rtl8821ae_dm_write_dig(hw, current_igi);
        dm_digtable->media_connect_0 =
                ((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)
index 7a718fdb82cd46771e7fe50cbc6dcd3dc2c2e582..b53d9dd7a59596e43c6892835b90af029780eb29 100644 (file)
@@ -2412,8 +2412,6 @@ struct dig_t {
        u8 pre_ccastate;
        u8 cur_ccasate;
        u8 large_fa_hit;
-       u8 dig_dynamic_min;
-       u8 dig_dynamic_min_1;
        u8 forbidden_igi;
        u8 dig_state;
        u8 dig_highpwrstate;