[PATCH 4/4] Staging: rtl8192e: Rename variable pTS

From: Tree Davies
Date: Sat Oct 14 2023 - 00:40:15 EST


Rename variable pTS to ts to fix checkpatch warning
Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@xxxxxxxxxxxxxxx>
---
drivers/staging/rtl8192e/rtl819x_BAProc.c | 26 +++----
drivers/staging/rtl8192e/rtl819x_TSProc.c | 94 +++++++++++------------
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_tx.c | 8 +-
4 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 34fc400035c8..93b566482149 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -304,7 +304,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
{
struct ieee80211_hdr_3addr *rsp = NULL;
struct ba_record *pending_ba, *pAdmittedBA;
- struct tx_ts_record *pTS = NULL;
+ struct tx_ts_record *ts = NULL;
u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
u16 *status_code = NULL, *pBaTimeoutVal = NULL;
union ba_param_set *pBaParamSet = NULL;
@@ -337,16 +337,16 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
goto OnADDBARsp_Reject;
}

- if (!rtllib_get_ts(ieee, (struct ts_common_info **)&pTS, dst,
+ if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst,
(u8)(pBaParamSet->field.tid), TX_DIR, false)) {
netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
reason_code = DELBA_REASON_UNKNOWN_BA;
goto OnADDBARsp_Reject;
}

- pTS->bAddBaReqInProgress = false;
- pending_ba = &pTS->TxPendingBARecord;
- pAdmittedBA = &pTS->TxAdmittedBARecord;
+ ts->bAddBaReqInProgress = false;
+ pending_ba = &ts->TxPendingBARecord;
+ pAdmittedBA = &ts->TxAdmittedBARecord;

if (pAdmittedBA->b_valid) {
netdev_dbg(ieee->dev, "%s(): ADDBA response already admitted\n",
@@ -368,7 +368,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)

if (*status_code == ADDBA_STATUS_SUCCESS) {
if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
- pTS->bAddBaReqDelayed = true;
+ ts->bAddBaReqDelayed = true;
deactivate_ba_entry(ieee, pAdmittedBA);
reason_code = DELBA_REASON_END_BA;
goto OnADDBARsp_Reject;
@@ -381,8 +381,8 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb)
deactivate_ba_entry(ieee, pAdmittedBA);
activate_ba_entry(pAdmittedBA, *pBaTimeoutVal);
} else {
- pTS->bAddBaReqDelayed = true;
- pTS->bDisable_AddBa = true;
+ ts->bAddBaReqDelayed = true;
+ ts->bDisable_AddBa = true;
reason_code = DELBA_REASON_END_BA;
goto OnADDBARsp_Reject;
}
@@ -461,10 +461,10 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb)
return 0;
}

-void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *pTS,
+void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts,
u8 policy, u8 bOverwritePending)
{
- struct ba_record *ba = &pTS->TxPendingBARecord;
+ struct ba_record *ba = &ts->TxPendingBARecord;

if (ba->b_valid && !bOverwritePending)
return;
@@ -474,14 +474,14 @@ void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *pTS,
ba->dialog_token++;
ba->ba_param_set.field.amsdu_support = 0;
ba->ba_param_set.field.ba_policy = policy;
- ba->ba_param_set.field.tid = pTS->TsCommonInfo.TSpec.f.ts_info.field.ucTSID;
+ ba->ba_param_set.field.tid = ts->TsCommonInfo.TSpec.f.ts_info.field.ucTSID;
ba->ba_param_set.field.buffer_size = 32;
ba->ba_timeout_value = 0;
- ba->ba_start_seq_ctrl.field.seq_num = (pTS->TxCurSeq + 3) % 4096;
+ ba->ba_start_seq_ctrl.field.seq_num = (ts->TxCurSeq + 3) % 4096;

activate_ba_entry(ba, BA_SETUP_TIMEOUT);

- rtllib_send_ADDBAReq(ieee, pTS->TsCommonInfo.addr, ba);
+ rtllib_send_ADDBAReq(ieee, ts->TsCommonInfo.addr, ba);
}

void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 16d5164e860d..95e735c078e4 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -100,16 +100,16 @@ static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
pTsCommonInfo->TClasNum = 0;
}

