2024-06-12 03:22:47

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 00/24] Staging: rtl8192e: Maintenance renames and cleanup

This patch series v2 attacks CamelCase variable renames, removes
un-used variables and adjusts alignment issues found in
rtllib_rx.c and rtllib_tx.c.

NOTE: Patch #9 doesn't completely resolve CamelCase violation as the
correct abreviation of megahertz is MHz as called out by Dan Carpenter.

Thank you in advance to all reviewers.
~Tree

Changes since v1:
#09: Change bforced_tx20Mhz to forced_tx_20MHz, and update commit message
#21: Update subject prefix with 'Staging: rtl8192e:'
#22: Update subject prefix with 'Staging: rtl8192e:'
#23: Update subject prefix with 'Staging: rtl8192e:'
#24: Update subject prefix with 'Staging: rtl8192e:'

Tree Davies (24):
Staging: rtl8192e: Rename variable bHwSec
Staging: rtl8192e: Rename variable bIsMulticast
Staging: rtl8192e: Rename variable HTCurrentOperaRate
Staging: rtl8192e: Rename variable HTOpMode
Staging: rtl8192e: Rename variable bRTSEnable
Staging: rtl8192e: Rename variable bRTSBW
Staging: rtl8192e: Rename variable bCTSEnable
Staging: rtl8192e: Rename variable bRTSUseShortGI
Staging: rtl8192e: Rename variable bforced_tx20Mhz
Staging: rtl8192e: Rename variable bPacketBW
Staging: rtl8192e: Rename variable bBroadcast
Staging: rtl8192e: Rename variable CntAfterLink
Staging: rtl8192e: Rename variable bUseShortGI
Staging: rtl8192e: Rename function TsStartAddBaProcess()
Staging: rtl8192e: Fix alignment to match open parenthesis
Staging: rtl8192e: Rename function rtllib_query_BandwidthMode
Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode
Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI
Staging: rtl8192e: Rename variable bUseShortPreamble
Staging: rtl8192e: Rename variable bRTSSTBC
Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify()
Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter()
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_tx.c
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_rx.c

.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +-
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 +-
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 28 ++--
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 +-
drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +-
drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 +-
drivers/staging/rtl8192e/rtllib_rx.c | 45 +++---
drivers/staging/rtl8192e/rtllib_tx.c | 131 +++++++++---------
12 files changed, 126 insertions(+), 132 deletions(-)

--
2.30.2



2024-06-12 03:22:55

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 01/24] Staging: rtl8192e: Rename variable bHwSec

Rename variable bHwSec to hw_sec
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 ++--
drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +++++-----
drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++----
drivers/staging/rtl8192e/rtllib_tx.c | 6 +++---
7 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index a0fc33f984e8..27dfa268cd68 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -934,7 +934,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,

pdesc->NoEnc = 1;
pdesc->SecType = 0x0;
- if (cb_desc->bHwSec) {
+ if (cb_desc->hw_sec) {
static u8 tmp;

if (!tmp)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 62af48c20229..46bc3561f56f 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -105,7 +105,7 @@ struct cb_desc {
u8 bCmdOrInit:1;
u8 tx_dis_rate_fallback:1;
u8 tx_use_drv_assinged_rate:1;
- u8 bHwSec:1;
+ u8 hw_sec:1;

u8 nStuckCount;

diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
index cbb8c8dbe9b0..230552dd2b4d 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
@@ -182,7 +182,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
*pos++ = key->tx_pn[0];

hdr = (struct ieee80211_hdr *)skb->data;
- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
struct aead_request *req;
struct scatterlist sg[2];
u8 *aad = key->tx_aad;
@@ -265,7 +265,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
key->dot11rsna_stats_ccmp_replays++;
return -4;
}
- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN;
struct aead_request *req;
struct scatterlist sg[2];
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
index 0244b524a7d4..a45fcb13bd54 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
@@ -268,7 +268,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)

hdr = (struct ieee80211_hdr *)skb->data;

- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
if (!tkey->tx_phase1_done) {
tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
tkey->tx_iv32);
@@ -285,7 +285,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
memmove(pos, pos + 8, hdr_len);
pos += hdr_len;

- if (tcb_desc->bHwSec) {
+ if (tcb_desc->hw_sec) {
*pos++ = Hi8(tkey->tx_iv16);
*pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F;
*pos++ = Lo8(tkey->tx_iv16);
@@ -301,7 +301,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
*pos++ = (tkey->tx_iv32 >> 16) & 0xff;
*pos++ = (tkey->tx_iv32 >> 24) & 0xff;

- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
icv = skb_put(skb, 4);
crc = ~crc32_le(~0, pos, len);
icv[0] = crc;
@@ -319,7 +319,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
tkey->tx_iv32++;
}

- if (!tcb_desc->bHwSec)
+ if (!tcb_desc->hw_sec)
return ret;
return 0;
}
@@ -371,7 +371,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24);
pos += 8;

- if (!tcb_desc->bHwSec || (skb->cb[0] == 1)) {
+ if (!tcb_desc->hw_sec || (skb->cb[0] == 1)) {
if ((iv32 < tkey->rx_iv32 ||
(iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) &&
tkey->initialized) {
diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
index 21c2b7666d6f..bd732c562b82 100644
--- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c
+++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c
@@ -102,7 +102,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
/* Copy rest of the WEP key (the secret part) */
memcpy(key + 3, wep->key, wep->key_len);

- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
/* Append little-endian CRC32 and encrypt it to produce ICV */
crc = ~crc32_le(~0, pos, len);
icv = skb_put(skb, 4);
@@ -155,7 +155,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
/* Apply RC4 to data and compute CRC32 over decrypted data */
plen = skb->len - hdr_len - 8;

- if (!tcb_desc->bHwSec) {
+ if (!tcb_desc->hw_sec) {
arc4_setkey(&wep->rx_ctx_arc4, key, klen);
arc4_crypt(&wep->rx_ctx_arc4, pos, pos, plen + 4);

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 86b8d342ac80..3bff54efe66e 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -282,10 +282,10 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
struct cb_desc *tcb_desc = (struct cb_desc *)
(skb->cb + MAX_DEV_ADDR_SIZE);

- tcb_desc->bHwSec = 1;
+ tcb_desc->hw_sec = 1;

if (ieee->need_sw_enc)
- tcb_desc->bHwSec = 0;
+ tcb_desc->hw_sec = 0;
}

hdr = (struct ieee80211_hdr *)skb->data;
@@ -321,10 +321,10 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
struct cb_desc *tcb_desc = (struct cb_desc *)
(skb->cb + MAX_DEV_ADDR_SIZE);

- tcb_desc->bHwSec = 1;
+ tcb_desc->hw_sec = 1;

if (ieee->need_sw_enc)
- tcb_desc->bHwSec = 0;
+ tcb_desc->hw_sec = 0;
}

hdr = (struct ieee80211_hdr *)skb->data;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index b1bde5c0050a..87d1ff943617 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -751,14 +751,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)

if (encrypt) {
if (ieee->hwsec_active)
- tcb_desc->bHwSec = 1;
+ tcb_desc->hw_sec = 1;
else
- tcb_desc->bHwSec = 0;
+ tcb_desc->hw_sec = 0;
skb_reserve(skb_frag,
crypt->ops->extra_mpdu_prefix_len +
crypt->ops->extra_msdu_prefix_len);
} else {
- tcb_desc->bHwSec = 0;
+ tcb_desc->hw_sec = 0;
}
frag_hdr = skb_put_data(skb_frag, &header, hdr_len);

--
2.30.2


2024-06-12 03:23:20

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 02/24] Staging: rtl8192e: Rename variable bIsMulticast

Rename variable bIsMulticast to is_multicast
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 87d1ff943617..8856191a1228 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -538,7 +538,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
u8 src[ETH_ALEN];
struct lib80211_crypt_data *crypt = NULL;
struct cb_desc *tcb_desc;
- u8 bIsMulticast = false;
+ u8 is_multicast = false;
u8 IsAmsdu = false;
bool bdhcp = false;

@@ -655,14 +655,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
ether_addr_copy(header.addr3, dest);
}

- bIsMulticast = is_multicast_ether_addr(header.addr1);
+ is_multicast = is_multicast_ether_addr(header.addr1);

header.frame_control = cpu_to_le16(fc);

/* Determine fragmentation size based on destination (multicast
* and broadcast are not fragmented)
*/
- if (bIsMulticast) {
+ if (is_multicast) {
frag_size = MAX_FRAG_THRESHOLD;
qos_ctl |= QOS_CTL_NOTCONTAIN_ACK;
} else {
@@ -774,7 +774,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
/* The last fragment has the remaining length */
bytes = bytes_last_frag;
}
- if ((qos_activated) && (!bIsMulticast)) {
+ if ((qos_activated) && (!is_multicast)) {
frag_hdr->seq_ctrl =
cpu_to_le16(rtllib_query_seqnum(ieee, skb_frag,
header.addr1));
@@ -809,7 +809,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
skb_put(skb_frag, 4);
}

- if ((qos_activated) && (!bIsMulticast)) {
+ if ((qos_activated) && (!is_multicast)) {
if (ieee->seq_ctrl[UP2AC(skb->priority) + 1] == 0xFFF)
ieee->seq_ctrl[UP2AC(skb->priority) + 1] = 0;
else
--
2.30.2


2024-06-12 03:23:48

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 05/24] Staging: rtl8192e: Rename variable bRTSEnable

Rename variable bRTSEnable to rts_enable
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 27dfa268cd68..0263f3d7179c 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -892,7 +892,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
pTxFwInfo->RxAMD = 0;
}

- pTxFwInfo->RtsEnable = (cb_desc->bRTSEnable) ? 1 : 0;
+ pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ? 1 : 0;
pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ? 1 : 0;
pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ? 1 : 0;
pTxFwInfo->RtsHT = (cb_desc->rts_rate & 0x80) ? 1 : 0;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 6dc641f78202..a305848dabd5 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -111,7 +111,7 @@ struct cb_desc {

/* Tx Firmware Related flags (10-11)*/
u8 bCTSEnable:1;
- u8 bRTSEnable:1;
+ u8 rts_enable:1;
u8 bUseShortGI:1;
u8 bUseShortPreamble:1;
u8 tx_enable_fw_calc_dur:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 83082a990fbd..be8de6703e5d 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -386,10 +386,10 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,

if (ieee->mode < WIRELESS_MODE_N_24G) {
if (skb->len > ieee->rts) {
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
tcb_desc->rts_rate = MGN_24M;
} else if (ieee->current_network.buseprotection) {
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
tcb_desc->bCTSEnable = true;
tcb_desc->rts_rate = MGN_24M;
}
@@ -402,16 +402,16 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
if (ht_info->iot_action & HT_IOT_ACT_FORCED_CTS2SELF) {
tcb_desc->bCTSEnable = true;
tcb_desc->rts_rate = MGN_24M;
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
break;
} else if (ht_info->iot_action & (HT_IOT_ACT_FORCED_RTS |
HT_IOT_ACT_PURE_N_MODE)) {
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
tcb_desc->rts_rate = MGN_24M;
break;
}
if (ieee->current_network.buseprotection) {
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
tcb_desc->bCTSEnable = true;
tcb_desc->rts_rate = MGN_24M;
break;
@@ -423,18 +423,18 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
ht_op_mode == 3)) ||
(!ht_info->cur_bw_40mhz && ht_op_mode == 3)) {
tcb_desc->rts_rate = MGN_24M;
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
break;
}
}
if (skb->len > ieee->rts) {
tcb_desc->rts_rate = MGN_24M;
- tcb_desc->bRTSEnable = true;
+ tcb_desc->rts_enable = true;
break;
}
if (tcb_desc->ampdu_enable) {
tcb_desc->rts_rate = MGN_24M;
- tcb_desc->bRTSEnable = false;
+ tcb_desc->rts_enable = false;
break;
}
goto NO_PROTECTION;
@@ -443,7 +443,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->bUseShortPreamble = true;
return;
NO_PROTECTION:
- tcb_desc->bRTSEnable = false;
+ tcb_desc->rts_enable = false;
tcb_desc->bCTSEnable = false;
tcb_desc->rts_rate = 0;
tcb_desc->RTSSC = 0;
--
2.30.2


2024-06-12 03:23:56

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 06/24] Staging: rtl8192e: Rename variable bRTSBW

Rename variable bRTSBW to rts_bw
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index a305848dabd5..0131765e451e 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -119,7 +119,7 @@ struct cb_desc {
u8 bRTSSTBC:1;
u8 RTSSC:1;

- u8 bRTSBW:1;
+ u8 rts_bw:1;
u8 bPacketBW:1;
u8 rts_use_short_preamble:1;
u8 bRTSUseShortGI:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index be8de6703e5d..8c9072538688 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -376,7 +376,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->bRTSUseShortGI = false;
tcb_desc->bCTSEnable = false;
tcb_desc->RTSSC = 0;
- tcb_desc->bRTSBW = false;
+ tcb_desc->rts_bw = false;

if (tcb_desc->bBroadcast || tcb_desc->multicast)
return;
@@ -447,7 +447,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->bCTSEnable = false;
tcb_desc->rts_rate = 0;
tcb_desc->RTSSC = 0;
- tcb_desc->bRTSBW = false;
+ tcb_desc->rts_bw = false;
}

static void rtllib_txrate_selectmode(struct rtllib_device *ieee,
--
2.30.2


2024-06-12 03:24:10

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 07/24] Staging: rtl8192e: Rename variable bCTSEnable

Rename variable bCTSEnable to cts_enable
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 0263f3d7179c..4117530f19b1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -893,7 +893,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
}

pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ? 1 : 0;
- pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ? 1 : 0;
+ pTxFwInfo->CtsEnable = (cb_desc->cts_enable) ? 1 : 0;
pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ? 1 : 0;
pTxFwInfo->RtsHT = (cb_desc->rts_rate & 0x80) ? 1 : 0;
pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw(cb_desc->rts_rate);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 0131765e451e..2282c709654d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -110,7 +110,7 @@ struct cb_desc {
u8 nStuckCount;

/* Tx Firmware Related flags (10-11)*/
- u8 bCTSEnable:1;
+ u8 cts_enable:1;
u8 rts_enable:1;
u8 bUseShortGI:1;
u8 bUseShortPreamble:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 8c9072538688..c0fe00d0df02 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -374,7 +374,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,

tcb_desc->bRTSSTBC = false;
tcb_desc->bRTSUseShortGI = false;
- tcb_desc->bCTSEnable = false;
+ tcb_desc->cts_enable = false;
tcb_desc->RTSSC = 0;
tcb_desc->rts_bw = false;

@@ -390,7 +390,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->rts_rate = MGN_24M;
} else if (ieee->current_network.buseprotection) {
tcb_desc->rts_enable = true;
- tcb_desc->bCTSEnable = true;
+ tcb_desc->cts_enable = true;
tcb_desc->rts_rate = MGN_24M;
}
return;
@@ -400,7 +400,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,

while (true) {
if (ht_info->iot_action & HT_IOT_ACT_FORCED_CTS2SELF) {
- tcb_desc->bCTSEnable = true;
+ tcb_desc->cts_enable = true;
tcb_desc->rts_rate = MGN_24M;
tcb_desc->rts_enable = true;
break;
@@ -412,7 +412,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
}
if (ieee->current_network.buseprotection) {
tcb_desc->rts_enable = true;
- tcb_desc->bCTSEnable = true;
+ tcb_desc->cts_enable = true;
tcb_desc->rts_rate = MGN_24M;
break;
}
@@ -444,7 +444,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
return;
NO_PROTECTION:
tcb_desc->rts_enable = false;
- tcb_desc->bCTSEnable = false;
+ tcb_desc->cts_enable = false;
tcb_desc->rts_rate = 0;
tcb_desc->RTSSC = 0;
tcb_desc->rts_bw = false;
--
2.30.2


2024-06-12 03:24:34

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 09/24] Staging: rtl8192e: Rename variable bforced_tx20Mhz

Rename variable bforced_tx20Mhz to forced_tx_20MHz
to remove hungarian notation and make it snake_case.

Signed-off-by: Tree Davies <[email protected]>
---
v2: Change bforced_tx20Mhz to forced_tx_20MHz, and update commit message
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 ++++----
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_tx.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 5392d2daf870..f546e6d368b4 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -377,7 +377,7 @@ static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev)

priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz = BW_AUTO_SWITCH_LOW_HIGH;
priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz = BW_AUTO_SWITCH_HIGH_LOW;
- priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false;
+ priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false;
priv->rtllib->bandwidth_auto_switch.bautoswitch_enable = false;
}

@@ -388,14 +388,14 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)
if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20 ||
!priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)
return;
- if (!priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz) {
+ if (!priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz) {
if (priv->undecorated_smoothed_pwdb <=
priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
- priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = true;
+ priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = true;
} else {
if (priv->undecorated_smoothed_pwdb >=
priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz)
- priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false;
+ priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false;
}
}

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index bd18d866ce22..ab52fd66c705 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1018,7 +1018,7 @@ struct tx_pending {
struct bandwidth_autoswitch {
long threshold_20Mhzto40Mhz;
long threshold_40Mhzto20Mhz;
- bool bforced_tx20Mhz;
+ bool forced_tx_20MHz;
bool bautoswitch_enable;
};

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index d376c35a5ad7..ba76d2fcc750 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -362,7 +362,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
if ((tcb_desc->data_rate & 0x80) == 0)
return;
if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz &&
- !ieee->bandwidth_auto_switch.bforced_tx20Mhz)
+ !ieee->bandwidth_auto_switch.forced_tx_20MHz)
tcb_desc->bPacketBW = true;
}

--
2.30.2


2024-06-12 03:25:04

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 11/24] Staging: rtl8192e: Rename variable bBroadcast

