mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
staging: rtl8712: Rename PrivacyAlgrthm variable
This patch renames PrivacyAlgrthm to privacy_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-3-dominik.karol.piatkowski@protonmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
974f29f26d
commit
dcf8c7f335
|
|
@ -122,7 +122,7 @@ void r8712_os_indicate_disconnect(struct _adapter *adapter)
|
|||
struct security_priv *sec_priv = &adapter->securitypriv;
|
||||
|
||||
sec_priv->auth_algorithm = 0; /*open system*/
|
||||
sec_priv->PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
sec_priv->privacy_algorithm = _NO_PRIVACY_;
|
||||
sec_priv->PrivacyKeyIndex = 0;
|
||||
sec_priv->XGrpPrivacy = _NO_PRIVACY_;
|
||||
sec_priv->XGrpKeyid = 1;
|
||||
|
|
|
|||
|
|
@ -407,8 +407,8 @@ int r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork)
|
|||
* to avoid some IOT issues, especially for Realtek 8192u
|
||||
* SoftAP.
|
||||
*/
|
||||
if ((padapter->securitypriv.PrivacyAlgrthm != _WEP40_) &&
|
||||
(padapter->securitypriv.PrivacyAlgrthm != _WEP104_)) {
|
||||
if ((padapter->securitypriv.privacy_algorithm != _WEP40_) &&
|
||||
(padapter->securitypriv.privacy_algorithm != _WEP104_)) {
|
||||
/* restructure_ht_ie */
|
||||
r8712_restructure_ht_ie(padapter,
|
||||
&pnetwork->network.IEs[0],
|
||||
|
|
@ -522,7 +522,7 @@ void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
|
|||
ether_addr_copy(psetstakey_para->addr, sta->hwaddr);
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
|
||||
psetstakey_para->algorithm = (unsigned char)
|
||||
psecuritypriv->PrivacyAlgrthm;
|
||||
psecuritypriv->privacy_algorithm;
|
||||
else
|
||||
GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false);
|
||||
if (unicast_key)
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
netdev_info(dev, "r8712u: %s: crypt.alg = WEP\n", __func__);
|
||||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11Encryption1Enabled;
|
||||
padapter->securitypriv.PrivacyAlgrthm = _WEP40_;
|
||||
padapter->securitypriv.privacy_algorithm = _WEP40_;
|
||||
padapter->securitypriv.XGrpPrivacy = _WEP40_;
|
||||
wep_key_idx = param->u.crypt.idx;
|
||||
wep_key_len = param->u.crypt.key_len;
|
||||
|
|
@ -387,7 +387,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
pwep->Length = wep_key_len +
|
||||
offsetof(struct NDIS_802_11_WEP, KeyMaterial);
|
||||
if (wep_key_len == 13) {
|
||||
padapter->securitypriv.PrivacyAlgrthm = _WEP104_;
|
||||
padapter->securitypriv.privacy_algorithm = _WEP104_;
|
||||
padapter->securitypriv.XGrpPrivacy = _WEP104_;
|
||||
}
|
||||
pwep->KeyIndex = wep_key_idx;
|
||||
|
|
@ -397,7 +397,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
if (r8712_set_802_11_add_wep(padapter, pwep))
|
||||
ret = -EOPNOTSUPP;
|
||||
} else {
|
||||
/* don't update "psecuritypriv->PrivacyAlgrthm" and
|
||||
/* don't update "psecuritypriv->privacy_algorithm" and
|
||||
* "psecuritypriv->PrivacyKeyIndex=keyid", but can
|
||||
* r8712_set_key to fw/cam
|
||||
*/
|
||||
|
|
@ -429,7 +429,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
Ndis802_11Encryption2Enabled ||
|
||||
spriv->ndisencryptstatus ==
|
||||
Ndis802_11Encryption3Enabled)
|
||||
psta->XPrivacy = spriv->PrivacyAlgrthm;
|
||||
psta->XPrivacy = spriv->privacy_algorithm;
|
||||
if (param->u.crypt.set_tx == 1)
|
||||
handle_pairwise_key(psta, param,
|
||||
padapter);
|
||||
|
|
@ -444,7 +444,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
spriv->ndisencryptstatus ==
|
||||
Ndis802_11Encryption3Enabled)
|
||||
pbcmc_sta->XPrivacy =
|
||||
spriv->PrivacyAlgrthm;
|
||||
spriv->privacy_algorithm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -506,23 +506,23 @@ static int r871x_set_wpa_ie(struct _adapter *padapter, char *pie,
|
|||
}
|
||||
switch (pairwise_cipher) {
|
||||
case WPA_CIPHER_NONE:
|
||||
padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
|
||||
break;
|
||||
case WPA_CIPHER_WEP40:
|
||||
padapter->securitypriv.PrivacyAlgrthm = _WEP40_;
|
||||
padapter->securitypriv.privacy_algorithm = _WEP40_;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
|
||||
break;
|
||||
case WPA_CIPHER_TKIP:
|
||||
padapter->securitypriv.PrivacyAlgrthm = _TKIP_;
|
||||
padapter->securitypriv.privacy_algorithm = _TKIP_;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption2Enabled;
|
||||
break;
|
||||
case WPA_CIPHER_CCMP:
|
||||
padapter->securitypriv.PrivacyAlgrthm = _AES_;
|
||||
padapter->securitypriv.privacy_algorithm = _AES_;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption3Enabled;
|
||||
break;
|
||||
case WPA_CIPHER_WEP104:
|
||||
padapter->securitypriv.PrivacyAlgrthm = _WEP104_;
|
||||
padapter->securitypriv.privacy_algorithm = _WEP104_;
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11Encryption1Enabled;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1448,7 +1448,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
|
|||
netdev_info(dev, "r8712u: %s: EncryptionDisabled\n", __func__);
|
||||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11EncryptionDisabled;
|
||||
padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
|
||||
padapter->securitypriv.auth_algorithm = 0; /* open system */
|
||||
authmode = Ndis802_11AuthModeOpen;
|
||||
|
|
@ -1470,7 +1470,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
|
|||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11Encryption1Enabled;
|
||||
padapter->securitypriv.auth_algorithm = 0; /* open system */
|
||||
padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
|
||||
authmode = Ndis802_11AuthModeOpen;
|
||||
padapter->securitypriv.ndisauthtype = authmode;
|
||||
|
|
@ -1480,7 +1480,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
|
|||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11Encryption1Enabled;
|
||||
padapter->securitypriv.auth_algorithm = 1; /* shared system */
|
||||
padapter->securitypriv.PrivacyAlgrthm = _WEP40_;
|
||||
padapter->securitypriv.privacy_algorithm = _WEP40_;
|
||||
padapter->securitypriv.XGrpPrivacy = _WEP40_;
|
||||
authmode = Ndis802_11AuthModeShared;
|
||||
padapter->securitypriv.ndisauthtype = authmode;
|
||||
|
|
@ -1488,7 +1488,7 @@ static int r8711_wx_set_enc(struct net_device *dev,
|
|||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11Encryption1Enabled;
|
||||
padapter->securitypriv.auth_algorithm = 0; /* open system */
|
||||
padapter->securitypriv.PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.privacy_algorithm = _NO_PRIVACY_;
|
||||
padapter->securitypriv.XGrpPrivacy = _NO_PRIVACY_;
|
||||
authmode = Ndis802_11AuthModeOpen;
|
||||
padapter->securitypriv.ndisauthtype = authmode;
|
||||
|
|
@ -1506,15 +1506,15 @@ static int r8711_wx_set_enc(struct net_device *dev,
|
|||
padapter->securitypriv.PrivacyKeyIndex = key;
|
||||
switch (padapter->securitypriv.DefKeylen[key]) {
|
||||
case 5:
|
||||
padapter->securitypriv.PrivacyAlgrthm =
|
||||
padapter->securitypriv.privacy_algorithm =
|
||||
_WEP40_;
|
||||
break;
|
||||
case 13:
|
||||
padapter->securitypriv.PrivacyAlgrthm =
|
||||
padapter->securitypriv.privacy_algorithm =
|
||||
_WEP104_;
|
||||
break;
|
||||
default:
|
||||
padapter->securitypriv.PrivacyAlgrthm =
|
||||
padapter->securitypriv.privacy_algorithm =
|
||||
_NO_PRIVACY_;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1668,7 +1668,7 @@ static int r871x_wx_set_auth(struct net_device *dev,
|
|||
if (paramval) {
|
||||
padapter->securitypriv.ndisencryptstatus =
|
||||
Ndis802_11EncryptionDisabled;
|
||||
padapter->securitypriv.PrivacyAlgrthm =
|
||||
padapter->securitypriv.privacy_algorithm =
|
||||
_NO_PRIVACY_;
|
||||
padapter->securitypriv.XGrpPrivacy =
|
||||
_NO_PRIVACY_;
|
||||
|
|
|
|||
|
|
@ -337,13 +337,13 @@ int r8712_set_802_11_add_wep(struct _adapter *padapter,
|
|||
return -EINVAL;
|
||||
switch (wep->KeyLength) {
|
||||
case 5:
|
||||
psecuritypriv->PrivacyAlgrthm = _WEP40_;
|
||||
psecuritypriv->privacy_algorithm = _WEP40_;
|
||||
break;
|
||||
case 13:
|
||||
psecuritypriv->PrivacyAlgrthm = _WEP104_;
|
||||
psecuritypriv->privacy_algorithm = _WEP104_;
|
||||
break;
|
||||
default:
|
||||
psecuritypriv->PrivacyAlgrthm = _NO_PRIVACY_;
|
||||
psecuritypriv->privacy_algorithm = _NO_PRIVACY_;
|
||||
break;
|
||||
}
|
||||
memcpy(psecuritypriv->DefKey[keyid].skey, &wep->KeyMaterial,
|
||||
|
|
|
|||
|
|
@ -219,10 +219,10 @@ int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork)
|
|||
int ret = true;
|
||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
|
||||
if ((psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_) &&
|
||||
if ((psecuritypriv->privacy_algorithm != _NO_PRIVACY_) &&
|
||||
(pnetwork->network.Privacy == cpu_to_le32(0)))
|
||||
ret = false;
|
||||
else if ((psecuritypriv->PrivacyAlgrthm == _NO_PRIVACY_) &&
|
||||
else if ((psecuritypriv->privacy_algorithm == _NO_PRIVACY_) &&
|
||||
(pnetwork->network.Privacy == cpu_to_le32(1)))
|
||||
ret = false;
|
||||
else
|
||||
|
|
@ -426,7 +426,7 @@ static int is_desired_network(struct _adapter *adapter,
|
|||
return true;
|
||||
return false;
|
||||
}
|
||||
if ((psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_) &&
|
||||
if ((psecuritypriv->privacy_algorithm != _NO_PRIVACY_) &&
|
||||
(pnetwork->network.Privacy == 0))
|
||||
bselected = false;
|
||||
if (check_fwstate(&adapter->mlmepriv, WIFI_ADHOC_STATE)) {
|
||||
|
|
@ -774,7 +774,7 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
|
|||
adapter->securitypriv.bgrpkey_handshake = false;
|
||||
ptarget_sta->ieee8021x_blocked = true;
|
||||
ptarget_sta->XPrivacy =
|
||||
adapter->securitypriv.PrivacyAlgrthm;
|
||||
adapter->securitypriv.privacy_algorithm;
|
||||
memset((u8 *)&ptarget_sta->x_UncstKey,
|
||||
0,
|
||||
sizeof(union Keytype));
|
||||
|
|
@ -870,7 +870,7 @@ void r8712_stassoc_event_callback(struct _adapter *adapter, u8 *pbuf)
|
|||
/* psta->aid = (uint)pstassoc->cam_id; */
|
||||
|
||||
if (adapter->securitypriv.auth_algorithm == 2)
|
||||
psta->XPrivacy = adapter->securitypriv.PrivacyAlgrthm;
|
||||
psta->XPrivacy = adapter->securitypriv.privacy_algorithm;
|
||||
psta->ieee8021x_blocked = false;
|
||||
spin_lock_irqsave(&pmlmepriv->lock, irqL);
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
|
||||
|
|
@ -1165,7 +1165,7 @@ int r8712_set_key(struct _adapter *adapter,
|
|||
(u8)psecuritypriv->XGrpPrivacy;
|
||||
} else { /* WEP */
|
||||
psetkeyparm->algorithm =
|
||||
(u8)psecuritypriv->PrivacyAlgrthm;
|
||||
(u8)psecuritypriv->privacy_algorithm;
|
||||
}
|
||||
psetkeyparm->keyid = (u8)keyid;
|
||||
|
||||
|
|
@ -1542,7 +1542,7 @@ void r8712_update_registrypriv_dev_network(struct _adapter *adapter)
|
|||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
struct wlan_network *cur_network = &adapter->mlmepriv.cur_network;
|
||||
|
||||
pdev_network->Privacy = cpu_to_le32(psecuritypriv->PrivacyAlgrthm
|
||||
pdev_network->Privacy = cpu_to_le32(psecuritypriv->privacy_algorithm
|
||||
> 0 ? 1 : 0); /* adhoc no 802.1x */
|
||||
pdev_network->Rssi = 0;
|
||||
switch (pregistrypriv->wireless_mode) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ struct security_priv {
|
|||
u32 auth_algorithm; /* 802.11 auth, could be open, shared,
|
||||
* 8021x and authswitch
|
||||
*/
|
||||
u32 PrivacyAlgrthm; /* This specify the privacy for shared
|
||||
u32 privacy_algorithm; /* This specify the privacy for shared
|
||||
* auth. algorithm.
|
||||
*/
|
||||
u32 PrivacyKeyIndex; /* this is only valid for legendary
|
||||
|
|
@ -143,7 +143,7 @@ do { \
|
|||
case 0: \
|
||||
case 1: \
|
||||
case 3: \
|
||||
encry_algo = (u8)psecuritypriv->PrivacyAlgrthm; \
|
||||
encry_algo = (u8)psecuritypriv->privacy_algorithm; \
|
||||
break; \
|
||||
case 2: \
|
||||
if (bmcst) \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user