staging: rtl8192e: Rename Regdot11HTOper.., bSupportM.. and PowerSaveCo..
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 13 Nov 2022 04:35:12 +0000 (05:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Nov 2022 18:50:15 +0000 (19:50 +0100)
Rename variable Regdot11HTOperationalRateSet to
reg_dot11ht_oper_rate_set, bSupportMode to support_mode and
PowerSaveControl to pwr_save_ctrl to avoid CamelCase which is not accepted
by checkpatch. Fix unnecessary parentheses warning from checkpatch when
used with this variables.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/1ef7fd22b4a037c4d1f8685065ce7916b6f0930b.1668313325.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
drivers/staging/rtl8192e/rtl819x_HTProc.c
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_softmac.c

index 58da2dab55bd6dc73d0022c2ef82a62e8f3149fd..b14497423cbf76087111cab8a080c7d35cb70632 100644 (file)
@@ -1304,7 +1304,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&(priv->rtllib->PowerSaveControl));
+                                       (&priv->rtllib->pwr_save_ctrl);
        bool bResult = true;
        u8      i = 0, QueueID = 0;
        struct rtl8192_tx_ring  *ring = NULL;
index 952fe8d7a7be46aa1a0084282c09b6221fe54d86..16e15b8e1b7a65d28bf8fa41ae7f6a05969a0a33 100644 (file)
@@ -607,13 +607,13 @@ static void _rtl92e_refresh_support_rate(struct r8192_priv *priv)
 
        if (ieee->mode == WIRELESS_MODE_N_24G ||
            ieee->mode == WIRELESS_MODE_N_5G) {
-               memcpy(ieee->Regdot11HTOperationalRateSet,
+               memcpy(ieee->reg_dot11ht_oper_rate_set,
                       ieee->RegHTSuppRateSet, 16);
                memcpy(ieee->Regdot11TxHTOperationalRateSet,
                       ieee->RegHTSuppRateSet, 16);
 
        } else {
-               memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
+               memset(ieee->reg_dot11ht_oper_rate_set, 0, 16);
        }
 }
 
@@ -642,19 +642,19 @@ static u8 _rtl92e_get_supported_wireless_mode(struct net_device *dev)
 void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