Rename variable bBroadcast to broadcast
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 1f4c1f1f0274..812aeabb4a52 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -124,7 +124,7 @@ struct cb_desc {
u8 rts_use_short_preamble:1;
u8 rts_use_short_gi:1;
u8 multicast:1;
- u8 bBroadcast:1;
+ u8 broadcast:1;
u8 drv_agg_enable:1;
u8 reserved2:1;

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index a3c211c1b0fa..1ea7157127f6 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -356,7 +356,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
if (!ht_info->current_ht_support || !ht_info->enable_ht)
return;

- if (tcb_desc->multicast || tcb_desc->bBroadcast)
+ if (tcb_desc->multicast || tcb_desc->broadcast)
return;

if ((tcb_desc->data_rate & 0x80) == 0)
@@ -378,7 +378,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
tcb_desc->RTSSC = 0;
tcb_desc->rts_bw = false;

- if (tcb_desc->bBroadcast || tcb_desc->multicast)
+ if (tcb_desc->broadcast || tcb_desc->multicast)
return;

if (is_broadcast_ether_addr(skb->data + 16))
@@ -845,9 +845,9 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
if (is_multicast_ether_addr(header.addr1))
tcb_desc->multicast = 1;
if (is_broadcast_ether_addr(header.addr1))
- tcb_desc->bBroadcast = 1;
+ tcb_desc->broadcast = 1;
rtllib_txrate_selectmode(ieee, tcb_desc);
- if (tcb_desc->multicast || tcb_desc->bBroadcast)
+ if (tcb_desc->multicast || tcb_desc->broadcast)
tcb_desc->data_rate = ieee->basic_rate;
else
tcb_desc->data_rate = rtllib_current_rate(ieee);
--
2.30.2


2024-06-12 03:25:08

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 10/24] Staging: rtl8192e: Rename variable bPacketBW

Rename variable bPacketBW to packet_bw
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index a52db6b1fdb5..8dec4e1b89b8 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -903,7 +903,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
(cb_desc->rts_use_short_preamble ? 1 : 0) :
(cb_desc->rts_use_short_gi ? 1 : 0);
if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20_40) {
- if (cb_desc->bPacketBW) {
+ if (cb_desc->packet_bw) {
pTxFwInfo->TxBandwidth = 1;
pTxFwInfo->TxSubCarrier = 0;
} else {
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ab52fd66c705..1f4c1f1f0274 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -120,7 +120,7 @@ struct cb_desc {
u8 RTSSC:1;

u8 rts_bw:1;
- u8 bPacketBW:1;
+ u8 packet_bw:1;
u8 rts_use_short_preamble:1;
u8 rts_use_short_gi:1;
u8 multicast:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index ba76d2fcc750..a3c211c1b0fa 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -351,7 +351,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

- tcb_desc->bPacketBW = false;
+ tcb_desc->packet_bw = false;

if (!ht_info->current_ht_support || !ht_info->enable_ht)
return;
@@ -363,7 +363,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
return;
if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz &&
!ieee->bandwidth_auto_switch.forced_tx_20MHz)
- tcb_desc->bPacketBW = true;
+ tcb_desc->packet_bw = true;
}

static void rtllib_query_protectionmode(struct rtllib_device *ieee,
--
2.30.2


2024-06-12 03:25:18

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 12/24] Staging: rtl8192e: Rename variable CntAfterLink

Rename variable CntAfterLink to cnt_after_link
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 08d057ab8f74..9eeae01dc98d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -951,10 +951,10 @@ static void _rtl92e_watchdog_wq_cb(void *data)
return;

if (priv->rtllib->link_state >= MAC80211_LINKED) {
- if (priv->rtllib->CntAfterLink < 2)
- priv->rtllib->CntAfterLink++;
+ if (priv->rtllib->cnt_after_link < 2)
+ priv->rtllib->cnt_after_link++;
} else {
- priv->rtllib->CntAfterLink = 0;
+ priv->rtllib->cnt_after_link = 0;
}

rtl92e_dm_watchdog(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index d131ef525f46..c21a0560410a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -241,7 +241,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
(ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED))
return 0;
if ((priv->rtllib->link_state == MAC80211_LINKED) &&
- (priv->rtllib->CntAfterLink < 2))
+ (priv->rtllib->cnt_after_link < 2))
return 0;
}

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 812aeabb4a52..b48d9d416ead 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1168,7 +1168,7 @@ struct rtllib_device {
bool disable_mgnt_queue;

unsigned long status;
- u8 CntAfterLink;
+ u8 cnt_after_link;

enum rt_op_mode op_mode;

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 1ea7157127f6..b5eb3968581d 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -280,7 +280,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
if (is_multicast_ether_addr(hdr->addr1))
return;

- if (tcb_desc->bdhcp || ieee->CntAfterLink < 2)
+ if (tcb_desc->bdhcp || ieee->cnt_after_link < 2)
return;

if (ht_info->iot_action & HT_IOT_ACT_TX_NO_AGGREGATION)
--
2.30.2


2024-06-12 03:25:47

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 14/24] Staging: rtl8192e: Rename function TsStartAddBaProcess()

Rename variable TsStartAddBaProcess to
rtllib_ts_start_add_ba_process to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 7cdeca7ed8c2..ed6a488bc7ac 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -431,7 +431,7 @@ void remove_all_ts(struct rtllib_device *ieee)
}
}

-void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS)
+void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee, struct tx_ts_record *pTxTS)
{
if (pTxTS->add_ba_req_in_progress == false) {
pTxTS->add_ba_req_in_progress = true;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 54cf5ee628f0..a35079f6dc65 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1770,7 +1770,7 @@ void rtllib_reset_ba_entry(struct ba_record *ba);
bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr,
u8 TID, enum tr_select tx_rx_select, bool bAddNewTs);
void rtllib_ts_init(struct rtllib_device *ieee);
-void TsStartAddBaProcess(struct rtllib_device *ieee,
+void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee,
struct tx_ts_record *pTxTS);
void remove_peer_ts(struct rtllib_device *ieee, u8 *addr);
void remove_all_ts(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index d46963fe9bbc..6514d53c9679 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -301,7 +301,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
} else if (tcb_desc->bdhcp == 1) {
;
} else if (!ts->disable_add_ba) {
- TsStartAddBaProcess(ieee, ts);
+ rtllib_ts_start_add_ba_process(ieee, ts);
}
return;
} else if (!ts->using_ba) {
--
2.30.2


2024-06-12 03:26:08

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 15/24] Staging: rtl8192e: Fix alignment to match open parenthesis

