Commit 974f29f2 authored by Dominik Karol Piątkowski's avatar Dominik Karol Piątkowski Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: Rename AuthAlgrthm variable



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

Signed-off-by: default avatarDominik 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67283a5c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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_;
+12 −12
Original line number Diff line number Diff line
@@ -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 =
+1 −1
Original line number Diff line number Diff line
@@ -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
+4 −4
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading