2024-01-06 05:56:21

by Tree Davies

[permalink] [raw]
Subject: [PATCH 00/21] Staging: rtl8192e: checkpatch fixes for rtllib_softmac.c

This series' focus is on fixing checkpatch warnings regarding
drivers/staging/rtl8192e/rtllib_softmac.c

Thank you in advance to reviewers
~ Tree

Tree Davies (21):
Staging: rtl8192e: Remove unnecessary parenthesis in
rtllib_softmac_new_net()
Staging: rtl8192e: Rename variable SlotIndex
Staging: rtl8192e: Rename function rtllib_MgntDisconnectAP()
Staging: rtl8192e: Rename variable bMulticast
Staging: rtl8192e: Rename variable MaxPeriod
Staging: rtl8192e: Rename variable bAwakePktSent
Staging: rtl8192e: Rename variable bSupportNmode
Staging: rtl8192e: Rename variable bBusyTraffic
Staging: rtl8192e: Rename function rtllib_MgntDisconnect()
Staging: rtl8192e: Rename variable bFilterOutNonAssociatedBSSID
Staging: rtl8192e: Rename variable array Bssid
Staging: rtl8192e: Rename variable NumRxUnicastOkInPeriod
Staging: rtl8192e: Rename variable SlotNum
Staging: rtl8192e: Rename variable RemoveAllTS
Staging: rtl8192e: Rename function RemovePeerTS()
Staging: rtl8192e: Rename function rtllib_MlmeDisassociateRequest()
Staging: rtl8192e: Rename function SendDisassociation()
Staging: rtl8192e: Rename variable bHalfSupportNmode
Staging: rtl8192e: Rename variable PMKCacheIdx
Staging: rtl8192e: Rename function GetNmodeSupportBySecCfg()
Staging: rtl8192e: Rename variable AsocRetryCount

.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 +-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 32 +++----
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 6 +-
drivers/staging/rtl8192e/rtllib.h | 26 +++---
drivers/staging/rtl8192e/rtllib_rx.c | 6 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 86 +++++++++----------
drivers/staging/rtl8192e/rtllib_tx.c | 10 +--
drivers/staging/rtl8192e/rtllib_wx.c | 2 +-
9 files changed, 89 insertions(+), 89 deletions(-)

--
2.39.2



2024-01-06 05:56:22

by Tree Davies

[permalink] [raw]
Subject: [PATCH 01/21] Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_softmac_new_net()

Remove parentheses to fix checkpatch Warning:
Unnecessary parentheses around ieee->current_network

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index b9278b26accd..520b90abcde7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1220,7 +1220,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
if ((ieee->current_network.qos_data.supported == 1) &&
ieee->current_network.bssht.bd_support_ht)
ht_reset_self_and_save_peer_setting(ieee,
- &(ieee->current_network));
+ &ieee->current_network);
else
ieee->ht_info->current_ht_support = false;

--
2.39.2


2024-01-06 05:56:41

by Tree Davies

[permalink] [raw]
Subject: [PATCH 02/21] Staging: rtl8192e: Rename variable SlotIndex

Rename variable SlotIndex to slot_index to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index c7a2eae2fdb9..9b9d95ba06df 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1852,7 +1852,7 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
u16 RegRxCounter = rtl92e_readw(dev, 0x130);
bool bStuck = false;
static u8 rx_chk_cnt;
- u32 SlotIndex = 0, TotalRxStuckCount = 0;
+ u32 slot_index = 0, TotalRxStuckCount = 0;
u8 i;
u8 SilentResetRxSoltNum = 4;

@@ -1882,10 +1882,10 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
}


- SlotIndex = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum;
+ slot_index = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum;

if (priv->rx_ctr == RegRxCounter) {
- priv->silent_reset_rx_stuck_event[SlotIndex] = 1;
+ priv->silent_reset_rx_stuck_event[slot_index] = 1;

for (i = 0; i < SilentResetRxSoltNum; i++)
TotalRxStuckCount += priv->silent_reset_rx_stuck_event[i];
@@ -1897,7 +1897,7 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
priv->silent_reset_rx_stuck_event[i];
}
} else {
- priv->silent_reset_rx_stuck_event[SlotIndex] = 0;
+ priv->silent_reset_rx_stuck_event[slot_index] = 0;
}

