2023-10-27 08:52:42

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 00/10] Type encoding info dropped from array and function names in NIC driver

This patchset series consist of fixes to issues found by checkpatch

Pavan Bobba (10):
staging: vt6655: Type encoding info dropped from array name
"cwRXBCNTSFOff"
staging: vt6655: Type encoding info dropped from function name
"s_vCalculateOFDMRParameter"
staging: vt6655: Type encoding info dropped from variable name
"pbyTxRate"
staging: vt6655: Type encoding info dropped from variable name
"pbyRsvTime"
staging: vt6655: Type encoding info dropped from function name
"CARDbSetPhyParameter"
staging: vt6655: Type encoding info dropped from variable name
"byPacketType"
staging: vt6655: Type encoding info dropped from function name
"CARDbyGetPktType"
staging: vt6655: Type encoding info dropped from function name
"CARDvSetRSPINF"
staging: vt6655: Type encoding info dropped from function name
"CARDbUpdateTSF"
staging: vt6655: Type encoding info dropped from variable name
"byRxRate"

drivers/staging/vt6655/card.c | 118 +++++++++++++--------------
drivers/staging/vt6655/card.h | 10 +--
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 8 +-
4 files changed, 69 insertions(+), 69 deletions(-)

--
2.34.1


2023-10-27 08:52:43

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 01/10] staging: vt6655: Type encoding info dropped from array name "cwRXBCNTSFOff"

array name "cwRXBCNTSFOff" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 079fd01c6780..aa1017d7399c 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -50,7 +50,7 @@

/*--------------------- Static Variables --------------------------*/

-static const unsigned short cwRXBCNTSFOff[MAX_RATE] = {
+static const unsigned short rx_bcn_tsf_off[MAX_RATE] = {
17, 17, 17, 17, 34, 23, 17, 11, 8, 5, 4, 3};

/*--------------------- Static Functions --------------------------*/
@@ -712,7 +712,7 @@ u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2)
{
unsigned short wRxBcnTSFOffst;

- wRxBcnTSFOffst = cwRXBCNTSFOff[byRxRate % MAX_RATE];
+ wRxBcnTSFOffst = rx_bcn_tsf_off[byRxRate % MAX_RATE];

qwTSF2 += (u64)wRxBcnTSFOffst;

--
2.34.1

2023-10-27 08:52:45

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 02/10] staging: vt6655: Type encoding info dropped from function name "s_vCalculateOFDMRParameter"

