]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8712: Rename AuthAlgrthm variable
authorDominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Sat, 12 Oct 2024 16:17:45 +0000 (16:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Oct 2024 13:48:52 +0000 (15:48 +0200)
This patch renames AuthAlgrthm to auth_algorithm in order to avoid
using camel case.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@protonmail.com>
Tested-by:
Link: https://lore.kernel.org/r/20241012161638.67030-2-dominik.karol.piatkowski@protonmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/mlme_linux.c
drivers/staging/rtl8712/rtl871x_ioctl_linux.c
drivers/staging/rtl8712/rtl871x_ioctl_set.c
drivers/staging/rtl8712/rtl871x_mlme.c
drivers/staging/rtl8712/rtl871x_recv.c
drivers/staging/rtl8712/rtl871x_security.h

index 436816d14cdf351c07b6fb8142f53ada95696d41..041768d46defbe101e0d672e7b7945f9206cb717 100644 (file)
@@ -92,7 +92,7 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)
 
        r8712_indicate_wx_disassoc_event(adapter);
        netif_carrier_off(adapter->pnetdev);
-       if (adapter->securitypriv.AuthAlgrthm == 2) { /*/802.1x*/
+       if (adapter->securitypriv.auth_algorithm == 2) { /*/802.1x*/
                /* We have to backup the PMK information for WiFi PMK Caching
                 * test item. Backup the btkip_countermeasure information.
                 * When the countermeasure is trigger, the driver have to
@@ -121,7 +121,7 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)
        } else { /*reset values in securitypriv*/
                struct security_priv *sec_priv = &adapter->securitypriv;
 
-               sec_priv->AuthAlgrthm = 0; /*open system*/
+               sec_priv->auth_algorithm = 0; /*open system*/
                sec_priv->PrivacyAlgrthm = _NO_PRIVACY_;
                sec_priv->PrivacyKeyIndex = 0;
                sec_priv->XGrpPrivacy = _NO_PRIVACY_;
index ebfb1b2f1189366ff6d6bf60cf71ea891dc82021..eca6175e232cd4d879af592fb0c898fc1329596b 100644 (file)
@@ -325,18 +325,18 @@ static int wpa_set_auth_algs(struct net_device *dev, u32 value)
                                                 Ndis802_11Encryption1Enabled;
                padapter->securitypriv.ndisauthtype =
                                                 Ndis802_11AuthModeAutoSwitch;
-               padapter->securitypriv.AuthAlgrthm = 3;
+               padapter->securitypriv.auth_algorithm = 3;
        } else if (value & AUTH_ALG_SHARED_KEY) {
                padapter->securitypriv.ndisencryptstatus =
                                                 Ndis802_11Encryption1Enabled;
                padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeShared;
-               padapter->securitypriv.AuthAlgrthm = 1;
+               padapter->securitypriv.auth_algorithm = 1;
        } else if (value & AUTH_ALG_OPEN_SYSTEM) {
                if (padapter->securitypriv.ndisauthtype <
                                                 Ndis802_11AuthModeWPAPSK) {
                        padapter->securitypriv.ndisauthtype =
                                                 Ndis802_11AuthModeOpen;
-                       padapter->securitypriv.AuthAlgrthm = 0;
+                       padapter->securitypriv.auth_algorithm = 0;
                }
        } else {
                ret = -EINVAL;
@@ -414,7 +414,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
                }
                goto exit;
        }