priv->rx_ctr = RegRxCounter;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 6815d18a7919..67938e212db1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -915,17 +915,17 @@ static void _rtl92e_if_check_reset(struct net_device *dev)
static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
u32 *TotalRxDataNum)
{
- u16 SlotIndex;
+ u16 slot_index;
u8 i;

*TotalRxBcnNum = 0;
*TotalRxDataNum = 0;

- SlotIndex = (priv->rtllib->link_detect_info.SlotIndex++) %
+ slot_index = (priv->rtllib->link_detect_info.slot_index++) %
(priv->rtllib->link_detect_info.SlotNum);
- priv->rtllib->link_detect_info.RxBcnNum[SlotIndex] =
+ priv->rtllib->link_detect_info.RxBcnNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvBcnInPeriod;
- priv->rtllib->link_detect_info.RxDataNum[SlotIndex] =
+ priv->rtllib->link_detect_info.RxDataNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvDataInPeriod;
for (i = 0; i < priv->rtllib->link_detect_info.SlotNum; i++) {
*TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i];
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7b39a1987fdd..37bcd968a542 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1116,7 +1116,7 @@ struct rt_link_detect {
u32 RxBcnNum[RT_MAX_LD_SLOT_NUM];
u32 RxDataNum[RT_MAX_LD_SLOT_NUM];
u16 SlotNum;
- u16 SlotIndex;
+ u16 slot_index;

u32 num_tx_ok_in_period;
u32 num_rx_ok_in_period;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 520b90abcde7..1d490704389e 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2072,7 +2072,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
for (i = 0; i < 5; i++)
ieee->seq_ctrl[i] = 0;

- ieee->link_detect_info.SlotIndex = 0;
+ ieee->link_detect_info.slot_index = 0;
ieee->link_detect_info.SlotNum = 2;
ieee->link_detect_info.NumRecvBcnInPeriod = 0;
ieee->link_detect_info.NumRecvDataInPeriod = 0;
--
2.39.2


2024-01-06 05:56:53

by Tree Davies

[permalink] [raw]
Subject: [PATCH 03/21] Staging: rtl8192e: Rename function rtllib_MgntDisconnectAP()

Rename function rtllib_MgntDisconnectAP to rtllib_mgnt_disconnect_ap
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1d490704389e..6f730242728a 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2265,7 +2265,7 @@ static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib,
}
}

-static void rtllib_MgntDisconnectAP(struct rtllib_device *rtllib, u8 asRsn)
+static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 asRsn)
{
bool bFilterOutNonAssociatedBSSID = false;

@@ -2285,7 +2285,7 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn)

if (rtllib->link_state == MAC80211_LINKED) {
if (rtllib->iw_mode == IW_MODE_INFRA)
- rtllib_MgntDisconnectAP(rtllib, asRsn);
+ rtllib_mgnt_disconnect_ap(rtllib, asRsn);
}

return true;
--
2.39.2


2024-01-06 05:57:05

by Tree Davies

[permalink] [raw]
Subject: [PATCH 04/21] Staging: rtl8192e: Rename variable bMulticast

Rename variable bMulticast to multicast to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 37bcd968a542..9d3c79105508 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -123,7 +123,7 @@ struct cb_desc {
u8 bPacketBW:1;
u8 bRTSUseShortPreamble:1;
u8 bRTSUseShortGI:1;
- u8 bMulticast:1;
+ u8 multicast:1;
u8 bBroadcast:1;
u8 drv_agg_enable:1;
u8 reserved2:1;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 6f730242728a..9db834f5d637 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1816,7 +1816,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
/* update the tx status */
tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb +
MAX_DEV_ADDR_SIZE);
- if (tcb_desc->bMulticast)
+ if (tcb_desc->multicast)
ieee->stats.multicast++;

/* if xmit available, just xmit it immediately, else just insert it to
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index f7098a2ba8b0..f1e9a0390be0 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->bMulticast || tcb_desc->bBroadcast)
+ if (tcb_desc->multicast || tcb_desc->bBroadcast)
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->bRTSBW = false;

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

if (is_broadcast_ether_addr(skb->data + 16))
@@ -843,11 +843,11 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)
tcb_desc->tx_use_drv_assinged_rate = 1;
} else {
if (is_multicast_ether_addr(header.addr1))
- tcb_desc->bMulticast = 1;
+ tcb_desc->multicast = 1;
if (is_broadcast_ether_addr(header.addr1))
tcb_desc->bBroadcast = 1;
rtllib_txrate_selectmode(ieee, tcb_desc);
- if (tcb_desc->bMulticast || tcb_desc->bBroadcast)
+ if (tcb_desc->multicast || tcb_desc->bBroadcast)
tcb_desc->data_rate = ieee->basic_rate;
else
tcb_desc->data_rate = rtllib_current_rate(ieee);
--
2.39.2


2024-01-06 05:57:24

by Tree Davies

[permalink] [raw]
Subject: [PATCH 05/21] Staging: rtl8192e: Rename variable MaxPeriod

Rename variable MaxPeriod to max_period to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 9db834f5d637..0d53e0a92a4c 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1381,12 +1381,12 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
if (ieee->bAwakePktSent) {
psc->LPSAwakeIntvl = 1;
} else {
- u8 MaxPeriod = 5;
+ u8 max_period = 5;

if (psc->LPSAwakeIntvl == 0)
psc->LPSAwakeIntvl = 1;
psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >=
- MaxPeriod) ? MaxPeriod :
+ max_period) ? max_period :
(psc->LPSAwakeIntvl + 1);
}
{
--
2.39.2


2024-01-06 05:57:41

by Tree Davies

[permalink] [raw]
Subject: [PATCH 06/21] Staging: rtl8192e: Rename variable bAwakePktSent

Rename variable bAwakePktSent to awake_pkt_sent to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 67938e212db1..c9d7484fe1cd 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1257,7 +1257,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
int idx;
u32 fwinfo_size = 0;

- priv->rtllib->bAwakePktSent = true;
+ priv->rtllib->awake_pkt_sent = true;

fwinfo_size = sizeof(struct tx_fwinfo_8190pci);

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 9d3c79105508..9d6704fc86ff 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1374,7 +1374,7 @@ struct rtllib_device {

/* for PS mode */
unsigned long last_rx_ps_time;
- bool bAwakePktSent;
+ bool awake_pkt_sent;
u8 LPSDelayCnt;

/* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 0d53e0a92a4c..08ff55c2f1be 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1378,7 +1378,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
return 0;

if (time) {
- if (ieee->bAwakePktSent) {
+ if (ieee->awake_pkt_sent) {
psc->LPSAwakeIntvl = 1;
} else {
u8 max_period = 5;
@@ -1461,7 +1461,7 @@ static inline void rtllib_sta_ps(struct work_struct *work)
spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2);
}

- ieee->bAwakePktSent = false;
+ ieee->awake_pkt_sent = false;

} else if (sleep == 2) {
spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2);
--
2.39.2


2024-01-06 05:57:45

by Tree Davies

[permalink] [raw]
Subject: [PATCH 07/21] Staging: rtl8192e: Rename variable bSupportNmode

Rename variable bSupportNmode to support_nmode to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 08ff55c2f1be..85e6e727bec7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1648,7 +1648,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
int errcode;
u8 *challenge;
int chlen = 0;
- bool bSupportNmode = true, bHalfSupportNmode = false;
+ bool support_nmode = true, bHalfSupportNmode = false;

errcode = auth_parse(ieee->dev, skb, &challenge, &chlen);

@@ -1666,16 +1666,16 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) {
if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
if (is_ht_half_nmode_aps(ieee)) {
- bSupportNmode = true;
+ support_nmode = true;
bHalfSupportNmode = true;
} else {
- bSupportNmode = false;
+ support_nmode = false;
bHalfSupportNmode = false;
}
}
}
/* Dummy wirless mode setting to avoid encryption issue */
- if (bSupportNmode) {
+ if (support_nmode) {
ieee->set_wireless_mode(ieee->dev,
ieee->current_network.mode);
} else {
--
2.39.2


2024-01-06 05:58:10

by Tree Davies

[permalink] [raw]
Subject: [PATCH 08/21] Staging: rtl8192e: Rename variable bBusyTraffic

Rename variable bBusyTraffic to busy_traffic 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_softmac.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 c9d7484fe1cd..16ce207f5bd7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -943,7 +943,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
unsigned long flags;
struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl);
- bool bBusyTraffic = false;
+ bool busy_traffic = false;
bool bHigherBusyTraffic = false;
bool bHigherBusyRxTraffic = false;
bool bEnterPS = false;
@@ -973,7 +973,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA)) {
if (ieee->link_detect_info.num_rx_ok_in_period > 100 ||
ieee->link_detect_info.num_tx_ok_in_period > 100)
- bBusyTraffic = true;
+ busy_traffic = true;

if (ieee->link_detect_info.num_rx_ok_in_period > 4000 ||
ieee->link_detect_info.num_tx_ok_in_period > 4000) {
@@ -1006,7 +1006,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->link_detect_info.num_rx_ok_in_period = 0;
ieee->link_detect_info.num_tx_ok_in_period = 0;
ieee->link_detect_info.NumRxUnicastOkInPeriod = 0;
- ieee->link_detect_info.bBusyTraffic = bBusyTraffic;
+ ieee->link_detect_info.busy_traffic = busy_traffic;

ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic;
ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index 4c884c5277f9..5fd44d0c4b1d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -253,7 +253,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
rt_state = priv->rtllib->rf_power_state;
if (!priv->up)
return -ENETDOWN;
- if (priv->rtllib->link_detect_info.bBusyTraffic)
+ if (priv->rtllib->link_detect_info.busy_traffic)
return -EAGAIN;

if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 9d6704fc86ff..d127528e7932 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1121,7 +1121,7 @@ struct rt_link_detect {
u32 num_tx_ok_in_period;
u32 num_rx_ok_in_period;
u32 NumRxUnicastOkInPeriod;
- bool bBusyTraffic;
+ bool busy_traffic;
bool bHigherBusyTraffic;
bool bHigherBusyRxTraffic;
};
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 85e6e727bec7..40d6ae15b246 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1734,7 +1734,7 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
ieee->link_state = RTLLIB_ASSOCIATING;
ieee->softmac_stats.reassoc++;
ieee->is_roaming = true;
- ieee->link_detect_info.bBusyTraffic = false;
+ ieee->link_detect_info.busy_traffic = false;
rtllib_disassociate(ieee);
RemovePeerTS(ieee, header->addr2);
if (!(ieee->rtllib_ap_sec_type(ieee) &
--
2.39.2


2024-01-06 05:58:15

by Tree Davies

[permalink] [raw]
Subject: [PATCH 09/21] Staging: rtl8192e: Rename function rtllib_MgntDisconnect()

Rename function rtllib_MgntDisconnect to rtllib_mgnt_disconnect fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 16ce207f5bd7..ac72f7dcd5c1 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -172,7 +172,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
priv->blinked_ingpio = true;
else
priv->blinked_ingpio = false;
- rtllib_MgntDisconnect(priv->rtllib,
+ rtllib_mgnt_disconnect(priv->rtllib,
WLAN_REASON_DISASSOC_STA_HAS_LEFT);
}
}
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d127528e7932..35c66ecd20e6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1805,7 +1805,7 @@ static inline const char *escape_essid(const char *essid, u8 essid_len)
}

/* fun with the built-in rtllib stack... */
-bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn);
+bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 asRsn);

