2024-05-15 04:52:47

by Tree Davies

[permalink] [raw]
Subject: [PATCH 00/31] Staging: rtl8192e: rtllib_rx.c Rename camelcase variables

This series renames camelcase variables to meet style
guide requirements. Thank you in advance to reviewers.
~ Tree

Tree Davies (31):
Staging: rtl8192e: Rename variable IsPassiveChannel
Staging: rtl8192e: Rename variable CountryIeBuf
Staging: rtl8192e: Rename variable CountryIeLen
Staging: rtl8192e: Rename variable bWithAironetIE
Staging: rtl8192e: Rename variable bContainHTC
Staging: rtl8192e: Rename variable MBssid
Staging: rtl8192e: Rename variable MBssidMask
Staging: rtl8192e: Rename variable elementID
Staging: rtl8192e: Rename variable rtllib_rx_Monitor
Staging: rtl8192e: Rename variable rtllib_rx_InfraAdhoc
Staging: rtl8192e: Rename variable IsLegacyDataFrame
Staging: rtl8192e: Rename variable RxReorderIndicatePacket
Staging: rtl8192e: Rename variable RfdArray
Staging: rtl8192e: Rename variable Decrypted
Staging: rtl8192e: Rename variable AddReorderEntry
Staging: rtl8192e: Rename variable pList
Staging: rtl8192e: Rename variable nPadding_Length
Staging: rtl8192e: Rename variable LLCOffset
Staging: rtl8192e: Rename variable ChkLength
Staging: rtl8192e: Rename variable WinEnd
Staging: rtl8192e: Rename variable WinSize
Staging: rtl8192e: Rename variable IsDataFrame
Staging: rtl8192e: Rename variable bMatchWinStart
Staging: rtl8192e: Rename variable bMBssidValid
Staging: rtl8192e: Rename variable bWithCcxVerNum
Staging: rtl8192e: Rename variable Frame_QoSTID
Staging: rtl8192e: Rename variable CcxRmState
Staging: rtl8192e: Rename variable IsQoSDataFrame
Staging: rtl8192e: Rename variable RfdCnt
Staging: rtl8192e: Rename variable prxbIndicateArray
Staging: rtl8192e: Rename variable bPktInBuf

.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 +-
drivers/staging/rtl8192e/rtllib.h | 36 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 184 +++++++++---------
drivers/staging/rtl8192e/rtllib_tx.c | 4 +-
6 files changed, 118 insertions(+), 118 deletions(-)

--
2.30.2



2024-05-15 04:53:06

by Tree Davies

[permalink] [raw]
Subject: [PATCH 02/31] Staging: rtl8192e: Rename variable CountryIeBuf