-       if (padapter->securitypriv.AuthAlgrthm == 2) { /* 802_1x */
+       if (padapter->securitypriv.auth_algorithm == 2) { /* 802_1x */
                struct sta_info *psta, *pbcmc_sta;
                struct sta_priv *pstapriv = &padapter->stapriv;
                struct security_priv *spriv = &padapter->securitypriv;
@@ -472,13 +472,13 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie,
                }
                if (r8712_parse_wpa_ie(buf, ielen, &group_cipher,
                                       &pairwise_cipher) == 0) {
-                       padapter->securitypriv.AuthAlgrthm = 2;
+                       padapter->securitypriv.auth_algorithm = 2;
                        padapter->securitypriv.ndisauthtype =
                                  Ndis802_11AuthModeWPAPSK;
                }
                if (r8712_parse_wpa2_ie(buf, ielen, &group_cipher,
                                        &pairwise_cipher) == 0) {
-                       padapter->securitypriv.AuthAlgrthm = 2;
+                       padapter->securitypriv.auth_algorithm = 2;
                        padapter->securitypriv.ndisauthtype =
                                  Ndis802_11AuthModeWPA2PSK;
                }
@@ -1450,7 +1450,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
                                 Ndis802_11EncryptionDisabled;
                padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
                padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
-               padapter->securitypriv.AuthAlgrthm = 0; /* open system */
+               padapter->securitypriv.auth_algorithm = 0; /* open system */
                authmode = Ndis802_11AuthModeOpen;
                padapter->securitypriv.ndisauthtype = authmode;
                return 0;
@@ -1469,7 +1469,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
                netdev_info(dev, "r8712u: %s: IW_ENCODE_OPEN\n", __func__);
                padapter->securitypriv.ndisencryptstatus =
                                 Ndis802_11Encryption1Enabled;
-               padapter->securitypriv.AuthAlgrthm = 0; /* open system */
+               padapter->securitypriv.auth_algorithm = 0; /* open system */
                padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
                padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
                authmode = Ndis802_11AuthModeOpen;
@@ -1479,7 +1479,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
                                "r8712u: %s: IW_ENCODE_RESTRICTED\n", __func__);
                padapter->securitypriv.ndisencryptstatus =
                                 Ndis802_11Encryption1Enabled;
-               padapter->securitypriv.AuthAlgrthm = 1; /* shared system */
+               padapter->securitypriv.auth_algorithm = 1; /* shared system */
                padapter->securitypriv.PrivacyAlgrthm = _WEP40_;
                padapter->securitypriv.XGrpPrivacy = _WEP40_;
                authmode = Ndis802_11AuthModeShared;