/* For the function is more related to hardware setting, it's better to use the
* ieee handler to refer to it.
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 40d6ae15b246..3d7fad28c414 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2278,7 +2278,7 @@ static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 asRsn)
rtllib->link_state = MAC80211_NOLINK;
}

-bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn)
+bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 asRsn)
{
if (rtllib->ps != RTLLIB_PS_DISABLED)
rtllib->sta_wake_up(rtllib->dev);
@@ -2290,7 +2290,7 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn)

return true;
}
-EXPORT_SYMBOL(rtllib_MgntDisconnect);
+EXPORT_SYMBOL(rtllib_mgnt_disconnect);

void notify_wx_assoc_event(struct rtllib_device *ieee)
{
--
2.39.2


2024-01-06 05:58:39

by Tree Davies

[permalink] [raw]
Subject: [PATCH 10/21] Staging: rtl8192e: Rename variable bFilterOutNonAssociatedBSSID

Rename variable bFilterOutNonAssociatedBSSID -> filter_out_nonassociated_bssid
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 3d7fad28c414..98c1041214fb 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2267,11 +2267,11 @@ static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib,

static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 asRsn)
{
- bool bFilterOutNonAssociatedBSSID = false;
+ bool filter_out_nonassociated_bssid = false;

- bFilterOutNonAssociatedBSSID = false;
+ filter_out_nonassociated_bssid = false;
rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_CECHK_BSSID,
- (u8 *)(&bFilterOutNonAssociatedBSSID));
+ (u8 *)(&filter_out_nonassociated_bssid));
rtllib_MlmeDisassociateRequest(rtllib, rtllib->current_network.bssid,
asRsn);

--
2.39.2


2024-01-06 05:59:07

by Tree Davies

[permalink] [raw]
Subject: [PATCH 12/21] Staging: rtl8192e: Rename variable NumRxUnicastOkInPeriod

Rename variable NumRxUnicastOkInPeriod to num_rx_unicast_ok_in_period
to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index ac72f7dcd5c1..34e30b03c545 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -984,9 +984,9 @@ static void _rtl92e_watchdog_wq_cb(void *data)
bHigherBusyRxTraffic = false;
}

- if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
+ if (((ieee->link_detect_info.num_rx_unicast_ok_in_period +
ieee->link_detect_info.num_tx_ok_in_period) > 8) ||
- (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2))
+ (ieee->link_detect_info.num_rx_unicast_ok_in_period > 2))
bEnterPS = false;
else
bEnterPS = true;
@@ -1005,7 +1005,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)

ieee->link_detect_info.num_rx_ok_in_period = 0;
ieee->link_detect_info.num_tx_ok_in_period = 0;
- ieee->link_detect_info.NumRxUnicastOkInPeriod = 0;
+ ieee->link_detect_info.num_rx_unicast_ok_in_period = 0;
ieee->link_detect_info.busy_traffic = busy_traffic;

ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index f379819287b4..5cab1aa6455a 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1120,7 +1120,7 @@ struct rt_link_detect {

u32 num_tx_ok_in_period;
u32 num_rx_ok_in_period;
- u32 NumRxUnicastOkInPeriod;
+ u32 num_rx_unicast_ok_in_period;
bool busy_traffic;
bool bHigherBusyTraffic;
bool bHigherBusyRxTraffic;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4df20f4d6bf9..f777febcfe3b 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1149,9 +1149,9 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
{
if (unicast) {
if (ieee->link_state == MAC80211_LINKED) {
- if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
+ if (((ieee->link_detect_info.num_rx_unicast_ok_in_period +
ieee->link_detect_info.num_tx_ok_in_period) > 8) ||
- (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) {
+ (ieee->link_detect_info.num_rx_unicast_ok_in_period > 2)) {
ieee->leisure_ps_leave(ieee->dev);
}
}
@@ -1363,7 +1363,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
else
nr_subframes = 1;
if (unicast)
- ieee->link_detect_info.NumRxUnicastOkInPeriod += nr_subframes;
+ ieee->link_detect_info.num_rx_unicast_ok_in_period += nr_subframes;
rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes);

/* Indicate packets to upper layer or Rx Reorder */
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 8fb69fa09cc2..9a9b8f63218b 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2078,7 +2078,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
ieee->link_detect_info.NumRecvDataInPeriod = 0;
ieee->link_detect_info.num_tx_ok_in_period = 0;
ieee->link_detect_info.num_rx_ok_in_period = 0;
- ieee->link_detect_info.NumRxUnicastOkInPeriod = 0;
+ ieee->link_detect_info.num_rx_unicast_ok_in_period = 0;
ieee->is_aggregate_frame = false;
ieee->assoc_id = 0;
ieee->queue_stop = 0;
--
2.39.2