Added tabs and spaces to fix warning:
Alignment should match open parenthesis

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 6514d53c9679..24ae90915b10 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -290,7 +290,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
return;
if (ht_info->current_ampdu_enable) {
if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), hdr->addr1,
- skb->priority, TX_DIR, true)) {
+ skb->priority, TX_DIR, true)) {
netdev_info(ieee->dev, "%s: can't get TS\n", __func__);
return;
}
@@ -420,7 +420,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
u8 ht_op_mode = ht_info->current_op_mode;

if ((ht_info->cur_bw_40mhz && (ht_op_mode == 2 ||
- ht_op_mode == 3)) ||
+ ht_op_mode == 3)) ||
(!ht_info->cur_bw_40mhz && ht_op_mode == 3)) {
tcb_desc->rts_rate = MGN_24M;
tcb_desc->rts_enable = true;
@@ -476,7 +476,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,
struct tx_ts_record *ts = NULL;

if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), dst,
- skb->priority, TX_DIR, true))
+ skb->priority, TX_DIR, true))
return 0;
seqnum = ts->tx_cur_seq;
ts->tx_cur_seq = (ts->tx_cur_seq + 1) % 4096;
@@ -548,8 +548,8 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
* creating it...
*/
if (!(ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE) ||
- ((!ieee->softmac_data_hard_start_xmit &&
- (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
+ ((!ieee->softmac_data_hard_start_xmit &&
+ (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)))) {
netdev_warn(ieee->dev, "No xmit handler.\n");
goto success;
}
--
2.30.2


2024-06-12 03:26:14

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 16/24] Staging: rtl8192e: Rename function rtllib_query_BandwidthMode

Rename function rtllib_query_BandwidthMode to
rtllib_query_bandwidth_mode to fix checkpatch warning Avoid
CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 24ae90915b10..06c3166a5b47 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -346,7 +346,7 @@ static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
tcb_desc->use_short_gi = true;
}

-static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
+static void rtllib_query_bandwidth_mode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
@@ -872,7 +872,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
rtllib_tx_query_agg_cap(ieee, txb->fragments[0],
tcb_desc);
rtllib_query_HTCapShortGI(ieee, tcb_desc);
- rtllib_query_BandwidthMode(ieee, tcb_desc);
+ rtllib_query_bandwidth_mode(ieee, tcb_desc);
rtllib_query_protectionmode(ieee, tcb_desc,
txb->fragments[0]);
}
--
2.30.2


2024-06-12 03:26:28

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 17/24] Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode

Rename function rtllib_query_ShortPreambleMode to
rtllib_query_short_preamble_mode to fix checkpatch warning Avoid
CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 06c3166a5b47..93b9f0609428 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -319,7 +319,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
}
}

-static void rtllib_query_ShortPreambleMode(struct rtllib_device *ieee,
+static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
tcb_desc->bUseShortPreamble = false;
@@ -868,7 +868,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->bdhcp = 1;
}

- rtllib_query_ShortPreambleMode(ieee, tcb_desc);
+ rtllib_query_short_preamble_mode(ieee, tcb_desc);
rtllib_tx_query_agg_cap(ieee, txb->fragments[0],
tcb_desc);
rtllib_query_HTCapShortGI(ieee, tcb_desc);
--
2.30.2


2024-06-12 03:26:50

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 03/24] Staging: rtl8192e: Rename variable HTCurrentOperaRate

Rename variable HTCurrentOperaRate to ht_curr_op_rate
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 36a734ded7dc..e38cd0c9c013 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -496,7 +496,7 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee)
ieee->HTHighestOperaRate = ht_get_highest_mcs_rate(ieee,
ieee->dot11ht_oper_rate_set,
pMcsFilter);
- ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
+ ieee->ht_curr_op_rate = ieee->HTHighestOperaRate;

ht_info->current_op_mode = pPeerHTInfo->opt_mode;
}
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 46bc3561f56f..6dc641f78202 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1198,7 +1198,7 @@ struct rtllib_device {
u8 reg_dot11tx_ht_oper_rate_set[16];
u8 dot11ht_oper_rate_set[16];
u8 reg_ht_supp_rate_set[16];
- u8 HTCurrentOperaRate;
+ u8 ht_curr_op_rate;
u8 HTHighestOperaRate;
u8 tx_dis_rate_fallback;
u8 tx_use_drv_assinged_rate;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 8856191a1228..360d1cc446d0 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -510,8 +510,8 @@ static u8 rtllib_current_rate(struct rtllib_device *ieee)
if (ieee->mode & IEEE_MODE_MASK)
return ieee->rate;

- if (ieee->HTCurrentOperaRate)
- return ieee->HTCurrentOperaRate;
+ if (ieee->ht_curr_op_rate)
+ return ieee->ht_curr_op_rate;
else
return ieee->rate & 0x7F;
}
--
2.30.2


2024-06-12 03:26:58

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 19/24] Staging: rtl8192e: Rename variable bUseShortPreamble

Rename variable bUseShortPreamble to use_short_preamble
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index f38d172ddb4b..46e42fad5834 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -860,7 +860,7 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc)
u8 tmp_Short;

tmp_Short = (TxHT == 1) ? ((tcb_desc->use_short_gi) ? 1 : 0) :
- ((tcb_desc->bUseShortPreamble) ? 1 : 0);
+ ((tcb_desc->use_short_preamble) ? 1 : 0);
if (TxHT == 1 && TxRate != DESC90_RATEMCS15)
tmp_Short = 0;

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index a35079f6dc65..61d383a560f6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -113,7 +113,7 @@ struct cb_desc {
u8 cts_enable:1;
u8 rts_enable:1;
u8 use_short_gi:1;
- u8 bUseShortPreamble:1;
+ u8 use_short_preamble:1;
u8 tx_enable_fw_calc_dur:1;
u8 ampdu_enable:1;
u8 bRTSSTBC:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 6a979151d1d0..1aad5253ae4e 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -322,12 +322,12 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
- tcb_desc->bUseShortPreamble = false;
+ tcb_desc->use_short_preamble = false;
if (tcb_desc->data_rate == 2)
return;
else if (ieee->current_network.capability &
WLAN_CAPABILITY_SHORT_PREAMBLE)
- tcb_desc->bUseShortPreamble = true;
+ tcb_desc->use_short_preamble = true;
}

