lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241012161638.67030-2-dominik.karol.piatkowski@protonmail.com>
Date: Sat, 12 Oct 2024 16:17:45 +0000
From: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
To: florian.c.schilhabel@...glemail.com, gregkh@...uxfoundation.org, ayushtiw0110@...il.com, dan.carpenter@...aro.org
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org, Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
Subject: [PATCH 1/3] staging: rtl8712: Rename AuthAlgrthm variable

This patch renames AuthAlgrthm to auth_algorithm in order to avoid
using camel case.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
---
 drivers/staging/rtl8712/mlme_linux.c          |  4 ++--
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 24 +++++++++----------
 drivers/staging/rtl8712/rtl871x_ioctl_set.c   |  2 +-
 drivers/staging/rtl8712/rtl871x_mlme.c        |  8 +++----
 drivers/staging/rtl8712/rtl871x_recv.c        |  2 +-
 drivers/staging/rtl8712/rtl871x_security.h    |  4 ++--
 6 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/rtl8712/mlme_linux.c b/drivers/staging/rtl8712/mlme_linux.c
index 436816d14cdf..041768d46def 100644
--- a/drivers/staging/rtl8712/mlme_linux.c
+++ b/drivers/staging/rtl8712/mlme_linux.c
@@ -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_;
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index ebfb1b2f1189..eca6175e232c 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -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 =
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c
index b335799b2ad5..9eb67db36ecb 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c
@@ -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
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index a80c99554273..876788b80953 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -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 */
diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c
index 0c305bd19693..3fb5cd746273 100644
--- a/drivers/staging/rtl8712/rtl871x_recv.c
+++ b/drivers/staging/rtl8712/rtl871x_recv.c
@@ -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;
diff --git a/drivers/staging/rtl8712/rtl871x_security.h b/drivers/staging/rtl8712/rtl871x_security.h
index 8461b7f05359..b498ce4ddd34 100644
--- a/drivers/staging/rtl8712/rtl871x_security.h
+++ b/drivers/staging/rtl8712/rtl871x_security.h
@@ -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: \
-- 
2.34.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