2024-01-06 05:59:10

by Tree Davies

[permalink] [raw]
Subject: [PATCH 11/21] Staging: rtl8192e: Rename variable array Bssid

Rename variable array Bssid -> bssid to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 35c66ecd20e6..f379819287b4 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1161,7 +1161,7 @@ struct rate_adaptive {

#define NUM_PMKID_CACHE 16
struct rt_pmkid_list {
- u8 Bssid[ETH_ALEN];
+ u8 bssid[ETH_ALEN];
u8 PMKID[16];
u8 SsidBuf[33];
u8 used;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 98c1041214fb..8fb69fa09cc2 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -671,7 +671,7 @@ static inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid)

do {
if ((ieee->PMKIDList[i].used) &&
- (memcmp(ieee->PMKIDList[i].Bssid, bssid, ETH_ALEN) == 0))
+ (memcmp(ieee->PMKIDList[i].bssid, bssid, ETH_ALEN) == 0))
break;
i++;
} while (i < NUM_PMKID_CACHE);
--
2.39.2


2024-01-06 05:59:27

by Tree Davies

[permalink] [raw]
Subject: [PATCH 13/21] Staging: rtl8192e: Rename variable SlotNum

Rename variable SlotNum to slot_num to fix checkpatch warning Avoid
CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 34e30b03c545..f4e48b4a122d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -922,12 +922,12 @@ static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
*TotalRxDataNum = 0;

slot_index = (priv->rtllib->link_detect_info.slot_index++) %
- (priv->rtllib->link_detect_info.SlotNum);
+ (priv->rtllib->link_detect_info.slot_num);
priv->rtllib->link_detect_info.RxBcnNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvBcnInPeriod;
priv->rtllib->link_detect_info.RxDataNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvDataInPeriod;
- for (i = 0; i < priv->rtllib->link_detect_info.SlotNum; i++) {
+ for (i = 0; i < priv->rtllib->link_detect_info.slot_num; i++) {
*TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i];
*TotalRxDataNum += priv->rtllib->link_detect_info.RxDataNum[i];
}
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 5cab1aa6455a..26ceb579afeb 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1115,7 +1115,7 @@ struct rt_link_detect {

u32 RxBcnNum[RT_MAX_LD_SLOT_NUM];
u32 RxDataNum[RT_MAX_LD_SLOT_NUM];
- u16 SlotNum;
+ u16 slot_num;
u16 slot_index;

u32 num_tx_ok_in_period;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 9a9b8f63218b..d7edfa1dca65 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1072,7 +1072,7 @@ static void rtllib_associate_complete_wq(void *data)
ieee->ht_info->enable_ht);
memset(ieee->dot11ht_oper_rate_set, 0, 16);
}
- ieee->link_detect_info.SlotNum = 2 * (1 +
+ ieee->link_detect_info.slot_num = 2 * (1 +
ieee->current_network.beacon_interval /
500);
if (ieee->link_detect_info.NumRecvBcnInPeriod == 0 ||
@@ -2073,7 +2073,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
ieee->seq_ctrl[i] = 0;

ieee->link_detect_info.slot_index = 0;
- ieee->link_detect_info.SlotNum = 2;
+ ieee->link_detect_info.slot_num = 2;
ieee->link_detect_info.NumRecvBcnInPeriod = 0;
ieee->link_detect_info.NumRecvDataInPeriod = 0;
ieee->link_detect_info.num_tx_ok_in_period = 0;
--
2.39.2


2024-01-06 05:59:48

by Tree Davies

[permalink] [raw]
Subject: [PATCH 14/21] Staging: rtl8192e: Rename variable RemoveAllTS

Rename variable RemoveAllTS to remove_all_ts 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_softmac.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 7e73d31dcccf..48374cae816d 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -402,7 +402,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *addr)
}
EXPORT_SYMBOL(RemovePeerTS);

-void RemoveAllTS(struct rtllib_device *ieee)
+void remove_all_ts(struct rtllib_device *ieee)
{
struct ts_common_info *ts, *pTmpTS;

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 26ceb579afeb..ed9ca77fbcb9 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1789,7 +1789,7 @@ void rtllib_ts_init(struct rtllib_device *ieee);
void TsStartAddBaProcess(struct rtllib_device *ieee,
struct tx_ts_record *pTxTS);
void RemovePeerTS(struct rtllib_device *ieee, u8 *addr);
-void RemoveAllTS(struct rtllib_device *ieee);
+void remove_all_ts(struct rtllib_device *ieee);

static inline const char *escape_essid(const char *essid, u8 essid_len)
{
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index d7edfa1dca65..b9750c9b3952 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2002,7 +2002,7 @@ void rtllib_stop_protocol(struct rtllib_device *ieee)
rtllib_disassociate(ieee);
}

- RemoveAllTS(ieee);
+ remove_all_ts(ieee);
ieee->proto_stoppping = 0;

kfree(ieee->assocreq_ies);
--
2.39.2


2024-01-06 06:00:04

by Tree Davies

[permalink] [raw]
Subject: [PATCH 15/21] Staging: rtl8192e: Rename function RemovePeerTS()

Rename function RemovePeerTS to remove_peer_ts to fix checkpatch warning Avoid
CamelCase.

Signed-off-by: Tree Davies <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 4 ++--
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 4 ++--
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 f4e48b4a122d..e499f96e9010 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1032,7 +1032,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)