static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee,
@@ -440,7 +440,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
goto NO_PROTECTION;
}
if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
- tcb_desc->bUseShortPreamble = true;
+ tcb_desc->use_short_preamble = true;
return;
NO_PROTECTION:
tcb_desc->rts_enable = false;
--
2.30.2


2024-06-12 03:27:00

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 04/24] Staging: rtl8192e: Rename variable HTOpMode

Rename variable HTOpMode to ht_op_mode
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 360d1cc446d0..83082a990fbd 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -417,11 +417,11 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
break;
}
if (ht_info->current_ht_support && ht_info->enable_ht) {
- u8 HTOpMode = ht_info->current_op_mode;
+ u8 ht_op_mode = ht_info->current_op_mode;

- if ((ht_info->cur_bw_40mhz && (HTOpMode == 2 ||
- HTOpMode == 3)) ||
- (!ht_info->cur_bw_40mhz && HTOpMode == 3)) {
+ if ((ht_info->cur_bw_40mhz && (ht_op_mode == 2 ||
+ ht_op_mode == 3)) ||
+ (!ht_info->cur_bw_40mhz && ht_op_mode == 3)) {
tcb_desc->rts_rate = MGN_24M;
tcb_desc->bRTSEnable = true;
break;
--
2.30.2


2024-06-12 03:27:20

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 21/24] Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify()

Remove argument, bIsAmsdu from rtllib_classify() as it is
never used.

Signed-off-by: Tree Davies <[email protected]>
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index b6bf10dc1772..9a9bd8450354 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -228,7 +228,7 @@ static struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,
return NULL;
}

-static int rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu)
+static int rtllib_classify(struct sk_buff *skb)
{
struct ethhdr *eth;
struct iphdr *ip;
@@ -607,7 +607,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
}
}

- skb->priority = rtllib_classify(skb, IsAmsdu);
+ skb->priority = rtllib_classify(skb);
crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
encrypt = !(ether_type == ETH_P_PAE && ieee->ieee802_1x) && crypt && crypt->ops;
if (!encrypt && ieee->ieee802_1x &&
--
2.30.2


2024-06-12 03:27:34

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 22/24] Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter()

Remove boolean variable, IsAmsdu, and code which does not
execute because it is never set to true.

Signed-off-by: Tree Davies <[email protected]>
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 9a9bd8450354..2f5005689a36 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -539,7 +539,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
struct lib80211_crypt_data *crypt = NULL;
struct cb_desc *tcb_desc;
u8 is_multicast = false;
- u8 IsAmsdu = false;
bool bdhcp = false;

spin_lock_irqsave(&ieee->lock, flags);
@@ -648,11 +647,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
ether_addr_copy(header.addr1,
ieee->current_network.bssid);
ether_addr_copy(header.addr2, src);
- if (IsAmsdu)
- ether_addr_copy(header.addr3,
- ieee->current_network.bssid);
- else
- ether_addr_copy(header.addr3, dest);
+ ether_addr_copy(header.addr3, dest);
}

is_multicast = is_multicast_ether_addr(header.addr1);
--
2.30.2


2024-06-12 03:27:42

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 23/24] Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_tx.c

Add spaces and tabs to fix warning: Alignment should match open
parenthesis.

Signed-off-by: Tree Davies <[email protected]>
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 2f5005689a36..8e2abd16eb86 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -320,7 +320,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
}

static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee,
- struct cb_desc *tcb_desc)
+ struct cb_desc *tcb_desc)
{
tcb_desc->use_short_preamble = false;
if (tcb_desc->data_rate == 2)
@@ -331,7 +331,7 @@ static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee,
}

static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee,
- struct cb_desc *tcb_desc)
+ struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

@@ -347,7 +347,7 @@ static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee,
}

static void rtllib_query_bandwidth_mode(struct rtllib_device *ieee,
- struct cb_desc *tcb_desc)
+ struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

--
2.30.2


2024-06-12 03:28:01

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 24/24] Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_rx.c

Add spaces and tabs to fix warning: Alignment should match open
parenthesis.

Signed-off-by: Tree Davies <[email protected]>
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_rx.c | 37 ++++++++++++++--------------
1 file changed, 18 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3bff54efe66e..84ca5d769b7e 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -55,7 +55,7 @@ static inline void rtllib_monitor_rx(struct rtllib_device *ieee,
/* Called only as a tasklet (software IRQ) */
static struct rtllib_frag_entry *
rtllib_frag_cache_find(struct rtllib_device *ieee, unsigned int seq,
- unsigned int frag, u8 tid, u8 *src, u8 *dst)
+ unsigned int frag, u8 tid, u8 *src, u8 *dst)
{
struct rtllib_frag_entry *entry;
int i;
@@ -84,7 +84,7 @@ rtllib_frag_cache_find(struct rtllib_device *ieee, unsigned int seq,
/* Called only as a tasklet (software IRQ) */
static struct sk_buff *
rtllib_frag_cache_get(struct rtllib_device *ieee,
- struct ieee80211_hdr *hdr)
+ struct ieee80211_hdr *hdr)
{
struct sk_buff *skb = NULL;
u16 fc = le16_to_cpu(hdr->frame_control);
@@ -143,7 +143,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
* should have already been received
*/
entry = rtllib_frag_cache_find(ieee, seq, frag, tid, hdr->addr2,
- hdr->addr1);
+ hdr->addr1);
if (entry) {
entry->last_frag = frag;
skb = entry->skb;
@@ -155,7 +155,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,

/* Called only as a tasklet (software IRQ) */
static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
- struct ieee80211_hdr *hdr)
+ struct ieee80211_hdr *hdr)
{
u16 fc = le16_to_cpu(hdr->frame_control);
u16 sc = le16_to_cpu(hdr->seq_ctrl);
@@ -181,7 +181,7 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
}

