[PATCH 3/3] Staging: rtl8192e: Rename variable pBA

From: Tree Davies
Date: Mon Oct 02 2023 - 23:14:51 EST


Rename variable pBA to ba to fix checkpatch warning Avoid CamelCase.

Signed-off-by: Tree Davies <tdavies@xxxxxxxxxxxxxxx>
---
drivers/staging/rtl8192e/rtl819x_BAProc.c | 100 +++++++++++-----------
drivers/staging/rtl8192e/rtllib.h | 2 +-
2 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 15e4b83af234..ec8edfecdb73 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -10,17 +10,17 @@
#include "rtllib.h"
#include "rtl819x_BA.h"

-static void activate_ba_entry(struct ba_record *pBA, u16 time)
+static void activate_ba_entry(struct ba_record *ba, u16 time)
{
- pBA->b_valid = true;
+ ba->b_valid = true;
if (time != 0)
- mod_timer(&pBA->timer, jiffies + msecs_to_jiffies(time));
+ mod_timer(&ba->timer, jiffies + msecs_to_jiffies(time));
}

-static void deactivate_ba_entry(struct rtllib_device *ieee, struct ba_record *pBA)
+static void deactivate_ba_entry(struct rtllib_device *ieee, struct ba_record *ba)
{
- pBA->b_valid = false;
- del_timer_sync(&pBA->timer);
+ ba->b_valid = false;
+ del_timer_sync(&ba->timer);
}

static u8 tx_ts_delete_ba(struct rtllib_device *ieee, struct tx_ts_record *pTxTs)
@@ -54,17 +54,17 @@ static u8 rx_ts_delete_ba(struct rtllib_device *ieee, struct rx_ts_record *ts)
return bSendDELBA;
}

-void rtllib_reset_ba_entry(struct ba_record *pBA)
+void rtllib_reset_ba_entry(struct ba_record *ba)
{
- pBA->b_valid = false;
- pBA->ba_param_set.short_data = 0;
- pBA->ba_timeout_value = 0;
- pBA->dialog_token = 0;
- pBA->ba_start_seq_ctrl.short_data = 0;
+ ba->b_valid = false;
+ ba->ba_param_set.short_data = 0;
+ ba->ba_timeout_value = 0;
+ ba->dialog_token = 0;
+ ba->ba_start_seq_ctrl.short_data = 0;
}

static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst,
- struct ba_record *pBA,
+ struct ba_record *ba,
u16 status_code, u8 type)
{
struct sk_buff *skb = NULL;
@@ -75,8 +75,8 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst,
netdev_dbg(ieee->dev, "%s(): frame(%d) sentd to: %pM, ieee->dev:%p\n",
__func__, type, dst, ieee->dev);

- if (!pBA) {
- netdev_warn(ieee->dev, "pBA is NULL\n");
+ if (!ba) {
+ netdev_warn(ieee->dev, "ba is NULL\n");
return NULL;
}
skb = dev_alloc_skb(len + sizeof(struct ieee80211_hdr_3addr));
@@ -98,21 +98,21 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst,
tag = skb_put(skb, 9);
*tag++ = ACT_CAT_BA;
*tag++ = type;
- *tag++ = pBA->dialog_token;
+ *tag++ = ba->dialog_token;

if (type == ACT_ADDBARSP) {
put_unaligned_le16(status_code, tag);
tag += 2;
}

- put_unaligned_le16(pBA->ba_param_set.short_data, tag);
+ put_unaligned_le16(ba->ba_param_set.short_data, tag);
tag += 2;

- put_unaligned_le16(pBA->ba_timeout_value, tag);
+ put_unaligned_le16(ba->ba_timeout_value, tag);
tag += 2;

if (type == ACT_ADDBAREQ) {
- memcpy(tag, (u8 *)&pBA->ba_start_seq_ctrl, 2);
+ memcpy(tag, (u8 *)&ba->ba_start_seq_ctrl, 2);
tag += 2;
}

@@ -124,7 +124,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst,
}

static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
- struct ba_record *pBA,
+ struct ba_record *ba,
enum tr_select TxRxSelect, u16 ReasonCode)
{
union delba_param_set DelbaParamSet;
@@ -140,7 +140,7 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
memset(&DelbaParamSet, 0, 2);

DelbaParamSet.field.initiator = (TxRxSelect == TX_DIR) ? 1 : 0;
- DelbaParamSet.field.tid = pBA->ba_param_set.field.tid;
+ DelbaParamSet.field.tid = ba->ba_param_set.field.tid;

skb = dev_alloc_skb(len + sizeof(struct ieee80211_hdr_3addr));
if (!skb)
@@ -174,11 +174,11 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
}