ieee->link_state = RTLLIB_ASSOCIATING;

- RemovePeerTS(priv->rtllib,
+ remove_peer_ts(priv->rtllib,
priv->rtllib->current_network.bssid);
ieee->is_roaming = true;
ieee->is_set_key = false;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 48374cae816d..e9a193b5ab10 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -360,7 +360,7 @@ static void RemoveTsEntry(struct rtllib_device *ieee,
}
}

-void RemovePeerTS(struct rtllib_device *ieee, u8 *addr)
+void remove_peer_ts(struct rtllib_device *ieee, u8 *addr)
{
struct ts_common_info *ts, *pTmpTS;

@@ -400,7 +400,7 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *addr)
}
}
}
-EXPORT_SYMBOL(RemovePeerTS);
+EXPORT_SYMBOL(remove_peer_ts);

void remove_all_ts(struct rtllib_device *ieee)
{
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ed9ca77fbcb9..d20a1809cffd 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1788,7 +1788,7 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8
void rtllib_ts_init(struct rtllib_device *ieee);
void TsStartAddBaProcess(struct rtllib_device *ieee,
struct tx_ts_record *pTxTS);
-void RemovePeerTS(struct rtllib_device *ieee, u8 *addr);
+void remove_peer_ts(struct rtllib_device *ieee, u8 *addr);
void remove_all_ts(struct rtllib_device *ieee);

static inline const char *escape_essid(const char *essid, u8 essid_len)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index b9750c9b3952..ff43697768cb 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1736,7 +1736,7 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
ieee->is_roaming = true;
ieee->link_detect_info.busy_traffic = false;
rtllib_disassociate(ieee);
- RemovePeerTS(ieee, header->addr2);
+ remove_peer_ts(ieee, header->addr2);
if (!(ieee->rtllib_ap_sec_type(ieee) &
(SEC_ALG_CCMP | SEC_ALG_TKIP)))
schedule_delayed_work(
@@ -2247,7 +2247,7 @@ static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib,
u8 i;
u8 op_mode;

- RemovePeerTS(rtllib, asSta);
+ remove_peer_ts(rtllib, asSta);

if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) {
rtllib->link_state = MAC80211_NOLINK;
--
2.39.2


2024-01-06 06:01:00

by Tree Davies

[permalink] [raw]
Subject: [PATCH 19/21] Staging: rtl8192e: Rename variable PMKCacheIdx

Rename variable PMKCacheIdx to pmk_cache_idx to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 5305486c9594..533af4b28aa7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -700,7 +700,7 @@ rtllib_association_req(struct rtllib_network *beacon,
unsigned int cxvernum_ie_len = 0;
struct lib80211_crypt_data *crypt;
int encrypt;
- int PMKCacheIdx;
+ int pmk_cache_idx;

unsigned int rate_len = (beacon->rates_len ?
(beacon->rates_len + 2) : 0) +
@@ -748,8 +748,8 @@ rtllib_association_req(struct rtllib_network *beacon,
if (beacon->BssCcxVerNumber >= 2)
cxvernum_ie_len = 5 + 2;

- PMKCacheIdx = SecIsInPMKIDList(ieee, ieee->current_network.bssid);
- if (PMKCacheIdx >= 0) {
+ pmk_cache_idx = SecIsInPMKIDList(ieee, ieee->current_network.bssid);
+ if (pmk_cache_idx >= 0) {
wpa_ie_len += 18;
netdev_info(ieee->dev, "[PMK cache]: WPA2 IE length: %x\n",
wpa_ie_len);
@@ -878,11 +878,11 @@ rtllib_association_req(struct rtllib_network *beacon,
if (wpa_ie_len) {
skb_put_data(skb, ieee->wpa_ie, ieee->wpa_ie_len);

- if (PMKCacheIdx >= 0) {
+ if (pmk_cache_idx >= 0) {
tag = skb_put(skb, 18);
*tag = 1;
*(tag + 1) = 0;
- memcpy((tag + 2), &ieee->PMKIDList[PMKCacheIdx].PMKID,
+ memcpy((tag + 2), &ieee->PMKIDList[pmk_cache_idx].PMKID,
16);
}
}
--
2.39.2


2024-01-06 06:06:14

by Tree Davies

[permalink] [raw]
Subject: [PATCH 17/21] Staging: rtl8192e: Rename function SendDisassociation()

Rename function SendDisassociation to send_disassociation to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d20a1809cffd..c453af8dec47 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1662,7 +1662,7 @@ int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb,
void rtllib_softmac_new_net(struct rtllib_device *ieee,
struct rtllib_network *net);

-void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn);
+void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn);
void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee);

int rtllib_softmac_init(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 7c5056f9f6f5..b422ffbf0cbc 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1998,7 +1998,7 @@ void rtllib_stop_protocol(struct rtllib_device *ieee)

if (ieee->link_state == MAC80211_LINKED) {
if (ieee->iw_mode == IW_MODE_INFRA)
- SendDisassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING);
+ send_disassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING);
rtllib_disassociate(ieee);
}

@@ -2199,7 +2199,7 @@ rtllib_disassociate_skb(struct rtllib_network *beacon,
return skb;
}

-void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn)
+void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn)
{
struct rtllib_network *beacon = &ieee->current_network;
struct sk_buff *skb;
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index f92ec0faf4d5..55a3e4222cd6 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -636,7 +636,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee,

ieee->cannot_notify = true;

- SendDisassociation(ieee, deauth, mlme->reason_code);
+ send_disassociation(ieee, deauth, mlme->reason_code);
rtllib_disassociate(ieee);

ieee->wap_set = 0;
--
2.39.2


2024-01-06 06:06:15

by Tree Davies

[permalink] [raw]
Subject: [PATCH 16/21] Staging: rtl8192e: Rename function rtllib_MlmeDisassociateRequest()

Rename function rtllib_MlmeDisassociateRequest to
rtllib_mlme_disassociate_request to fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index ff43697768cb..7c5056f9f6f5 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2241,7 +2241,7 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee)
}
}

-static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib,
+static void rtllib_mlme_disassociate_request(struct rtllib_device *rtllib,
u8 *asSta, u8 asRsn)
{
u8 i;
@@ -2272,7 +2272,7 @@ static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 asRsn)
filter_out_nonassociated_bssid = false;
rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_CECHK_BSSID,
(u8 *)(&filter_out_nonassociated_bssid));
- rtllib_MlmeDisassociateRequest(rtllib, rtllib->current_network.bssid,
+ rtllib_mlme_disassociate_request(rtllib, rtllib->current_network.bssid,
asRsn);

rtllib->link_state = MAC80211_NOLINK;
--
2.39.2


2024-01-06 06:11:12

by Tree Davies

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

Rename variable AsocRetryCount to asoc_retry_count to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 2d753a159358..0fdc767d43e0 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1381,7 +1381,7 @@ struct rtllib_device {
struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM];
int mgmt_queue_head;
int mgmt_queue_tail;
- u8 AsocRetryCount;
+ u8 asoc_retry_count;
struct sk_buff_head skb_waitq[MAX_QUEUE_SIZE];

bool bdynamic_txpower_enable;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index b9b79f6b0c08..9d1e9b780bc7 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1216,7 +1216,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
ieee->wmm_acm = 0;
if (ieee->iw_mode == IW_MODE_INFRA) {
/* Join the network for the first time */
- ieee->AsocRetryCount = 0;
+ ieee->asoc_retry_count = 0;
if ((ieee->current_network.qos_data.supported == 1) &&
ieee->current_network.bssht.bd_support_ht)
ht_reset_self_and_save_peer_setting(ieee,
@@ -1319,10 +1319,10 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb,
status_code == WLAN_STATUS_CAPS_UNSUPPORTED) &&
((ieee->mode == WIRELESS_MODE_G) &&
(ieee->current_network.mode == WIRELESS_MODE_N_24G) &&
- (ieee->AsocRetryCount++ < (RT_ASOC_RETRY_LIMIT - 1)))) {
+ (ieee->asoc_retry_count++ < (RT_ASOC_RETRY_LIMIT - 1)))) {
ieee->ht_info->iot_action |= HT_IOT_ACT_PURE_N_MODE;
} else {
- ieee->AsocRetryCount = 0;
+ ieee->asoc_retry_count = 0;
}