entry = rtllib_frag_cache_find(ieee, seq, -1, tid, hdr->addr2,
- hdr->addr1);
+ hdr->addr1);

if (!entry) {
netdev_dbg(ieee->dev,
@@ -202,8 +202,7 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
*/
static inline int
rtllib_rx_frame_mgmt(struct rtllib_device *ieee, struct sk_buff *skb,
- struct rtllib_rx_stats *rx_stats, u16 type,
- u16 stype)
+ struct rtllib_rx_stats *rx_stats, u16 type, u16 stype)
{
/* On the struct stats definition there is written that
* this is not mandatory.... but seems that the probe
@@ -228,7 +227,7 @@ rtllib_rx_frame_mgmt(struct rtllib_device *ieee, struct sk_buff *skb,

/* Called by rtllib_rx_frame_decrypt */
static int rtllib_is_eapol_frame(struct rtllib_device *ieee,
- struct sk_buff *skb, size_t hdrlen)
+ struct sk_buff *skb, size_t hdrlen)
{
struct net_device *dev = ieee->dev;
u16 fc, ethertype;
@@ -346,7 +345,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,
/* this function is stolen from ipw2200 driver*/
#define IEEE_PACKET_RETRY_TIME (5 * HZ)
static int is_duplicate_packet(struct rtllib_device *ieee,
- struct ieee80211_hdr *header)
+ struct ieee80211_hdr *header)
{
u16 fc = le16_to_cpu(header->frame_control);
u16 sc = le16_to_cpu(header->seq_ctrl);
@@ -404,7 +403,7 @@ 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 rx_reorder_entry *pReorderEntry)
{
struct list_head *list = &ts->rx_pending_pkt_list;

@@ -521,8 +520,8 @@ void rtllib_flush_rx_ts_pending_pkts(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)
+ struct rtllib_rxb *prxb,
+ struct rx_ts_record *ts, u16 SeqNum)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rx_reorder_entry *pReorderEntry = NULL;
@@ -1911,7 +1910,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
switch (info_element->id) {
case MFIE_TYPE_SSID:
if (rtllib_is_empty_essid(info_element->data,
- info_element->len)) {
+ info_element->len)) {
network->flags |= NETWORK_EMPTY_ESSID;
break;
}
@@ -2190,10 +2189,10 @@ static inline int rtllib_network_init(
network->wzc_ie_len = 0;

if (rtllib_parse_info_param(ieee,
- beacon->info_element,
- (stats->len - sizeof(*beacon)),
- network,
- stats))
+ beacon->info_element,
+ (stats->len - sizeof(*beacon)),
+ network,
+ stats))
return 1;

network->mode = 0;
@@ -2559,7 +2558,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
schedule_work(&ieee->ps_task);
} else if (ieee80211_is_probe_resp(header->frame_control)) {
netdev_dbg(ieee->dev, "received PROBE RESPONSE\n");
- rtllib_process_probe_response(ieee,
- (struct rtllib_probe_response *)header, stats);
+ rtllib_process_probe_response(ieee, (struct rtllib_probe_response *)header,
+ stats);
}
}
--
2.30.2


2024-06-12 03:28:11

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 20/24] Staging: rtl8192e: Rename variable bRTSSTBC

Rename variable bRTSSTBC to rtsstbc
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_tx.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 46e42fad5834..b3d4b3394284 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -894,7 +894,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,

pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ? 1 : 0;
pTxFwInfo->CtsEnable = (cb_desc->cts_enable) ? 1 : 0;
- pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ? 1 : 0;
+ pTxFwInfo->RtsSTBC = (cb_desc->rtsstbc) ? 1 : 0;
pTxFwInfo->RtsHT = (cb_desc->rts_rate & 0x80) ? 1 : 0;
pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw(cb_desc->rts_rate);
pTxFwInfo->RtsBandwidth = 0;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 61d383a560f6..022851b7f1a9 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -116,7 +116,7 @@ struct cb_desc {
u8 use_short_preamble:1;
u8 tx_enable_fw_calc_dur:1;
u8 ampdu_enable:1;
- u8 bRTSSTBC:1;
+ u8 rtsstbc:1;
u8 RTSSC:1;

u8 rts_bw:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 1aad5253ae4e..b6bf10dc1772 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -372,7 +372,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info;

- tcb_desc->bRTSSTBC = false;
+ tcb_desc->rtsstbc = false;
tcb_desc->rts_use_short_gi = false;
tcb_desc->cts_enable = false;
tcb_desc->RTSSC = 0;
--
2.30.2


2024-06-12 03:28:23

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 08/24] Staging: rtl8192e: Rename variable bRTSUseShortGI