function name "s_vCalculateOFDMRParameter" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index aa1017d7399c..2968be1f8d4e 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -80,7 +80,7 @@ static void vt6655_mac_set_bb_type(void __iomem *iobase, u32 mask)
*
* Return Value: none
*/
-static void s_vCalculateOFDMRParameter(unsigned char rate,
+static void calculate_ofdmr_parameter(unsigned char rate,
u8 bb_type,
unsigned char *pbyTxRate,
unsigned char *pbyRsvTime)
@@ -585,58 +585,58 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
iowrite32(phy.field_write, priv->port_offset + MAC_REG_RSPINF_B_11);

/* RSPINF_a_6 */
- s_vCalculateOFDMRParameter(RATE_6M,
+ calculate_ofdmr_parameter(RATE_6M,
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_6);
/* RSPINF_a_9 */
- s_vCalculateOFDMRParameter(RATE_9M,
+ calculate_ofdmr_parameter(RATE_9M,
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_9);
/* RSPINF_a_12 */
- s_vCalculateOFDMRParameter(RATE_12M,
+ calculate_ofdmr_parameter(RATE_12M,
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_12);
/* RSPINF_a_18 */
- s_vCalculateOFDMRParameter(RATE_18M,
+ calculate_ofdmr_parameter(RATE_18M,
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_18);
/* RSPINF_a_24 */
- s_vCalculateOFDMRParameter(RATE_24M,
+ calculate_ofdmr_parameter(RATE_24M,
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_24);
/* RSPINF_a_36 */
- s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
+ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv,
RATE_36M),
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_36);
/* RSPINF_a_48 */
- s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
+ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv,
RATE_48M),
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_48);
/* RSPINF_a_54 */
- s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
+ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv,
RATE_54M),
bb_type,
&byTxRate,
&byRsvTime);
iowrite16(MAKEWORD(byTxRate, byRsvTime), priv->port_offset + MAC_REG_RSPINF_A_54);
/* RSPINF_a_72 */
- s_vCalculateOFDMRParameter(CARDwGetOFDMControlRate((void *)priv,
+ calculate_ofdmr_parameter(CARDwGetOFDMControlRate((void *)priv,
RATE_54M),
bb_type,
&byTxRate,
--
2.34.1

2023-10-27 08:53:03

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 06/10] staging: vt6655: Type encoding info dropped from variable name "byPacketType"

variable name "byPacketType" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 2 +-
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 4f73da832b6a..c58a25032a03 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -265,7 +265,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
iowrite8(priv->cw_max_min, priv->port_offset + MAC_REG_CWMAXMIN0);
}

- priv->byPacketType = CARDbyGetPktType(priv);
+ priv->packet_type = CARDbyGetPktType(priv);

CARDvSetRSPINF(priv, bb_type);

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 7773b19a5788..d9ee0b7401fe 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -188,7 +188,7 @@ struct vnt_private {
unsigned char cw_max_min;

u8 byBBType; /* 0:11A, 1:11B, 2:11G */
- u8 byPacketType; /*
+ u8 packet_type; /*
* 0:11a,1:11b,2:11gb (only CCK
* in BasicRate), 3:11ga (OFDM in
* Basic Rate)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index c6627c10a462..17a323800ce9 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -177,7 +177,7 @@ device_set_options(struct vnt_private *priv)
priv->byShortRetryLimit = priv->opts.short_retry;
priv->byLongRetryLimit = priv->opts.long_retry;
priv->byBBType = priv->opts.bbp_type;
- priv->byPacketType = priv->byBBType;
+ priv->packet_type = priv->byBBType;
priv->byAutoFBCtrl = AUTO_FB_0;
priv->update_bbvga = true;
priv->preamble_type = 0;
--
2.34.1

2023-10-27 08:53:07

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 09/10] staging: vt6655: Type encoding info dropped from function name "CARDbUpdateTSF"

function name "CARDbUpdateTSF" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 2 +-
drivers/staging/vt6655/card.h | 2 +-
drivers/staging/vt6655/device_main.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 56beaf6de488..ebb96b4c9406 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -287,7 +287,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
*
* Return Value: none
*/
-bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
+bool card_update_tsf(struct vnt_private *priv, unsigned char byRxRate,
u64 qwBSSTimestamp)
{
u64 local_tsf;
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index b36e276c699b..caf72892c1cd 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -54,7 +54,7 @@ void CARDvSafeResetTx(struct vnt_private *priv);
void CARDvSafeResetRx(struct vnt_private *priv);
void CARDbRadioPowerOff(struct vnt_private *priv);
bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type);
-bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
+bool card_update_tsf(struct vnt_private *priv, unsigned char byRxRate,
u64 qwBSSTimestamp);
bool CARDbSetBeaconPeriod(struct vnt_private *priv,
unsigned short wBeaconInterval);
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 17a323800ce9..7d297526e653 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1534,7 +1534,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BEACON_INFO) &&
priv->op_mode != NL80211_IFTYPE_AP) {
if (vif->cfg.assoc && conf->beacon_rate) {
- CARDbUpdateTSF(priv, conf->beacon_rate->hw_value,
+ card_update_tsf(priv, conf->beacon_rate->hw_value,
conf->sync_tsf);

CARDbSetBeaconPeriod(priv, conf->beacon_int);
--
2.34.1

2023-10-27 08:53:10

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 05/10] staging: vt6655: Type encoding info dropped from function name "CARDbSetPhyParameter"

function name "CARDbSetPhyParameter" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 2 +-
drivers/staging/vt6655/card.h | 2 +-
drivers/staging/vt6655/device_main.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 5fdfc4dc70cc..4f73da832b6a 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -182,7 +182,7 @@ static void calculate_ofdmr_parameter(unsigned char rate,
*
* Return Value: None.
*/
-bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type)
+bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
{
unsigned char cw_max_min = 0;
unsigned char slot = 0;
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 22dc359a6565..8c0d06da952f 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -53,7 +53,7 @@ unsigned char CARDbyGetPktType(struct vnt_private *priv);
void CARDvSafeResetTx(struct vnt_private *priv);
void CARDvSafeResetRx(struct vnt_private *priv);
void CARDbRadioPowerOff(struct vnt_private *priv);
-bool CARDbSetPhyParameter(struct vnt_private *priv, u8 bb_type);
+bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type);
bool CARDbUpdateTSF(struct vnt_private *priv, unsigned char byRxRate,
u64 qwBSSTimestamp);
bool CARDbSetBeaconPeriod(struct vnt_private *priv,
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 2152c6850e61..c6627c10a462 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1442,7 +1442,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)
if (priv->byBBType != bb_type) {
priv->byBBType = bb_type;

- CARDbSetPhyParameter(priv, priv->byBBType);
+ card_set_phy_parameter(priv, priv->byBBType);
}
}

@@ -1509,7 +1509,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
else
priv->short_slot_time = false;

- CARDbSetPhyParameter(priv, priv->byBBType);
+ card_set_phy_parameter(priv, priv->byBBType);
bb_set_vga_gain_offset(priv, priv->bbvga[0]);
}

