2024-06-10 05:49:05

by Tree Davies

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

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

This completes the last of the remaining checkpatch issues
for rtllib_tx.c.

Thank you in advance to all reviewers.
~Tree


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 spaces/tab 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
Remove parameter bIsAmsdu from rtllib_classify()
Remove variable IsAmsdu from rtllib_xmit_inter()
Fix space/tab alignment to match open parenthesis in rtllib_tx.c
Fix space/tab 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-10 05:49:12

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:49:19

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:49:27

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:49:28

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:49:50

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:49:50

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:50:20

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:50:30

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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-10 05:50:31

by Tree Davies

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

Rename variable bforced_tx20Mhz to forced_tx_20mhz
to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
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..7d5046b58cd1 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..d0da16a86633 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..d9749d2c1668 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-10 05:50:44

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 d0da16a86633..7a5accd86809 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 d9749d2c1668..ca123864e12b 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-10 05:51:02

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 7a5accd86809..4bd7a85e2411 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 ca123864e12b..0c58b70ae03f 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-10 05:51:05

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 4bd7a85e2411..4abd01ff3d21 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 0c58b70ae03f..bb8ffedaf9f3 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-10 05:51:16

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 4abd01ff3d21..33bb1cbb525a 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 bb8ffedaf9f3..56510365f1a9 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-10 05:51:30

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 33bb1cbb525a..0029e4ab4394 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 56510365f1a9..369fd26180fa 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-10 05:51:43

by Tree Davies

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

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

Signed-off-by: Tree Davies <[email protected]>
---
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 369fd26180fa..c46bd0ea061e 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-10 05:52:27

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 4ac8140d7e68..97581cd58571 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-10 05:54:27

by Tree Davies

[permalink] [raw]
Subject: [PATCH 23/24] Fix space/tab 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]>
---
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 eb1668458e30..0f73dbf53c03 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-10 05:57:52

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 0029e4ab4394..7c010534af52 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 183a3897687e..f6525256298a 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-10 05:58:50

by Tree Davies

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

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

Signed-off-by: Tree Davies <[email protected]>
---
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 841d9960385b..deae90640e90 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-10 06:04:42

by Tree Davies

[permalink] [raw]
Subject: [PATCH 24/24] Fix space/tab 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]>
---
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-10 06:08:29

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 7c010534af52..738db4d6180e 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 f6525256298a..841d9960385b 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-10 06:10:51

by Dan Carpenter

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

On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> Rename variable bforced_tx20Mhz to forced_tx_20mhz
> to fix checkpatch warning Avoid CamelCase.

The correct capitalization for megahertz is MHz. So the original is
wrong but the new name is not correct either.

regards,
dan carpenter


2024-06-10 06:21:02

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 97581cd58571..183a3897687e 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-10 06:21:45

by Tree Davies

[permalink] [raw]
Subject: [PATCH 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]>
---
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 c46bd0ea061e..4ac8140d7e68 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-10 06:23:27

by Tree Davies

[permalink] [raw]
Subject: [PATCH 22/24] 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]>
---
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 deae90640e90..eb1668458e30 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-10 06:38:41

by Greg Kroah-Hartman

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

On Sun, Jun 09, 2024 at 10:44:25PM -0700, Tree Davies wrote:
> This patch series attacks CamelCase variable renames, removes
> un-used variables and adjusts alignment issues found in
> rtllib_rx.c and rtllib_tx.c.
>
> This completes the last of the remaining checkpatch issues
> for rtllib_tx.c.
>
> Thank you in advance to all reviewers.
> ~Tree
>
>
> 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 spaces/tab 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
> Remove parameter bIsAmsdu from rtllib_classify()
> Remove variable IsAmsdu from rtllib_xmit_inter()
> Fix space/tab alignment to match open parenthesis in rtllib_tx.c
> Fix space/tab alignment to match open parenthesis in rtllib_rx.c

Any reason why the last 4 patches lost the "Staging: rtl8192e:" prefix?

thanks,

greg k-h

2024-06-11 02:16:03

by Tree Davies

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

On Mon, Jun 10, 2024 at 09:08:03AM +0300, Dan Carpenter wrote:
> On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> > Rename variable bforced_tx20Mhz to forced_tx_20mhz
> > to fix checkpatch warning Avoid CamelCase.
>
> The correct capitalization for megahertz is MHz. So the original is
> wrong but the new name is not correct either.
>
> regards,
> dan carpenter
>

Thanks Dan,
So... I guess just spell it out as 'forced_tx_20_megahertz' ?
Tree


2024-06-11 05:18:41

by Dan Carpenter

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

On Mon, Jun 10, 2024 at 07:15:51PM -0700, <Tree Davies wrote:
> On Mon, Jun 10, 2024 at 09:08:03AM +0300, Dan Carpenter wrote:
> > On Sun, Jun 09, 2024 at 10:44:34PM -0700, Tree Davies wrote:
> > > Rename variable bforced_tx20Mhz to forced_tx_20mhz
> > > to fix checkpatch warning Avoid CamelCase.
> >
> > The correct capitalization for megahertz is MHz. So the original is
> > wrong but the new name is not correct either.
> >
> > regards,
> > dan carpenter
> >
>
> Thanks Dan,
> So... I guess just spell it out as 'forced_tx_20_megahertz' ?

No, just write it as "forced_tx_20MHz". Don't bow down to checkpatch.

regards,
dan carpenter