Rename variable bRTSUseShortGI to rts_use_short_gi
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_tx.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 4117530f19b1..a52db6b1fdb5 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -901,7 +901,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
pTxFwInfo->RtsSubcarrier = cb_desc->RTSSC;
pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT == 0) ?
(cb_desc->rts_use_short_preamble ? 1 : 0) :
- (cb_desc->bRTSUseShortGI ? 1 : 0);
+ (cb_desc->rts_use_short_gi ? 1 : 0);
if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20_40) {
if (cb_desc->bPacketBW) {
pTxFwInfo->TxBandwidth = 1;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 2282c709654d..bd18d866ce22 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -122,7 +122,7 @@ struct cb_desc {
u8 rts_bw:1;
u8 bPacketBW:1;
u8 rts_use_short_preamble:1;
- u8 bRTSUseShortGI:1;
+ u8 rts_use_short_gi:1;
u8 multicast:1;
u8 bBroadcast:1;
u8 drv_agg_enable:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index c0fe00d0df02..d376c35a5ad7 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -373,7 +373,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,
struct rt_hi_throughput *ht_info;

tcb_desc->bRTSSTBC = false;
- tcb_desc->bRTSUseShortGI = false;
+ tcb_desc->rts_use_short_gi = false;
tcb_desc->cts_enable = false;
tcb_desc->RTSSC = 0;
tcb_desc->rts_bw = false;
--
2.30.2


2024-06-12 03:30:07

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 13/24] Staging: rtl8192e: Rename variable bUseShortGI

Rename variable bUseShortGI to use_short_gi
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 8dec4e1b89b8..f38d172ddb4b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -859,7 +859,7 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc)
{
u8 tmp_Short;

- tmp_Short = (TxHT == 1) ? ((tcb_desc->bUseShortGI) ? 1 : 0) :
+ tmp_Short = (TxHT == 1) ? ((tcb_desc->use_short_gi) ? 1 : 0) :
((tcb_desc->bUseShortPreamble) ? 1 : 0);
if (TxHT == 1 && TxRate != DESC90_RATEMCS15)
tmp_Short = 0;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b48d9d416ead..54cf5ee628f0 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -112,7 +112,7 @@ struct cb_desc {
/* Tx Firmware Related flags (10-11)*/
u8 cts_enable:1;
u8 rts_enable:1;
- u8 bUseShortGI:1;
+ u8 use_short_gi:1;
u8 bUseShortPreamble:1;
u8 tx_enable_fw_calc_dur:1;
u8 ampdu_enable:1;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index b5eb3968581d..d46963fe9bbc 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -335,15 +335,15 @@ static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;

- tcb_desc->bUseShortGI = false;
+ tcb_desc->use_short_gi = false;

if (!ht_info->current_ht_support || !ht_info->enable_ht)
return;

if (ht_info->cur_bw_40mhz && ht_info->cur_short_gi_40mhz)
- tcb_desc->bUseShortGI = true;
+ tcb_desc->use_short_gi = true;
else if (!ht_info->cur_bw_40mhz && ht_info->cur_short_gi_20mhz)
- tcb_desc->bUseShortGI = true;
+ tcb_desc->use_short_gi = true;
}

static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
--
2.30.2


2024-06-12 03:33:33

by Tree Davies

[permalink] [raw]
Subject: [PATCH v2 18/24] Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI

Rename function rtllib_query_HTCapShortGI to
rtllib_query_ht_cap_short_gi to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 93b9f0609428..6a979151d1d0 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -330,7 +330,7 @@ static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee,
tcb_desc->bUseShortPreamble = true;
}

-static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee,
+static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee,
struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
@@ -871,7 +871,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
rtllib_query_short_preamble_mode(ieee, tcb_desc);
rtllib_tx_query_agg_cap(ieee, txb->fragments[0],
tcb_desc);
- rtllib_query_HTCapShortGI(ieee, tcb_desc);
+ rtllib_query_ht_cap_short_gi(ieee, tcb_desc);
rtllib_query_bandwidth_mode(ieee, tcb_desc);
rtllib_query_protectionmode(ieee, tcb_desc,
txb->fragments[0]);
--
2.30.2


2024-06-12 07:02:27

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH v2 00/24] Staging: rtl8192e: Maintenance renames and cleanup

On Tue, Jun 11, 2024 at 08:22:06PM -0700, Tree Davies wrote:
> This patch series v2 attacks CamelCase variable renames, removes
> un-used variables and adjusts alignment issues found in
> rtllib_rx.c and rtllib_tx.c.
>
> NOTE: Patch #9 doesn't completely resolve CamelCase violation as the
> correct abreviation of megahertz is MHz as called out by Dan Carpenter.

Thanks!

Reviewed-by: Dan Carpenter <[email protected]>

regards,
dan carpenter


2024-06-13 04:13:26

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH v2 00/24] Staging: rtl8192e: Maintenance renames and cleanup

On 6/12/24 05:22, Tree Davies wrote:
> This patch series v2 attacks CamelCase variable renames, removes
> un-used variables and adjusts alignment issues found in
> rtllib_rx.c and rtllib_tx.c.
>
> NOTE: Patch #9 doesn't completely resolve CamelCase violation as the
> correct abreviation of megahertz is MHz as called out by Dan Carpenter.
>
> Thank you in advance to all reviewers.
> ~Tree
>
> Changes since v1:
> #09: Change bforced_tx20Mhz to forced_tx_20MHz, and update commit message
> #21: Update subject prefix with 'Staging: rtl8192e:'
> #22: Update subject prefix with 'Staging: rtl8192e:'
> #23: Update subject prefix with 'Staging: rtl8192e:'
> #24: Update subject prefix with 'Staging: rtl8192e:'
>
> Tree Davies (24):
> Staging: rtl8192e: Rename variable bHwSec
> Staging: rtl8192e: Rename variable bIsMulticast
> Staging: rtl8192e: Rename variable HTCurrentOperaRate
> Staging: rtl8192e: Rename variable HTOpMode
> Staging: rtl8192e: Rename variable bRTSEnable
> Staging: rtl8192e: Rename variable bRTSBW
> Staging: rtl8192e: Rename variable bCTSEnable
> Staging: rtl8192e: Rename variable bRTSUseShortGI
> Staging: rtl8192e: Rename variable bforced_tx20Mhz
> Staging: rtl8192e: Rename variable bPacketBW
> Staging: rtl8192e: Rename variable bBroadcast
> Staging: rtl8192e: Rename variable CntAfterLink
> Staging: rtl8192e: Rename variable bUseShortGI
> Staging: rtl8192e: Rename function TsStartAddBaProcess()
> Staging: rtl8192e: Fix alignment to match open parenthesis
> Staging: rtl8192e: Rename function rtllib_query_BandwidthMode
> Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode
> Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI
> Staging: rtl8192e: Rename variable bUseShortPreamble
> Staging: rtl8192e: Rename variable bRTSSTBC
> Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify()
> Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter()
> Staging: rtl8192e: Fix alignment to match open parenthesis in
> rtllib_tx.c
> Staging: rtl8192e: Fix alignment to match open parenthesis in
> rtllib_rx.c
>
> .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 +--
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +-
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 +-
> drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +-
> drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
> drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +-
> drivers/staging/rtl8192e/rtllib.h | 28 ++--
> drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 +-
> drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +-
> drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 +-
> drivers/staging/rtl8192e/rtllib_rx.c | 45 +++---
> drivers/staging/rtl8192e/rtllib_tx.c | 131 +++++++++---------
> 12 files changed, 126 insertions(+), 132 deletions(-)
>

Tested-by: Philipp Hortmann <[email protected]>