--
2.34.1

2023-10-27 08:53:14

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 04/10] staging: vt6655: Type encoding info dropped from variable name "pbyRsvTime"

variable name "pbyRsvTime" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 4ee9b48de2c2..5fdfc4dc70cc 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -76,83 +76,83 @@ static void vt6655_mac_set_bb_type(void __iomem *iobase, u32 mask)
* byPktType - Tx Packet type
* Out:
* tx_rate - pointer to RSPINF TxRate field
- * pbyRsvTime - pointer to RSPINF RsvTime field
+ * rsv_time - pointer to RSPINF RsvTime field
*
* Return Value: none
*/
static void calculate_ofdmr_parameter(unsigned char rate,
u8 bb_type,
unsigned char *tx_rate,
- unsigned char *pbyRsvTime)
+ unsigned char *rsv_time)
{
switch (rate) {
case RATE_6M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9B;
- *pbyRsvTime = 44;
+ *rsv_time = 44;
} else {
*tx_rate = 0x8B;
- *pbyRsvTime = 50;
+ *rsv_time = 50;
}
break;

case RATE_9M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9F;
- *pbyRsvTime = 36;
+ *rsv_time = 36;
} else {
*tx_rate = 0x8F;
- *pbyRsvTime = 42;
+ *rsv_time = 42;
}
break;

case RATE_12M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9A;
- *pbyRsvTime = 32;
+ *rsv_time = 32;
} else {
*tx_rate = 0x8A;
- *pbyRsvTime = 38;
+ *rsv_time = 38;
}
break;

case RATE_18M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9E;
- *pbyRsvTime = 28;
+ *rsv_time = 28;
} else {
*tx_rate = 0x8E;
- *pbyRsvTime = 34;
+ *rsv_time = 34;
}
break;

case RATE_36M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9D;
- *pbyRsvTime = 24;
+ *rsv_time = 24;
} else {
*tx_rate = 0x8D;
- *pbyRsvTime = 30;
+ *rsv_time = 30;
}
break;

case RATE_48M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x98;
- *pbyRsvTime = 24;
+ *rsv_time = 24;
} else {
*tx_rate = 0x88;
- *pbyRsvTime = 30;
+ *rsv_time = 30;
}
break;

case RATE_54M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x9C;
- *pbyRsvTime = 24;
+ *rsv_time = 24;
} else {
*tx_rate = 0x8C;
- *pbyRsvTime = 30;
+ *rsv_time = 30;
}
break;

@@ -160,10 +160,10 @@ static void calculate_ofdmr_parameter(unsigned char rate,
default:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
*tx_rate = 0x99;
- *pbyRsvTime = 28;
+ *rsv_time = 28;
} else {
*tx_rate = 0x89;
- *pbyRsvTime = 34;
+ *rsv_time = 34;
}
break;
}
--
2.34.1

2023-10-27 08:53:20

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 07/10] staging: vt6655: Type encoding info dropped from function name "CARDbyGetPktType"

function name "CARDbyGetPktType" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 4 ++--
drivers/staging/vt6655/card.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index c58a25032a03..7d632d1057c0 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -265,7 +265,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
iowrite8(priv->cw_max_min, priv->port_offset + MAC_REG_CWMAXMIN0);
}

- priv->packet_type = CARDbyGetPktType(priv);
+ priv->packet_type = card_get_pkt_type(priv);

CARDvSetRSPINF(priv, bb_type);

@@ -684,7 +684,7 @@ bool CARDbIsOFDMinBasicRate(struct vnt_private *priv)
return false;
}