-static void ResetTxTsEntry(struct tx_ts_record *pTS)
+static void ResetTxTsEntry(struct tx_ts_record *ts)
{
- ResetTsCommonInfo(&pTS->TsCommonInfo);
- pTS->TxCurSeq = 0;
- pTS->bAddBaReqInProgress = false;
- pTS->bAddBaReqDelayed = false;
- pTS->bUsingBa = false;
- pTS->bDisable_AddBa = false;
- rtllib_reset_ba_entry(&pTS->TxAdmittedBARecord);
- rtllib_reset_ba_entry(&pTS->TxPendingBARecord);
+ ResetTsCommonInfo(&ts->TsCommonInfo);
+ ts->TxCurSeq = 0;
+ ts->bAddBaReqInProgress = false;
+ ts->bAddBaReqDelayed = false;
+ ts->bUsingBa = false;
+ ts->bDisable_AddBa = false;
+ rtllib_reset_ba_entry(&ts->TxAdmittedBARecord);
+ rtllib_reset_ba_entry(&ts->TxPendingBARecord);
}

static void ResetRxTsEntry(struct rx_ts_record *ts)
@@ -382,41 +382,41 @@ static void RemoveTsEntry(struct rtllib_device *ieee,

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

netdev_info(ieee->dev, "===========>%s, %pM\n", __func__, addr);

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
- if (memcmp(pTS->addr, addr, 6) == 0) {
- RemoveTsEntry(ieee, pTS, TX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
+ if (memcmp(ts->addr, addr, 6) == 0) {
+ RemoveTsEntry(ieee, ts, TX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List);
}
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
- if (memcmp(pTS->addr, addr, 6) == 0) {
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
+ if (memcmp(ts->addr, addr, 6) == 0) {
netdev_info(ieee->dev,
"====>remove Tx_TS_admin_list\n");
- RemoveTsEntry(ieee, pTS, TX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
+ RemoveTsEntry(ieee, ts, TX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List);
}
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Pending_List, List) {
- if (memcmp(pTS->addr, addr, 6) == 0) {
- RemoveTsEntry(ieee, pTS, RX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, List) {
+ if (memcmp(ts->addr, addr, 6) == 0) {
+ RemoveTsEntry(ieee, ts, RX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List);
}
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Admit_List, List) {
- if (memcmp(pTS->addr, addr, 6) == 0) {
- RemoveTsEntry(ieee, pTS, RX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, List) {
+ if (memcmp(ts->addr, addr, 6) == 0) {
+ RemoveTsEntry(ieee, ts, RX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List);
}
}
}
@@ -424,30 +424,30 @@ EXPORT_SYMBOL(RemovePeerTS);

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

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
- RemoveTsEntry(ieee, pTS, TX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Pending_List, List) {
+ RemoveTsEntry(ieee, ts, TX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List);
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
- RemoveTsEntry(ieee, pTS, TX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Tx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Tx_TS_Admit_List, List) {
+ RemoveTsEntry(ieee, ts, TX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Tx_TS_Unused_List);
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Pending_List, List) {
- RemoveTsEntry(ieee, pTS, RX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Pending_List, List) {
+ RemoveTsEntry(ieee, ts, RX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List);
}

- list_for_each_entry_safe(pTS, pTmpTS, &ieee->Rx_TS_Admit_List, List) {
- RemoveTsEntry(ieee, pTS, RX_DIR);
- list_del_init(&pTS->List);
- list_add_tail(&pTS->List, &ieee->Rx_TS_Unused_List);
+ list_for_each_entry_safe(ts, pTmpTS, &ieee->Rx_TS_Admit_List, List) {
+ RemoveTsEntry(ieee, ts, RX_DIR);
+ list_del_init(&ts->List);
+ list_add_tail(&ts->List, &ieee->Rx_TS_Unused_List);
}
}

diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b12a39ecdd9d..64a846af8679 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1788,7 +1788,7 @@ u16 TxCountToDataRate(struct rtllib_device *ieee, u8 nDataRate);
int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
-void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *pTS,
+void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts,
u8 policy, u8 bOverwritePending);
void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
struct ts_common_info *pTsCommonInfo,
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 8d8ce22c5f09..9bf679438ad1 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -495,13 +495,13 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,
if (is_multicast_ether_addr(dst))
return 0;
if (IsQoSDataFrame(skb->data)) {
- struct tx_ts_record *pTS = NULL;
+ struct tx_ts_record *ts = NULL;

- if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&pTS), dst,
+ if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), dst,
skb->priority, TX_DIR, true))
return 0;
- seqnum = pTS->TxCurSeq;
- pTS->TxCurSeq = (pTS->TxCurSeq + 1) % 4096;
+ seqnum = ts->TxCurSeq;
+ ts->TxCurSeq = (ts->TxCurSeq + 1) % 4096;
return seqnum;
}
return 0;
--
2.39.2