@@ -1487,7 +1487,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
        } else {
                padapter->securitypriv.ndisencryptstatus =
                                 Ndis802_11Encryption1Enabled;
-               padapter->securitypriv.AuthAlgrthm = 0; /* open system */
+               padapter->securitypriv.auth_algorithm = 0; /* open system */
                padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
                padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
                authmode = Ndis802_11AuthModeOpen;
@@ -1672,7 +1672,7 @@ static int r871x_wx_set_auth(struct net_device *dev,
                                  _NO_PRIVACY_;
                        padapter->securitypriv.XGrpPrivacy =
                                  _NO_PRIVACY_;
-                       padapter->securitypriv.AuthAlgrthm = 0;
+                       padapter->securitypriv.auth_algorithm = 0;
                        padapter->securitypriv.ndisauthtype =
                                  Ndis802_11AuthModeOpen;
                }
@@ -2017,7 +2017,7 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
 
        switch (name) {
        case IEEE_PARAM_WPA_ENABLED:
-               padapter->securitypriv.AuthAlgrthm = 2; /* 802.1x */
+               padapter->securitypriv.auth_algorithm = 2; /* 802.1x */
                switch ((value) & 0xff) {
                case 1: /* WPA */
                        padapter->securitypriv.ndisauthtype =
index b335799b2ad5f0290b855b91c9447411601d8135..9eb67db36ecbae2d0ed01c734a446014b7534bbe 100644 (file)
@@ -318,7 +318,7 @@ u8 r8712_set_802_11_authentication_mode(struct _adapter *padapter,
 
        psecuritypriv->ndisauthtype = authmode;
        if (psecuritypriv->ndisauthtype > 3)
-               psecuritypriv->AuthAlgrthm = 2; /* 802.1x */
+               psecuritypriv->auth_algorithm = 2; /* 802.1x */
        if (r8712_set_auth(padapter, psecuritypriv))
                ret = false;
        else
index a80c99554273615a40fd490a3886891f188c4f93..876788b80953a0189555583a8c41201022621924 100644 (file)
@@ -768,7 +768,7 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
                                        ptarget_sta->aid = pnetwork->join_res;
                                        ptarget_sta->qos_option = 1;
                                        ptarget_sta->mac_id = 5;
-                                       if (adapter->securitypriv.AuthAlgrthm == 2) {
+                                       if (adapter->securitypriv.auth_algorithm == 2) {
                                                adapter->securitypriv.binstallGrpkey = false;
                                                adapter->securitypriv.busetkipkey = false;
                                                adapter->securitypriv.bgrpkey_handshake = false;
@@ -869,7 +869,7 @@ void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf)
        psta->mac_id = le32_to_cpu(pstassoc->cam_id);
        /* psta->aid = (uint)pstassoc->cam_id; */
 
-       if (adapter->securitypriv.AuthAlgrthm == 2)
+       if (adapter->securitypriv.auth_algorithm == 2)
                psta->XPrivacy = adapter->securitypriv.PrivacyAlgrthm;
        psta->ieee8021x_blocked = false;
        spin_lock_irqsave(&pmlmepriv->lock, irqL);
@@ -1131,7 +1131,7 @@ int r8712_set_auth(struct _adapter *adapter,
                kfree(pcmd);
                return -ENOMEM;
        }
-       psetauthparm->mode = (u8)psecuritypriv->AuthAlgrthm;
+       psetauthparm->mode = (u8)psecuritypriv->auth_algorithm;
        pcmd->cmdcode = _SetAuth_CMD_;
        pcmd->parmbuf = (unsigned char *)psetauthparm;
        pcmd->cmdsz = sizeof(struct setauth_parm);
@@ -1160,7 +1160,7 @@ int r8712_set_key(struct _adapter *adapter,
                ret = -ENOMEM;
                goto err_free_cmd;
        }
-       if (psecuritypriv->AuthAlgrthm == 2) { /* 802.1X */
+       if (psecuritypriv->auth_algorithm == 2) { /* 802.1X */
                psetkeyparm->algorithm =
                         (u8)psecuritypriv->XGrpPrivacy;
        } else { /* WEP */
index 0c305bd196935a618dc0d88b04c1f39b9093030c..3fb5cd7462730bff7560107b8f9bd2bc9960f5ff 100644 (file)
@@ -240,7 +240,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,
        pfhdr = &precv_frame->u.hdr;
        psta_addr = pfhdr->attrib.ta;
        psta = r8712_get_stainfo(pstapriv, psta_addr);
-       auth_alg = adapter->securitypriv.AuthAlgrthm;
+       auth_alg = adapter->securitypriv.auth_algorithm;
        if (auth_alg == 2) {
                /* get ether_type */
                ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
index 8461b7f05359a0d97ab7ae8ff5ad75a8ee28a3a2..b498ce4ddd34ef3c9e2466fd44edeb9c2c101203 100644 (file)
@@ -77,7 +77,7 @@ struct RT_PMKID_LIST {
 };
 
 struct security_priv {
-       u32 AuthAlgrthm;                /* 802.11 auth, could be open, shared,
+       u32 auth_algorithm;             /* 802.11 auth, could be open, shared,
                                         * 8021x and authswitch
                                         */
        u32 PrivacyAlgrthm;             /* This specify the privacy for shared
@@ -139,7 +139,7 @@ struct security_priv {
 
 #define GET_ENCRY_ALGO(psecuritypriv, psta, encry_algo, bmcst) \
 do { \
-       switch (psecuritypriv->AuthAlgrthm) { \
+       switch (psecuritypriv->auth_algorithm) { \
        case 0: \
        case 1: \
        case 3: \