-unsigned char CARDbyGetPktType(struct vnt_private *priv)
+unsigned char card_get_pkt_type(struct vnt_private *priv)
{
if (priv->byBBType == BB_TYPE_11A || priv->byBBType == BB_TYPE_11B)
return (unsigned char)priv->byBBType;
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 8c0d06da952f..6564682bcd56 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -49,7 +49,7 @@ void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF,
u64 vt6655_get_current_tsf(struct vnt_private *priv);
u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval);
u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2);
-unsigned char CARDbyGetPktType(struct vnt_private *priv);
+unsigned char card_get_pkt_type(struct vnt_private *priv);
void CARDvSafeResetTx(struct vnt_private *priv);
void CARDvSafeResetRx(struct vnt_private *priv);
void CARDbRadioPowerOff(struct vnt_private *priv);
--
2.34.1

2023-10-27 08:53:24

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 08/10] staging: vt6655: Type encoding info dropped from function name "CARDvSetRSPINF"

function name "CARDvSetRSPINF" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 6 +++---
drivers/staging/vt6655/card.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 7d632d1057c0..56beaf6de488 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -6,7 +6,7 @@
* Purpose: Provide functions to setup NIC operation mode
* Functions:
* s_vSafeResetTx - Rest Tx
- * CARDvSetRSPINF - Set RSPINF
+ * card_set_rspinf - Set RSPINF
* CARDvUpdateBasicTopRate - Update BasicTopRate
* CARDbAddBasicRate - Add to BasicRateSet
* CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet
@@ -267,7 +267,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)

priv->packet_type = card_get_pkt_type(priv);

- CARDvSetRSPINF(priv, bb_type);
+ card_set_rspinf(priv, bb_type);