-       u8 bSupportMode = _rtl92e_get_supported_wireless_mode(dev);
+       u8 support_mode = _rtl92e_get_supported_wireless_mode(dev);
 
        if ((wireless_mode == WIRELESS_MODE_AUTO) ||
-           ((wireless_mode & bSupportMode) == 0)) {
-               if (bSupportMode & WIRELESS_MODE_N_24G) {
+           ((wireless_mode & support_mode) == 0)) {
+               if (support_mode & WIRELESS_MODE_N_24G) {
                        wireless_mode = WIRELESS_MODE_N_24G;
-               } else if (bSupportMode & WIRELESS_MODE_N_5G) {
+               } else if (support_mode & WIRELESS_MODE_N_5G) {
                        wireless_mode = WIRELESS_MODE_N_5G;
-               } else if ((bSupportMode & WIRELESS_MODE_A)) {
+               } else if ((support_mode & WIRELESS_MODE_A)) {
                        wireless_mode = WIRELESS_MODE_A;
-               } else if ((bSupportMode & WIRELESS_MODE_G)) {
+               } else if ((support_mode & WIRELESS_MODE_G)) {
                        wireless_mode = WIRELESS_MODE_G;
-               } else if ((bSupportMode & WIRELESS_MODE_B)) {
+               } else if ((support_mode & WIRELESS_MODE_B)) {
                        wireless_mode = WIRELESS_MODE_B;
                } else {
                        netdev_info(dev,
@@ -683,7 +683,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&priv->rtllib->PowerSaveControl);
+                                       (&priv->rtllib->pwr_save_ctrl);
        bool init_status;
 
        priv->bdisable_nic = false;
@@ -820,7 +820,7 @@ static void _rtl92e_init_priv_constant(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &priv->rtllib->PowerSaveControl;
+                                       &priv->rtllib->pwr_save_ctrl;
 
        pPSC->reg_max_lps_awake_intvl = 5;
 }
@@ -877,7 +877,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
        priv->rf_change_in_progress = false;
        priv->bHwRfOffAction = 0;
        priv->SetRFPowerStateInProgress = false;
-       priv->rtllib->PowerSaveControl.bLeisurePs = true;
+       priv->rtllib->pwr_save_ctrl.bLeisurePs = true;
        priv->rtllib->LPSDelayCnt = 0;
        priv->rtllib->sta_sleep = LPS_IS_WAKE;
        priv->rtllib->rf_power_state = rf_on;
@@ -1272,7 +1272,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
        static u8 check_reset_cnt;
        unsigned long flags;
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&priv->rtllib->PowerSaveControl);
+                                       (&priv->rtllib->pwr_save_ctrl);
        bool bBusyTraffic = false;
        bool    bHigherBusyTraffic = false;
        bool    bHigherBusyRxTraffic = false;
@@ -1295,7 +1295,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
                     RTLLIB_NOLINK) &&
                     (ieee->rf_power_state == rf_on) && !ieee->is_set_key &&
                     (!ieee->proto_stoppping) && !ieee->wx_set_enc) {
-                       if ((ieee->PowerSaveControl.ReturnPoint ==
+                       if ((ieee->pwr_save_ctrl.ReturnPoint ==
                             IPS_CALLBACK_NONE) &&
                             (!ieee->bNetPromiscuousMode)) {
                                rtl92e_ips_enter(dev);
@@ -2422,7 +2422,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
        bool init_status = true;
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&priv->rtllib->PowerSaveControl);
+                                       (&priv->rtllib->pwr_save_ctrl);
 
        if (!priv->up) {
                netdev_warn(dev, "%s(): Driver is already down!\n", __func__);
index 1501f7be8eee97d75f42fdc29d7304ba9c47aa60..8a6b7f58ebfdd6e8b3eb468089a23821c8c1a97a 100644 (file)
@@ -101,7 +101,7 @@ static void _rtl92e_ps_update_rf_state(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &(priv->rtllib->PowerSaveControl);
+                                       &priv->rtllib->pwr_save_ctrl;
 
        pPSC->bSwRfProcessing = true;
        rtl92e_set_rf_state(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS);
@@ -113,7 +113,7 @@ void rtl92e_ips_enter(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &(priv->rtllib->PowerSaveControl);
+                                       &priv->rtllib->pwr_save_ctrl;
        enum rt_rf_power_state rt_state;
 
        rt_state = priv->rtllib->rf_power_state;
@@ -129,7 +129,7 @@ void rtl92e_ips_leave(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &(priv->rtllib->PowerSaveControl);
+                                       &priv->rtllib->pwr_save_ctrl;
        enum rt_rf_power_state rt_state;
 
        rt_state = priv->rtllib->rf_power_state;
@@ -207,7 +207,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &(priv->rtllib->PowerSaveControl);
+                                       &priv->rtllib->pwr_save_ctrl;
 
        if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
            (priv->rtllib->state == RTLLIB_LINKED))
@@ -233,7 +233,7 @@ void rtl92e_leisure_ps_leave(struct net_device *dev)
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       &(priv->rtllib->PowerSaveControl);
+                                       &priv->rtllib->pwr_save_ctrl;
 
        if (pPSC->bLeisurePs) {
                if (priv->rtllib->ps != RTLLIB_PS_DISABLED) {
index ffef63e8dcaee98671db32704b3d8e6d7d81a523..d68f8f5902c8d001447980f804bb3b9a55c2f2e5 100644 (file)
@@ -160,7 +160,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&priv->rtllib->PowerSaveControl);
+                                       (&priv->rtllib->pwr_save_ctrl);
        struct rtllib_device *ieee = priv->rtllib;
 
        mutex_lock(&priv->wx_mutex);
@@ -189,7 +189,7 @@ static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,
 {
        struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)
-                                       (&priv->rtllib->PowerSaveControl);
+                                       (&priv->rtllib->pwr_save_ctrl);
 
        mutex_lock(&priv->wx_mutex);
 
index 7fad983ad4be16949ce04f03d87807b4deb97c7e..52f41562dd824881de3d347fac4bab78d0642ef7 100644 (file)
@@ -323,7 +323,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
                pCapELE->MPDUDensity    = 0;
        }
 
-       memcpy(pCapELE->MCS, ieee->Regdot11HTOperationalRateSet, 16);
+       memcpy(pCapELE->MCS, ieee->reg_dot11ht_oper_rate_set, 16);
        memset(&pCapELE->ExtHTCapInfo, 0, 2);
        memset(pCapELE->TxBFCap, 0, 4);
 
index ca9e016ffa9fed322c62d6d3a9371b0e9e19efe4..d80883b211cea12821d11dcba998275f45e2cd61 100644 (file)
@@ -1435,7 +1435,7 @@ struct rtllib_device {
        struct rt_hi_throughput *pHTInfo;
 
        spinlock_t reorder_spinlock;
-       u8      Regdot11HTOperationalRateSet[16];
+       u8      reg_dot11ht_oper_rate_set[16];
        u8      Regdot11TxHTOperationalRateSet[16];
        u8      dot11HTOperationalRateSet[16];
        u8      RegHTSuppRateSet[16];
@@ -1645,7 +1645,7 @@ struct rtllib_device {
 
        struct rt_link_detect LinkDetectInfo;
        bool bIsAggregateFrame;
-       struct rt_pwr_save_ctrl PowerSaveControl;
+       struct rt_pwr_save_ctrl pwr_save_ctrl;
 
        /* used if IEEE_SOFTMAC_TX_QUEUE is set */
        struct tx_pending tx_pending;
index 604d4fd7e2cdea93edbf81b74aca4fbcb69a21d9..498febc88b15ec1b8dd5d82d5771f5881928e15e 100644 (file)
@@ -1504,7 +1504,7 @@ static void rtllib_associate_complete_wq(void *data)
                                     container_of_work_rsl(data,
                                     struct rtllib_device,
                                     associate_complete_wq);
-       struct rt_pwr_save_ctrl *pPSC = &(ieee->PowerSaveControl);
+       struct rt_pwr_save_ctrl *pPSC = &ieee->pwr_save_ctrl;
 
        netdev_info(ieee->dev, "Associated successfully with %pM\n",
                    ieee->current_network.bssid);
@@ -1960,7 +1960,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
 {
        int timeout;
        u8 dtim;
-       struct rt_pwr_save_ctrl *pPSC = &(ieee->PowerSaveControl);
+       struct rt_pwr_save_ctrl *pPSC = &ieee->pwr_save_ctrl;
 
        if (ieee->LPSDelayCnt) {
                ieee->LPSDelayCnt--;
@@ -2984,9 +2984,9 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
        ieee->ps = RTLLIB_PS_DISABLED;
        ieee->sta_sleep = LPS_IS_WAKE;
 
-       ieee->Regdot11HTOperationalRateSet[0] = 0xff;
-       ieee->Regdot11HTOperationalRateSet[1] = 0xff;
-       ieee->Regdot11HTOperationalRateSet[4] = 0x01;
+       ieee->reg_dot11ht_oper_rate_set[0] = 0xff;
+       ieee->reg_dot11ht_oper_rate_set[1] = 0xff;
+       ieee->reg_dot11ht_oper_rate_set[4] = 0x01;
 
        ieee->Regdot11TxHTOperationalRateSet[0] = 0xff;
        ieee->Regdot11TxHTOperationalRateSet[1] = 0xff;