Rename variable CountryIeBuf to country_ie_buf
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 0809af3fd041..8a84d61e6912 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -950,7 +950,7 @@ struct rtllib_network {
struct rtllib_wmm_ac_param wmm_param[4];
u8 turbo_enable;
u16 CountryIeLen;
- u8 CountryIeBuf[MAX_IE_LEN];
+ u8 country_ie_buf[MAX_IE_LEN];
struct bss_ht bssht;
bool broadcom_cap_exist;
bool realtek_cap_exit;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4a0db2dfd5e9..dc0db6fade0f 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -2184,7 +2184,7 @@ static inline int rtllib_network_init(
network->SignalStrength = stats->SignalStrength;
network->RSSI = stats->SignalStrength;
network->CountryIeLen = 0;
- memset(network->CountryIeBuf, 0, MAX_IE_LEN);
+ memset(network->country_ie_buf, 0, MAX_IE_LEN);
ht_initialize_bss_desc(&network->bssht);
network->flags |= NETWORK_HAS_CCK;

@@ -2343,7 +2343,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->turbo_enable = src->turbo_enable;

dst->CountryIeLen = src->CountryIeLen;
- memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen);
+ memcpy(dst->country_ie_buf, src->country_ie_buf, src->CountryIeLen);

dst->bWithAironetIE = src->bWithAironetIE;
dst->ckip_supported = src->ckip_supported;
--
2.30.2


2024-05-15 04:53:06

by Tree Davies

[permalink] [raw]
Subject: [PATCH 03/31] Staging: rtl8192e: Rename variable CountryIeLen

Rename variable CountryIeLen to country_ie_len
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 8a84d61e6912..cae4df481397 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -949,7 +949,7 @@ struct rtllib_network {
u8 wmm_info;
struct rtllib_wmm_ac_param wmm_param[4];
u8 turbo_enable;
- u16 CountryIeLen;
+ u16 country_ie_len;
u8 country_ie_buf[MAX_IE_LEN];
struct bss_ht bssht;
bool broadcom_cap_exist;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index dc0db6fade0f..1cae6d6efb96 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -2183,7 +2183,7 @@ static inline int rtllib_network_init(
network->turbo_enable = 0;
network->SignalStrength = stats->SignalStrength;
network->RSSI = stats->SignalStrength;
- network->CountryIeLen = 0;
+ network->country_ie_len = 0;
memset(network->country_ie_buf, 0, MAX_IE_LEN);
ht_initialize_bss_desc(&network->bssht);
network->flags |= NETWORK_HAS_CCK;
@@ -2342,8 +2342,8 @@ static inline void update_network(struct rtllib_device *ieee,
dst->RSSI = src->RSSI;
dst->turbo_enable = src->turbo_enable;

- dst->CountryIeLen = src->CountryIeLen;
- memcpy(dst->country_ie_buf, src->country_ie_buf, src->CountryIeLen);
+ dst->country_ie_len = src->country_ie_len;
+ memcpy(dst->country_ie_buf, src->country_ie_buf, src->country_ie_len);

dst->bWithAironetIE = src->bWithAironetIE;
dst->ckip_supported = src->ckip_supported;
--
2.30.2


2024-05-15 04:53:12

by Tree Davies

[permalink] [raw]
Subject: [PATCH 04/31] Staging: rtl8192e: Rename variable bWithAironetIE

Rename variable bWithAironetIE to with_aironet_ie
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cae4df481397..40ec29434d68 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -910,7 +910,7 @@ struct rtllib_network {
u8 hidden_ssid_len;
struct rtllib_qos_data qos_data;

- bool bWithAironetIE;
+ bool with_aironet_ie;
bool ckip_supported;
bool ccx_rm_enable;
u8 CcxRmState[2];
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 1cae6d6efb96..d4dbf8052c30 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -2090,7 +2090,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
netdev_dbg(ieee->dev, "MFIE_TYPE_AIRONET: %d bytes\n",
info_element->len);
if (info_element->len > IE_CISCO_FLAG_POSITION) {
- network->bWithAironetIE = true;
+ network->with_aironet_ie = true;

if ((info_element->data[IE_CISCO_FLAG_POSITION]
& SUPPORT_CKIP_MIC) ||
@@ -2100,7 +2100,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
else
network->ckip_supported = false;
} else {
- network->bWithAironetIE = false;
+ network->with_aironet_ie = false;
network->ckip_supported = false;
}
break;
@@ -2345,7 +2345,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->country_ie_len = src->country_ie_len;
memcpy(dst->country_ie_buf, src->country_ie_buf, src->country_ie_len);

- dst->bWithAironetIE = src->bWithAironetIE;
+ dst->with_aironet_ie = src->with_aironet_ie;
dst->ckip_supported = src->ckip_supported;
memcpy(dst->CcxRmState, src->CcxRmState, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
--
2.30.2


2024-05-15 04:53:28

by Tree Davies

[permalink] [raw]
Subject: [PATCH 05/31] Staging: rtl8192e: Rename variable bContainHTC

Rename variable bContainHTC to contain_htc
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 40ec29434d68..ce0cd1f557c3 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -489,7 +489,7 @@ struct rtllib_rx_stats {
u8 RxBufShift;
bool bIsAMPDU;
bool bFirstMPDU;
- bool bContainHTC;
+ bool contain_htc;
u32 RxPWDBAll;
u8 RxMIMOSignalStrength[4];
s8 RxMIMOSignalQuality[2];
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d4dbf8052c30..4e7c491c0aaf 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -743,7 +743,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,

if (RTLLIB_QOS_HAS_SEQ(fc))
LLCOffset += 2;
- if (rx_stats->bContainHTC)
+ if (rx_stats->contain_htc)
LLCOffset += sHTCLng;

ChkLength = LLCOffset;
@@ -862,7 +862,7 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
netdev_info(ieee->dev, "%s: find HTCControl!\n",
__func__);
hdrlen += 4;
- rx_stats->bContainHTC = true;
+ rx_stats->contain_htc = true;
}

return hdrlen;
--
2.30.2


2024-05-15 04:53:31

by Tree Davies

[permalink] [raw]
Subject: [PATCH 06/31] Staging: rtl8192e: Rename variable MBssid

Rename variable MBssid to mb_ssid
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ce0cd1f557c3..7f1c2f49227e 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -916,7 +916,7 @@ struct rtllib_network {
u8 CcxRmState[2];
bool bMBssidValid;
u8 MBssidMask;
- u8 MBssid[ETH_ALEN];
+ u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum;
u8 bss_ccx_ver_number;
/* These are network statistics */
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4e7c491c0aaf..c29efa3eef6f 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1823,9 +1823,9 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
network->bMBssidValid = true;
network->MBssidMask = 0xff <<
(network->MBssidMask);
- ether_addr_copy(network->MBssid,
+ ether_addr_copy(network->mb_ssid,
network->bssid);
- network->MBssid[5] &= network->MBssidMask;
+ network->mb_ssid[5] &= network->MBssidMask;
} else {
network->bMBssidValid = false;
}
@@ -2351,7 +2351,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->ccx_rm_enable = src->ccx_rm_enable;
dst->MBssidMask = src->MBssidMask;
dst->bMBssidValid = src->bMBssidValid;
- memcpy(dst->MBssid, src->MBssid, 6);
+ memcpy(dst->mb_ssid, src->mb_ssid, 6);
dst->bWithCcxVerNum = src->bWithCcxVerNum;
dst->bss_ccx_ver_number = src->bss_ccx_ver_number;
}
--
2.30.2


2024-05-15 04:53:44

by Tree Davies

[permalink] [raw]
Subject: [PATCH 07/31] Staging: rtl8192e: Rename variable MBssidMask

Rename variable MBssidMask to mb_ssid_mask
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7f1c2f49227e..3722fc0cae1d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -915,7 +915,7 @@ struct rtllib_network {
bool ccx_rm_enable;
u8 CcxRmState[2];
bool bMBssidValid;
- u8 MBssidMask;
+ u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum;
u8 bss_ccx_ver_number;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index c29efa3eef6f..19cb717df3bb 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1818,14 +1818,14 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
network->ccx_rm_enable = true;
else
network->ccx_rm_enable = false;
- network->MBssidMask = network->CcxRmState[1] & 0x07;
- if (network->MBssidMask != 0) {
+ network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
+ if (network->mb_ssid_mask != 0) {
network->bMBssidValid = true;
- network->MBssidMask = 0xff <<
- (network->MBssidMask);
+ network->mb_ssid_mask = 0xff <<
+ (network->mb_ssid_mask);
ether_addr_copy(network->mb_ssid,
network->bssid);
- network->mb_ssid[5] &= network->MBssidMask;
+ network->mb_ssid[5] &= network->mb_ssid_mask;
} else {
network->bMBssidValid = false;
}
@@ -2349,7 +2349,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->ckip_supported = src->ckip_supported;
memcpy(dst->CcxRmState, src->CcxRmState, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
- dst->MBssidMask = src->MBssidMask;
+ dst->mb_ssid_mask = src->mb_ssid_mask;
dst->bMBssidValid = src->bMBssidValid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
dst->bWithCcxVerNum = src->bWithCcxVerNum;
--
2.30.2


2024-05-15 04:54:08

by Tree Davies

[permalink] [raw]
Subject: [PATCH 08/31] Staging: rtl8192e: Rename variable elementID

Rename variable elementID to element_id
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 3722fc0cae1d..4645fe803a15 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -728,7 +728,7 @@ union frameqos {
#define QOS_VERSION_1 1

struct rtllib_qos_information_element {
- u8 elementID;
+ u8 element_id;
u8 length;
u8 qui[QOS_OUI_LEN];
u8 qui_type;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 19cb717df3bb..76389aef53ee 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1456,7 +1456,7 @@ static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
static int rtllib_verify_qos_info(struct rtllib_qos_information_element
*info_element, int sub_type)
{
- if (info_element->elementID != QOS_ELEMENT_ID)
+ if (info_element->element_id != QOS_ELEMENT_ID)
return -1;
if (info_element->qui_subtype != sub_type)
return -1;
--
2.30.2


2024-05-15 04:54:09

by Tree Davies

[permalink] [raw]
Subject: [PATCH 09/31] Staging: rtl8192e: Rename variable rtllib_rx_Monitor

Rename variable rtllib_rx_Monitor to rtllib_rx_monit
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 76389aef53ee..108fe1520cf9 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1383,7 +1383,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
return 0;
}

-static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
+static int rtllib_rx_monitor(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *rx_stats)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -1434,7 +1434,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
break;
case IW_MODE_MONITOR:
- ret = rtllib_rx_Monitor(ieee, skb, rx_stats);
+ ret = rtllib_rx_monitor(ieee, skb, rx_stats);
break;
default:
netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__);
--
2.30.2


2024-05-15 04:54:24

by Tree Davies

[permalink] [raw]
Subject: [PATCH 10/31] Staging: rtl8192e: Rename variable rtllib_rx_InfraAdhoc

Rename variable rtllib_rx_InfraAdhoc to rtllib_rx_infra_adhoc
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 108fe1520cf9..ea8cab9707bc 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1223,7 +1223,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
kfree(rxb);
}

-static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
+static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *rx_stats)
{
struct net_device *dev = ieee->dev;
@@ -1431,7 +1431,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,

switch (ieee->iw_mode) {
case IW_MODE_INFRA:
- ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
+ ret = rtllib_rx_infra_adhoc(ieee, skb, rx_stats);
break;
case IW_MODE_MONITOR:
ret = rtllib_rx_monitor(ieee, skb, rx_stats);
--
2.30.2


2024-05-15 04:54:42

by Tree Davies

[permalink] [raw]
Subject: [PATCH 11/31] Staging: rtl8192e: Rename variable IsLegacyDataFrame

Rename variable IsLegacyDataFrame to is_legacy_data_frame
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 4645fe803a15..cdb3ebc77a53 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -339,7 +339,7 @@ enum rt_op_mode {

#define FC_QOS_BIT BIT(7)
#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
-#define IsLegacyDataFrame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
+#define is_legacy_data_frame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
#define IsQoSDataFrame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index ea8cab9707bc..24136bba64b6 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -882,7 +882,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
if (!ieee->ht_info->cur_rx_reorder_enable ||
!ieee->current_network.qos_data.active ||
!IsDataFrame(skb->data) ||
- IsLegacyDataFrame(skb->data)) {
+ is_legacy_data_frame(skb->data)) {
if (!ieee80211_is_beacon(hdr->frame_control)) {
if (is_duplicate_packet(ieee, hdr))
return -1;
--
2.30.2


2024-05-15 05:03:02

by Tree Davies

[permalink] [raw]
Subject: [PATCH 30/31] Staging: rtl8192e: Rename variable prxbIndicateArray

Rename variable prxbIndicateArray to prxb_indicate_array
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 4 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index e2695beaf582..62af48c20229 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1409,7 +1409,7 @@ struct rtllib_device {
union {
struct rtllib_rxb *rfd_array[REORDER_WIN_SIZE];
struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
- struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *prxb_indicate_array[REORDER_WIN_SIZE];
struct {
struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT];
struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT];
@@ -1803,7 +1803,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
struct rtllib_rx_stats *stats);

void rtllib_indicate_packets(struct rtllib_device *ieee,
- struct rtllib_rxb **prxbIndicateArray, u8 index);
+ struct rtllib_rxb **prxb_indicate_array, u8 index);
#define RT_ASOC_RETRY_LIMIT 5
u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee);

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 89dcbead5e11..43e94af07e99 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -429,14 +429,14 @@ static bool add_reorder_entry(struct rx_ts_record *ts,
}

void rtllib_indicate_packets(struct rtllib_device *ieee,
- struct rtllib_rxb **prxbIndicateArray, u8 index)
+ struct rtllib_rxb **prxb_indicate_array, u8 index)
{
struct net_device_stats *stats = &ieee->stats;
u8 i = 0, j = 0;
u16 ethertype;

for (j = 0; j < index; j++) {
- struct rtllib_rxb *prxb = prxbIndicateArray[j];
+ struct rtllib_rxb *prxb = prxb_indicate_array[j];

for (i = 0; i < prxb->nr_subframes; i++) {
struct sk_buff *sub_skb = prxb->subframes[i];
@@ -594,7 +594,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
netdev_dbg(ieee->dev,
"Packets indication! IndicateSeq: %d, NewSeq: %d\n",
ts->rx_indicate_seq, SeqNum);
- ieee->prxbIndicateArray[0] = prxb;
+ ieee->prxb_indicate_array[0] = prxb;
index = 1;
} else {
/* Current packet is going to be inserted into pending list.*/
@@ -675,7 +675,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) %
4096;

- ieee->prxbIndicateArray[index] = pReorderEntry->prxb;
+ ieee->prxb_indicate_array[index] = pReorderEntry->prxb;
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n",
__func__, pReorderEntry->SeqNum);
index++;
@@ -706,7 +706,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
flags);
return;
}
- rtllib_indicate_packets(ieee, ieee->prxbIndicateArray, index);
+ rtllib_indicate_packets(ieee, ieee->prxb_indicate_array, index);
bPktInBuf = false;
}

--
2.30.2


2024-05-15 05:03:08

by Tree Davies

[permalink] [raw]
Subject: [PATCH 17/31] Staging: rtl8192e: Rename variable nPadding_Length

Rename variable nPadding_Length to npadding_length
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index fb679229f173..0db75fa7da1e 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -732,7 +732,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
u16 ChkLength;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
- u8 nPadding_Length = 0;
+ u8 npadding_length = 0;
u16 SeqNum = 0;
struct sk_buff *sub_skb;
/* just for debug purpose */
@@ -833,15 +833,15 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
skb_pull(skb, nSubframe_Length);

if (skb->len != 0) {
- nPadding_Length = 4 - ((nSubframe_Length +
+ npadding_length = 4 - ((nSubframe_Length +
ETHERNET_HEADER_SIZE) % 4);
- if (nPadding_Length == 4)
- nPadding_Length = 0;
+ if (npadding_length == 4)
+ npadding_length = 0;

- if (skb->len < nPadding_Length)
+ if (skb->len < npadding_length)
return 0;

- skb_pull(skb, nPadding_Length);
+ skb_pull(skb, npadding_length);
}
}

--
2.30.2


2024-05-15 05:03:19

by Tree Davies

[permalink] [raw]
Subject: [PATCH 22/31] Staging: rtl8192e: Rename variable IsDataFrame

Rename variable IsDataFrame to is_data_frame
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 4 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index f69f4ca39fd5..0914ba37f42f 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -338,8 +338,8 @@ enum rt_op_mode {
#define RTLLIB_QCTL_TID 0x000F

#define FC_QOS_BIT BIT(7)
-#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
-#define is_legacy_data_frame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
+#define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
+#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
#define IsQoSDataFrame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index f276e52aab08..d4714e193df4 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -881,7 +881,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,

if (!ieee->ht_info->cur_rx_reorder_enable ||
!ieee->current_network.qos_data.active ||
- !IsDataFrame(skb->data) ||
+ !is_data_frame(skb->data) ||
is_legacy_data_frame(skb->data)) {
if (!ieee80211_is_beacon(hdr->frame_control)) {
if (is_duplicate_packet(ieee, hdr))
--
2.30.2


2024-05-15 05:03:29

by Tree Davies

[permalink] [raw]
Subject: [PATCH 21/31] Staging: rtl8192e: Rename variable WinSize

Rename variable WinSize to win_size
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 72e4af81b1de..f276e52aab08 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -526,19 +526,19 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rx_reorder_entry *pReorderEntry = NULL;
- u8 WinSize = ht_info->rx_reorder_win_size;
+ u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
bool bMatchWinStart = false, bPktInBuf = false;
unsigned long flags;

netdev_dbg(ieee->dev,
- "%s(): Seq is %d, ts->rx_indicate_seq is %d, WinSize is %d\n",
- __func__, SeqNum, ts->rx_indicate_seq, WinSize);
+ "%s(): Seq is %d, ts->rx_indicate_seq is %d, win_size is %d\n",
+ __func__, SeqNum, ts->rx_indicate_seq, win_size);

spin_lock_irqsave(&(ieee->reorder_spinlock), flags);

- win_end = (ts->rx_indicate_seq + WinSize - 1) % 4096;
+ win_end = (ts->rx_indicate_seq + win_size - 1) % 4096;
/* Rx Reorder initialize condition.*/
if (ts->rx_indicate_seq == 0xffff)
ts->rx_indicate_seq = SeqNum;
@@ -569,11 +569,11 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
bMatchWinStart = true;
} else if (SN_LESS(win_end, SeqNum)) {
- if (SeqNum >= (WinSize - 1))
- ts->rx_indicate_seq = SeqNum + 1 - WinSize;
+ if (SeqNum >= (win_size - 1))
+ ts->rx_indicate_seq = SeqNum + 1 - win_size;
else
ts->rx_indicate_seq = 4095 -
- (WinSize - (SeqNum + 1)) + 1;
+ (win_size - (SeqNum + 1)) + 1;
netdev_dbg(ieee->dev,
"Window Shift! IndicateSeq: %d, NewSeq: %d\n",
ts->rx_indicate_seq, SeqNum);
--
2.30.2


2024-05-15 05:03:42

by Tree Davies

[permalink] [raw]
Subject: [PATCH 16/31] Staging: rtl8192e: Rename variable pList

Rename variable pList to plist
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 30bd6f49e915..fb679229f173 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -406,24 +406,24 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
static bool add_reorder_entry(struct rx_ts_record *ts,
struct rx_reorder_entry *pReorderEntry)
{
- struct list_head *pList = &ts->rx_pending_pkt_list;
+ struct list_head *plist = &ts->rx_pending_pkt_list;

- while (pList->next != &ts->rx_pending_pkt_list) {
+ while (plist->next != &ts->rx_pending_pkt_list) {
if (SN_LESS(pReorderEntry->SeqNum, ((struct rx_reorder_entry *)
- list_entry(pList->next, struct rx_reorder_entry,
+ list_entry(plist->next, struct rx_reorder_entry,
list))->SeqNum))
- pList = pList->next;
+ plist = plist->next;
else if (SN_EQUAL(pReorderEntry->SeqNum,
- ((struct rx_reorder_entry *)list_entry(pList->next,
+ ((struct rx_reorder_entry *)list_entry(plist->next,
struct rx_reorder_entry, list))->SeqNum))
return false;
else
break;
}
- pReorderEntry->list.next = pList->next;
+ pReorderEntry->list.next = plist->next;
pReorderEntry->list.next->prev = &pReorderEntry->list;
- pReorderEntry->list.prev = pList;
- pList->next = &pReorderEntry->list;
+ pReorderEntry->list.prev = plist;
+ plist->next = &pReorderEntry->list;

return true;
}
--
2.30.2


2024-05-15 05:03:52

by Tree Davies

[permalink] [raw]
Subject: [PATCH 13/31] Staging: rtl8192e: Rename variable RfdArray

Rename variable RfdArray to rfd_array
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cdb3ebc77a53..996662a06e3f 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1407,7 +1407,7 @@ struct rtllib_device {
struct work_struct wx_sync_scan_wq;

union {
- struct rtllib_rxb *RfdArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *rfd_array[REORDER_WIN_SIZE];
struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
struct {
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index a30945f30e14..4c8cfa40927c 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -509,13 +509,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->list);

- ieee->RfdArray[RfdCnt] = pRxReorderEntry->prxb;
+ ieee->rfd_array[RfdCnt] = pRxReorderEntry->prxb;

RfdCnt = RfdCnt + 1;
list_add_tail(&pRxReorderEntry->list,
&ieee->RxReorder_Unused_List);
}
- rtllib_indicate_packets(ieee, ieee->RfdArray, RfdCnt);
+ rtllib_indicate_packets(ieee, ieee->rfd_array, RfdCnt);

ts->rx_indicate_seq = 0xffff;
}
--
2.30.2


2024-05-15 05:03:57

by Tree Davies

[permalink] [raw]
Subject: [PATCH 14/31] Staging: rtl8192e: Rename variable Decrypted

Rename variable Decrypted to decrypted
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index fdf8fc66939d..1901a319316b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1646,7 +1646,7 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,

stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
stats->RxBufShift = (pdesc->Shift) & 0x03;
- stats->Decrypted = !pdesc->SWDec;
+ stats->decrypted = !pdesc->SWDec;

pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 996662a06e3f..f69f4ca39fd5 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -481,7 +481,7 @@ struct rtllib_rx_stats {
u16 bHwError:1;
u16 bCRC:1;
u16 bICV:1;
- u16 Decrypted:1;
+ u16 decrypted:1;
u32 time_stamp_low;
u32 time_stamp_high;

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4c8cfa40927c..3afce436a5d8 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1025,7 +1025,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
sc = le16_to_cpu(hdr->seq_ctrl);
frag = WLAN_GET_SEQ_FRAG(sc);

- if ((!rx_stats->Decrypted))
+ if ((!rx_stats->decrypted))
ieee->need_sw_enc = 1;
else
ieee->need_sw_enc = 0;
--
2.30.2


2024-05-15 05:04:03

by Tree Davies

[permalink] [raw]
Subject: [PATCH 12/31] Staging: rtl8192e: Rename variable RxReorderIndicatePacket

Rename variable RxReorderIndicatePacket to
rx_reorder_indicate_packet to fix checkpatch warning
Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 24136bba64b6..a30945f30e14 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -520,7 +520,7 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
ts->rx_indicate_seq = 0xffff;
}

-static void RxReorderIndicatePacket(struct rtllib_device *ieee,
+static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
struct rtllib_rxb *prxb,
struct rx_ts_record *ts, u16 SeqNum)
{
@@ -1366,7 +1366,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
if (!ieee->ht_info->cur_rx_reorder_enable || !ts)
rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src);
else
- RxReorderIndicatePacket(ieee, rxb, ts, SeqNum);
+ rx_reorder_indicate_packet(ieee, rxb, ts, SeqNum);

dev_kfree_skb(skb);

--
2.30.2


2024-05-15 05:07:09

by Tree Davies

[permalink] [raw]
Subject: [PATCH 31/31] Staging: rtl8192e: Rename variable bPktInBuf

Rename variable bPktInBuf to pkt_in_buf
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 ++++----
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 9903fe3f3c77..7cdeca7ed8c2 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -18,7 +18,7 @@ static void RxPktPendingTimeout(struct timer_list *t)

unsigned long flags = 0;
u8 index = 0;
- bool bPktInBuf = false;
+ bool pkt_in_buf = false;

spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
if (ts->rx_timeout_indicate_seq != 0xffff) {
@@ -50,7 +50,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
list_add_tail(&pReorderEntry->list,
&ieee->RxReorder_Unused_List);
} else {
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}
}
@@ -68,10 +68,10 @@ static void RxPktPendingTimeout(struct timer_list *t)
return;
}
rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index);
- bPktInBuf = false;
+ pkt_in_buf = false;
}

- if (bPktInBuf && (ts->rx_timeout_indicate_seq == 0xffff)) {
+ if (pkt_in_buf && (ts->rx_timeout_indicate_seq == 0xffff)) {
ts->rx_timeout_indicate_seq = ts->rx_indicate_seq;
mod_timer(&ts->rx_pkt_pending_timer, jiffies +
msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 43e94af07e99..c17e7d3ca8c3 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -529,7 +529,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
- bool match_win_start = false, bPktInBuf = false;
+ bool match_win_start = false, pkt_in_buf = false;
unsigned long flags;

netdev_dbg(ieee->dev,
@@ -665,7 +665,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
netdev_err(ieee->dev,
"%s(): Buffer overflow!\n",
__func__);
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}

@@ -683,7 +683,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
list_add_tail(&pReorderEntry->list,
&ieee->RxReorder_Unused_List);
} else {
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}
}
@@ -707,10 +707,10 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
return;
}
rtllib_indicate_packets(ieee, ieee->prxb_indicate_array, index);
- bPktInBuf = false;
+ pkt_in_buf = false;
}

- if (bPktInBuf && ts->rx_timeout_indicate_seq == 0xffff) {
+ if (pkt_in_buf && ts->rx_timeout_indicate_seq == 0xffff) {
netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__);
ts->rx_timeout_indicate_seq = ts->rx_indicate_seq;
spin_unlock_irqrestore(&ieee->reorder_spinlock, flags);
--
2.30.2


2024-05-15 05:07:15

by Tree Davies

[permalink] [raw]
Subject: [PATCH 29/31] Staging: rtl8192e: Rename variable RfdCnt

Rename variable RfdCnt to rfd_cnt
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 976e8b4da1d4..89dcbead5e11 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -491,13 +491,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
struct rx_ts_record *ts)
{
struct rx_reorder_entry *pRxReorderEntry;
- u8 RfdCnt = 0;
+ u8 rfd_cnt = 0;

del_timer_sync(&ts->rx_pkt_pending_timer);
while (!list_empty(&ts->rx_pending_pkt_list)) {
- if (RfdCnt >= REORDER_WIN_SIZE) {
+ if (rfd_cnt >= REORDER_WIN_SIZE) {
netdev_info(ieee->dev,
- "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n",
+ "-------------->%s() error! rfd_cnt >= REORDER_WIN_SIZE\n",
__func__);
break;
}
@@ -509,13 +509,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->list);

- ieee->rfd_array[RfdCnt] = pRxReorderEntry->prxb;
+ ieee->rfd_array[rfd_cnt] = pRxReorderEntry->prxb;

- RfdCnt = RfdCnt + 1;
+ rfd_cnt = rfd_cnt + 1;
list_add_tail(&pRxReorderEntry->list,
&ieee->RxReorder_Unused_List);
}
- rtllib_indicate_packets(ieee, ieee->rfd_array, RfdCnt);
+ rtllib_indicate_packets(ieee, ieee->rfd_array, rfd_cnt);

ts->rx_indicate_seq = 0xffff;
}
--
2.30.2


2024-05-15 05:07:16

by Tree Davies

[permalink] [raw]
Subject: [PATCH 26/31] Staging: rtl8192e: Rename variable Frame_QoSTID

Rename variable Frame_QoSTID to frame_qos_tid
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 4fec36cfa2fc..b88c7cd399fb 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -799,7 +799,7 @@ static inline const char *eap_get_type(int type)
eap_types[type];
}

-static inline u8 Frame_QoSTID(u8 *buf)
+static inline u8 frame_qos_tid(u8 *buf)
{
struct ieee80211_hdr_3addr *hdr;
u16 fc;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 328972cfd7a7..95dde1938874 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -891,7 +891,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
struct rx_ts_record *ts = NULL;

if (rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2,
- (u8)Frame_QoSTID((u8 *)(skb->data)), RX_DIR, true)) {
+ (u8)frame_qos_tid((u8 *)(skb->data)), RX_DIR, true)) {
if ((fc & (1 << 11)) && (frag == ts->rx_last_frag_num) &&
(WLAN_GET_SEQ_SEQ(sc) == ts->rx_last_seq_num))
return -1;
@@ -1324,7 +1324,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
hdr = (struct ieee80211_hdr *)skb->data;
if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
&& !is_multicast_ether_addr(hdr->addr1)) {
- TID = Frame_QoSTID(skb->data);
+ TID = frame_qos_tid(skb->data);
SeqNum = WLAN_GET_SEQ_SEQ(sc);
rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID,
RX_DIR, true);
--
2.30.2


2024-05-15 05:12:40

by Tree Davies

[permalink] [raw]
Subject: [PATCH 23/31] Staging: rtl8192e: Rename variable bMatchWinStart

Rename variable bMatchWinStart to match_win_start
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d4714e193df4..ffb1bbc01bc6 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -529,7 +529,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
- bool bMatchWinStart = false, bPktInBuf = false;
+ bool match_win_start = false, bPktInBuf = false;
unsigned long flags;

netdev_dbg(ieee->dev,
@@ -567,7 +567,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
*/
if (SN_EQUAL(SeqNum, ts->rx_indicate_seq)) {
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
- bMatchWinStart = true;
+ match_win_start = true;
} else if (SN_LESS(win_end, SeqNum)) {
if (SeqNum >= (win_size - 1))
ts->rx_indicate_seq = SeqNum + 1 - win_size;
@@ -589,7 +589,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
* 2. All packets with SeqNum larger than or equal to
* WinStart => Buffer it.
*/
- if (bMatchWinStart) {
+ if (match_win_start) {
/* Current packet is going to be indicated.*/
netdev_dbg(ieee->dev,
"Packets indication! IndicateSeq: %d, NewSeq: %d\n",
--
2.30.2


2024-05-15 05:12:51

by Tree Davies

[permalink] [raw]
Subject: [PATCH 25/31] Staging: rtl8192e: Rename variable bWithCcxVerNum

Rename variable bWithCcxVerNum to with_ccx_ver_num
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 91164a3b01aa..4fec36cfa2fc 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -917,7 +917,7 @@ struct rtllib_network {
bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
- bool bWithCcxVerNum;
+ bool with_ccx_ver_num;
u8 bss_ccx_ver_number;
/* These are network statistics */
struct rtllib_rx_stats stats;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d662a12bf437..328972cfd7a7 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1839,10 +1839,10 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
info_element->data[2] == 0x96 &&
info_element->data[3] == 0x03) {
if (info_element->len == 5) {
- network->bWithCcxVerNum = true;
+ network->with_ccx_ver_num = true;
network->bss_ccx_ver_number = info_element->data[4];
} else {
- network->bWithCcxVerNum = false;
+ network->with_ccx_ver_num = false;
network->bss_ccx_ver_number = 0;
}
}
@@ -2352,7 +2352,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->mb_ssid_mask = src->mb_ssid_mask;
dst->mb_ssid_valid = src->mb_ssid_valid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
- dst->bWithCcxVerNum = src->bWithCcxVerNum;
+ dst->with_ccx_ver_num = src->with_ccx_ver_num;
dst->bss_ccx_ver_number = src->bss_ccx_ver_number;
}

--
2.30.2


2024-05-15 05:17:02

by Tree Davies

[permalink] [raw]
Subject: [PATCH 28/31] Staging: rtl8192e: Rename variable IsQoSDataFrame

Rename variable IsQoSDataFrame to is_qos_data_frame
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 9b0a981f6f22..36a734ded7dc 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -625,7 +625,7 @@ EXPORT_SYMBOL(HT_update_self_and_peer_setting);
u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame)
{
if (ieee->ht_info->current_ht_support) {
- if ((IsQoSDataFrame(pFrame) && frame_order(pFrame)) == 1) {
+ if ((is_qos_data_frame(pFrame) && frame_order(pFrame)) == 1) {
netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n");
return true;
}
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ca69bb0965ba..e2695beaf582 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -340,7 +340,7 @@ enum rt_op_mode {
#define FC_QOS_BIT BIT(7)
#define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
-#define IsQoSDataFrame(pframe) \
+#define is_qos_data_frame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
#define frame_order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index fe72149aa81c..976e8b4da1d4 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1322,7 +1322,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb

/* Get TS for Rx Reorder */
hdr = (struct ieee80211_hdr *)skb->data;
- if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
+ if (ieee->current_network.qos_data.active && is_qos_data_frame(skb->data)
&& !is_multicast_ether_addr(hdr->addr1)) {
TID = frame_qos_tid(skb->data);
SeqNum = WLAN_GET_SEQ_SEQ(sc);
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 1aeb207a3fee..b1bde5c0050a 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -275,7 +275,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,

if (!ht_info->current_ht_support || !ht_info->enable_ht)
return;
- if (!IsQoSDataFrame(skb->data))
+ if (!is_qos_data_frame(skb->data))
return;
if (is_multicast_ether_addr(hdr->addr1))
return;
@@ -472,7 +472,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,

if (is_multicast_ether_addr(dst))
return 0;
- if (IsQoSDataFrame(skb->data)) {
+ if (is_qos_data_frame(skb->data)) {
struct tx_ts_record *ts = NULL;

if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), dst,
--
2.30.2


2024-05-15 05:22:08

by Tree Davies

[permalink] [raw]
Subject: [PATCH 24/31] Staging: rtl8192e: Rename variable bMBssidValid

Rename variable bMBssidValid to mb_ssid_valid
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 0914ba37f42f..91164a3b01aa 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -914,7 +914,7 @@ struct rtllib_network {
bool ckip_supported;
bool ccx_rm_enable;
u8 CcxRmState[2];
- bool bMBssidValid;
+ bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index ffb1bbc01bc6..d662a12bf437 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1820,14 +1820,14 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
network->ccx_rm_enable = false;
network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
if (network->mb_ssid_mask != 0) {
- network->bMBssidValid = true;
+ network->mb_ssid_valid = true;
network->mb_ssid_mask = 0xff <<
(network->mb_ssid_mask);
ether_addr_copy(network->mb_ssid,
network->bssid);
network->mb_ssid[5] &= network->mb_ssid_mask;
} else {
- network->bMBssidValid = false;
+ network->mb_ssid_valid = false;
}
} else {
network->ccx_rm_enable = false;
@@ -2350,7 +2350,7 @@ static inline void update_network(struct rtllib_device *ieee,
memcpy(dst->CcxRmState, src->CcxRmState, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
dst->mb_ssid_mask = src->mb_ssid_mask;
- dst->bMBssidValid = src->bMBssidValid;
+ dst->mb_ssid_valid = src->mb_ssid_valid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
dst->bWithCcxVerNum = src->bWithCcxVerNum;
dst->bss_ccx_ver_number = src->bss_ccx_ver_number;
--
2.30.2


2024-05-15 05:22:47

by Tree Davies

[permalink] [raw]
Subject: [PATCH 27/31] Staging: rtl8192e: Rename variable CcxRmState

Rename variable CcxRmState to ccx_rm_state
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b88c7cd399fb..ca69bb0965ba 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -913,7 +913,7 @@ struct rtllib_network {
bool with_aironet_ie;
bool ckip_supported;
bool ccx_rm_enable;
- u8 CcxRmState[2];
+ u8 ccx_rm_state[2];
bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 95dde1938874..fe72149aa81c 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1813,12 +1813,12 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
info_element->data[2] == 0x96 &&
info_element->data[3] == 0x01) {
if (info_element->len == 6) {
- memcpy(network->CcxRmState, &info_element->data[4], 2);
- if (network->CcxRmState[0] != 0)
+ memcpy(network->ccx_rm_state, &info_element->data[4], 2);
+ if (network->ccx_rm_state[0] != 0)
network->ccx_rm_enable = true;
else
network->ccx_rm_enable = false;
- network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
+ network->mb_ssid_mask = network->ccx_rm_state[1] & 0x07;
if (network->mb_ssid_mask != 0) {
network->mb_ssid_valid = true;
network->mb_ssid_mask = 0xff <<
@@ -2347,7 +2347,7 @@ static inline void update_network(struct rtllib_device *ieee,

dst->with_aironet_ie = src->with_aironet_ie;
dst->ckip_supported = src->ckip_supported;
- memcpy(dst->CcxRmState, src->CcxRmState, 2);
+ memcpy(dst->ccx_rm_state, src->ccx_rm_state, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
dst->mb_ssid_mask = src->mb_ssid_mask;
dst->mb_ssid_valid = src->mb_ssid_valid;
--
2.30.2


2024-05-15 05:26:05

by Tree Davies

[permalink] [raw]
Subject: [PATCH 18/31] Staging: rtl8192e: Rename variable LLCOffset

Rename variable LLCOffset to llc_offset
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 0db75fa7da1e..3223619f8cd9 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -728,7 +728,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *)skb->data;
u16 fc = le16_to_cpu(hdr->frame_control);

- u16 LLCOffset = sizeof(struct ieee80211_hdr_3addr);
+ u16 llc_offset = sizeof(struct ieee80211_hdr_3addr);
u16 ChkLength;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
@@ -742,16 +742,16 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
is_aggregate_frame = true;

if (RTLLIB_QOS_HAS_SEQ(fc))
- LLCOffset += 2;
+ llc_offset += 2;
if (rx_stats->contain_htc)
- LLCOffset += sHTCLng;
+ llc_offset += sHTCLng;

- ChkLength = LLCOffset;
+ ChkLength = llc_offset;

if (skb->len <= ChkLength)
return 0;

- skb_pull(skb, LLCOffset);
+ skb_pull(skb, llc_offset);
ieee->is_aggregate_frame = is_aggregate_frame;
if (!is_aggregate_frame) {
rxb->nr_subframes = 1;
--
2.30.2


2024-05-15 05:32:04

by Tree Davies

[permalink] [raw]
Subject: [PATCH 20/31] Staging: rtl8192e: Rename variable WinEnd

Rename variable WinEnd to win_end
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index ca1c748ac40c..72e4af81b1de 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -527,7 +527,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rx_reorder_entry *pReorderEntry = NULL;
u8 WinSize = ht_info->rx_reorder_win_size;
- u16 WinEnd = 0;
+ u16 win_end = 0;
u8 index = 0;
bool bMatchWinStart = false, bPktInBuf = false;
unsigned long flags;
@@ -538,7 +538,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,

spin_lock_irqsave(&(ieee->reorder_spinlock), flags);

- WinEnd = (ts->rx_indicate_seq + WinSize - 1) % 4096;
+ win_end = (ts->rx_indicate_seq + WinSize - 1) % 4096;
/* Rx Reorder initialize condition.*/
if (ts->rx_indicate_seq == 0xffff)
ts->rx_indicate_seq = SeqNum;
@@ -563,12 +563,12 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,

/* Sliding window manipulation. Conditions includes:
* 1. Incoming SeqNum is equal to WinStart =>Window shift 1
- * 2. Incoming SeqNum is larger than the WinEnd => Window shift N
+ * 2. Incoming SeqNum is larger than the win_end => Window shift N
*/
if (SN_EQUAL(SeqNum, ts->rx_indicate_seq)) {
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
bMatchWinStart = true;
- } else if (SN_LESS(WinEnd, SeqNum)) {
+ } else if (SN_LESS(win_end, SeqNum)) {
if (SeqNum >= (WinSize - 1))
ts->rx_indicate_seq = SeqNum + 1 - WinSize;
else
--
2.30.2


2024-05-15 05:32:20

by Tree Davies

[permalink] [raw]
Subject: [PATCH 15/31] Staging: rtl8192e: Rename variable AddReorderEntry

Rename variable AddReorderEntry to add_reorder_entry
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3afce436a5d8..30bd6f49e915 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -403,7 +403,7 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
return 1;
}

-static bool AddReorderEntry(struct rx_ts_record *ts,
+static bool add_reorder_entry(struct rx_ts_record *ts,
struct rx_reorder_entry *pReorderEntry)
{
struct list_head *pList = &ts->rx_pending_pkt_list;
@@ -610,7 +610,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
pReorderEntry->SeqNum = SeqNum;
pReorderEntry->prxb = prxb;

- if (!AddReorderEntry(ts, pReorderEntry)) {
+ if (!add_reorder_entry(ts, pReorderEntry)) {
int i;

netdev_dbg(ieee->dev,
--
2.30.2


2024-05-15 05:32:25

by Tree Davies

[permalink] [raw]
Subject: [PATCH 19/31] Staging: rtl8192e: Rename variable ChkLength

Rename variable ChkLength to chk_length
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3223619f8cd9..ca1c748ac40c 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -729,7 +729,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
u16 fc = le16_to_cpu(hdr->frame_control);

u16 llc_offset = sizeof(struct ieee80211_hdr_3addr);
- u16 ChkLength;
+ u16 chk_length;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
u8 npadding_length = 0;
@@ -746,9 +746,9 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
if (rx_stats->contain_htc)
llc_offset += sHTCLng;

- ChkLength = llc_offset;
+ chk_length = llc_offset;

- if (skb->len <= ChkLength)
+ if (skb->len <= chk_length)
return 0;

skb_pull(skb, llc_offset);
--
2.30.2


2024-05-15 09:16:15

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 16/31] Staging: rtl8192e: Rename variable pList

On Tue, May 14, 2024 at 09:52:13PM -0700, Tree Davies wrote:
> Rename variable pList to plist
> to fix checkpatch warning Avoid CamelCase.
>
> Signed-off-by: Tree Davies <[email protected]>
> ---
> drivers/staging/rtl8192e/rtllib_rx.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> index 30bd6f49e915..fb679229f173 100644
> --- a/drivers/staging/rtl8192e/rtllib_rx.c
> +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> @@ -406,24 +406,24 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
> static bool add_reorder_entry(struct rx_ts_record *ts,
> struct rx_reorder_entry *pReorderEntry)
> {
> - struct list_head *pList = &ts->rx_pending_pkt_list;
> + struct list_head *plist = &ts->rx_pending_pkt_list;

The p stands for pointer. #ugh

regards,
dan carpenter



2024-05-15 10:27:55

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 17/31] Staging: rtl8192e: Rename variable nPadding_Length

On Tue, May 14, 2024 at 09:52:14PM -0700, Tree Davies wrote:
> Rename variable nPadding_Length to npadding_length

n and length mean the same thing really. Normally we'd use a shorter
name like "pad_len".

regards,
dan carpenter


2024-05-15 10:32:46

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 19/31] Staging: rtl8192e: Rename variable ChkLength

On Tue, May 14, 2024 at 09:52:16PM -0700, Tree Davies wrote:
> Rename variable ChkLength to chk_length
> to fix checkpatch warning Avoid CamelCase.
>

Just use llc_directly and delete ChkLength variable.

regards,
dan carpenter


2024-05-18 22:02:48

by Tree Davies

[permalink] [raw]
Subject: Re: [PATCH 19/31] Staging: rtl8192e: Rename variable ChkLength

On Wed, May 15, 2024 at 12:31:20PM +0200, Dan Carpenter wrote:
> On Tue, May 14, 2024 at 09:52:16PM -0700, Tree Davies wrote:
> > Rename variable ChkLength to chk_length
> > to fix checkpatch warning Avoid CamelCase.
> >
>
> Just use llc_directly and delete ChkLength variable.
>
> regards,
> dan carpenter
>

Thanks Dan, I will send a v2.
~Tree