return true;
}
@@ -536,7 +536,7 @@ static unsigned short CARDwGetOFDMControlRate(struct vnt_private *priv,
*
* Return Value: None.
*/
-void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
+void card_set_rspinf(struct vnt_private *priv, u8 bb_type)
{
union vnt_phy_field_swap phy;
unsigned char byTxRate, byRsvTime; /* For OFDM */
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 6564682bcd56..b36e276c699b 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -39,7 +39,7 @@

struct vnt_private;

-void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type);
+void card_set_rspinf(struct vnt_private *priv, u8 bb_type);
void CARDvUpdateBasicTopRate(struct vnt_private *priv);
bool CARDbIsOFDMinBasicRate(struct vnt_private *priv);
void CARDvSetFirstNextTBTT(struct vnt_private *priv,
--
2.34.1

2023-10-27 08:53:26

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 10/10] staging: vt6655: Type encoding info dropped from variable name "byRxRate"

variable name "byRxRate" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 12 ++++++------
drivers/staging/vt6655/card.h | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index ebb96b4c9406..350ab8f3778a 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -278,8 +278,8 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
*
* Parameters:
* In:
- * priv - The adapter to be sync.
- * byRxRate - data rate of receive beacon
+ * priv - The adapter to be sync.
+ * rx_rate - data rate of receive beacon
* qwBSSTimestamp - Rx BCN's TSF
* qwLocalTSF - Local TSF
* Out:
@@ -287,7 +287,7 @@ bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type)
*
* Return Value: none
*/
-bool card_update_tsf(struct vnt_private *priv, unsigned char byRxRate,
+bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate,
u64 qwBSSTimestamp)
{
u64 local_tsf;
@@ -296,7 +296,7 @@ bool card_update_tsf(struct vnt_private *priv, unsigned char byRxRate,
local_tsf = vt6655_get_current_tsf(priv);

if (qwBSSTimestamp != local_tsf) {
- qwTSFOffset = CARDqGetTSFOffset(byRxRate, qwBSSTimestamp,
+ qwTSFOffset = CARDqGetTSFOffset(rx_rate, qwBSSTimestamp,
local_tsf);
/* adjust TSF, HW's TSF add TSF Offset reg */
qwTSFOffset = le64_to_cpu(qwTSFOffset);
@@ -708,11 +708,11 @@ unsigned char card_get_pkt_type(struct vnt_private *priv)
*
* Return Value: TSF Offset value
*/
-u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2)
+u64 CARDqGetTSFOffset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2)
{
unsigned short wRxBcnTSFOffst;

- wRxBcnTSFOffst = rx_bcn_tsf_off[byRxRate % MAX_RATE];
+ wRxBcnTSFOffst = rx_bcn_tsf_off[rx_rate % MAX_RATE];

qwTSF2 += (u64)wRxBcnTSFOffst;

diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index caf72892c1cd..19689a291f5b 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -48,13 +48,13 @@ void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 qwTSF,
unsigned short wBeaconInterval);
u64 vt6655_get_current_tsf(struct vnt_private *priv);
u64 CARDqGetNextTBTT(u64 qwTSF, unsigned short wBeaconInterval);
-u64 CARDqGetTSFOffset(unsigned char byRxRate, u64 qwTSF1, u64 qwTSF2);
+u64 CARDqGetTSFOffset(unsigned char rx_rate, u64 qwTSF1, u64 qwTSF2);
unsigned char card_get_pkt_type(struct vnt_private *priv);
void CARDvSafeResetTx(struct vnt_private *priv);
void CARDvSafeResetRx(struct vnt_private *priv);
void CARDbRadioPowerOff(struct vnt_private *priv);
bool card_set_phy_parameter(struct vnt_private *priv, u8 bb_type);
-bool card_update_tsf(struct vnt_private *priv, unsigned char byRxRate,
+bool card_update_tsf(struct vnt_private *priv, unsigned char rx_rate,
u64 qwBSSTimestamp);
bool CARDbSetBeaconPeriod(struct vnt_private *priv,
unsigned short wBeaconInterval);
--
2.34.1

2023-10-27 08:53:28

by Pavan Bobba

[permalink] [raw]
Subject: [PATCH 03/10] staging: vt6655: Type encoding info dropped from variable name "pbyTxRate"

variable name "pbyTxRate" updated like below:

a.type encoding info dropped from name
b.camelcase name replaced by snakecase

Issue found by checkpatch

Signed-off-by: Pavan Bobba <[email protected]>
---
drivers/staging/vt6655/card.c | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index 2968be1f8d4e..4ee9b48de2c2 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -75,83 +75,83 @@ static void vt6655_mac_set_bb_type(void __iomem *iobase, u32 mask)
* wRate - Tx Rate
* byPktType - Tx Packet type
* Out:
- * pbyTxRate - pointer to RSPINF TxRate field
+ * tx_rate - pointer to RSPINF TxRate field
* pbyRsvTime - pointer to RSPINF RsvTime field
*
* Return Value: none
*/
static void calculate_ofdmr_parameter(unsigned char rate,
u8 bb_type,
- unsigned char *pbyTxRate,
+ unsigned char *tx_rate,
unsigned char *pbyRsvTime)
{
switch (rate) {
case RATE_6M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9B;
+ *tx_rate = 0x9B;
*pbyRsvTime = 44;
} else {
- *pbyTxRate = 0x8B;
+ *tx_rate = 0x8B;
*pbyRsvTime = 50;
}
break;

case RATE_9M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9F;
+ *tx_rate = 0x9F;
*pbyRsvTime = 36;
} else {
- *pbyTxRate = 0x8F;
+ *tx_rate = 0x8F;
*pbyRsvTime = 42;
}
break;

case RATE_12M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9A;
+ *tx_rate = 0x9A;
*pbyRsvTime = 32;
} else {
- *pbyTxRate = 0x8A;
+ *tx_rate = 0x8A;
*pbyRsvTime = 38;
}
break;

case RATE_18M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9E;
+ *tx_rate = 0x9E;
*pbyRsvTime = 28;
} else {
- *pbyTxRate = 0x8E;
+ *tx_rate = 0x8E;
*pbyRsvTime = 34;
}
break;

case RATE_36M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9D;
+ *tx_rate = 0x9D;
*pbyRsvTime = 24;
} else {
- *pbyTxRate = 0x8D;
+ *tx_rate = 0x8D;
*pbyRsvTime = 30;
}
break;

case RATE_48M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x98;
+ *tx_rate = 0x98;
*pbyRsvTime = 24;
} else {
- *pbyTxRate = 0x88;
+ *tx_rate = 0x88;
*pbyRsvTime = 30;
}
break;

case RATE_54M:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x9C;
+ *tx_rate = 0x9C;
*pbyRsvTime = 24;
} else {
- *pbyTxRate = 0x8C;
+ *tx_rate = 0x8C;
*pbyRsvTime = 30;
}
break;
@@ -159,10 +159,10 @@ static void calculate_ofdmr_parameter(unsigned char rate,
case RATE_24M:
default:
if (bb_type == BB_TYPE_11A) { /* 5GHZ */
- *pbyTxRate = 0x99;
+ *tx_rate = 0x99;
*pbyRsvTime = 28;
} else {
- *pbyTxRate = 0x89;
+ *tx_rate = 0x89;
*pbyRsvTime = 34;
}
break;
--
2.34.1