static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
- struct ba_record *pBA)
+ struct ba_record *ba)
{
struct sk_buff *skb;

- skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ);
+ skb = rtllib_ADDBA(ieee, dst, ba, 0, ACT_ADDBAREQ);

if (skb)
softmac_mgmt_xmit(skb, ieee);
@@ -187,11 +187,11 @@ static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
}

static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
- struct ba_record *pBA, u16 status_code)
+ struct ba_record *ba, u16 status_code)
{
struct sk_buff *skb;

- skb = rtllib_ADDBA(ieee, dst, pBA, status_code, ACT_ADDBARSP);
+ skb = rtllib_ADDBA(ieee, dst, ba, status_code, ACT_ADDBARSP);
if (skb)
softmac_mgmt_xmit(skb, ieee);
else
@@ -199,12 +199,12 @@ static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst,
}

static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst,
- struct ba_record *pBA, enum tr_select TxRxSelect,
+ struct ba_record *ba, enum tr_select TxRxSelect,
u16 ReasonCode)
{
struct sk_buff *skb;

- skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode);
+ skb = rtllib_DELBA(ieee, dst, ba, TxRxSelect, ReasonCode);
if (skb)
softmac_mgmt_xmit(skb, ieee);
else
@@ -216,7 +216,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
struct ieee80211_hdr_3addr *req = NULL;
u16 rc = 0;
u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
- struct ba_record *pBA = NULL;
+ struct ba_record *ba = NULL;
union ba_param_set *pBaParamSet = NULL;
u16 *pBaTimeoutVal = NULL;
union sequence_control *pBaStartSeqCtrl = NULL;
@@ -259,7 +259,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
goto OnADDBAReq_Fail;
}
- pBA = &ts->rx_admitted_ba_record;
+ ba = &ts->rx_admitted_ba_record;

if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
rc = ADDBA_STATUS_INVALID_PARAM;
@@ -270,20 +270,20 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)

rtllib_FlushRxTsPendingPkts(ieee, ts);

- deactivate_ba_entry(ieee, pBA);
- pBA->dialog_token = *pDialogToken;
- pBA->ba_param_set = *pBaParamSet;
- pBA->ba_timeout_value = *pBaTimeoutVal;
- pBA->ba_start_seq_ctrl = *pBaStartSeqCtrl;
+ deactivate_ba_entry(ieee, ba);
+ ba->dialog_token = *pDialogToken;
+ ba->ba_param_set = *pBaParamSet;
+ ba->ba_timeout_value = *pBaTimeoutVal;
+ ba->ba_start_seq_ctrl = *pBaStartSeqCtrl;

if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) ||
(ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT))
- pBA->ba_param_set.field.buffer_size = 1;
+ ba->ba_param_set.field.buffer_size = 1;
else
- pBA->ba_param_set.field.buffer_size = 32;
+ ba->ba_param_set.field.buffer_size = 32;

- activate_ba_entry(pBA, 0);
- rtllib_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS);
+ activate_ba_entry(ba, 0);
+ rtllib_send_ADDBARsp(ieee, dst, ba, ADDBA_STATUS_SUCCESS);

return 0;

@@ -464,24 +464,24 @@ 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,
u8 policy, u8 bOverwritePending)
{
- struct ba_record *pBA = &pTS->TxPendingBARecord;
+ struct ba_record *ba = &pTS->TxPendingBARecord;

- if (pBA->b_valid && !bOverwritePending)
+ if (ba->b_valid && !bOverwritePending)
return;

- deactivate_ba_entry(ieee, pBA);
+ deactivate_ba_entry(ieee, ba);

- pBA->dialog_token++;
- pBA->ba_param_set.field.amsdu_support = 0;
- pBA->ba_param_set.field.ba_policy = policy;
- pBA->ba_param_set.field.tid = pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
- pBA->ba_param_set.field.buffer_size = 32;
- pBA->ba_timeout_value = 0;
- pBA->ba_start_seq_ctrl.field.seq_num = (pTS->TxCurSeq + 3) % 4096;
+ 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.TSInfo.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;

- activate_ba_entry(pBA, BA_SETUP_TIMEOUT);
+ activate_ba_entry(ba, BA_SETUP_TIMEOUT);

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

void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index bdbd27e382b9..f02f1c96d14a 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1819,7 +1819,7 @@ void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
void rtllib_ba_setup_timeout(struct timer_list *t);
void rtllib_tx_ba_inact_timeout(struct timer_list *t);
void rtllib_rx_ba_inact_timeout(struct timer_list *t);
-void rtllib_reset_ba_entry(struct ba_record *pBA);
+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 TxRxSelect, bool bAddNewTs);
void rtllib_ts_init(struct rtllib_device *ieee);
--
2.39.2