Staging: rtl8192e: Rename variable pBA

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

Signed-off-by: Tree Davies <tdavies@darkphysics.net>
Link: https://lore.kernel.org/r/20231003031849.176743-4-tdavies@darkphysics.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tree Davies 2023-10-02 20:18:49 -07:00 committed by Greg Kroah-Hartman
parent 782bfb0624
commit d459c3c0cb
2 changed files with 51 additions and 51 deletions

View File

@ -10,17 +10,17 @@
#include "rtllib.h" #include "rtllib.h"
#include "rtl819x_BA.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) 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; ba->b_valid = false;
del_timer_sync(&pBA->timer); del_timer_sync(&ba->timer);
} }
static u8 tx_ts_delete_ba(struct rtllib_device *ieee, struct tx_ts_record *pTxTs) 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; return bSendDELBA;
} }
void rtllib_reset_ba_entry(struct ba_record *pBA) void rtllib_reset_ba_entry(struct ba_record *ba)
{ {
pBA->b_valid = false; ba->b_valid = false;
pBA->ba_param_set.short_data = 0; ba->ba_param_set.short_data = 0;
pBA->ba_timeout_value = 0; ba->ba_timeout_value = 0;
pBA->dialog_token = 0; ba->dialog_token = 0;
pBA->ba_start_seq_ctrl.short_data = 0; ba->ba_start_seq_ctrl.short_data = 0;
} }
static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst, 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) u16 status_code, u8 type)
{ {
struct sk_buff *skb = NULL; 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", netdev_dbg(ieee->dev, "%s(): frame(%d) sentd to: %pM, ieee->dev:%p\n",
__func__, type, dst, ieee->dev); __func__, type, dst, ieee->dev);
if (!pBA) { if (!ba) {
netdev_warn(ieee->dev, "pBA is NULL\n"); netdev_warn(ieee->dev, "ba is NULL\n");
return NULL; return NULL;
} }
skb = dev_alloc_skb(len + sizeof(struct ieee80211_hdr_3addr)); 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 = skb_put(skb, 9);
*tag++ = ACT_CAT_BA; *tag++ = ACT_CAT_BA;
*tag++ = type; *tag++ = type;
*tag++ = pBA->dialog_token; *tag++ = ba->dialog_token;
if (type == ACT_ADDBARSP) { if (type == ACT_ADDBARSP) {
put_unaligned_le16(status_code, tag); put_unaligned_le16(status_code, tag);
tag += 2; tag += 2;
} }
put_unaligned_le16(pBA->ba_param_set.short_data, tag); put_unaligned_le16(ba->ba_param_set.short_data, tag);
tag += 2; tag += 2;
put_unaligned_le16(pBA->ba_timeout_value, tag); put_unaligned_le16(ba->ba_timeout_value, tag);
tag += 2; tag += 2;
if (type == ACT_ADDBAREQ) { if (type == ACT_ADDBAREQ) {
memcpy(tag, (u8 *)&pBA->ba_start_seq_ctrl, 2); memcpy(tag, (u8 *)&ba->ba_start_seq_ctrl, 2);
tag += 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, 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) enum tr_select TxRxSelect, u16 ReasonCode)
{ {
union delba_param_set DelbaParamSet; 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); memset(&DelbaParamSet, 0, 2);
DelbaParamSet.field.initiator = (TxRxSelect == TX_DIR) ? 1 : 0; 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)); skb = dev_alloc_skb(len + sizeof(struct ieee80211_hdr_3addr));
if (!skb) 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, static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst,
struct ba_record *pBA) struct ba_record *ba)
{ {
struct sk_buff *skb; struct sk_buff *skb;
skb = rtllib_ADDBA(ieee, dst, pBA, 0, ACT_ADDBAREQ); skb = rtllib_ADDBA(ieee, dst, ba, 0, ACT_ADDBAREQ);
if (skb) if (skb)
softmac_mgmt_xmit(skb, ieee); 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, 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; 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) if (skb)
softmac_mgmt_xmit(skb, ieee); softmac_mgmt_xmit(skb, ieee);
else 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, 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) u16 ReasonCode)
{ {
struct sk_buff *skb; struct sk_buff *skb;
skb = rtllib_DELBA(ieee, dst, pBA, TxRxSelect, ReasonCode); skb = rtllib_DELBA(ieee, dst, ba, TxRxSelect, ReasonCode);
if (skb) if (skb)
softmac_mgmt_xmit(skb, ieee); softmac_mgmt_xmit(skb, ieee);
else else
@ -216,7 +216,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
struct ieee80211_hdr_3addr *req = NULL; struct ieee80211_hdr_3addr *req = NULL;
u16 rc = 0; u16 rc = 0;
u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL; u8 *dst = NULL, *pDialogToken = NULL, *tag = NULL;
struct ba_record *pBA = NULL; struct ba_record *ba = NULL;
union ba_param_set *pBaParamSet = NULL; union ba_param_set *pBaParamSet = NULL;
u16 *pBaTimeoutVal = NULL; u16 *pBaTimeoutVal = NULL;
union sequence_control *pBaStartSeqCtrl = 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__); netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__);
goto OnADDBAReq_Fail; goto OnADDBAReq_Fail;
} }
pBA = &ts->rx_admitted_ba_record; ba = &ts->rx_admitted_ba_record;
if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) { if (pBaParamSet->field.ba_policy == BA_POLICY_DELAYED) {
rc = ADDBA_STATUS_INVALID_PARAM; 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); rtllib_FlushRxTsPendingPkts(ieee, ts);
deactivate_ba_entry(ieee, pBA); deactivate_ba_entry(ieee, ba);
pBA->dialog_token = *pDialogToken; ba->dialog_token = *pDialogToken;
pBA->ba_param_set = *pBaParamSet; ba->ba_param_set = *pBaParamSet;
pBA->ba_timeout_value = *pBaTimeoutVal; ba->ba_timeout_value = *pBaTimeoutVal;
pBA->ba_start_seq_ctrl = *pBaStartSeqCtrl; ba->ba_start_seq_ctrl = *pBaStartSeqCtrl;
if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) || if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) ||
(ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) (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 else
pBA->ba_param_set.field.buffer_size = 32; ba->ba_param_set.field.buffer_size = 32;
activate_ba_entry(pBA, 0); activate_ba_entry(ba, 0);
rtllib_send_ADDBARsp(ieee, dst, pBA, ADDBA_STATUS_SUCCESS); rtllib_send_ADDBARsp(ieee, dst, ba, ADDBA_STATUS_SUCCESS);
return 0; 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, void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *pTS,
u8 policy, u8 bOverwritePending) 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; return;
deactivate_ba_entry(ieee, pBA); deactivate_ba_entry(ieee, ba);
pBA->dialog_token++; ba->dialog_token++;
pBA->ba_param_set.field.amsdu_support = 0; ba->ba_param_set.field.amsdu_support = 0;
pBA->ba_param_set.field.ba_policy = policy; ba->ba_param_set.field.ba_policy = policy;
pBA->ba_param_set.field.tid = pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID; ba->ba_param_set.field.tid = pTS->TsCommonInfo.TSpec.f.TSInfo.field.ucTSID;
pBA->ba_param_set.field.buffer_size = 32; ba->ba_param_set.field.buffer_size = 32;
pBA->ba_timeout_value = 0; ba->ba_timeout_value = 0;
pBA->ba_start_seq_ctrl.field.seq_num = (pTS->TxCurSeq + 3) % 4096; 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, void rtllib_ts_init_del_ba(struct rtllib_device *ieee,

View File

@ -1814,7 +1814,7 @@ void rtllib_ts_init_del_ba(struct rtllib_device *ieee,
void rtllib_ba_setup_timeout(struct timer_list *t); void rtllib_ba_setup_timeout(struct timer_list *t);
void rtllib_tx_ba_inact_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_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, bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr,
u8 TID, enum tr_select TxRxSelect, bool bAddNewTs); u8 TID, enum tr_select TxRxSelect, bool bAddNewTs);
void rtllib_ts_init(struct rtllib_device *ieee); void rtllib_ts_init(struct rtllib_device *ieee);