return le16_to_cpu(response_head->status);
@@ -1634,7 +1634,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
netdev_info(ieee->dev,
"Association response status code 0x%x\n",
errcode);
- if (ieee->AsocRetryCount < RT_ASOC_RETRY_LIMIT)
+ if (ieee->asoc_retry_count < RT_ASOC_RETRY_LIMIT)
schedule_delayed_work(&ieee->associate_procedure_wq, 0);
else
rtllib_associate_abort(ieee);
--
2.39.2


2024-01-06 06:11:14

by Tree Davies

[permalink] [raw]
Subject: [PATCH 20/21] Staging: rtl8192e: Rename function GetNmodeSupportBySecCfg()

Rename function GetNmodeSupportBySecCfg to get_nmode_support_by_sec_cfg
fix checkpatch warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index e499f96e9010..76aacd27e157 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -656,7 +656,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->enter_sleep_state = rtl92e_enter_sleep;
priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty;

- priv->rtllib->GetNmodeSupportBySecCfg = rtl92e_get_nmode_support_by_sec;
+ priv->rtllib->get_nmode_support_by_sec_cfg = rtl92e_get_nmode_support_by_sec;
priv->rtllib->GetHalfNmodeSupportByAPsHandler =
rtl92e_is_halfn_supported_by_ap;

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index c453af8dec47..2d753a159358 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1484,7 +1484,7 @@ struct rtllib_device {
void (*set_bw_mode_handler)(struct net_device *dev,
enum ht_channel_width bandwidth,
enum ht_extchnl_offset Offset);
- bool (*GetNmodeSupportBySecCfg)(struct net_device *dev);
+ bool (*get_nmode_support_by_sec_cfg)(struct net_device *dev);
void (*set_wireless_mode)(struct net_device *dev, u8 wireless_mode);
bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 533af4b28aa7..b9b79f6b0c08 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1664,7 +1664,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
ieee->link_state = RTLLIB_ASSOCIATING_AUTHENTICATED;
ieee->softmac_stats.rx_auth_rs_ok++;
if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) {
- if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
+ if (!ieee->get_nmode_support_by_sec_cfg(ieee->dev)) {
if (is_ht_half_nmode_aps(ieee)) {
support_nmode = true;
half_support_nmode = true;
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index f1e9a0390be0..b82f3415085b 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -286,7 +286,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
if (ht_info->iot_action & HT_IOT_ACT_TX_NO_AGGREGATION)
return;

- if (!ieee->GetNmodeSupportBySecCfg(ieee->dev))
+ if (!ieee->get_nmode_support_by_sec_cfg(ieee->dev))
return;
if (ht_info->current_ampdu_enable) {
if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), hdr->addr1,
--
2.39.2


2024-01-06 06:15:57

by Tree Davies

[permalink] [raw]
Subject: [PATCH 18/21] Staging: rtl8192e: Rename variable bHalfSupportNmode

Rename variable bHalfSupportNmode to half_support_nmode to fix checkpatch
warning Avoid CamelCase.

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

diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index b422ffbf0cbc..5305486c9594 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1648,7 +1648,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
int errcode;
u8 *challenge;
int chlen = 0;
- bool support_nmode = true, bHalfSupportNmode = false;
+ bool support_nmode = true, half_support_nmode = false;

errcode = auth_parse(ieee->dev, skb, &challenge, &chlen);

@@ -1667,10 +1667,10 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) {
if (is_ht_half_nmode_aps(ieee)) {
support_nmode = true;
- bHalfSupportNmode = true;
+ half_support_nmode = true;
} else {
support_nmode = false;
- bHalfSupportNmode = false;
+ half_support_nmode = false;
}
}
}
@@ -1684,7 +1684,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
}

