From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: gregkh@linuxfoundation.org
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 16/16] staging: rtl8723bs: fix camel case in struct ndis_802_11_wep
Date: Wed, 21 Jul 2021 15:37:23 +0200 [thread overview]
Message-ID: <d3a1407e1bcb07d423dfa0c9bd33021a59bc0b61.1626874164.git.fabioaiuto83@gmail.com> (raw)
In-Reply-To: <cover.1626874164.git.fabioaiuto83@gmail.com>
fix camel case in struct ndis_802_11_wep all over the driver.
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
---
.../staging/rtl8723bs/core/rtw_ioctl_set.c | 8 +--
.../staging/rtl8723bs/include/wlan_bssdef.h | 8 +--
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 ++---
.../staging/rtl8723bs/os_dep/ioctl_linux.c | 54 +++++++++----------
4 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index 03a7da84bf23..8914ef3d33c8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -494,14 +494,14 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep)
struct security_priv *psecuritypriv = &(padapter->securitypriv);
u8 ret = _SUCCESS;
- keyid = wep->KeyIndex & 0x3fffffff;
+ keyid = wep->key_index & 0x3fffffff;
if (keyid >= 4) {
ret = false;
goto exit;
}
- switch (wep->KeyLength) {
+ switch (wep->key_length) {
case 5:
psecuritypriv->dot11PrivacyAlgrthm = _WEP40_;
break;
@@ -513,9 +513,9 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep)
break;
}
- memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->KeyMaterial), wep->KeyLength);
+ memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]), &(wep->key_material), wep->key_length);
- psecuritypriv->dot11DefKeylen[keyid] = wep->KeyLength;
+ psecuritypriv->dot11DefKeylen[keyid] = wep->key_length;
psecuritypriv->dot11PrivacyKeyIndex = keyid;
diff --git a/drivers/staging/rtl8723bs/include/wlan_bssdef.h b/drivers/staging/rtl8723bs/include/wlan_bssdef.h
index b101a3ac40ff..530c95275c1e 100644
--- a/drivers/staging/rtl8723bs/include/wlan_bssdef.h
+++ b/drivers/staging/rtl8723bs/include/wlan_bssdef.h
@@ -110,10 +110,10 @@ enum {
/* Key mapping keys require a BSSID */
struct ndis_802_11_wep {
- u32 Length; /* Length of this structure */
- u32 KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
- u32 KeyLength; /* length of key in bytes */
- u8 KeyMaterial[16];/* variable length depending on above field */
+ u32 length; /* Length of this structure */
+ u32 key_index; /* 0 is the per-client key, 1-N are the global keys */
+ u32 key_length; /* length of key in bytes */
+ u8 key_material[16];/* variable length depending on above field */
};
/* mask for authentication/integrity fields */
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index bcd8d03a35a0..dc23470fcdef 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1874,7 +1874,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
if (wep_key_len > 0) {
wep_key_len = wep_key_len <= 5 ? 5 : 13;
- wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
+ wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material);
pwep = rtw_malloc(wep_total_len);
if (pwep == NULL) {
ret = -ENOMEM;
@@ -1883,8 +1883,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
memset(pwep, 0, wep_total_len);
- pwep->KeyLength = wep_key_len;
- pwep->Length = wep_total_len;
+ pwep->key_length = wep_key_len;
+ pwep->length = wep_total_len;
if (wep_key_len == 13) {
padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_;
@@ -1895,10 +1895,10 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
- pwep->KeyIndex = wep_key_idx;
- pwep->KeyIndex |= 0x80000000;
+ pwep->key_index = wep_key_idx;
+ pwep->key_index |= 0x80000000;
- memcpy(pwep->KeyMaterial, (void *)sme->key, pwep->KeyLength);
+ memcpy(pwep->key_material, (void *)sme->key, pwep->key_length);
if (rtw_set_802_11_add_wep(padapter, pwep) == (u8)_FAIL)
ret = -EOPNOTSUPP;
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 8c44db696b52..1383f84a4425 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -411,15 +411,15 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
if (wep_key_len > 0) {
wep_key_len = wep_key_len <= 5 ? 5 : 13;
- wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
+ wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material);
pwep = kzalloc(wep_total_len, GFP_KERNEL);
if (!pwep) {
ret = -ENOMEM;
goto exit;
}
- pwep->KeyLength = wep_key_len;
- pwep->Length = wep_total_len;
+ pwep->key_length = wep_key_len;
+ pwep->length = wep_total_len;
if (wep_key_len == 13) {
padapter->securitypriv.dot11PrivacyAlgrthm = _WEP104_;
@@ -430,10 +430,10 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
goto exit;
}
- pwep->KeyIndex = wep_key_idx;
- pwep->KeyIndex |= 0x80000000;
+ pwep->key_index = wep_key_idx;
+ pwep->key_index |= 0x80000000;
- memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength);
+ memcpy(pwep->key_material, param->u.crypt.key, pwep->key_length);
if (param->u.crypt.set_tx) {
if (rtw_set_802_11_add_wep(padapter, pwep) == (u8)_FAIL)
@@ -447,8 +447,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
goto exit;
}
- memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength);
- psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength;
+ memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length);
+ psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length;
rtw_set_key(padapter, psecuritypriv, wep_key_idx, 0, true);
}
@@ -1667,15 +1667,15 @@ static int rtw_wx_set_enc(struct net_device *dev,
padapter->securitypriv.ndisauthtype = authmode;
}
- wep.KeyIndex = key;
+ wep.key_index = key;
if (erq->length > 0) {
- wep.KeyLength = erq->length <= 5 ? 5 : 13;
+ wep.key_length = erq->length <= 5 ? 5 : 13;
- wep.Length = wep.KeyLength + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
+ wep.length = wep.key_length + FIELD_OFFSET(struct ndis_802_11_wep, key_material);
} else {
- wep.KeyLength = 0;
+ wep.key_length = 0;
- if (keyindex_provided == 1) { /* set key_id only, no given KeyMaterial(erq->length == 0). */
+ if (keyindex_provided == 1) { /* set key_id only, no given key_material(erq->length == 0). */
padapter->securitypriv.dot11PrivacyKeyIndex = key;
switch (padapter->securitypriv.dot11DefKeylen[key]) {
@@ -1696,9 +1696,9 @@ static int rtw_wx_set_enc(struct net_device *dev,
}
- wep.KeyIndex |= 0x80000000;
+ wep.key_index |= 0x80000000;
- memcpy(wep.KeyMaterial, keybuf, wep.KeyLength);
+ memcpy(wep.key_material, keybuf, wep.key_length);
if (rtw_set_802_11_add_wep(padapter, &wep) == false) {
if (rf_on == pwrpriv->rf_pwrstate)
@@ -2974,19 +2974,19 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
if (wep_key_len > 0) {
wep_key_len = wep_key_len <= 5 ? 5 : 13;
- wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
+ wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, key_material);
pwep = kzalloc(wep_total_len, GFP_KERNEL);
if (!pwep)
goto exit;
- pwep->KeyLength = wep_key_len;
- pwep->Length = wep_total_len;
+ pwep->key_length = wep_key_len;
+ pwep->length = wep_total_len;
}
- pwep->KeyIndex = wep_key_idx;
+ pwep->key_index = wep_key_idx;
- memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength);
+ memcpy(pwep->key_material, param->u.crypt.key, pwep->key_length);
if (param->u.crypt.set_tx) {
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Auto;
@@ -2994,7 +2994,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
psecuritypriv->dot11PrivacyAlgrthm = _WEP40_;
psecuritypriv->dot118021XGrpPrivacy = _WEP40_;
- if (pwep->KeyLength == 13) {
+ if (pwep->key_length == 13) {
psecuritypriv->dot11PrivacyAlgrthm = _WEP104_;
psecuritypriv->dot118021XGrpPrivacy = _WEP104_;
}
@@ -3002,20 +3002,20 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx;
- memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength);
+ memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length);
- psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength;
+ psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length;
- rtw_ap_set_wep_key(padapter, pwep->KeyMaterial, pwep->KeyLength, wep_key_idx, 1);
+ rtw_ap_set_wep_key(padapter, pwep->key_material, pwep->key_length, wep_key_idx, 1);
} else {
/* don't update "psecuritypriv->dot11PrivacyAlgrthm" and */
/* psecuritypriv->dot11PrivacyKeyIndex =keyid", but can rtw_set_key to cam */
- memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->KeyMaterial, pwep->KeyLength);
+ memcpy(&(psecuritypriv->dot11DefKey[wep_key_idx].skey[0]), pwep->key_material, pwep->key_length);
- psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->KeyLength;
+ psecuritypriv->dot11DefKeylen[wep_key_idx] = pwep->key_length;
- rtw_ap_set_wep_key(padapter, pwep->KeyMaterial, pwep->KeyLength, wep_key_idx, 0);
+ rtw_ap_set_wep_key(padapter, pwep->key_material, pwep->key_length, wep_key_idx, 0);
}
goto exit;
--
2.20.1
prev parent reply other threads:[~2021-07-21 13:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 13:37 [PATCH 00/16] staging: rtl8723bs: remove residual 5 Ghz code and more code cleaning Fabio Aiuto
2021-07-21 13:37 ` [PATCH 01/16] staging: rtl8723bs: simplify function selecting channel group Fabio Aiuto
2021-07-21 13:37 ` [PATCH 02/16] staging: rtl8723bs: fix camel case inside function Fabio Aiuto
2021-07-21 13:37 ` [PATCH 03/16] staging: rtl8723bs: convert function name to snake case Fabio Aiuto
2021-07-21 13:37 ` [PATCH 04/16] staging: rtl8723bs: add spaces around operator Fabio Aiuto
2021-07-21 13:37 ` [PATCH 05/16] staging: rtl8723bs: remove 5Ghz code blocks Fabio Aiuto
2021-07-21 13:37 ` [PATCH 06/16] staging: rtl8723bs: remove commented out condition Fabio Aiuto
2021-07-21 13:37 ` [PATCH 07/16] staging: rtl8723bs: fix camel case in struct wlan_bssid_ex Fabio Aiuto
2021-07-21 13:37 ` [PATCH 08/16] staging: rtl8723bs: fix camel case in struct ndis_802_11_conf Fabio Aiuto
2021-07-21 13:37 ` [PATCH 09/16] staging: rtl8723bs: remove struct ndis_802_11_conf_fh Fabio Aiuto
2021-07-21 13:37 ` [PATCH 10/16] staging: rtl8723bs: fix camel case in struct ndis_802_11_ssid Fabio Aiuto
2021-07-21 13:37 ` [PATCH 11/16] staging: rtl8723bs: fix camel case in struct wlan_phy_info Fabio Aiuto
2021-07-21 13:37 ` [PATCH 12/16] staging: rtl8723bs: fix camel case in struct wlan_bcn_info Fabio Aiuto
2021-07-21 13:37 ` [PATCH 13/16] staging: rtl8723bs: fix camel case in IE structures Fabio Aiuto
2021-07-21 13:37 ` [PATCH 14/16] staging: rtl8723bs: remove unused struct ndis_802_11_ai_reqfi Fabio Aiuto
2021-07-21 13:37 ` [PATCH 15/16] staging: rtl8723bs: remove unused struct ndis_801_11_ai_resfi Fabio Aiuto
2021-07-21 13:37 ` Fabio Aiuto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3a1407e1bcb07d423dfa0c9bd33021a59bc0b61.1626874164.git.fabioaiuto83@gmail.com \
--to=fabioaiuto83@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).