if ((ieee->current_network.mode == WIRELESS_MODE_N_24G) &&
- bHalfSupportNmode) {
+ half_support_nmode) {
netdev_info(ieee->dev, "======>enter half N mode\n");
ieee->bHalfWirelessN24GMode = true;
} else {
--
2.39.2


2024-01-06 12:47:14

by Philipp Hortmann

[permalink] [raw]
Subject: Re: [PATCH 00/21] Staging: rtl8192e: checkpatch fixes for rtllib_softmac.c

On 1/6/24 06:55, Tree Davies wrote:
> This series' focus is on fixing checkpatch warnings regarding
> drivers/staging/rtl8192e/rtllib_softmac.c
>
> Thank you in advance to reviewers
> ~ Tree
>
> Tree Davies (21):
> Staging: rtl8192e: Remove unnecessary parenthesis in
> rtllib_softmac_new_net()
> Staging: rtl8192e: Rename variable SlotIndex
> Staging: rtl8192e: Rename function rtllib_MgntDisconnectAP()
> Staging: rtl8192e: Rename variable bMulticast
> Staging: rtl8192e: Rename variable MaxPeriod
> Staging: rtl8192e: Rename variable bAwakePktSent
> Staging: rtl8192e: Rename variable bSupportNmode
> Staging: rtl8192e: Rename variable bBusyTraffic
> Staging: rtl8192e: Rename function rtllib_MgntDisconnect()
> Staging: rtl8192e: Rename variable bFilterOutNonAssociatedBSSID
> Staging: rtl8192e: Rename variable array Bssid
> Staging: rtl8192e: Rename variable NumRxUnicastOkInPeriod
> Staging: rtl8192e: Rename variable SlotNum
> Staging: rtl8192e: Rename variable RemoveAllTS
> Staging: rtl8192e: Rename function RemovePeerTS()
> Staging: rtl8192e: Rename function rtllib_MlmeDisassociateRequest()
> Staging: rtl8192e: Rename function SendDisassociation()
> Staging: rtl8192e: Rename variable bHalfSupportNmode
> Staging: rtl8192e: Rename variable PMKCacheIdx
> Staging: rtl8192e: Rename function GetNmodeSupportBySecCfg()
> Staging: rtl8192e: Rename variable AsocRetryCount
>
> .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 +-
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 32 +++----
> drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +-
> drivers/staging/rtl8192e/rtl819x_TSProc.c | 6 +-
> drivers/staging/rtl8192e/rtllib.h | 26 +++---
> drivers/staging/rtl8192e/rtllib_rx.c | 6 +-
> drivers/staging/rtl8192e/rtllib_softmac.c | 86 +++++++++----------
> drivers/staging/rtl8192e/rtllib_tx.c | 10 +--
> drivers/staging/rtl8192e/rtllib_wx.c | 2 +-
> 9 files changed, 89 insertions(+), 89 deletions(-)
>

Is working fine on hardware.

Bye Philipp