linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c
@ 2022-10-25 23:36 Tanjuate Brunostar
  2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
                   ` (16 more replies)
  0 siblings, 17 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:36 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

The fixes are similar, mostly changing variable and functions names to
match the linux naming style. I had to make
serveral patches to ease the work of inspectors

Tanjuate Brunostar (17):
  staging: vt6655: changed variable names: wFB_Opt0
  staging: vt6655: changed variable names: s_vFillRTSHead
  staging: vt6655: changed variable name: pDevice
  staging: vt6655: changed variable name: byPktType
  staging: vt6655: changed variable name: pvRTS
  staging: vt6655: changed variable name: cbFrameLength
  staging: vt6655: changed variable name: b_need_ack
  staging: vt6655: changed variable name: bDisCRC
  staging: vt6655: changed variable name: byFBOption
  staging: vt6655: changed variable name: s_vGenerateTxParameter
  staging: vt6655: changed variable name: pvRrvTime
  staging: vt6655: changed variable name: cbFrameSize
  staging: vt6655: changed variable name: bNeedACK
  staging: vt6655: changed variable name: uDMAIdx
  staging: vt6655: changed variable name: psEthHeader
  staging: vt6655: changed variable name: s_cbFillTxBufHead
  staging: vt6655: changed variable name: pbyTxBufferAddr

 drivers/staging/vt6655/rxtx.c | 1062 +++++++++++++++++----------------
 1 file changed, 536 insertions(+), 526 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
@ 2022-10-25 23:36 ` Tanjuate Brunostar
  2022-10-26  2:46   ` Philipp Hortmann
  2022-10-26  3:24   ` Philipp Hortmann
  2022-10-25 23:36 ` [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead Tanjuate Brunostar
                   ` (15 subsequent siblings)
  16 siblings, 2 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:36 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names wFB_Opt0 and wFB_Opt1 to meet the
linux coding standard, as it says to avoid using camelCase naming style.
Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index d585435520b3..ac9b3402be4f 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -59,12 +59,12 @@ static const unsigned short wTimeStampOff[2][MAX_RATE] = {
 	{384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, /* Short Preamble */
 };
 
-static const unsigned short wFB_Opt0[2][5] = {
+static const unsigned short w_fb_opt_0[2][5] = {
 	{RATE_12M, RATE_18M, RATE_24M, RATE_36M, RATE_48M}, /* fallback_rate0 */
 	{RATE_12M, RATE_12M, RATE_18M, RATE_24M, RATE_36M}, /* fallback_rate1 */
 };
 
-static const unsigned short wFB_Opt1[2][5] = {
+static const unsigned short w_fb_opt_1[2][5] = {
 	{RATE_12M, RATE_18M, RATE_24M, RATE_24M, RATE_36M}, /* fallback_rate0 */
 	{RATE_6M,  RATE_6M,  RATE_12M, RATE_12M, RATE_18M}, /* fallback_rate1 */
 };
@@ -299,9 +299,9 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 			wRate -= RATE_18M;
 
 			if (byFBOption == AUTO_FB_0)
-				wRate = wFB_Opt0[FB_RATE0][wRate];
+				wRate = w_fb_opt_0[FB_RATE0][wRate];
 			else
-				wRate = wFB_Opt1[FB_RATE0][wRate];
+				wRate = w_fb_opt_1[FB_RATE0][wRate];
 
 			uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType,
 						       len, wRate, bNeedAck);
@@ -360,11 +360,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
@@ -374,11 +374,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
@@ -388,11 +388,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
@@ -402,11 +402,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
@@ -414,11 +414,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
@@ -426,11 +426,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = pDevice->uSIFS +
 				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
-						wFB_Opt1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
  2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
@ 2022-10-25 23:36 ` Tanjuate Brunostar
  2022-10-26  2:56   ` Philipp Hortmann
  2022-10-26 13:52   ` Greg KH
  2022-10-25 23:36 ` [PATCH 03/17] staging: vt6655: changed variable name: pDevice Tanjuate Brunostar
                   ` (14 subsequent siblings)
  16 siblings, 2 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:36 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

    change variable names s_vFillRTSHead and wTimeStampOff to meet the
    linux coding standard, as it says to avoid using camelCase naming style.
    Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 54 +++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index ac9b3402be4f..8bb06b142748 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -23,7 +23,7 @@
  *      s_uGetTxRsvTime- get frame reserved time
  *      s_vFillCTSHead- fulfill CTS ctl header
  *      s_vFillFragParameter- Set fragment ctl parameter.
- *      s_vFillRTSHead- fulfill RTS ctl header
+ *      s_v_fill_rts_head- fulfill RTS ctl header
  *      s_vFillTxKey- fulfill tx encrypt key
  *      s_vSWencryption- Software encrypt header
  *      vDMA0_tx_80211- tx 802.11 frame via dma0
@@ -54,7 +54,7 @@
  */
 #define CRITICAL_PACKET_LEN      256
 
-static const unsigned short wTimeStampOff[2][MAX_RATE] = {
+static const unsigned short w_time_stamp_off[2][MAX_RATE] = {
 	{384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, /* Long Preamble */
 	{384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, /* Short Preamble */
 };
@@ -85,15 +85,15 @@ static const unsigned short w_fb_opt_1[2][5] = {
 #define DATADUR_A_F1    13
 
 /*---------------------  Static Functions  --------------------------*/
-static void s_vFillRTSHead(struct vnt_private *pDevice,
-			   unsigned char byPktType,
-			   void *pvRTS,
-			   unsigned int	cbFrameLength,
-			   bool bNeedAck,
-			   bool bDisCRC,
-			   struct ieee80211_hdr *hdr,
-			   unsigned short wCurrentRate,
-			   unsigned char byFBOption);
+static void s_v_fill_rts_head(struct vnt_private *pDevice,
+			      unsigned char byPktType,
+			      void *pvRTS,
+			      unsigned int	cbFrameLength,
+			      bool bNeedAck,
+			      bool bDisCRC,
+			      struct ieee80211_hdr *hdr,
+			      unsigned short wCurrentRate,
+			      unsigned char byFBOption);
 
 static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 				   unsigned char byPktType,
@@ -130,7 +130,7 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
 
 static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
 {
-	return cpu_to_le16(wTimeStampOff[priv->preamble_type % 2]
+	return cpu_to_le16(w_time_stamp_off[priv->preamble_type % 2]
 							[rate % MAX_RATE]);
 }
 
@@ -620,15 +620,15 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
 	return buf->duration;
 }
 
-static void s_vFillRTSHead(struct vnt_private *pDevice,
-			   unsigned char byPktType,
-			   void *pvRTS,
-			   unsigned int cbFrameLength,
-			   bool bNeedAck,
-			   bool bDisCRC,
-			   struct ieee80211_hdr *hdr,
-			   unsigned short wCurrentRate,
-			   unsigned char byFBOption)
+static void s_v_fill_rts_head(struct vnt_private *pDevice,
+			      unsigned char byPktType,
+			      void *pvRTS,
+			      unsigned int cbFrameLength,
+			      bool bNeedAck,
+			      bool bDisCRC,
+			      struct ieee80211_hdr *hdr,
+			      unsigned short wCurrentRate,
+			      unsigned char byFBOption)
 {
 	unsigned int uRTSFrameLen = 20;
 
@@ -977,8 +977,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 								pDevice->byTopCCKBasicRate,
 								bNeedACK);
 
-			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-				       psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
+					  psEthHeader, wCurrentRate, byFBOption);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
 
@@ -1004,8 +1004,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-				       psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
+					  psEthHeader, wCurrentRate, byFBOption);
 		} else if (!pvRTS) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
@@ -1022,8 +1022,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-				       psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
+					  psEthHeader, wCurrentRate, byFBOption);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 03/17] staging: vt6655: changed variable name: pDevice
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
  2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
  2022-10-25 23:36 ` [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead Tanjuate Brunostar
@ 2022-10-25 23:36 ` Tanjuate Brunostar
  2022-10-26  3:03   ` Philipp Hortmann
  2022-10-25 23:37 ` [PATCH 04/17] staging: vt6655: changed variable name: byPktType Tanjuate Brunostar
                   ` (13 subsequent siblings)
  16 siblings, 1 reply; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:36 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

    change variable names pDevice to meet the
    linux coding standard, as it says to avoid using camelCase naming
    style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 354 +++++++++++++++++-----------------
 1 file changed, 177 insertions(+), 177 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 8bb06b142748..3565f5608790 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -85,7 +85,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
 #define DATADUR_A_F1    13
 
 /*---------------------  Static Functions  --------------------------*/
-static void s_v_fill_rts_head(struct vnt_private *pDevice,
+static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char byPktType,
 			      void *pvRTS,
 			      unsigned int	cbFrameLength,
@@ -95,7 +95,7 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 			      unsigned short wCurrentRate,
 			      unsigned char byFBOption);
 
-static void s_vGenerateTxParameter(struct vnt_private *pDevice,
+static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned char byPktType,
 				   struct vnt_tx_fifo_head *,
 				   void *pvRrvTime,
@@ -108,12 +108,12 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 				   unsigned short wCurrentRate);
 
 static unsigned int
-s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
+s_cbFillTxBufHead(struct vnt_private *p_device, unsigned char byPktType,
 		  unsigned char *pbyTxBufferAddr,
 		  unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD,
 		  unsigned int uNodeIndex);
 
-static __le16 s_uFillDataHead(struct vnt_private *pDevice,
+static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char byPktType,
 			      void *pTxDataHead,
 			      unsigned int cbFrameLength,
@@ -139,7 +139,7 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
  * PK_TYPE_11GB    2
  * PK_TYPE_11GA    3
  */
-static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice,
+static unsigned int s_uGetTxRsvTime(struct vnt_private *p_device,
 				    unsigned char byPktType,
 				    unsigned int cbFrameLength,
 				    unsigned short wRate,
@@ -147,7 +147,7 @@ static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice,
 {
 	unsigned int uDataTime, uAckTime;
 
-	uDataTime = bb_get_frame_time(pDevice->preamble_type, byPktType, cbFrameLength, wRate);
+	uDataTime = bb_get_frame_time(p_device->preamble_type, byPktType, cbFrameLength, wRate);
 
 	if (!bNeedAck)
 		return uDataTime;
@@ -156,12 +156,12 @@ static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice,
 	 * CCK mode  - 11b
 	 * OFDM mode - 11g 2.4G & 11a 5G
 	 */
-	uAckTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
+	uAckTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
 				     byPktType == PK_TYPE_11B ?
-				     pDevice->byTopCCKBasicRate :
-				     pDevice->byTopOFDMBasicRate);
+				     p_device->byTopCCKBasicRate :
+				     p_device->byTopOFDMBasicRate);
 
-	return uDataTime + pDevice->uSIFS + uAckTime;
+	return uDataTime + p_device->uSIFS + uAckTime;
 }
 
 static __le16 vnt_rxtx_rsvtime_le16(struct vnt_private *priv, u8 pkt_type,
@@ -219,7 +219,7 @@ static __le16 get_rtscts_time(struct vnt_private *priv,
 }
 
 /* byFreqType 0: 5GHz, 1:2.4Ghz */
-static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
+static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				       unsigned char byDurType,
 				       unsigned int cbFrameLength,
 				       unsigned char byPktType,
@@ -244,9 +244,9 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 	switch (byDurType) {
 	case DATADUR_B:    /* DATADUR_B */
 		if (bNeedAck) {
-			uAckTime = bb_get_frame_time(pDevice->preamble_type,
+			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     byPktType, 14,
-						     pDevice->byTopCCKBasicRate);
+						     p_device->byTopCCKBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
@@ -254,17 +254,17 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
-			uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
 						       len, wRate, bNeedAck);
 		}
 
-		return pDevice->uSIFS + uAckTime + uNextPktTime;
+		return p_device->uSIFS + uAckTime + uNextPktTime;
 
 	case DATADUR_A:    /* DATADUR_A */
 		if (bNeedAck) {
-			uAckTime = bb_get_frame_time(pDevice->preamble_type,
+			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     byPktType, 14,
-						     pDevice->byTopOFDMBasicRate);
+						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
@@ -272,18 +272,18 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
-			uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
 						       len, wRate, bNeedAck);
 		}
 
-		return pDevice->uSIFS + uAckTime + uNextPktTime;
+		return p_device->uSIFS + uAckTime + uNextPktTime;
 
 	case DATADUR_A_F0:    /* DATADUR_A_F0 */
 	case DATADUR_A_F1:    /* DATADUR_A_F1 */
 		if (bNeedAck) {
-			uAckTime = bb_get_frame_time(pDevice->preamble_type,
+			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     byPktType, 14,
-						     pDevice->byTopOFDMBasicRate);
+						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
@@ -303,11 +303,11 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 			else
 				wRate = w_fb_opt_1[FB_RATE0][wRate];
 
-			uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
 						       len, wRate, bNeedAck);
 		}
 
-		return pDevice->uSIFS + uAckTime + uNextPktTime;
+		return p_device->uSIFS + uAckTime + uNextPktTime;
 
 	default:
 		break;
@@ -317,7 +317,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *pDevice,
 }
 
 /* byFreqType: 0=>5GHZ 1=>2.4GHZ */
-static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
+static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 				   unsigned char byDurType,
 				   unsigned int cbFrameLength,
 				   unsigned char byPktType,
@@ -329,107 +329,107 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 
 	switch (byDurType) {
 	case RTSDUR_BB:    /* RTSDuration_bb */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopCCKBasicRate);
-		uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-			s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopCCKBasicRate);
+		uDurTime = uCTSTime + 2 * p_device->uSIFS +
+			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA:    /* RTSDuration_ba */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopCCKBasicRate);
-		uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-			s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopCCKBasicRate);
+		uDurTime = uCTSTime + 2 * p_device->uSIFS +
+			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_AA:    /* RTSDuration_aa */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopOFDMBasicRate);
-		uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-			s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopOFDMBasicRate);
+		uDurTime = uCTSTime + 2 * p_device->uSIFS +
+			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case CTSDUR_BA:    /* CTSDuration_ba */
-		uDurTime = pDevice->uSIFS + s_uGetTxRsvTime(pDevice, byPktType,
+		uDurTime = p_device->uSIFS + s_uGetTxRsvTime(p_device, byPktType,
 							    cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopCCKBasicRate);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopOFDMBasicRate);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopCCKBasicRate);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */
-		uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
-					     pDevice->byTopOFDMBasicRate);
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = uCTSTime + 2 * pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = uCTSTime + 2 * p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
-			uDurTime = pDevice->uSIFS +
-				s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength,
+			uDurTime = p_device->uSIFS +
+				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -441,7 +441,7 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
 	return cpu_to_le16((u16)uDurTime);
 }
 
-static __le16 s_uFillDataHead(struct vnt_private *pDevice,
+static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char byPktType,
 			      void *pTxDataHead,
 			      unsigned int cbFrameLength,
@@ -466,22 +466,22 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_tx_datahead_g *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate,
+			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
 					  byPktType, &buf->a);
 
-			vnt_get_phy_field(pDevice, cbFrameLength,
-					  pDevice->byTopCCKBasicRate,
+			vnt_get_phy_field(p_device, cbFrameLength,
+					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
 			if (is_pspoll) {
-				__le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15));
+				__le16 dur = cpu_to_le16(p_device->current_aid | BIT(14) | BIT(15));
 
 				buf->duration_a = dur;
 				buf->duration_b = dur;
 			} else {
 				/* Get Duration and TimeStamp */
 				buf->duration_a =
-					cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A,
+					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 									    cbFrameLength,
 									    byPktType,
 									    wCurrentRate, bNeedAck,
@@ -490,57 +490,57 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
 									    uMACfragNum,
 									    byFBOption));
 				buf->duration_b =
-					cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B,
+					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
 									    cbFrameLength,
 									    PK_TYPE_11B,
-									    pDevice->byTopCCKBasicRate,
+									    p_device->byTopCCKBasicRate,
 									    bNeedAck, uFragIdx,
 									    cbLastFragmentSize,
 									    uMACfragNum,
 									    byFBOption));
 			}
 
-			buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate);
-			buf->time_stamp_off_b = vnt_time_stamp_off(pDevice,
-								   pDevice->byTopCCKBasicRate);
+			buf->time_stamp_off_a = vnt_time_stamp_off(p_device, wCurrentRate);
+			buf->time_stamp_off_b = vnt_time_stamp_off(p_device,
+								   p_device->byTopCCKBasicRate);
 
 			return buf->duration_a;
 		}
 
 		/* Get SignalField, ServiceField & Length */
-		vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate,
+		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
 				  byPktType, &buf->a);
 
-		vnt_get_phy_field(pDevice, cbFrameLength,
-				  pDevice->byTopCCKBasicRate,
+		vnt_get_phy_field(p_device, cbFrameLength,
+				  p_device->byTopCCKBasicRate,
 				  PK_TYPE_11B, &buf->b);
 		/* Get Duration and TimeStamp */
-		buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A,
+		buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								      cbFrameLength, byPktType,
 								      wCurrentRate, bNeedAck,
 								      uFragIdx, cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
-		buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B,
+		buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
 								      cbFrameLength, PK_TYPE_11B,
-								      pDevice->byTopCCKBasicRate,
+								      p_device->byTopCCKBasicRate,
 								      bNeedAck, uFragIdx,
 								      cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
-		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0,
+		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 									 cbFrameLength, byPktType,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
-		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1,
+		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 									 cbFrameLength, byPktType,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
 
-		buf->time_stamp_off_a = vnt_time_stamp_off(pDevice, wCurrentRate);
-		buf->time_stamp_off_b = vnt_time_stamp_off(pDevice, pDevice->byTopCCKBasicRate);
+		buf->time_stamp_off_a = vnt_time_stamp_off(p_device, wCurrentRate);
+		buf->time_stamp_off_b = vnt_time_stamp_off(p_device, p_device->byTopCCKBasicRate);
 
 		return buf->duration_a;
 		  /* if (byFBOption == AUTO_FB_NONE) */
@@ -551,76 +551,76 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
 			/* Auto Fallback */
 			struct vnt_tx_datahead_a_fb *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate,
+			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
 					  byPktType, &buf->a);
 
 			/* Get Duration and TimeStampOff */
 			buf->duration =
-				cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A,
+				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								    cbFrameLength, byPktType,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f0 =
-				cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F0,
+				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 								    cbFrameLength, byPktType,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f1 =
-				cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A_F1,
+				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 								    cbFrameLength, byPktType,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
-			buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate);
+			buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
 			return buf->duration;
 		}
 
 		/* Get SignalField, ServiceField & Length */
-		vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate,
+		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
 				  byPktType, &buf->ab);
 
 		if (is_pspoll) {
-			__le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15));
+			__le16 dur = cpu_to_le16(p_device->current_aid | BIT(14) | BIT(15));
 
 			buf->duration = dur;
 		} else {
 			/* Get Duration and TimeStampOff */
 			buf->duration =
-				cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_A,
+				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								    cbFrameLength, byPktType,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 		}
 
-		buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate);
+		buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
 		return buf->duration;
 	}
 
 	/* Get SignalField, ServiceField & Length */
-	vnt_get_phy_field(pDevice, cbFrameLength, wCurrentRate,
+	vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
 			  byPktType, &buf->ab);
 
 	if (is_pspoll) {
-		__le16 dur = cpu_to_le16(pDevice->current_aid | BIT(14) | BIT(15));
+		__le16 dur = cpu_to_le16(p_device->current_aid | BIT(14) | BIT(15));
 
 		buf->duration = dur;
 	} else {
 		/* Get Duration and TimeStampOff */
 		buf->duration =
-			cpu_to_le16((u16)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameLength,
+			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cbFrameLength,
 							    byPktType, wCurrentRate, bNeedAck,
 							    uFragIdx, cbLastFragmentSize,
 							    uMACfragNum, byFBOption));
 	}
 
-	buf->time_stamp_off = vnt_time_stamp_off(pDevice, wCurrentRate);
+	buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
 	return buf->duration;
 }
 
-static void s_v_fill_rts_head(struct vnt_private *pDevice,
+static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char byPktType,
 			      void *pvRTS,
 			      unsigned int cbFrameLength,
@@ -650,26 +650,26 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_rts_g *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopCCKBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopOFDMBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopOFDMBasicRate,
 					  byPktType, &buf->a);
 			/* Get Duration */
 			buf->duration_bb =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BB,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cbFrameLength, PK_TYPE_11B,
-						     pDevice->byTopCCKBasicRate,
+						     p_device->byTopCCKBasicRate,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -685,46 +685,46 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 		} else {
 			struct vnt_rts_g_fb *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopCCKBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopOFDMBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopOFDMBasicRate,
 					  byPktType, &buf->a);
 			/* Get Duration */
 			buf->duration_bb =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BB,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cbFrameLength, PK_TYPE_11B,
-						     pDevice->byTopCCKBasicRate,
+						     p_device->byTopCCKBasicRate,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f0 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F0,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f0 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f1 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F1,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f1 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -741,12 +741,12 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_rts_ab *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopOFDMBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopOFDMBasicRate,
 					  byPktType, &buf->ab);
 			/* Get Duration */
 			buf->duration =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -761,22 +761,22 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 		} else {
 			struct vnt_rts_a_fb *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uRTSFrameLen,
-					  pDevice->byTopOFDMBasicRate,
+			vnt_get_phy_field(p_device, uRTSFrameLen,
+					  p_device->byTopOFDMBasicRate,
 					  byPktType, &buf->a);
 			/* Get Duration */
 			buf->duration =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f0 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f1 =
-				s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1,
+				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -792,12 +792,12 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 	} else if (byPktType == PK_TYPE_11B) {
 		struct vnt_rts_ab *buf = pvRTS;
 		/* Get SignalField, ServiceField & Length */
-		vnt_get_phy_field(pDevice, uRTSFrameLen,
-				  pDevice->byTopCCKBasicRate,
+		vnt_get_phy_field(p_device, uRTSFrameLen,
+				  p_device->byTopCCKBasicRate,
 				  PK_TYPE_11B, &buf->ab);
 		/* Get Duration */
 		buf->duration =
-			s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
+			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cbFrameLength,
 					     byPktType, wCurrentRate, bNeedAck,
 					     byFBOption);
 
@@ -811,7 +811,7 @@ static void s_v_fill_rts_head(struct vnt_private *pDevice,
 	}
 }
 
-static void s_vFillCTSHead(struct vnt_private *pDevice,
+static void s_vFillCTSHead(struct vnt_private *p_device,
 			   unsigned int uDMAIdx,
 			   unsigned char byPktType,
 			   void *pvCTS,
@@ -840,26 +840,26 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
 			/* Auto Fall back */
 			struct vnt_cts_fb *buf = pvCTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uCTSFrameLen,
-					  pDevice->byTopCCKBasicRate,
+			vnt_get_phy_field(p_device, uCTSFrameLen,
+					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
 			buf->duration_ba =
-				s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
+				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f0 */
 			buf->cts_duration_ba_f0 =
-				s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F0,
+				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F0,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f1 */
 			buf->cts_duration_ba_f1 =
-				s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1,
+				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F1,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -874,7 +874,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
 			buf->reserved2 = 0x0;
 
 			ether_addr_copy(buf->data.ra,
-					pDevice->abyCurrentNetAddr);
+					p_device->abyCurrentNetAddr);
 		} else {
 			/* if (byFBOption != AUTO_FB_NONE &&
 			 * uDMAIdx != TYPE_ATIMDMA &&
@@ -882,13 +882,13 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
 			 */
 			struct vnt_cts *buf = pvCTS;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(pDevice, uCTSFrameLen,
-					  pDevice->byTopCCKBasicRate,
+			vnt_get_phy_field(p_device, uCTSFrameLen,
+					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
 			/* Get CTSDuration_ba */
 			buf->duration_ba =
-				s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
+				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cbFrameLength, byPktType,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
@@ -902,7 +902,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
 
 			buf->reserved2 = 0x0;
 			ether_addr_copy(buf->data.ra,
-					pDevice->abyCurrentNetAddr);
+					p_device->abyCurrentNetAddr);
 		}
 	}
 }
@@ -914,7 +914,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
  *
  * Parameters:
  *  In:
- *      pDevice         - Pointer to adapter
+ *      p_device         - Pointer to adapter
  *      pTxDataHead     - Transmit Data Buffer
  *      pTxBufHead      - pTxBufHead
  *      pvRrvTime        - pvRrvTime
@@ -931,7 +931,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice,
  -
  * unsigned int cbFrameSize, Hdr+Payload+FCS
  */
-static void s_vGenerateTxParameter(struct vnt_private *pDevice,
+static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned char byPktType,
 				   struct vnt_tx_fifo_head *tx_buffer_head,
 				   void *pvRrvTime,
@@ -965,75 +965,75 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
 			/* Fill RsvTime */
 			struct vnt_rrv_time_rts *buf = pvRrvTime;
 
-			buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
+			buf->rts_rrv_time_aa = get_rtscts_time(p_device, 2, byPktType, cbFrameSize,
 							       wCurrentRate);
-			buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
+			buf->rts_rrv_time_ba = get_rtscts_time(p_device, 1, byPktType, cbFrameSize,
 							       wCurrentRate);
-			buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
+			buf->rts_rrv_time_bb = get_rtscts_time(p_device, 0, byPktType, cbFrameSize,
 							       wCurrentRate);
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
 								wCurrentRate, bNeedACK);
-			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
-								pDevice->byTopCCKBasicRate,
+			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+								p_device->byTopCCKBasicRate,
 								bNeedACK);
 
-			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-					  psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
 
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
 								wCurrentRate, bNeedACK);
-			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
-								pDevice->byTopCCKBasicRate,
+			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+								p_device->byTopCCKBasicRate,
 								bNeedACK);
-			buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
+			buf->cts_rrv_time_ba = get_rtscts_time(p_device, 3, byPktType, cbFrameSize,
 							       wCurrentRate);
 
 			/* Fill CTS */
-			s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK,
+			s_vFillCTSHead(p_device, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK,
 				       bDisCRC, wCurrentRate, byFBOption);
 		}
 	} else if (byPktType == PK_TYPE_11A) {
 		if (pvRTS) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 2, byPktType, cbFrameSize,
 							    wCurrentRate);
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-					  psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else if (!pvRTS) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 		}
 	} else if (byPktType == PK_TYPE_11B) {
 		if (pvRTS) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 0, byPktType, cbFrameSize,
 							    wCurrentRate);
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
-					  psEthHeader, wCurrentRate, byFBOption);
+			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 		}
 	}
 }
 
-static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice,
+static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				      unsigned char byPktType,
 				      unsigned char *pbyTxBufferAddr,
 				      unsigned int uDMAIdx,
@@ -1080,7 +1080,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice,
 
 		cbFrameSize += info->control.hw_key->icv_len;
 
-		if (pDevice->local_id > REV_ID_VT3253_A1) {
+		if (p_device->local_id > REV_ID_VT3253_A1) {
 			/* MAC Header should be padding 0 to DW alignment. */
 			uPadding = 4 - (ieee80211_get_hdrlen_from_skb(skb) % 4);
 			uPadding %= 4;
@@ -1218,11 +1218,11 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *pDevice,
 	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
-	s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
-			       cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate);
+	s_vGenerateTxParameter(p_device, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
+			       cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
-	uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK,
-				    0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate,
+	uDuration = s_uFillDataHead(p_device, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK,
+				    0, 0, uMACfragNum, byFBOption, p_device->wCurrentRate,
 				    is_pspoll);
 
 	hdr->duration_id = uDuration;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 04/17] staging: vt6655: changed variable name: byPktType
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (2 preceding siblings ...)
  2022-10-25 23:36 ` [PATCH 03/17] staging: vt6655: changed variable name: pDevice Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 05/17] staging: vt6655: changed variable name: pvRTS Tanjuate Brunostar
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

	change variable names byPktType to meet the
        linux coding standard, as it says to avoid using camelCase naming
        style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 222 +++++++++++++++++-----------------
 1 file changed, 111 insertions(+), 111 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 3565f5608790..2cac8f3882df 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -86,7 +86,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
 
 /*---------------------  Static Functions  --------------------------*/
 static void s_v_fill_rts_head(struct vnt_private *p_device,
-			      unsigned char byPktType,
+			      unsigned char by_pkt_type,
 			      void *pvRTS,
 			      unsigned int	cbFrameLength,
 			      bool bNeedAck,
@@ -96,7 +96,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char byFBOption);
 
 static void s_vGenerateTxParameter(struct vnt_private *p_device,
-				   unsigned char byPktType,
+				   unsigned char by_pkt_type,
 				   struct vnt_tx_fifo_head *,
 				   void *pvRrvTime,
 				   void *pvRTS,
@@ -108,13 +108,13 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned short wCurrentRate);
 
 static unsigned int
-s_cbFillTxBufHead(struct vnt_private *p_device, unsigned char byPktType,
+s_cbFillTxBufHead(struct vnt_private *p_device, unsigned char by_pkt_type,
 		  unsigned char *pbyTxBufferAddr,
 		  unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD,
 		  unsigned int uNodeIndex);
 
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
-			      unsigned char byPktType,
+			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
 			      unsigned int cbFrameLength,
 			      unsigned int uDMAIdx,
@@ -134,20 +134,20 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
 							[rate % MAX_RATE]);
 }
 
-/* byPktType : PK_TYPE_11A     0
+/* by_pkt_type : PK_TYPE_11A     0
  * PK_TYPE_11B     1
  * PK_TYPE_11GB    2
  * PK_TYPE_11GA    3
  */
 static unsigned int s_uGetTxRsvTime(struct vnt_private *p_device,
-				    unsigned char byPktType,
+				    unsigned char by_pkt_type,
 				    unsigned int cbFrameLength,
 				    unsigned short wRate,
 				    bool bNeedAck)
 {
 	unsigned int uDataTime, uAckTime;
 
-	uDataTime = bb_get_frame_time(p_device->preamble_type, byPktType, cbFrameLength, wRate);
+	uDataTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, cbFrameLength, wRate);
 
 	if (!bNeedAck)
 		return uDataTime;
@@ -156,8 +156,8 @@ static unsigned int s_uGetTxRsvTime(struct vnt_private *p_device,
 	 * CCK mode  - 11b
 	 * OFDM mode - 11g 2.4G & 11a 5G
 	 */
-	uAckTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
-				     byPktType == PK_TYPE_11B ?
+	uAckTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
+				     by_pkt_type == PK_TYPE_11B ?
 				     p_device->byTopCCKBasicRate :
 				     p_device->byTopOFDMBasicRate);
 
@@ -222,7 +222,7 @@ static __le16 get_rtscts_time(struct vnt_private *priv,
 static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				       unsigned char byDurType,
 				       unsigned int cbFrameLength,
-				       unsigned char byPktType,
+				       unsigned char by_pkt_type,
 				       unsigned short wRate,
 				       bool bNeedAck,
 				       unsigned int uFragIdx,
@@ -245,7 +245,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 	case DATADUR_B:    /* DATADUR_B */
 		if (bNeedAck) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
-						     byPktType, 14,
+						     by_pkt_type, 14,
 						     p_device->byTopCCKBasicRate);
 		}
 		/* Non Frag or Last Frag */
@@ -254,7 +254,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
-			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
 						       len, wRate, bNeedAck);
 		}
 
@@ -263,7 +263,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 	case DATADUR_A:    /* DATADUR_A */
 		if (bNeedAck) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
-						     byPktType, 14,
+						     by_pkt_type, 14,
 						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
@@ -272,7 +272,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
-			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
 						       len, wRate, bNeedAck);
 		}
 
@@ -282,7 +282,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 	case DATADUR_A_F1:    /* DATADUR_A_F1 */
 		if (bNeedAck) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
-						     byPktType, 14,
+						     by_pkt_type, 14,
 						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
@@ -303,7 +303,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 			else
 				wRate = w_fb_opt_1[FB_RATE0][wRate];
 
-			uNextPktTime = s_uGetTxRsvTime(p_device, byPktType,
+			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
 						       len, wRate, bNeedAck);
 		}
 
@@ -320,7 +320,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 				   unsigned char byDurType,
 				   unsigned int cbFrameLength,
-				   unsigned char byPktType,
+				   unsigned char by_pkt_type,
 				   unsigned short wRate,
 				   bool bNeedAck,
 				   unsigned char byFBOption)
@@ -329,83 +329,83 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 
 	switch (byDurType) {
 	case RTSDUR_BB:    /* RTSDuration_bb */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA:    /* RTSDuration_ba */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_AA:    /* RTSDuration_aa */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, byPktType, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case CTSDUR_BA:    /* CTSDuration_ba */
-		uDurTime = p_device->uSIFS + s_uGetTxRsvTime(p_device, byPktType,
+		uDurTime = p_device->uSIFS + s_uGetTxRsvTime(p_device, by_pkt_type,
 							    cbFrameLength, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
 
 	case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */
-		uCTSTime = bb_get_frame_time(p_device->preamble_type, byPktType, 14,
+		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -413,11 +413,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -425,11 +425,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, byPktType, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -442,7 +442,7 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 }
 
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
-			      unsigned char byPktType,
+			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
 			      unsigned int cbFrameLength,
 			      unsigned int uDMAIdx,
@@ -459,7 +459,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 	if (!pTxDataHead)
 		return 0;
 
-	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
+	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		/* Auto Fallback */
 		struct vnt_tx_datahead_g_fb *buf = pTxDataHead;
 
@@ -467,7 +467,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			struct vnt_tx_datahead_g *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
-					  byPktType, &buf->a);
+					  by_pkt_type, &buf->a);
 
 			vnt_get_phy_field(p_device, cbFrameLength,
 					  p_device->byTopCCKBasicRate,
@@ -483,7 +483,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 				buf->duration_a =
 					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 									    cbFrameLength,
-									    byPktType,
+									    by_pkt_type,
 									    wCurrentRate, bNeedAck,
 									    uFragIdx,
 									    cbLastFragmentSize,
@@ -509,14 +509,14 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 
 		/* Get SignalField, ServiceField & Length */
 		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
-				  byPktType, &buf->a);
+				  by_pkt_type, &buf->a);
 
 		vnt_get_phy_field(p_device, cbFrameLength,
 				  p_device->byTopCCKBasicRate,
 				  PK_TYPE_11B, &buf->b);
 		/* Get Duration and TimeStamp */
 		buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								      cbFrameLength, byPktType,
+								      cbFrameLength, by_pkt_type,
 								      wCurrentRate, bNeedAck,
 								      uFragIdx, cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
@@ -527,13 +527,13 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 								      cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
 		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
-									 cbFrameLength, byPktType,
+									 cbFrameLength, by_pkt_type,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
 		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
-									 cbFrameLength, byPktType,
+									 cbFrameLength, by_pkt_type,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
@@ -544,7 +544,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 
 		return buf->duration_a;
 		  /* if (byFBOption == AUTO_FB_NONE) */
-	} else if (byPktType == PK_TYPE_11A) {
+	} else if (by_pkt_type == PK_TYPE_11A) {
 		struct vnt_tx_datahead_ab *buf = pTxDataHead;
 
 		if (byFBOption != AUTO_FB_NONE) {
@@ -552,24 +552,24 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			struct vnt_tx_datahead_a_fb *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
-					  byPktType, &buf->a);
+					  by_pkt_type, &buf->a);
 
 			/* Get Duration and TimeStampOff */
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								    cbFrameLength, byPktType,
+								    cbFrameLength, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f0 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
-								    cbFrameLength, byPktType,
+								    cbFrameLength, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f1 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
-								    cbFrameLength, byPktType,
+								    cbFrameLength, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
@@ -579,7 +579,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 
 		/* Get SignalField, ServiceField & Length */
 		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
-				  byPktType, &buf->ab);
+				  by_pkt_type, &buf->ab);
 
 		if (is_pspoll) {
 			__le16 dur = cpu_to_le16(p_device->current_aid | BIT(14) | BIT(15));
@@ -589,7 +589,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			/* Get Duration and TimeStampOff */
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								    cbFrameLength, byPktType,
+								    cbFrameLength, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
@@ -601,7 +601,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 
 	/* Get SignalField, ServiceField & Length */
 	vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
-			  byPktType, &buf->ab);
+			  by_pkt_type, &buf->ab);
 
 	if (is_pspoll) {
 		__le16 dur = cpu_to_le16(p_device->current_aid | BIT(14) | BIT(15));
@@ -611,7 +611,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		/* Get Duration and TimeStampOff */
 		buf->duration =
 			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cbFrameLength,
-							    byPktType, wCurrentRate, bNeedAck,
+							    by_pkt_type, wCurrentRate, bNeedAck,
 							    uFragIdx, cbLastFragmentSize,
 							    uMACfragNum, byFBOption));
 	}
@@ -621,7 +621,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 }
 
 static void s_v_fill_rts_head(struct vnt_private *p_device,
-			      unsigned char byPktType,
+			      unsigned char by_pkt_type,
 			      void *pvRTS,
 			      unsigned int cbFrameLength,
 			      bool bNeedAck,
@@ -646,7 +646,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 	 * so we don't need to take them into account.
 	 * Otherwise, we need to modify codes for them.
 	 */
-	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
+	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_rts_g *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
@@ -656,7 +656,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
-					  byPktType, &buf->a);
+					  by_pkt_type, &buf->a);
 			/* Get Duration */
 			buf->duration_bb =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
@@ -665,12 +665,12 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
@@ -691,7 +691,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
-					  byPktType, &buf->a);
+					  by_pkt_type, &buf->a);
 			/* Get Duration */
 			buf->duration_bb =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
@@ -700,32 +700,32 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F0,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F1,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration_aa;
@@ -737,17 +737,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ra, hdr->addr1);
 			ether_addr_copy(buf->data.ta, hdr->addr2);
 		} /* if (byFBOption == AUTO_FB_NONE) */
-	} else if (byPktType == PK_TYPE_11A) {
+	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_rts_ab *buf = pvRTS;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
-					  byPktType, &buf->ab);
+					  by_pkt_type, &buf->ab);
 			/* Get Duration */
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration;
@@ -763,21 +763,21 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
-					  byPktType, &buf->a);
+					  by_pkt_type, &buf->a);
 			/* Get Duration */
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration;
@@ -789,7 +789,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ra, hdr->addr1);
 			ether_addr_copy(buf->data.ta, hdr->addr2);
 		}
-	} else if (byPktType == PK_TYPE_11B) {
+	} else if (by_pkt_type == PK_TYPE_11B) {
 		struct vnt_rts_ab *buf = pvRTS;
 		/* Get SignalField, ServiceField & Length */
 		vnt_get_phy_field(p_device, uRTSFrameLen,
@@ -798,7 +798,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 		/* Get Duration */
 		buf->duration =
 			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cbFrameLength,
-					     byPktType, wCurrentRate, bNeedAck,
+					     by_pkt_type, wCurrentRate, bNeedAck,
 					     byFBOption);
 
 		buf->data.duration = buf->duration;
@@ -813,7 +813,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 
 static void s_vFillCTSHead(struct vnt_private *p_device,
 			   unsigned int uDMAIdx,
-			   unsigned char byPktType,
+			   unsigned char by_pkt_type,
 			   void *pvCTS,
 			   unsigned int cbFrameLength,
 			   bool bNeedAck,
@@ -833,7 +833,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 		uCTSFrameLen -= 4;
 	}
 
-	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
+	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (byFBOption != AUTO_FB_NONE &&
 		    uDMAIdx != TYPE_ATIMDMA &&
 		    uDMAIdx != TYPE_BEACONDMA) {
@@ -846,21 +846,21 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f0 */
 			buf->cts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F0,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f1 */
 			buf->cts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F1,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
@@ -889,7 +889,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			/* Get CTSDuration_ba */
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
-						     cbFrameLength, byPktType,
+						     cbFrameLength, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
@@ -932,7 +932,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  * unsigned int cbFrameSize, Hdr+Payload+FCS
  */
 static void s_vGenerateTxParameter(struct vnt_private *p_device,
-				   unsigned char byPktType,
+				   unsigned char by_pkt_type,
 				   struct vnt_tx_fifo_head *tx_buffer_head,
 				   void *pvRrvTime,
 				   void *pvRTS,
@@ -960,51 +960,51 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 	if (!pvRrvTime)
 		return;
 
-	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
+	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (pvRTS) { /* RTS_need */
 			/* Fill RsvTime */
 			struct vnt_rrv_time_rts *buf = pvRrvTime;
 
-			buf->rts_rrv_time_aa = get_rtscts_time(p_device, 2, byPktType, cbFrameSize,
-							       wCurrentRate);
-			buf->rts_rrv_time_ba = get_rtscts_time(p_device, 1, byPktType, cbFrameSize,
-							       wCurrentRate);
-			buf->rts_rrv_time_bb = get_rtscts_time(p_device, 0, byPktType, cbFrameSize,
-							       wCurrentRate);
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
+			buf->rts_rrv_time_aa = get_rtscts_time(p_device, 2, by_pkt_type,
+							       cbFrameSize, wCurrentRate);
+			buf->rts_rrv_time_ba = get_rtscts_time(p_device, 1, by_pkt_type,
+							       cbFrameSize, wCurrentRate);
+			buf->rts_rrv_time_bb = get_rtscts_time(p_device, 0, by_pkt_type,
+							       cbFrameSize, wCurrentRate);
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
 								wCurrentRate, bNeedACK);
 			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 								p_device->byTopCCKBasicRate,
 								bNeedACK);
 
-			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
 
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
 								wCurrentRate, bNeedACK);
 			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 								p_device->byTopCCKBasicRate,
 								bNeedACK);
-			buf->cts_rrv_time_ba = get_rtscts_time(p_device, 3, byPktType, cbFrameSize,
-							       wCurrentRate);
+			buf->cts_rrv_time_ba = get_rtscts_time(p_device, 3, by_pkt_type,
+							       cbFrameSize, wCurrentRate);
 
 			/* Fill CTS */
-			s_vFillCTSHead(p_device, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK,
+			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pvCTS, cbFrameSize, bNeedACK,
 				       bDisCRC, wCurrentRate, byFBOption);
 		}
-	} else if (byPktType == PK_TYPE_11A) {
+	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pvRTS) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rts_rrv_time = get_rtscts_time(p_device, 2, byPktType, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cbFrameSize,
 							    wCurrentRate);
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, byPktType, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else if (!pvRTS) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
@@ -1012,17 +1012,17 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 		}
-	} else if (byPktType == PK_TYPE_11B) {
+	} else if (by_pkt_type == PK_TYPE_11B) {
 		if (pvRTS) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-			buf->rts_rrv_time = get_rtscts_time(p_device, 0, byPktType, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cbFrameSize,
 							    wCurrentRate);
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, byPktType, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
@@ -1034,7 +1034,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 }
 
 static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
-				      unsigned char byPktType,
+				      unsigned char by_pkt_type,
 				      unsigned char *pbyTxBufferAddr,
 				      unsigned int uDMAIdx,
 				      struct vnt_tx_desc *pHeadTD,
@@ -1097,7 +1097,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 	/* Set RrvTime/RTS/CTS Buffer */
 	wTxBufSize = sizeof(struct vnt_tx_fifo_head);
-	if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {/* 802.11g packet */
+	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {/* 802.11g packet */
 
 		if (byFBOption == AUTO_FB_NONE) {
 			if (bRTS) {/* RTS_need */
@@ -1218,12 +1218,12 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
-	s_vGenerateTxParameter(p_device, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
+	s_vGenerateTxParameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
 			       cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
-	uDuration = s_uFillDataHead(p_device, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK,
-				    0, 0, uMACfragNum, byFBOption, p_device->wCurrentRate,
-				    is_pspoll);
+	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
+				    bNeedACK, 0, 0, uMACfragNum, byFBOption,
+				    p_device->wCurrentRate, is_pspoll);
 
 	hdr->duration_id = uDuration;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 05/17] staging: vt6655: changed variable name: pvRTS
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (3 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 04/17] staging: vt6655: changed variable name: byPktType Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-26 13:51   ` Greg KH
  2022-10-25 23:37 ` [PATCH 06/17] staging: vt6655: changed variable name: cbFrameLength Tanjuate Brunostar
                   ` (11 subsequent siblings)
  16 siblings, 1 reply; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

	change variable names pvRTS to meet the
        linux coding standard, as it says to avoid using camelCase naming
        style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 56 +++++++++++++++++------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 2cac8f3882df..e97cba014adf 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -87,7 +87,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
 /*---------------------  Static Functions  --------------------------*/
 static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
-			      void *pvRTS,
+			      void *pv_rts,
 			      unsigned int	cbFrameLength,
 			      bool bNeedAck,
 			      bool bDisCRC,
@@ -99,7 +99,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned char by_pkt_type,
 				   struct vnt_tx_fifo_head *,
 				   void *pvRrvTime,
-				   void *pvRTS,
+				   void *pv_rts,
 				   void *pvCTS,
 				   unsigned int	cbFrameSize,
 				   bool bNeedACK,
@@ -622,7 +622,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 
 static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
-			      void *pvRTS,
+			      void *pv_rts,
 			      unsigned int cbFrameLength,
 			      bool bNeedAck,
 			      bool bDisCRC,
@@ -632,7 +632,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 {
 	unsigned int uRTSFrameLen = 20;
 
-	if (!pvRTS)
+	if (!pv_rts)
 		return;
 
 	if (bDisCRC) {
@@ -648,7 +648,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 	 */
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (byFBOption == AUTO_FB_NONE) {
-			struct vnt_rts_g *buf = pvRTS;
+			struct vnt_rts_g *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopCCKBasicRate,
@@ -683,7 +683,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ra, hdr->addr1);
 			ether_addr_copy(buf->data.ta, hdr->addr2);
 		} else {
-			struct vnt_rts_g_fb *buf = pvRTS;
+			struct vnt_rts_g_fb *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopCCKBasicRate,
@@ -739,7 +739,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 		} /* if (byFBOption == AUTO_FB_NONE) */
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (byFBOption == AUTO_FB_NONE) {
-			struct vnt_rts_ab *buf = pvRTS;
+			struct vnt_rts_ab *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
@@ -759,7 +759,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ra, hdr->addr1);
 			ether_addr_copy(buf->data.ta, hdr->addr2);
 		} else {
-			struct vnt_rts_a_fb *buf = pvRTS;
+			struct vnt_rts_a_fb *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
 					  p_device->byTopOFDMBasicRate,
@@ -790,7 +790,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ta, hdr->addr2);
 		}
 	} else if (by_pkt_type == PK_TYPE_11B) {
-		struct vnt_rts_ab *buf = pvRTS;
+		struct vnt_rts_ab *buf = pv_rts;
 		/* Get SignalField, ServiceField & Length */
 		vnt_get_phy_field(p_device, uRTSFrameLen,
 				  p_device->byTopCCKBasicRate,
@@ -918,7 +918,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  *      pTxDataHead     - Transmit Data Buffer
  *      pTxBufHead      - pTxBufHead
  *      pvRrvTime        - pvRrvTime
- *      pvRTS            - RTS Buffer
+ *      pv_rts            - RTS Buffer
  *      pCTS            - CTS Buffer
  *      cbFrameSize     - Transmit Data Length (Hdr+Payload+FCS)
  *      bNeedACK        - If need ACK
@@ -935,7 +935,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned char by_pkt_type,
 				   struct vnt_tx_fifo_head *tx_buffer_head,
 				   void *pvRrvTime,
-				   void *pvRTS,
+				   void *pv_rts,
 				   void *pvCTS,
 				   unsigned int cbFrameSize,
 				   bool bNeedACK,
@@ -961,7 +961,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 		return;
 
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
-		if (pvRTS) { /* RTS_need */
+		if (pv_rts) { /* RTS_need */
 			/* Fill RsvTime */
 			struct vnt_rrv_time_rts *buf = pvRrvTime;
 
@@ -977,7 +977,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 								p_device->byTopCCKBasicRate,
 								bNeedACK);
 
-			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
@@ -995,7 +995,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				       bDisCRC, wCurrentRate, byFBOption);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
-		if (pvRTS) {/* RTS_need, non PCF mode */
+		if (pv_rts) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
 			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cbFrameSize,
@@ -1004,16 +1004,16 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
-		} else if (!pvRTS) {/* RTS_needless, non PCF mode */
+		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 		}
 	} else if (by_pkt_type == PK_TYPE_11B) {
-		if (pvRTS) {/* RTS_need, non PCF mode */
+		if (pv_rts) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
 			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cbFrameSize,
@@ -1022,7 +1022,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pvRTS, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
@@ -1061,7 +1061,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	unsigned int cbHeaderLength = 0;
 	void *pvRrvTime = NULL;
 	struct vnt_mic_hdr *pMICHDR = NULL;
-	void *pvRTS = NULL;
+	void *pv_rts = NULL;
 	void *pvCTS = NULL;
 	void *pvTxDataHd = NULL;
 	unsigned short wTxBufSize;   /* FFinfo size */
@@ -1104,7 +1104,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
-				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
@@ -1117,7 +1117,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
-				pvRTS = NULL;
+				pv_rts = NULL;
 				pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
 						  sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
@@ -1133,7 +1133,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
-				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
@@ -1146,7 +1146,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
-				pvRTS = NULL;
+				pv_rts = NULL;
 				pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
 				pvTxDataHd = (void  *)(pbyTxBufferAddr + wTxBufSize +
@@ -1164,7 +1164,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
@@ -1177,7 +1177,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pvRTS = NULL;
+				pv_rts = NULL;
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
@@ -1190,7 +1190,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
@@ -1203,7 +1203,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pvRTS = NULL;
+				pv_rts = NULL;
 				pvCTS = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
@@ -1218,7 +1218,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
-	s_vGenerateTxParameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
+	s_vGenerateTxParameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pv_rts, pvCTS,
 			       cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
 	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 06/17] staging: vt6655: changed variable name: cbFrameLength
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (4 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 05/17] staging: vt6655: changed variable name: pvRTS Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 07/17] staging: vt6655: changed variable name: b_need_ack Tanjuate Brunostar
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names cbFrameLength to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 128 +++++++++++++++++-----------------
 1 file changed, 65 insertions(+), 63 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index e97cba014adf..699ca2685052 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -88,7 +88,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
 static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pv_rts,
-			      unsigned int	cbFrameLength,
+			      unsigned int	cb_frame_length,
 			      bool bNeedAck,
 			      bool bDisCRC,
 			      struct ieee80211_hdr *hdr,
@@ -116,7 +116,7 @@ s_cbFillTxBufHead(struct vnt_private *p_device, unsigned char by_pkt_type,
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
-			      unsigned int cbFrameLength,
+			      unsigned int cb_frame_length,
 			      unsigned int uDMAIdx,
 			      bool bNeedAck,
 			      unsigned int uFragIdx,
@@ -141,13 +141,13 @@ static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
  */
 static unsigned int s_uGetTxRsvTime(struct vnt_private *p_device,
 				    unsigned char by_pkt_type,
-				    unsigned int cbFrameLength,
+				    unsigned int cb_frame_length,
 				    unsigned short wRate,
 				    bool bNeedAck)
 {
 	unsigned int uDataTime, uAckTime;
 
-	uDataTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, cbFrameLength, wRate);
+	uDataTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, cb_frame_length, wRate);
 
 	if (!bNeedAck)
 		return uDataTime;
@@ -221,7 +221,7 @@ static __le16 get_rtscts_time(struct vnt_private *priv,
 /* byFreqType 0: 5GHz, 1:2.4Ghz */
 static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				       unsigned char byDurType,
-				       unsigned int cbFrameLength,
+				       unsigned int cb_frame_length,
 				       unsigned char by_pkt_type,
 				       unsigned short wRate,
 				       bool bNeedAck,
@@ -239,7 +239,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 	if (uFragIdx == (uMACfragNum - 2))
 		len = cbLastFragmentSize;
 	else
-		len = cbFrameLength;
+		len = cb_frame_length;
 
 	switch (byDurType) {
 	case DATADUR_B:    /* DATADUR_B */
@@ -319,7 +319,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 /* byFreqType: 0=>5GHZ 1=>2.4GHZ */
 static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 				   unsigned char byDurType,
-				   unsigned int cbFrameLength,
+				   unsigned int cb_frame_length,
 				   unsigned char by_pkt_type,
 				   unsigned short wRate,
 				   bool bNeedAck,
@@ -332,26 +332,26 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA:    /* RTSDuration_ba */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_AA:    /* RTSDuration_aa */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
 		break;
 
 	case CTSDUR_BA:    /* CTSDuration_ba */
 		uDurTime = p_device->uSIFS + s_uGetTxRsvTime(p_device, by_pkt_type,
-							    cbFrameLength, wRate, bNeedAck);
+							    cb_frame_length, wRate, bNeedAck);
 		break;
 
 	case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */
@@ -359,11 +359,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -373,11 +373,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -387,11 +387,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 					     p_device->byTopCCKBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -401,11 +401,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 					     p_device->byTopOFDMBasicRate);
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -413,11 +413,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -425,11 +425,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
-				s_uGetTxRsvTime(p_device, by_pkt_type, cbFrameLength,
+				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
 
 		break;
@@ -444,7 +444,7 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
-			      unsigned int cbFrameLength,
+			      unsigned int cb_frame_length,
 			      unsigned int uDMAIdx,
 			      bool bNeedAck,
 			      unsigned int uFragIdx,
@@ -466,10 +466,10 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		if (byFBOption == AUTO_FB_NONE) {
 			struct vnt_tx_datahead_g *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
+			vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
 					  by_pkt_type, &buf->a);
 
-			vnt_get_phy_field(p_device, cbFrameLength,
+			vnt_get_phy_field(p_device, cb_frame_length,
 					  p_device->byTopCCKBasicRate,
 					  PK_TYPE_11B, &buf->b);
 
@@ -482,7 +482,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 				/* Get Duration and TimeStamp */
 				buf->duration_a =
 					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-									    cbFrameLength,
+									    cb_frame_length,
 									    by_pkt_type,
 									    wCurrentRate, bNeedAck,
 									    uFragIdx,
@@ -491,7 +491,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 									    byFBOption));
 				buf->duration_b =
 					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
-									    cbFrameLength,
+									    cb_frame_length,
 									    PK_TYPE_11B,
 									    p_device->byTopCCKBasicRate,
 									    bNeedAck, uFragIdx,
@@ -508,32 +508,34 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		}
 
 		/* Get SignalField, ServiceField & Length */
-		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
+		vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
 				  by_pkt_type, &buf->a);
 
-		vnt_get_phy_field(p_device, cbFrameLength,
+		vnt_get_phy_field(p_device, cb_frame_length,
 				  p_device->byTopCCKBasicRate,
 				  PK_TYPE_11B, &buf->b);
 		/* Get Duration and TimeStamp */
 		buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								      cbFrameLength, by_pkt_type,
+								      cb_frame_length, by_pkt_type,
 								      wCurrentRate, bNeedAck,
 								      uFragIdx, cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
 		buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
-								      cbFrameLength, PK_TYPE_11B,
+								      cb_frame_length, PK_TYPE_11B,
 								      p_device->byTopCCKBasicRate,
 								      bNeedAck, uFragIdx,
 								      cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
 		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
-									 cbFrameLength, by_pkt_type,
+									 cb_frame_length,
+									 by_pkt_type,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
 		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
-									 cbFrameLength, by_pkt_type,
+									 cb_frame_length,
+									 by_pkt_type,
 									 wCurrentRate, bNeedAck,
 									 uFragIdx,
 									 cbLastFragmentSize,
@@ -551,25 +553,25 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			/* Auto Fallback */
 			struct vnt_tx_datahead_a_fb *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
-			vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
+			vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
 					  by_pkt_type, &buf->a);
 
 			/* Get Duration and TimeStampOff */
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								    cbFrameLength, by_pkt_type,
+								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f0 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
-								    cbFrameLength, by_pkt_type,
+								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f1 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
-								    cbFrameLength, by_pkt_type,
+								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
@@ -578,7 +580,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		}
 
 		/* Get SignalField, ServiceField & Length */
-		vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
+		vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
 				  by_pkt_type, &buf->ab);
 
 		if (is_pspoll) {
@@ -589,7 +591,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			/* Get Duration and TimeStampOff */
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
-								    cbFrameLength, by_pkt_type,
+								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, bNeedAck,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
@@ -600,7 +602,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 	}
 
 	/* Get SignalField, ServiceField & Length */
-	vnt_get_phy_field(p_device, cbFrameLength, wCurrentRate,
+	vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
 			  by_pkt_type, &buf->ab);
 
 	if (is_pspoll) {
@@ -610,7 +612,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 	} else {
 		/* Get Duration and TimeStampOff */
 		buf->duration =
-			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cbFrameLength,
+			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cb_frame_length,
 							    by_pkt_type, wCurrentRate, bNeedAck,
 							    uFragIdx, cbLastFragmentSize,
 							    uMACfragNum, byFBOption));
@@ -623,7 +625,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pv_rts,
-			      unsigned int cbFrameLength,
+			      unsigned int cb_frame_length,
 			      bool bNeedAck,
 			      bool bDisCRC,
 			      struct ieee80211_hdr *hdr,
@@ -660,17 +662,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			/* Get Duration */
 			buf->duration_bb =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
-						     cbFrameLength, PK_TYPE_11B,
+						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
@@ -695,37 +697,37 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			/* Get Duration */
 			buf->duration_bb =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
-						     cbFrameLength, PK_TYPE_11B,
+						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
 						     bNeedAck, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F0,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F1,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_aa_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration_aa;
@@ -747,7 +749,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			/* Get Duration */
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration;
@@ -767,17 +769,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			/* Get Duration */
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->rts_duration_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 			buf->data.duration = buf->duration;
@@ -797,7 +799,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				  PK_TYPE_11B, &buf->ab);
 		/* Get Duration */
 		buf->duration =
-			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cbFrameLength,
+			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cb_frame_length,
 					     by_pkt_type, wCurrentRate, bNeedAck,
 					     byFBOption);
 
@@ -815,7 +817,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			   unsigned int uDMAIdx,
 			   unsigned char by_pkt_type,
 			   void *pvCTS,
-			   unsigned int cbFrameLength,
+			   unsigned int cb_frame_length,
 			   bool bNeedAck,
 			   bool bDisCRC,
 			   unsigned short wCurrentRate,
@@ -846,21 +848,21 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f0 */
 			buf->cts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F0,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f1 */
 			buf->cts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F1,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
@@ -889,7 +891,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			/* Get CTSDuration_ba */
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
-						     cbFrameLength, by_pkt_type,
+						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, bNeedAck,
 						     byFBOption);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 07/17] staging: vt6655: changed variable name: b_need_ack
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (5 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 06/17] staging: vt6655: changed variable name: cbFrameLength Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 08/17] staging: vt6655: changed variable name: bDisCRC Tanjuate Brunostar
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names pDevice to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 129 +++++++++++++++++-----------------
 1 file changed, 65 insertions(+), 64 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 699ca2685052..1949a647a443 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -89,7 +89,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pv_rts,
 			      unsigned int	cb_frame_length,
-			      bool bNeedAck,
+			      bool b_need_ack,
 			      bool bDisCRC,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
@@ -118,7 +118,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      void *pTxDataHead,
 			      unsigned int cb_frame_length,
 			      unsigned int uDMAIdx,
-			      bool bNeedAck,
+			      bool b_need_ack,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
 			      unsigned int uMACfragNum,
@@ -143,13 +143,13 @@ static unsigned int s_uGetTxRsvTime(struct vnt_private *p_device,
 				    unsigned char by_pkt_type,
 				    unsigned int cb_frame_length,
 				    unsigned short wRate,
-				    bool bNeedAck)
+				    bool b_need_ack)
 {
 	unsigned int uDataTime, uAckTime;
 
 	uDataTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, cb_frame_length, wRate);
 
-	if (!bNeedAck)
+	if (!b_need_ack)
 		return uDataTime;
 
 	/*
@@ -224,7 +224,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				       unsigned int cb_frame_length,
 				       unsigned char by_pkt_type,
 				       unsigned short wRate,
-				       bool bNeedAck,
+				       bool b_need_ack,
 				       unsigned int uFragIdx,
 				       unsigned int cbLastFragmentSize,
 				       unsigned int uMACfragNum,
@@ -243,51 +243,51 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 
 	switch (byDurType) {
 	case DATADUR_B:    /* DATADUR_B */
-		if (bNeedAck) {
+		if (b_need_ack) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     by_pkt_type, 14,
 						     p_device->byTopCCKBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
-			if (!bNeedAck)
+			if (!b_need_ack)
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
 			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
-						       len, wRate, bNeedAck);
+						       len, wRate, b_need_ack);
 		}
 
 		return p_device->uSIFS + uAckTime + uNextPktTime;
 
 	case DATADUR_A:    /* DATADUR_A */
-		if (bNeedAck) {
+		if (b_need_ack) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     by_pkt_type, 14,
 						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
-			if (!bNeedAck)
+			if (!b_need_ack)
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
 			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
-						       len, wRate, bNeedAck);
+						       len, wRate, b_need_ack);
 		}
 
 		return p_device->uSIFS + uAckTime + uNextPktTime;
 
 	case DATADUR_A_F0:    /* DATADUR_A_F0 */
 	case DATADUR_A_F1:    /* DATADUR_A_F1 */
-		if (bNeedAck) {
+		if (b_need_ack) {
 			uAckTime = bb_get_frame_time(p_device->preamble_type,
 						     by_pkt_type, 14,
 						     p_device->byTopOFDMBasicRate);
 		}
 		/* Non Frag or Last Frag */
 		if ((uMACfragNum == 1) || bLastFrag) {
-			if (!bNeedAck)
+			if (!b_need_ack)
 				return 0;
 		} else {
 			/* First Frag or Mid Frag */
@@ -304,7 +304,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				wRate = w_fb_opt_1[FB_RATE0][wRate];
 
 			uNextPktTime = s_uGetTxRsvTime(p_device, by_pkt_type,
-						       len, wRate, bNeedAck);
+						       len, wRate, b_need_ack);
 		}
 
 		return p_device->uSIFS + uAckTime + uNextPktTime;
@@ -322,7 +322,7 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 				   unsigned int cb_frame_length,
 				   unsigned char by_pkt_type,
 				   unsigned short wRate,
-				   bool bNeedAck,
+				   bool b_need_ack,
 				   unsigned char byFBOption)
 {
 	unsigned int uCTSTime = 0, uDurTime = 0;
@@ -332,26 +332,26 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, b_need_ack);
 		break;
 
 	case RTSDUR_BA:    /* RTSDuration_ba */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, b_need_ack);
 		break;
 
 	case RTSDUR_AA:    /* RTSDuration_aa */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
 		uDurTime = uCTSTime + 2 * p_device->uSIFS +
-			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, bNeedAck);
+			s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length, wRate, b_need_ack);
 		break;
 
 	case CTSDUR_BA:    /* CTSDuration_ba */
 		uDurTime = p_device->uSIFS + s_uGetTxRsvTime(p_device, by_pkt_type,
-							    cb_frame_length, wRate, bNeedAck);
+							    cb_frame_length, wRate, b_need_ack);
 		break;
 
 	case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */
@@ -360,11 +360,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -374,11 +374,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -388,11 +388,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -402,11 +402,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -414,11 +414,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -426,11 +426,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
 		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
-						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], bNeedAck);
+						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
 
 		break;
 
@@ -446,7 +446,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      void *pTxDataHead,
 			      unsigned int cb_frame_length,
 			      unsigned int uDMAIdx,
-			      bool bNeedAck,
+			      bool b_need_ack,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
 			      unsigned int uMACfragNum,
@@ -484,7 +484,8 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 									    cb_frame_length,
 									    by_pkt_type,
-									    wCurrentRate, bNeedAck,
+									    wCurrentRate,
+									    b_need_ack,
 									    uFragIdx,
 									    cbLastFragmentSize,
 									    uMACfragNum,
@@ -494,7 +495,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 									    cb_frame_length,
 									    PK_TYPE_11B,
 									    p_device->byTopCCKBasicRate,
-									    bNeedAck, uFragIdx,
+									    b_need_ack, uFragIdx,
 									    cbLastFragmentSize,
 									    uMACfragNum,
 									    byFBOption));
@@ -517,26 +518,26 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		/* Get Duration and TimeStamp */
 		buf->duration_a = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								      cb_frame_length, by_pkt_type,
-								      wCurrentRate, bNeedAck,
+								      wCurrentRate, b_need_ack,
 								      uFragIdx, cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
 		buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
 								      cb_frame_length, PK_TYPE_11B,
 								      p_device->byTopCCKBasicRate,
-								      bNeedAck, uFragIdx,
+								      b_need_ack, uFragIdx,
 								      cbLastFragmentSize,
 								      uMACfragNum, byFBOption));
 		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 									 cb_frame_length,
 									 by_pkt_type,
-									 wCurrentRate, bNeedAck,
+									 wCurrentRate, b_need_ack,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
 		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 									 cb_frame_length,
 									 by_pkt_type,
-									 wCurrentRate, bNeedAck,
+									 wCurrentRate, b_need_ack,
 									 uFragIdx,
 									 cbLastFragmentSize,
 									 uMACfragNum, byFBOption));
@@ -560,19 +561,19 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								    cb_frame_length, by_pkt_type,
-								    wCurrentRate, bNeedAck,
+								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f0 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 								    cb_frame_length, by_pkt_type,
-								    wCurrentRate, bNeedAck,
+								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->duration_f1 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 								    cb_frame_length, by_pkt_type,
-								    wCurrentRate, bNeedAck,
+								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 			buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
@@ -592,7 +593,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			buf->duration =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A,
 								    cb_frame_length, by_pkt_type,
-								    wCurrentRate, bNeedAck,
+								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
 								    uMACfragNum, byFBOption));
 		}
@@ -613,7 +614,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		/* Get Duration and TimeStampOff */
 		buf->duration =
 			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cb_frame_length,
-							    by_pkt_type, wCurrentRate, bNeedAck,
+							    by_pkt_type, wCurrentRate, b_need_ack,
 							    uFragIdx, cbLastFragmentSize,
 							    uMACfragNum, byFBOption));
 	}
@@ -626,7 +627,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pv_rts,
 			      unsigned int cb_frame_length,
-			      bool bNeedAck,
+			      bool b_need_ack,
 			      bool bDisCRC,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
@@ -664,16 +665,16 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
-						     bNeedAck, byFBOption);
+						     b_need_ack, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 
 			buf->data.duration = buf->duration_aa;
@@ -699,36 +700,36 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
-						     bNeedAck, byFBOption);
+						     b_need_ack, byFBOption);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F0,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_aa_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F1,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_aa_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->data.duration = buf->duration_aa;
 			/* Get RTS Frame body */
@@ -750,7 +751,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->data.duration = buf->duration;
 			/* Get RTS Frame body */
@@ -770,17 +771,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			buf->duration =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->rts_duration_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 			buf->data.duration = buf->duration;
 			/* Get RTS Frame body */
@@ -800,7 +801,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 		/* Get Duration */
 		buf->duration =
 			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cb_frame_length,
-					     by_pkt_type, wCurrentRate, bNeedAck,
+					     by_pkt_type, wCurrentRate, b_need_ack,
 					     byFBOption);
 
 		buf->data.duration = buf->duration;
@@ -818,7 +819,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			   unsigned char by_pkt_type,
 			   void *pvCTS,
 			   unsigned int cb_frame_length,
-			   bool bNeedAck,
+			   bool b_need_ack,
 			   bool bDisCRC,
 			   unsigned short wCurrentRate,
 			   unsigned char byFBOption)
@@ -849,21 +850,21 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f0 */
 			buf->cts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F0,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 
 			/* Get CTSDuration_ba_f1 */
 			buf->cts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F1,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 
 			/* Get CTS Frame body */
@@ -892,7 +893,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
-						     wCurrentRate, bNeedAck,
+						     wCurrentRate, b_need_ack,
 						     byFBOption);
 
 			/* Get CTS Frame body */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 08/17] staging: vt6655: changed variable name: bDisCRC
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (6 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 07/17] staging: vt6655: changed variable name: b_need_ack Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 09/17] staging: vt6655: changed variable name: byFBOption Tanjuate Brunostar
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names bDisCRC to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 1949a647a443..cb6d915fe7d0 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -90,7 +90,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      void *pv_rts,
 			      unsigned int	cb_frame_length,
 			      bool b_need_ack,
-			      bool bDisCRC,
+			      bool b_dis_crc,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
 			      unsigned char byFBOption);
@@ -628,7 +628,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      void *pv_rts,
 			      unsigned int cb_frame_length,
 			      bool b_need_ack,
-			      bool bDisCRC,
+			      bool b_dis_crc,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
 			      unsigned char byFBOption)
@@ -638,7 +638,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 	if (!pv_rts)
 		return;
 
-	if (bDisCRC) {
+	if (b_dis_crc) {
 		/* When CRCDIS bit is on, H/W forgot to generate FCS for
 		 * RTS frame, in this case we need to decrease its length by 4.
 		 */
@@ -820,7 +820,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			   void *pvCTS,
 			   unsigned int cb_frame_length,
 			   bool b_need_ack,
-			   bool bDisCRC,
+			   bool b_dis_crc,
 			   unsigned short wCurrentRate,
 			   unsigned char byFBOption)
 {
@@ -829,7 +829,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 	if (!pvCTS)
 		return;
 
-	if (bDisCRC) {
+	if (b_dis_crc) {
 		/* When CRCDIS bit is on, H/W forgot to generate FCS for
 		 * CTS frame, in this case we need to decrease its length by 4.
 		 */
@@ -947,13 +947,13 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned short wCurrentRate)
 {
 	u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
-	bool bDisCRC = false;
+	bool b_dis_crc = false;
 	unsigned char byFBOption = AUTO_FB_NONE;
 
 	tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate);
 
 	if (fifo_ctl & FIFOCTL_CRCDIS)
-		bDisCRC = true;
+		b_dis_crc = true;
 
 	if (fifo_ctl & FIFOCTL_AUTO_FB_0)
 		byFBOption = AUTO_FB_0;
@@ -981,7 +981,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 								bNeedACK);
 
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
 
@@ -995,7 +995,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill CTS */
 			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pvCTS, cbFrameSize, bNeedACK,
-				       bDisCRC, wCurrentRate, byFBOption);
+				       b_dis_crc, wCurrentRate, byFBOption);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
@@ -1008,7 +1008,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
@@ -1026,7 +1026,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 09/17] staging: vt6655: changed variable name: byFBOption
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (7 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 08/17] staging: vt6655: changed variable name: bDisCRC Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 10/17] staging: vt6655: changed variable name: s_vGenerateTxParameter Tanjuate Brunostar
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names byFBOption to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 144 +++++++++++++++++-----------------
 1 file changed, 73 insertions(+), 71 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index cb6d915fe7d0..3d28cbfec618 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -93,7 +93,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      bool b_dis_crc,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
-			      unsigned char byFBOption);
+			      unsigned char by_fb_option);
 
 static void s_vGenerateTxParameter(struct vnt_private *p_device,
 				   unsigned char by_pkt_type,
@@ -122,7 +122,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
 			      unsigned int uMACfragNum,
-			      unsigned char byFBOption,
+			      unsigned char by_fb_option,
 			      unsigned short wCurrentRate,
 			      bool is_pspoll);
 
@@ -228,7 +228,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 				       unsigned int uFragIdx,
 				       unsigned int cbLastFragmentSize,
 				       unsigned int uMACfragNum,
-				       unsigned char byFBOption)
+				       unsigned char by_fb_option)
 {
 	bool bLastFrag = false;
 	unsigned int uAckTime = 0, uNextPktTime = 0, len;
@@ -298,7 +298,7 @@ static unsigned int s_uGetDataDuration(struct vnt_private *p_device,
 
 			wRate -= RATE_18M;
 
-			if (byFBOption == AUTO_FB_0)
+			if (by_fb_option == AUTO_FB_0)
 				wRate = w_fb_opt_0[FB_RATE0][wRate];
 			else
 				wRate = w_fb_opt_1[FB_RATE0][wRate];
@@ -323,7 +323,7 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 				   unsigned char by_pkt_type,
 				   unsigned short wRate,
 				   bool b_need_ack,
-				   unsigned char byFBOption)
+				   unsigned char by_fb_option)
 {
 	unsigned int uCTSTime = 0, uDurTime = 0;
 
@@ -357,11 +357,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case RTSDUR_BA_F0: /* RTSDuration_ba_f0 */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
@@ -371,11 +371,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case RTSDUR_AA_F0: /* RTSDuration_aa_f0 */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
@@ -385,11 +385,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case RTSDUR_BA_F1: /* RTSDuration_ba_f1 */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopCCKBasicRate);
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
@@ -399,11 +399,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 	case RTSDUR_AA_F1: /* RTSDuration_aa_f1 */
 		uCTSTime = bb_get_frame_time(p_device->preamble_type, by_pkt_type, 14,
 					     p_device->byTopOFDMBasicRate);
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = uCTSTime + 2 * p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
@@ -411,11 +411,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		break;
 
 	case CTSDUR_BA_F0: /* CTSDuration_ba_f0 */
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE0][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE0][wRate - RATE_18M], b_need_ack);
@@ -423,11 +423,11 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *p_device,
 		break;
 
 	case CTSDUR_BA_F1: /* CTSDuration_ba_f1 */
-		if ((byFBOption == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		if ((by_fb_option == AUTO_FB_0) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_0[FB_RATE1][wRate - RATE_18M], b_need_ack);
-		else if ((byFBOption == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
+		else if ((by_fb_option == AUTO_FB_1) && (wRate >= RATE_18M) && (wRate <= RATE_54M))
 			uDurTime = p_device->uSIFS +
 				s_uGetTxRsvTime(p_device, by_pkt_type, cb_frame_length,
 						w_fb_opt_1[FB_RATE1][wRate - RATE_18M], b_need_ack);
@@ -450,7 +450,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
 			      unsigned int uMACfragNum,
-			      unsigned char byFBOption,
+			      unsigned char by_fb_option,
 			      unsigned short wCurrentRate,
 			      bool is_pspoll)
 {
@@ -463,7 +463,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 		/* Auto Fallback */
 		struct vnt_tx_datahead_g_fb *buf = pTxDataHead;
 
-		if (byFBOption == AUTO_FB_NONE) {
+		if (by_fb_option == AUTO_FB_NONE) {
 			struct vnt_tx_datahead_g *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, cb_frame_length, wCurrentRate,
@@ -489,7 +489,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 									    uFragIdx,
 									    cbLastFragmentSize,
 									    uMACfragNum,
-									    byFBOption));
+									    by_fb_option));
 				buf->duration_b =
 					cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
 									    cb_frame_length,
@@ -498,7 +498,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 									    b_need_ack, uFragIdx,
 									    cbLastFragmentSize,
 									    uMACfragNum,
-									    byFBOption));
+									    by_fb_option));
 			}
 
 			buf->time_stamp_off_a = vnt_time_stamp_off(p_device, wCurrentRate);
@@ -520,37 +520,39 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 								      cb_frame_length, by_pkt_type,
 								      wCurrentRate, b_need_ack,
 								      uFragIdx, cbLastFragmentSize,
-								      uMACfragNum, byFBOption));
+								      uMACfragNum, by_fb_option));
 		buf->duration_b = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B,
 								      cb_frame_length, PK_TYPE_11B,
 								      p_device->byTopCCKBasicRate,
 								      b_need_ack, uFragIdx,
 								      cbLastFragmentSize,
-								      uMACfragNum, byFBOption));
+								      uMACfragNum, by_fb_option));
 		buf->duration_a_f0 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 									 cb_frame_length,
 									 by_pkt_type,
 									 wCurrentRate, b_need_ack,
 									 uFragIdx,
 									 cbLastFragmentSize,
-									 uMACfragNum, byFBOption));
+									 uMACfragNum,
+									 by_fb_option));
 		buf->duration_a_f1 = cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 									 cb_frame_length,
 									 by_pkt_type,
 									 wCurrentRate, b_need_ack,
 									 uFragIdx,
 									 cbLastFragmentSize,
-									 uMACfragNum, byFBOption));
+									 uMACfragNum,
+									 by_fb_option));
 
 		buf->time_stamp_off_a = vnt_time_stamp_off(p_device, wCurrentRate);
 		buf->time_stamp_off_b = vnt_time_stamp_off(p_device, p_device->byTopCCKBasicRate);
 
 		return buf->duration_a;
-		  /* if (byFBOption == AUTO_FB_NONE) */
+		  /* if (by_fb_option == AUTO_FB_NONE) */
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		struct vnt_tx_datahead_ab *buf = pTxDataHead;
 
-		if (byFBOption != AUTO_FB_NONE) {
+		if (by_fb_option != AUTO_FB_NONE) {
 			/* Auto Fallback */
 			struct vnt_tx_datahead_a_fb *buf = pTxDataHead;
 			/* Get SignalField, ServiceField & Length */
@@ -563,19 +565,19 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
-								    uMACfragNum, byFBOption));
+								    uMACfragNum, by_fb_option));
 			buf->duration_f0 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F0,
 								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
-								    uMACfragNum, byFBOption));
+								    uMACfragNum, by_fb_option));
 			buf->duration_f1 =
 				cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_A_F1,
 								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
-								    uMACfragNum, byFBOption));
+								    uMACfragNum, by_fb_option));
 			buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
 			return buf->duration;
 		}
@@ -595,7 +597,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 								    cb_frame_length, by_pkt_type,
 								    wCurrentRate, b_need_ack,
 								    uFragIdx, cbLastFragmentSize,
-								    uMACfragNum, byFBOption));
+								    uMACfragNum, by_fb_option));
 		}
 
 		buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
@@ -616,7 +618,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			cpu_to_le16((u16)s_uGetDataDuration(p_device, DATADUR_B, cb_frame_length,
 							    by_pkt_type, wCurrentRate, b_need_ack,
 							    uFragIdx, cbLastFragmentSize,
-							    uMACfragNum, byFBOption));
+							    uMACfragNum, by_fb_option));
 	}
 
 	buf->time_stamp_off = vnt_time_stamp_off(p_device, wCurrentRate);
@@ -631,7 +633,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      bool b_dis_crc,
 			      struct ieee80211_hdr *hdr,
 			      unsigned short wCurrentRate,
-			      unsigned char byFBOption)
+			      unsigned char by_fb_option)
 {
 	unsigned int uRTSFrameLen = 20;
 
@@ -650,7 +652,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 	 * Otherwise, we need to modify codes for them.
 	 */
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
-		if (byFBOption == AUTO_FB_NONE) {
+		if (by_fb_option == AUTO_FB_NONE) {
 			struct vnt_rts_g *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
@@ -665,17 +667,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
-						     b_need_ack, byFBOption);
+						     b_need_ack, by_fb_option);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 
 			buf->data.duration = buf->duration_aa;
 			/* Get RTS Frame body */
@@ -700,37 +702,37 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BB,
 						     cb_frame_length, PK_TYPE_11B,
 						     p_device->byTopCCKBasicRate,
-						     b_need_ack, byFBOption);
+						     b_need_ack, by_fb_option);
 			buf->duration_aa =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->duration_ba =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F0,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_aa_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_BA_F1,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_aa_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->data.duration = buf->duration_aa;
 			/* Get RTS Frame body */
 			buf->data.frame_control =
@@ -739,9 +741,9 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 
 			ether_addr_copy(buf->data.ra, hdr->addr1);
 			ether_addr_copy(buf->data.ta, hdr->addr2);
-		} /* if (byFBOption == AUTO_FB_NONE) */
+		} /* if (by_fb_option == AUTO_FB_NONE) */
 	} else if (by_pkt_type == PK_TYPE_11A) {
-		if (byFBOption == AUTO_FB_NONE) {
+		if (by_fb_option == AUTO_FB_NONE) {
 			struct vnt_rts_ab *buf = pv_rts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uRTSFrameLen,
@@ -752,7 +754,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->data.duration = buf->duration;
 			/* Get RTS Frame body */
 			buf->data.frame_control =
@@ -772,17 +774,17 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_f0 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F0,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->rts_duration_f1 =
 				s_uGetRTSCTSDuration(p_device, RTSDUR_AA_F1,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 			buf->data.duration = buf->duration;
 			/* Get RTS Frame body */
 			buf->data.frame_control =
@@ -802,7 +804,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 		buf->duration =
 			s_uGetRTSCTSDuration(p_device, RTSDUR_BB, cb_frame_length,
 					     by_pkt_type, wCurrentRate, b_need_ack,
-					     byFBOption);
+					     by_fb_option);
 
 		buf->data.duration = buf->duration;
 		/* Get RTS Frame body */
@@ -822,7 +824,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			   bool b_need_ack,
 			   bool b_dis_crc,
 			   unsigned short wCurrentRate,
-			   unsigned char byFBOption)
+			   unsigned char by_fb_option)
 {
 	unsigned int uCTSFrameLen = 14;
 
@@ -837,7 +839,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 	}
 
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
-		if (byFBOption != AUTO_FB_NONE &&
+		if (by_fb_option != AUTO_FB_NONE &&
 		    uDMAIdx != TYPE_ATIMDMA &&
 		    uDMAIdx != TYPE_BEACONDMA) {
 			/* Auto Fall back */
@@ -851,21 +853,21 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 
 			/* Get CTSDuration_ba_f0 */
 			buf->cts_duration_ba_f0 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F0,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 
 			/* Get CTSDuration_ba_f1 */
 			buf->cts_duration_ba_f1 =
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA_F1,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 
 			/* Get CTS Frame body */
 			buf->data.duration = buf->duration_ba;
@@ -879,7 +881,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			ether_addr_copy(buf->data.ra,
 					p_device->abyCurrentNetAddr);
 		} else {
-			/* if (byFBOption != AUTO_FB_NONE &&
+			/* if (by_fb_option != AUTO_FB_NONE &&
 			 * uDMAIdx != TYPE_ATIMDMA &&
 			 * uDMAIdx != TYPE_BEACONDMA)
 			 */
@@ -894,7 +896,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 				s_uGetRTSCTSDuration(p_device, CTSDUR_BA,
 						     cb_frame_length, by_pkt_type,
 						     wCurrentRate, b_need_ack,
-						     byFBOption);
+						     by_fb_option);
 
 			/* Get CTS Frame body */
 			buf->data.duration = buf->duration_ba;
@@ -948,7 +950,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 {
 	u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
 	bool b_dis_crc = false;
-	unsigned char byFBOption = AUTO_FB_NONE;
+	unsigned char by_fb_option = AUTO_FB_NONE;
 
 	tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate);
 
@@ -956,9 +958,9 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 		b_dis_crc = true;
 
 	if (fifo_ctl & FIFOCTL_AUTO_FB_0)
-		byFBOption = AUTO_FB_0;
+		by_fb_option = AUTO_FB_0;
 	else if (fifo_ctl & FIFOCTL_AUTO_FB_1)
-		byFBOption = AUTO_FB_1;
+		by_fb_option = AUTO_FB_1;
 
 	if (!pvRrvTime)
 		return;
@@ -981,7 +983,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 								bNeedACK);
 
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pvRrvTime;
 
@@ -995,7 +997,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill CTS */
 			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pvCTS, cbFrameSize, bNeedACK,
-				       b_dis_crc, wCurrentRate, byFBOption);
+				       b_dis_crc, wCurrentRate, by_fb_option);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
@@ -1008,7 +1010,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
@@ -1026,7 +1028,7 @@ static void s_vGenerateTxParameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
-					  b_dis_crc, psEthHeader, wCurrentRate, byFBOption);
+					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pvRrvTime;
 
@@ -1068,7 +1070,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	void *pvCTS = NULL;
 	void *pvTxDataHd = NULL;
 	unsigned short wTxBufSize;   /* FFinfo size */
-	unsigned char byFBOption = AUTO_FB_NONE;
+	unsigned char by_fb_option = AUTO_FB_NONE;
 
 	cbFrameSize = skb->len + 4;
 
@@ -1094,15 +1096,15 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	 * Use for AUTO FALL BACK
 	 */
 	if (fifo_ctl & FIFOCTL_AUTO_FB_0)
-		byFBOption = AUTO_FB_0;
+		by_fb_option = AUTO_FB_0;
 	else if (fifo_ctl & FIFOCTL_AUTO_FB_1)
-		byFBOption = AUTO_FB_1;
+		by_fb_option = AUTO_FB_1;
 
 	/* Set RrvTime/RTS/CTS Buffer */
 	wTxBufSize = sizeof(struct vnt_tx_fifo_head);
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {/* 802.11g packet */
 
-		if (byFBOption == AUTO_FB_NONE) {
+		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {/* RTS_need */
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
@@ -1162,7 +1164,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 		} /* Auto Fall Back */
 	} else {/* 802.11a/b packet */
 
-		if (byFBOption == AUTO_FB_NONE) {
+		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {
 				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
@@ -1225,7 +1227,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 			       cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
 	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
-				    bNeedACK, 0, 0, uMACfragNum, byFBOption,
+				    bNeedACK, 0, 0, uMACfragNum, by_fb_option,
 				    p_device->wCurrentRate, is_pspoll);
 
 	hdr->duration_id = uDuration;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 10/17] staging: vt6655: changed variable name: s_vGenerateTxParameter
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (8 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 09/17] staging: vt6655: changed variable name: byFBOption Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 11/17] staging: vt6655: changed variable name: pvRrvTime Tanjuate Brunostar
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names s_vGenerateTxParameter to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 63 ++++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 3d28cbfec618..fa11677ce119 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -10,7 +10,7 @@
  * Date: May 20, 2003
  *
  * Functions:
- *      s_vGenerateTxParameter - Generate tx dma required parameter.
+ *      s_vgenerate_tx_parameter - Generate tx dma required parameter.
  *      vGenerateMACHeader - Translate 802.3 to 802.11 header
  *      cbGetFragCount - Calculate fragment number count
  *      csBeacon_xmit - beacon tx function
@@ -95,23 +95,24 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 			      unsigned short wCurrentRate,
 			      unsigned char by_fb_option);
 
-static void s_vGenerateTxParameter(struct vnt_private *p_device,
-				   unsigned char by_pkt_type,
-				   struct vnt_tx_fifo_head *,
-				   void *pvRrvTime,
-				   void *pv_rts,
-				   void *pvCTS,
-				   unsigned int	cbFrameSize,
-				   bool bNeedACK,
-				   unsigned int	uDMAIdx,
-				   void *psEthHeader,
-				   unsigned short wCurrentRate);
-
-static unsigned int
-s_cbFillTxBufHead(struct vnt_private *p_device, unsigned char by_pkt_type,
-		  unsigned char *pbyTxBufferAddr,
-		  unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD,
-		  unsigned int uNodeIndex);
+static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
+				     unsigned char by_pkt_type,
+				     struct vnt_tx_fifo_head *,
+				     void *pvRrvTime,
+				     void *pv_rts,
+				     void *pvCTS,
+				     unsigned int	cbFrameSize,
+				     bool bNeedACK,
+				     unsigned int	uDMAIdx,
+				     void *psEthHeader,
+				     unsigned short wCurrentRate);
+
+static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
+				      unsigned char by_pkt_type,
+				      unsigned char *pbyTxBufferAddr,
+				      unsigned int uDMAIdx,
+				      struct vnt_tx_desc *pHeadTD,
+				      unsigned int uNodeIndex);
 
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
@@ -936,17 +937,17 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  -
  * unsigned int cbFrameSize, Hdr+Payload+FCS
  */
-static void s_vGenerateTxParameter(struct vnt_private *p_device,
-				   unsigned char by_pkt_type,
-				   struct vnt_tx_fifo_head *tx_buffer_head,
-				   void *pvRrvTime,
-				   void *pv_rts,
-				   void *pvCTS,
-				   unsigned int cbFrameSize,
-				   bool bNeedACK,
-				   unsigned int uDMAIdx,
-				   void *psEthHeader,
-				   unsigned short wCurrentRate)
+static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
+				     unsigned char by_pkt_type,
+				     struct vnt_tx_fifo_head *tx_buffer_head,
+				     void *pvRrvTime,
+				     void *pv_rts,
+				     void *pvCTS,
+				     unsigned int cbFrameSize,
+				     bool bNeedACK,
+				     unsigned int uDMAIdx,
+				     void *psEthHeader,
+				     unsigned short wCurrentRate)
 {
 	u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
 	bool b_dis_crc = false;
@@ -1223,8 +1224,8 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
-	s_vGenerateTxParameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pv_rts, pvCTS,
-			       cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
+	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pv_rts, pvCTS,
+				 cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
 	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
 				    bNeedACK, 0, 0, uMACfragNum, by_fb_option,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 11/17] staging: vt6655: changed variable name: pvRrvTime
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (9 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 10/17] staging: vt6655: changed variable name: s_vGenerateTxParameter Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 12/17] staging: vt6655: changed variable name: cbFrameSize Tanjuate Brunostar
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names pvRrvTime to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 74 +++++++++++++++++------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index fa11677ce119..819080b14d5d 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -98,9 +98,9 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     unsigned char by_pkt_type,
 				     struct vnt_tx_fifo_head *,
-				     void *pvRrvTime,
+				     void *pv_rrv_time,
 				     void *pv_rts,
-				     void *pvCTS,
+				     void *pv_cts,
 				     unsigned int	cbFrameSize,
 				     bool bNeedACK,
 				     unsigned int	uDMAIdx,
@@ -820,7 +820,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 static void s_vFillCTSHead(struct vnt_private *p_device,
 			   unsigned int uDMAIdx,
 			   unsigned char by_pkt_type,
-			   void *pvCTS,
+			   void *pv_cts,
 			   unsigned int cb_frame_length,
 			   bool b_need_ack,
 			   bool b_dis_crc,
@@ -829,7 +829,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 {
 	unsigned int uCTSFrameLen = 14;
 
-	if (!pvCTS)
+	if (!pv_cts)
 		return;
 
 	if (b_dis_crc) {
@@ -844,7 +844,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 		    uDMAIdx != TYPE_ATIMDMA &&
 		    uDMAIdx != TYPE_BEACONDMA) {
 			/* Auto Fall back */
-			struct vnt_cts_fb *buf = pvCTS;
+			struct vnt_cts_fb *buf = pv_cts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uCTSFrameLen,
 					  p_device->byTopCCKBasicRate,
@@ -886,7 +886,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 			 * uDMAIdx != TYPE_ATIMDMA &&
 			 * uDMAIdx != TYPE_BEACONDMA)
 			 */
-			struct vnt_cts *buf = pvCTS;
+			struct vnt_cts *buf = pv_cts;
 			/* Get SignalField, ServiceField & Length */
 			vnt_get_phy_field(p_device, uCTSFrameLen,
 					  p_device->byTopCCKBasicRate,
@@ -923,7 +923,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  *      p_device         - Pointer to adapter
  *      pTxDataHead     - Transmit Data Buffer
  *      pTxBufHead      - pTxBufHead
- *      pvRrvTime        - pvRrvTime
+ *      pv_rrv_time        - pv_rrv_time
  *      pv_rts            - RTS Buffer
  *      pCTS            - CTS Buffer
  *      cbFrameSize     - Transmit Data Length (Hdr+Payload+FCS)
@@ -940,9 +940,9 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     unsigned char by_pkt_type,
 				     struct vnt_tx_fifo_head *tx_buffer_head,
-				     void *pvRrvTime,
+				     void *pv_rrv_time,
 				     void *pv_rts,
-				     void *pvCTS,
+				     void *pv_cts,
 				     unsigned int cbFrameSize,
 				     bool bNeedACK,
 				     unsigned int uDMAIdx,
@@ -963,13 +963,13 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 	else if (fifo_ctl & FIFOCTL_AUTO_FB_1)
 		by_fb_option = AUTO_FB_1;
 
-	if (!pvRrvTime)
+	if (!pv_rrv_time)
 		return;
 
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (pv_rts) { /* RTS_need */
 			/* Fill RsvTime */
-			struct vnt_rrv_time_rts *buf = pvRrvTime;
+			struct vnt_rrv_time_rts *buf = pv_rrv_time;
 
 			buf->rts_rrv_time_aa = get_rtscts_time(p_device, 2, by_pkt_type,
 							       cbFrameSize, wCurrentRate);
@@ -986,7 +986,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else {/* RTS_needless, PCF mode */
-			struct vnt_rrv_time_cts *buf = pvRrvTime;
+			struct vnt_rrv_time_cts *buf = pv_rrv_time;
 
 			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
 								wCurrentRate, bNeedACK);
@@ -997,12 +997,12 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 							       cbFrameSize, wCurrentRate);
 
 			/* Fill CTS */
-			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pvCTS, cbFrameSize, bNeedACK,
-				       b_dis_crc, wCurrentRate, by_fb_option);
+			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pv_cts, cbFrameSize,
+				       bNeedACK, b_dis_crc, wCurrentRate, by_fb_option);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
-			struct vnt_rrv_time_ab *buf = pvRrvTime;
+			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cbFrameSize,
 							    wCurrentRate);
@@ -1013,14 +1013,14 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
-			struct vnt_rrv_time_ab *buf = pvRrvTime;
+			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cbFrameSize,
 							      wCurrentRate, bNeedACK);
 		}
 	} else if (by_pkt_type == PK_TYPE_11B) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
-			struct vnt_rrv_time_ab *buf = pvRrvTime;
+			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cbFrameSize,
 							    wCurrentRate);
@@ -1031,7 +1031,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else { /* RTS_needless, non PCF mode */
-			struct vnt_rrv_time_ab *buf = pvRrvTime;
+			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
 							      wCurrentRate, bNeedACK);
@@ -1065,10 +1065,10 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	bool bRTS = (bool)(fifo_ctl & FIFOCTL_RTS);
 	struct vnt_tx_desc *ptdCurr;
 	unsigned int cbHeaderLength = 0;
-	void *pvRrvTime = NULL;
+	void *pv_rrv_time = NULL;
 	struct vnt_mic_hdr *pMICHDR = NULL;
 	void *pv_rts = NULL;
-	void *pvCTS = NULL;
+	void *pv_cts = NULL;
 	void *pvTxDataHd = NULL;
 	unsigned short wTxBufSize;   /* FFinfo size */
 	unsigned char by_fb_option = AUTO_FB_NONE;
@@ -1107,12 +1107,12 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {/* RTS_need */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
 				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_rts) +
 						      cbMICHDR + sizeof(struct vnt_rts_g));
@@ -1120,11 +1120,11 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 							cbMICHDR + sizeof(struct vnt_rts_g) +
 							sizeof(struct vnt_tx_datahead_g);
 			} else { /* RTS_needless */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
 				pv_rts = NULL;
-				pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_cts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						  sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_cts) + cbMICHDR +
@@ -1136,12 +1136,12 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 		} else {
 			/* Auto Fall Back */
 			if (bRTS) {/* RTS_need */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
 				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_rts) +
 					cbMICHDR + sizeof(struct vnt_rts_g_fb));
@@ -1149,11 +1149,11 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 					cbMICHDR + sizeof(struct vnt_rts_g_fb) +
 					sizeof(struct vnt_tx_datahead_g_fb);
 			} else { /* RTS_needless */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
 				pv_rts = NULL;
-				pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_cts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
 				pvTxDataHd = (void  *)(pbyTxBufferAddr + wTxBufSize +
 						       sizeof(struct vnt_rrv_time_cts) +
@@ -1167,12 +1167,12 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
 						      sizeof(struct vnt_rts_ab));
@@ -1180,11 +1180,11 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 					cbMICHDR + sizeof(struct vnt_rts_ab) +
 					sizeof(struct vnt_tx_datahead_ab);
 			} else { /* RTS_needless, need MICHDR */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = NULL;
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
@@ -1193,12 +1193,12 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 		} else {
 			/* Auto Fall Back */
 			if (bRTS) { /* RTS_need */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
 						      sizeof(struct vnt_rts_a_fb));
@@ -1206,11 +1206,11 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 					cbMICHDR + sizeof(struct vnt_rts_a_fb) +
 					sizeof(struct vnt_tx_datahead_a_fb);
 			} else { /* RTS_needless */
-				pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
+				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
 				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = NULL;
-				pvCTS = NULL;
+				pv_cts = NULL;
 				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
@@ -1224,7 +1224,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
-	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pvRrvTime, pv_rts, pvCTS,
+	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pv_rrv_time, pv_rts, pv_cts,
 				 cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
 	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 12/17] staging: vt6655: changed variable name: cbFrameSize
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (10 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 11/17] staging: vt6655: changed variable name: pvRrvTime Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 13/17] staging: vt6655: changed variable name: bNeedACK Tanjuate Brunostar
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names cbFrameSize to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 58 +++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 819080b14d5d..cc3b642ef8af 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -101,7 +101,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_rrv_time,
 				     void *pv_rts,
 				     void *pv_cts,
-				     unsigned int	cbFrameSize,
+				     unsigned int	cb_frame_size,
 				     bool bNeedACK,
 				     unsigned int	uDMAIdx,
 				     void *psEthHeader,
@@ -926,7 +926,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  *      pv_rrv_time        - pv_rrv_time
  *      pv_rts            - RTS Buffer
  *      pCTS            - CTS Buffer
- *      cbFrameSize     - Transmit Data Length (Hdr+Payload+FCS)
+ *      cb_frame_size     - Transmit Data Length (Hdr+Payload+FCS)
  *      bNeedACK        - If need ACK
  *      uDescIdx        - Desc Index
  *  Out:
@@ -935,7 +935,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  * Return Value: none
  *
  -
- * unsigned int cbFrameSize, Hdr+Payload+FCS
+ * unsigned int cb_frame_size, Hdr+Payload+FCS
  */
 static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     unsigned char by_pkt_type,
@@ -943,7 +943,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_rrv_time,
 				     void *pv_rts,
 				     void *pv_cts,
-				     unsigned int cbFrameSize,
+				     unsigned int cb_frame_size,
 				     bool bNeedACK,
 				     unsigned int uDMAIdx,
 				     void *psEthHeader,
@@ -972,68 +972,72 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			struct vnt_rrv_time_rts *buf = pv_rrv_time;
 
 			buf->rts_rrv_time_aa = get_rtscts_time(p_device, 2, by_pkt_type,
-							       cbFrameSize, wCurrentRate);
+							       cb_frame_size, wCurrentRate);
 			buf->rts_rrv_time_ba = get_rtscts_time(p_device, 1, by_pkt_type,
-							       cbFrameSize, wCurrentRate);
+							       cb_frame_size, wCurrentRate);
 			buf->rts_rrv_time_bb = get_rtscts_time(p_device, 0, by_pkt_type,
-							       cbFrameSize, wCurrentRate);
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
+							       cb_frame_size, wCurrentRate);
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type,
+								cb_frame_size,
 								wCurrentRate, bNeedACK);
-			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B,
+								cb_frame_size,
 								p_device->byTopCCKBasicRate,
 								bNeedACK);
 
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pv_rrv_time;
 
-			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
+			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type,
+								cb_frame_size,
 								wCurrentRate, bNeedACK);
-			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B,
+								cb_frame_size,
 								p_device->byTopCCKBasicRate,
 								bNeedACK);
 			buf->cts_rrv_time_ba = get_rtscts_time(p_device, 3, by_pkt_type,
-							       cbFrameSize, wCurrentRate);
+							       cb_frame_size, wCurrentRate);
 
 			/* Fill CTS */
-			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pv_cts, cbFrameSize,
+			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pv_cts, cb_frame_size,
 				       bNeedACK, b_dis_crc, wCurrentRate, by_fb_option);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
-			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cb_frame_size,
 							    wCurrentRate);
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cb_frame_size,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cb_frame_size,
 							      wCurrentRate, bNeedACK);
 		}
 	} else if (by_pkt_type == PK_TYPE_11B) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
-			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cbFrameSize,
+			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cb_frame_size,
 							    wCurrentRate);
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cb_frame_size,
 							      wCurrentRate, bNeedACK);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cbFrameSize, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
-			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cbFrameSize,
+			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cb_frame_size,
 							      wCurrentRate, bNeedACK);
 		}
 	}
@@ -1053,7 +1057,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	struct vnt_tx_fifo_head *tx_buffer_head =
 			(struct vnt_tx_fifo_head *)td_info->buf;
 	u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
-	unsigned int cbFrameSize;
+	unsigned int cb_frame_size;
 	__le16 uDuration;
 	unsigned char *pbyBuffer;
 	unsigned int uLength = 0;
@@ -1073,7 +1077,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	unsigned short wTxBufSize;   /* FFinfo size */
 	unsigned char by_fb_option = AUTO_FB_NONE;
 
-	cbFrameSize = skb->len + 4;
+	cb_frame_size = skb->len + 4;
 
 	if (info->control.hw_key) {
 		switch (info->control.hw_key->cipher) {
@@ -1084,7 +1088,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 			break;
 		}
 
-		cbFrameSize += info->control.hw_key->icv_len;
+		cb_frame_size += info->control.hw_key->icv_len;
 
 		if (p_device->local_id > REV_ID_VT3253_A1) {
 			/* MAC Header should be padding 0 to DW alignment. */
@@ -1225,9 +1229,9 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
 	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pv_rrv_time, pv_rts, pv_cts,
-				 cbFrameSize, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
+				 cb_frame_size, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
-	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cbFrameSize, uDMAIdx,
+	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cb_frame_size, uDMAIdx,
 				    bNeedACK, 0, 0, uMACfragNum, by_fb_option,
 				    p_device->wCurrentRate, is_pspoll);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 13/17] staging: vt6655: changed variable name: bNeedACK
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (11 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 12/17] staging: vt6655: changed variable name: cbFrameSize Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 14/17] staging: vt6655: changed variable name: uDMAIdx Tanjuate Brunostar
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names bDisCRC to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index cc3b642ef8af..1704b63da2cd 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -102,7 +102,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_rts,
 				     void *pv_cts,
 				     unsigned int	cb_frame_size,
-				     bool bNeedACK,
+				     bool b_need_ack,
 				     unsigned int	uDMAIdx,
 				     void *psEthHeader,
 				     unsigned short wCurrentRate);
@@ -927,7 +927,7 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
  *      pv_rts            - RTS Buffer
  *      pCTS            - CTS Buffer
  *      cb_frame_size     - Transmit Data Length (Hdr+Payload+FCS)
- *      bNeedACK        - If need ACK
+ *      b_need_ack        - If need ACK
  *      uDescIdx        - Desc Index
  *  Out:
  *      none
@@ -944,7 +944,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_rts,
 				     void *pv_cts,
 				     unsigned int cb_frame_size,
-				     bool bNeedACK,
+				     bool b_need_ack,
 				     unsigned int uDMAIdx,
 				     void *psEthHeader,
 				     unsigned short wCurrentRate)
@@ -979,30 +979,30 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 							       cb_frame_size, wCurrentRate);
 			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type,
 								cb_frame_size,
-								wCurrentRate, bNeedACK);
+								wCurrentRate, b_need_ack);
 			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B,
 								cb_frame_size,
 								p_device->byTopCCKBasicRate,
-								bNeedACK);
+								b_need_ack);
 
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pv_rrv_time;
 
 			buf->rrv_time_a = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type,
 								cb_frame_size,
-								wCurrentRate, bNeedACK);
+								wCurrentRate, b_need_ack);
 			buf->rrv_time_b = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B,
 								cb_frame_size,
 								p_device->byTopCCKBasicRate,
-								bNeedACK);
+								b_need_ack);
 			buf->cts_rrv_time_ba = get_rtscts_time(p_device, 3, by_pkt_type,
 							       cb_frame_size, wCurrentRate);
 
 			/* Fill CTS */
 			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pv_cts, cb_frame_size,
-				       bNeedACK, b_dis_crc, wCurrentRate, by_fb_option);
+				       b_need_ack, b_dis_crc, wCurrentRate, by_fb_option);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
@@ -1011,16 +1011,16 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			buf->rts_rrv_time = get_rtscts_time(p_device, 2, by_pkt_type, cb_frame_size,
 							    wCurrentRate);
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, by_pkt_type, cb_frame_size,
-							      wCurrentRate, bNeedACK);
+							      wCurrentRate, b_need_ack);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11A, cb_frame_size,
-							      wCurrentRate, bNeedACK);
+							      wCurrentRate, b_need_ack);
 		}
 	} else if (by_pkt_type == PK_TYPE_11B) {
 		if (pv_rts) {/* RTS_need, non PCF mode */
@@ -1029,16 +1029,16 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 			buf->rts_rrv_time = get_rtscts_time(p_device, 0, by_pkt_type, cb_frame_size,
 							    wCurrentRate);
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cb_frame_size,
-							      wCurrentRate, bNeedACK);
+							      wCurrentRate, b_need_ack);
 
 			/* Fill RTS */
-			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, bNeedACK,
+			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
 					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
 			buf->rrv_time = vnt_rxtx_rsvtime_le16(p_device, PK_TYPE_11B, cb_frame_size,
-							      wCurrentRate, bNeedACK);
+							      wCurrentRate, b_need_ack);
 		}
 	}
 }
@@ -1065,7 +1065,7 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 	unsigned int uMACfragNum = 1;
 	unsigned int uPadding = 0;
 	unsigned int cbReqCount = 0;
-	bool bNeedACK = (bool)(fifo_ctl & FIFOCTL_NEEDACK);
+	bool b_need_ack = (bool)(fifo_ctl & FIFOCTL_NEEDACK);
 	bool bRTS = (bool)(fifo_ctl & FIFOCTL_RTS);
 	struct vnt_tx_desc *ptdCurr;
 	unsigned int cbHeaderLength = 0;
@@ -1229,10 +1229,10 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
 	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pv_rrv_time, pv_rts, pv_cts,
-				 cb_frame_size, bNeedACK, uDMAIdx, hdr, p_device->wCurrentRate);
+				 cb_frame_size, b_need_ack, uDMAIdx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
 	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cb_frame_size, uDMAIdx,
-				    bNeedACK, 0, 0, uMACfragNum, by_fb_option,
+				    b_need_ack, 0, 0, uMACfragNum, by_fb_option,
 				    p_device->wCurrentRate, is_pspoll);
 
 	hdr->duration_id = uDuration;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 14/17] staging: vt6655: changed variable name: uDMAIdx
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (12 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 13/17] staging: vt6655: changed variable name: bNeedACK Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 15/17] staging: vt6655: changed variable name: psEthHeader Tanjuate Brunostar
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names uDMAIdx to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 1704b63da2cd..5729798973b4 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -103,14 +103,14 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_cts,
 				     unsigned int	cb_frame_size,
 				     bool b_need_ack,
-				     unsigned int	uDMAIdx,
+				     unsigned int	u_dma_idx,
 				     void *psEthHeader,
 				     unsigned short wCurrentRate);
 
 static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				      unsigned char by_pkt_type,
 				      unsigned char *pbyTxBufferAddr,
-				      unsigned int uDMAIdx,
+				      unsigned int u_dma_idx,
 				      struct vnt_tx_desc *pHeadTD,
 				      unsigned int uNodeIndex);
 
@@ -118,7 +118,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
 			      unsigned int cb_frame_length,
-			      unsigned int uDMAIdx,
+			      unsigned int u_dma_idx,
 			      bool b_need_ack,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
@@ -446,7 +446,7 @@ static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
 			      void *pTxDataHead,
 			      unsigned int cb_frame_length,
-			      unsigned int uDMAIdx,
+			      unsigned int u_dma_idx,
 			      bool b_need_ack,
 			      unsigned int uFragIdx,
 			      unsigned int cbLastFragmentSize,
@@ -818,7 +818,7 @@ static void s_v_fill_rts_head(struct vnt_private *p_device,
 }
 
 static void s_vFillCTSHead(struct vnt_private *p_device,
-			   unsigned int uDMAIdx,
+			   unsigned int u_dma_idx,
 			   unsigned char by_pkt_type,
 			   void *pv_cts,
 			   unsigned int cb_frame_length,
@@ -841,8 +841,8 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 
 	if (by_pkt_type == PK_TYPE_11GB || by_pkt_type == PK_TYPE_11GA) {
 		if (by_fb_option != AUTO_FB_NONE &&
-		    uDMAIdx != TYPE_ATIMDMA &&
-		    uDMAIdx != TYPE_BEACONDMA) {
+		    u_dma_idx != TYPE_ATIMDMA &&
+		    u_dma_idx != TYPE_BEACONDMA) {
 			/* Auto Fall back */
 			struct vnt_cts_fb *buf = pv_cts;
 			/* Get SignalField, ServiceField & Length */
@@ -883,8 +883,8 @@ static void s_vFillCTSHead(struct vnt_private *p_device,
 					p_device->abyCurrentNetAddr);
 		} else {
 			/* if (by_fb_option != AUTO_FB_NONE &&
-			 * uDMAIdx != TYPE_ATIMDMA &&
-			 * uDMAIdx != TYPE_BEACONDMA)
+			 * u_dma_idx != TYPE_ATIMDMA &&
+			 * u_dma_idx != TYPE_BEACONDMA)
 			 */
 			struct vnt_cts *buf = pv_cts;
 			/* Get SignalField, ServiceField & Length */
@@ -945,7 +945,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *pv_cts,
 				     unsigned int cb_frame_size,
 				     bool b_need_ack,
-				     unsigned int uDMAIdx,
+				     unsigned int u_dma_idx,
 				     void *psEthHeader,
 				     unsigned short wCurrentRate)
 {
@@ -1001,7 +1001,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 							       cb_frame_size, wCurrentRate);
 
 			/* Fill CTS */
-			s_vFillCTSHead(p_device, uDMAIdx, by_pkt_type, pv_cts, cb_frame_size,
+			s_vFillCTSHead(p_device, u_dma_idx, by_pkt_type, pv_cts, cb_frame_size,
 				       b_need_ack, b_dis_crc, wCurrentRate, by_fb_option);
 		}
 	} else if (by_pkt_type == PK_TYPE_11A) {
@@ -1046,7 +1046,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 				      unsigned char by_pkt_type,
 				      unsigned char *pbyTxBufferAddr,
-				      unsigned int uDMAIdx,
+				      unsigned int u_dma_idx,
 				      struct vnt_tx_desc *pHeadTD,
 				      unsigned int is_pspoll)
 {
@@ -1229,9 +1229,9 @@ static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
 	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pv_rrv_time, pv_rts, pv_cts,
-				 cb_frame_size, b_need_ack, uDMAIdx, hdr, p_device->wCurrentRate);
+				 cb_frame_size, b_need_ack, u_dma_idx, hdr, p_device->wCurrentRate);
 	/* Fill DataHead */
-	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cb_frame_size, uDMAIdx,
+	uDuration = s_uFillDataHead(p_device, by_pkt_type, pvTxDataHd, cb_frame_size, u_dma_idx,
 				    b_need_ack, 0, 0, uMACfragNum, by_fb_option,
 				    p_device->wCurrentRate, is_pspoll);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 15/17] staging: vt6655: changed variable name: psEthHeader
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (13 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 14/17] staging: vt6655: changed variable name: uDMAIdx Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 16/17] staging: vt6655: changed variable name: s_cbFillTxBufHead Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 17/17] staging: vt6655: changed variable name: pbyTxBufferAddr Tanjuate Brunostar
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names psEthHeader to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 5729798973b4..6a54f234261a 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -104,7 +104,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     unsigned int	cb_frame_size,
 				     bool b_need_ack,
 				     unsigned int	u_dma_idx,
-				     void *psEthHeader,
+				     void *ps_eth_header,
 				     unsigned short wCurrentRate);
 
 static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
@@ -946,7 +946,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     unsigned int cb_frame_size,
 				     bool b_need_ack,
 				     unsigned int u_dma_idx,
-				     void *psEthHeader,
+				     void *ps_eth_header,
 				     unsigned short wCurrentRate)
 {
 	u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
@@ -986,7 +986,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 								b_need_ack);
 
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
-					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
+					  b_dis_crc, ps_eth_header, wCurrentRate, by_fb_option);
 		} else {/* RTS_needless, PCF mode */
 			struct vnt_rrv_time_cts *buf = pv_rrv_time;
 
@@ -1015,7 +1015,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
-					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
+					  b_dis_crc, ps_eth_header, wCurrentRate, by_fb_option);
 		} else if (!pv_rts) {/* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
@@ -1033,7 +1033,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 
 			/* Fill RTS */
 			s_v_fill_rts_head(p_device, by_pkt_type, pv_rts, cb_frame_size, b_need_ack,
-					  b_dis_crc, psEthHeader, wCurrentRate, by_fb_option);
+					  b_dis_crc, ps_eth_header, wCurrentRate, by_fb_option);
 		} else { /* RTS_needless, non PCF mode */
 			struct vnt_rrv_time_ab *buf = pv_rrv_time;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 16/17] staging: vt6655: changed variable name: s_cbFillTxBufHead
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (14 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 15/17] staging: vt6655: changed variable name: psEthHeader Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  2022-10-25 23:37 ` [PATCH 17/17] staging: vt6655: changed variable name: pbyTxBufferAddr Tanjuate Brunostar
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names s_cbFillTxBufHead to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 6a54f234261a..90e7330680d9 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -15,7 +15,7 @@
  *      cbGetFragCount - Calculate fragment number count
  *      csBeacon_xmit - beacon tx function
  *      csMgmt_xmit - management tx function
- *      s_cbFillTxBufHead - fulfill tx dma buffer header
+ *      s_cb_fill_tx_buf_head - fulfill tx dma buffer header
  *      s_uGetDataDuration - get tx data required duration
  *      s_uFillDataHead- fulfill tx data duration header
  *      s_uGetRTSCTSDuration- get rtx/cts required duration
@@ -107,12 +107,12 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 				     void *ps_eth_header,
 				     unsigned short wCurrentRate);
 
-static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
-				      unsigned char by_pkt_type,
-				      unsigned char *pbyTxBufferAddr,
-				      unsigned int u_dma_idx,
-				      struct vnt_tx_desc *pHeadTD,
-				      unsigned int uNodeIndex);
+static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
+					  unsigned char by_pkt_type,
+					  unsigned char *pbyTxBufferAddr,
+					  unsigned int u_dma_idx,
+					  struct vnt_tx_desc *pHeadTD,
+					  unsigned int uNodeIndex);
 
 static __le16 s_uFillDataHead(struct vnt_private *p_device,
 			      unsigned char by_pkt_type,
@@ -1043,12 +1043,12 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 	}
 }
 
-static unsigned int s_cbFillTxBufHead(struct vnt_private *p_device,
-				      unsigned char by_pkt_type,
-				      unsigned char *pbyTxBufferAddr,
-				      unsigned int u_dma_idx,
-				      struct vnt_tx_desc *pHeadTD,
-				      unsigned int is_pspoll)
+static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
+					  unsigned char by_pkt_type,
+					  unsigned char *pbyTxBufferAddr,
+					  unsigned int u_dma_idx,
+					  struct vnt_tx_desc *pHeadTD,
+					  unsigned int is_pspoll)
 {
 	struct vnt_td_info *td_info = pHeadTD->td_info;
 	struct sk_buff *skb = td_info->skb;
@@ -1442,8 +1442,8 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,
 
 	tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_NONFRAG);
 
-	s_cbFillTxBufHead(priv, pkt_type, (u8 *)tx_buffer_head,
-			  dma_idx, head_td, is_pspoll);
+	s_cb_fill_tx_buf_head(priv, pkt_type, (u8 *)tx_buffer_head,
+			      dma_idx, head_td, is_pspoll);
 
 	if (info->control.hw_key) {
 		tx_key = info->control.hw_key;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [PATCH 17/17] staging: vt6655: changed variable name: pbyTxBufferAddr
  2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
                   ` (15 preceding siblings ...)
  2022-10-25 23:37 ` [PATCH 16/17] staging: vt6655: changed variable name: s_cbFillTxBufHead Tanjuate Brunostar
@ 2022-10-25 23:37 ` Tanjuate Brunostar
  16 siblings, 0 replies; 25+ messages in thread
From: Tanjuate Brunostar @ 2022-10-25 23:37 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, outreachy, Tanjuate Brunostar

change variable names pbyTxBufferAddr to meet the
linux coding standard, as it says to avoid using camelCase naming
style. Cought by checkpatch

Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
---
 drivers/staging/vt6655/rxtx.c | 66 +++++++++++++++++------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 90e7330680d9..da75ae573a00 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -109,7 +109,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 
 static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 					  unsigned char by_pkt_type,
-					  unsigned char *pbyTxBufferAddr,
+					  unsigned char *pby_tx_buffer_addr,
 					  unsigned int u_dma_idx,
 					  struct vnt_tx_desc *pHeadTD,
 					  unsigned int uNodeIndex);
@@ -1045,7 +1045,7 @@ static void s_vgenerate_tx_parameter(struct vnt_private *p_device,
 
 static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 					  unsigned char by_pkt_type,
-					  unsigned char *pbyTxBufferAddr,
+					  unsigned char *pby_tx_buffer_addr,
 					  unsigned int u_dma_idx,
 					  struct vnt_tx_desc *pHeadTD,
 					  unsigned int is_pspoll)
@@ -1111,26 +1111,26 @@ static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 
 		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {/* RTS_need */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
-				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_rts) +
 						      cbMICHDR + sizeof(struct vnt_rts_g));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
 							cbMICHDR + sizeof(struct vnt_rts_g) +
 							sizeof(struct vnt_tx_datahead_g);
 			} else { /* RTS_needless */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
 				pv_rts = NULL;
-				pv_cts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_cts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						  sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_cts) + cbMICHDR +
 						      sizeof(struct vnt_cts));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
@@ -1140,26 +1140,26 @@ static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 		} else {
 			/* Auto Fall Back */
 			if (bRTS) {/* RTS_need */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_rts));
-				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_rts) +
 					cbMICHDR + sizeof(struct vnt_rts_g_fb));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
 					cbMICHDR + sizeof(struct vnt_rts_g_fb) +
 					sizeof(struct vnt_tx_datahead_g_fb);
 			} else { /* RTS_needless */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_cts));
 				pv_rts = NULL;
-				pv_cts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_cts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
-				pvTxDataHd = (void  *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void  *)(pby_tx_buffer_addr + wTxBufSize +
 						       sizeof(struct vnt_rrv_time_cts) +
 					cbMICHDR + sizeof(struct vnt_cts_fb));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
@@ -1171,25 +1171,25 @@ static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 
 		if (by_fb_option == AUTO_FB_NONE) {
 			if (bRTS) {
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
 						      sizeof(struct vnt_rts_ab));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
 					cbMICHDR + sizeof(struct vnt_rts_ab) +
 					sizeof(struct vnt_tx_datahead_ab);
 			} else { /* RTS_needless, need MICHDR */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = NULL;
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
 					cbMICHDR + sizeof(struct vnt_tx_datahead_ab);
@@ -1197,25 +1197,25 @@ static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 		} else {
 			/* Auto Fall Back */
 			if (bRTS) { /* RTS_need */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
-				pv_rts = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rts = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						 sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
 						      sizeof(struct vnt_rts_a_fb));
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
 					cbMICHDR + sizeof(struct vnt_rts_a_fb) +
 					sizeof(struct vnt_tx_datahead_a_fb);
 			} else { /* RTS_needless */
-				pv_rrv_time = (void *)(pbyTxBufferAddr + wTxBufSize);
-				pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+				pv_rrv_time = (void *)(pby_tx_buffer_addr + wTxBufSize);
+				pMICHDR = (struct vnt_mic_hdr *)(pby_tx_buffer_addr + wTxBufSize +
 								 sizeof(struct vnt_rrv_time_ab));
 				pv_rts = NULL;
 				pv_cts = NULL;
-				pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+				pvTxDataHd = (void *)(pby_tx_buffer_addr + wTxBufSize +
 						      sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
 				cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
 					cbMICHDR + sizeof(struct vnt_tx_datahead_a_fb);
@@ -1225,7 +1225,7 @@ static unsigned int s_cb_fill_tx_buf_head(struct vnt_private *p_device,
 
 	td_info->mic_hdr = pMICHDR;
 
-	memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
+	memset((void *)(pby_tx_buffer_addr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
 
 	/* Fill FIFO,RrvTime,RTS,and CTS */
 	s_vgenerate_tx_parameter(p_device, by_pkt_type, tx_buffer_head, pv_rrv_time, pv_rts, pv_cts,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0
  2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
@ 2022-10-26  2:46   ` Philipp Hortmann
  2022-10-26  3:24   ` Philipp Hortmann
  1 sibling, 0 replies; 25+ messages in thread
From: Philipp Hortmann @ 2022-10-26  2:46 UTC (permalink / raw)
  To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy

On 10/26/22 01:36, Tanjuate Brunostar wrote:
> -static const unsigned short wFB_Opt0[2][5] = {
> +static const unsigned short w_fb_opt_0[2][5] = {
>   	{RATE_12M, RATE_18M, RATE_24M, RATE_36M, RATE_48M}, /* fallback_rate0 */
>   	{RATE_12M, RATE_12M, RATE_18M, RATE_24M, RATE_36M}, /* fallback_rate1 */
>   };

In this driver the variables often start with a "w" for "word", "p" for 
"pointer", "b" for "bool", "by" for "byte" and even "pv" for "pointer 
void"...
If possible I would omit those prefixes for the type as they sometimes 
make the variable names even longer and you need to consider how to 
break lines.

Bye Philipp

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead
  2022-10-25 23:36 ` [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead Tanjuate Brunostar
@ 2022-10-26  2:56   ` Philipp Hortmann
  2022-10-26 13:52   ` Greg KH
  1 sibling, 0 replies; 25+ messages in thread
From: Philipp Hortmann @ 2022-10-26  2:56 UTC (permalink / raw)
  To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy

On 10/26/22 01:36, Tanjuate Brunostar wrote:
>      change variable names s_vFillRTSHead and wTimeStampOff to meet the
>      linux coding standard, as it says to avoid using camelCase naming style.
>      Cought by checkpatch

WARNING: Possible unwrapped commit description (prefer a maximum 75 
chars per line)
#8:
     linux coding standard, as it says to avoid using camelCase naming 
style.

You need to use checkpatch on your patches before you send them in.

Bye Philipp


> 
> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> ---
>   drivers/staging/vt6655/rxtx.c | 54 +++++++++++++++++------------------
>   1 file changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index ac9b3402be4f..8bb06b142748 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -23,7 +23,7 @@
>    *      s_uGetTxRsvTime- get frame reserved time
>    *      s_vFillCTSHead- fulfill CTS ctl header
>    *      s_vFillFragParameter- Set fragment ctl parameter.
> - *      s_vFillRTSHead- fulfill RTS ctl header
> + *      s_v_fill_rts_head- fulfill RTS ctl header
>    *      s_vFillTxKey- fulfill tx encrypt key
>    *      s_vSWencryption- Software encrypt header
>    *      vDMA0_tx_80211- tx 802.11 frame via dma0
> @@ -54,7 +54,7 @@
>    */
>   #define CRITICAL_PACKET_LEN      256
>   
> -static const unsigned short wTimeStampOff[2][MAX_RATE] = {
> +static const unsigned short w_time_stamp_off[2][MAX_RATE] = {
>   	{384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23}, /* Long Preamble */
>   	{384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23}, /* Short Preamble */
>   };
> @@ -85,15 +85,15 @@ static const unsigned short w_fb_opt_1[2][5] = {
>   #define DATADUR_A_F1    13
>   
>   /*---------------------  Static Functions  --------------------------*/
> -static void s_vFillRTSHead(struct vnt_private *pDevice,
> -			   unsigned char byPktType,
> -			   void *pvRTS,
> -			   unsigned int	cbFrameLength,
> -			   bool bNeedAck,
> -			   bool bDisCRC,
> -			   struct ieee80211_hdr *hdr,
> -			   unsigned short wCurrentRate,
> -			   unsigned char byFBOption);
> +static void s_v_fill_rts_head(struct vnt_private *pDevice,
> +			      unsigned char byPktType,
> +			      void *pvRTS,
> +			      unsigned int	cbFrameLength,
> +			      bool bNeedAck,
> +			      bool bDisCRC,
> +			      struct ieee80211_hdr *hdr,
> +			      unsigned short wCurrentRate,
> +			      unsigned char byFBOption);
>   
>   static void s_vGenerateTxParameter(struct vnt_private *pDevice,
>   				   unsigned char byPktType,
> @@ -130,7 +130,7 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
>   
>   static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
>   {
> -	return cpu_to_le16(wTimeStampOff[priv->preamble_type % 2]
> +	return cpu_to_le16(w_time_stamp_off[priv->preamble_type % 2]
>   							[rate % MAX_RATE]);
>   }
>   
> @@ -620,15 +620,15 @@ static __le16 s_uFillDataHead(struct vnt_private *pDevice,
>   	return buf->duration;
>   }
>   
> -static void s_vFillRTSHead(struct vnt_private *pDevice,
> -			   unsigned char byPktType,
> -			   void *pvRTS,
> -			   unsigned int cbFrameLength,
> -			   bool bNeedAck,
> -			   bool bDisCRC,
> -			   struct ieee80211_hdr *hdr,
> -			   unsigned short wCurrentRate,
> -			   unsigned char byFBOption)
> +static void s_v_fill_rts_head(struct vnt_private *pDevice,
> +			      unsigned char byPktType,
> +			      void *pvRTS,
> +			      unsigned int cbFrameLength,
> +			      bool bNeedAck,
> +			      bool bDisCRC,
> +			      struct ieee80211_hdr *hdr,
> +			      unsigned short wCurrentRate,
> +			      unsigned char byFBOption)
>   {
>   	unsigned int uRTSFrameLen = 20;
>   
> @@ -977,8 +977,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
>   								pDevice->byTopCCKBasicRate,
>   								bNeedACK);
>   
> -			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> -				       psEthHeader, wCurrentRate, byFBOption);
> +			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> +					  psEthHeader, wCurrentRate, byFBOption);
>   		} else {/* RTS_needless, PCF mode */
>   			struct vnt_rrv_time_cts *buf = pvRrvTime;
>   
> @@ -1004,8 +1004,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
>   							      wCurrentRate, bNeedACK);
>   
>   			/* Fill RTS */
> -			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> -				       psEthHeader, wCurrentRate, byFBOption);
> +			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> +					  psEthHeader, wCurrentRate, byFBOption);
>   		} else if (!pvRTS) {/* RTS_needless, non PCF mode */
>   			struct vnt_rrv_time_ab *buf = pvRrvTime;
>   
> @@ -1022,8 +1022,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
>   							      wCurrentRate, bNeedACK);
>   
>   			/* Fill RTS */
> -			s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> -				       psEthHeader, wCurrentRate, byFBOption);
> +			s_v_fill_rts_head(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
> +					  psEthHeader, wCurrentRate, byFBOption);
>   		} else { /* RTS_needless, non PCF mode */
>   			struct vnt_rrv_time_ab *buf = pvRrvTime;
>   


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 03/17] staging: vt6655: changed variable name: pDevice
  2022-10-25 23:36 ` [PATCH 03/17] staging: vt6655: changed variable name: pDevice Tanjuate Brunostar
@ 2022-10-26  3:03   ` Philipp Hortmann
  0 siblings, 0 replies; 25+ messages in thread
From: Philipp Hortmann @ 2022-10-26  3:03 UTC (permalink / raw)
  To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy

On 10/26/22 01:36, Tanjuate Brunostar wrote:
>      change variable names pDevice to meet the
>      linux coding standard, as it says to avoid using camelCase naming
>      style. Cought by checkpatch
> 
> Signed-off-by: Tanjuate Brunostar<tanjubrunostar0@gmail.com>
> ---
>   drivers/staging/vt6655/rxtx.c | 354 +++++++++++++++++-----------------
>   1 file changed, 177 insertions(+), 177 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index 8bb06b142748..3565f5608790 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -85,7 +85,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
>   #define DATADUR_A_F1    13


WARNING: line length of 104 exceeds 100 columns
#376: FILE: drivers/staging/vt6655/rxtx.c:496:
+									    p_device->byTopCCKBasicRate,

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0
  2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
  2022-10-26  2:46   ` Philipp Hortmann
@ 2022-10-26  3:24   ` Philipp Hortmann
  1 sibling, 0 replies; 25+ messages in thread
From: Philipp Hortmann @ 2022-10-26  3:24 UTC (permalink / raw)
  To: Tanjuate Brunostar, gregkh; +Cc: linux-staging, linux-kernel, outreachy

On 10/26/22 01:36, Tanjuate Brunostar wrote:
> change variable names wFB_Opt0 and wFB_Opt1 to meet the
> linux coding standard, as it says to avoid using camelCase naming style.
> Cought by checkpatch
> 
> Signed-off-by: Tanjuate Brunostar<tanjubrunostar0@gmail.com>
> ---
>   drivers/staging/vt6655/rxtx.c | 32 ++++++++++++++++----------------
>   1 file changed, 16 insertions(+), 16 deletions(-)

Applying: staging: vt6655: changed variable names: wFB_Opt0
error: sha1 information is lacking or useless 
(drivers/staging/vt6655/rxtx.c).
error: could not build fake ancestor
Patch failed at 0001 staging: vt6655: changed variable names: wFB_Opt0

Please rebase

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 05/17] staging: vt6655: changed variable name: pvRTS
  2022-10-25 23:37 ` [PATCH 05/17] staging: vt6655: changed variable name: pvRTS Tanjuate Brunostar
@ 2022-10-26 13:51   ` Greg KH
  2022-10-27  6:12     ` Tanju Brunostar
  0 siblings, 1 reply; 25+ messages in thread
From: Greg KH @ 2022-10-26 13:51 UTC (permalink / raw)
  To: Tanjuate Brunostar; +Cc: linux-staging, linux-kernel, outreachy

On Tue, Oct 25, 2022 at 11:37:01PM +0000, Tanjuate Brunostar wrote:

Philipp has pointed out most of this already, but I'll just be specific
and say what isn't ok in all of these patches:

> 	change variable names pvRTS to meet the

"name" not "name"

>         linux coding standard, as it says to avoid using camelCase naming

"Linux" not "linux"

>         style. Cought by checkpatch

Why is this all indented?

Please do not do that, look at existing accepted changes in the git log
and match up what they look like.

But worst of all, you didn't really fix the variable name at all.  You
just appeased a tool that was trying to say "don't use camelCase, use
sane names".

> Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> ---
>  drivers/staging/vt6655/rxtx.c | 56 +++++++++++++++++------------------
>  1 file changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index 2cac8f3882df..e97cba014adf 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -87,7 +87,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
>  /*---------------------  Static Functions  --------------------------*/
>  static void s_v_fill_rts_head(struct vnt_private *p_device,
>  			      unsigned char by_pkt_type,
> -			      void *pvRTS,
> +			      void *pv_rts,

"pvRTS" is using Hungarian Notation.  Look it up on Wikipedia for what
it means, and why people used to use it.

For us, we don't need that at all as the type of the variable is obvious
in the code and the compiler checks it.

So "pvRTS" is trying to say "this is a pointer to void called "RTS".

We don't care about the "describe the variable type in the name" thing,
so it should just be called "RTS", or better yet, "rts", right?

But then, step back.  Why is this a void pointer at all?  This is really
a structure of type struct vnt_rts_g_fb.  So why isn't that being passed
here instead?

So try to work on both, fixing up the names to be sane, and then,
getting rid of the void * stuff, to better reflect how data is flowing
around and what type that data is in.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead
  2022-10-25 23:36 ` [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead Tanjuate Brunostar
  2022-10-26  2:56   ` Philipp Hortmann
@ 2022-10-26 13:52   ` Greg KH
  1 sibling, 0 replies; 25+ messages in thread
From: Greg KH @ 2022-10-26 13:52 UTC (permalink / raw)
  To: Tanjuate Brunostar; +Cc: linux-staging, linux-kernel, outreachy

On Tue, Oct 25, 2022 at 11:36:58PM +0000, Tanjuate Brunostar wrote:
>     change variable names s_vFillRTSHead and wTimeStampOff to meet the
>     linux coding standard, as it says to avoid using camelCase naming style.
>     Cought by checkpatch

s_vFillRTSHead is not a variable name.  It is a function name, and ick,
that's a horrid name, please make it sane (i.e. do NOT put the type of
the function in the name like they did here.)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH 05/17] staging: vt6655: changed variable name: pvRTS
  2022-10-26 13:51   ` Greg KH
@ 2022-10-27  6:12     ` Tanju Brunostar
  0 siblings, 0 replies; 25+ messages in thread
From: Tanju Brunostar @ 2022-10-27  6:12 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-staging, linux-kernel, outreachy

On Wed, Oct 26, 2022 at 2:50 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Oct 25, 2022 at 11:37:01PM +0000, Tanjuate Brunostar wrote:
>
> Philipp has pointed out most of this already, but I'll just be specific
> and say what isn't ok in all of these patches:
>
> >       change variable names pvRTS to meet the
>
> "name" not "name"
>
> >         linux coding standard, as it says to avoid using camelCase naming
>
> "Linux" not "linux"
>
> >         style. Cought by checkpatch
>
> Why is this all indented?
>
> Please do not do that, look at existing accepted changes in the git log
> and match up what they look like.
>
> But worst of all, you didn't really fix the variable name at all.  You
> just appeased a tool that was trying to say "don't use camelCase, use
> sane names".
>
> > Signed-off-by: Tanjuate Brunostar <tanjubrunostar0@gmail.com>
> > ---
> >  drivers/staging/vt6655/rxtx.c | 56 +++++++++++++++++------------------
> >  1 file changed, 28 insertions(+), 28 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> > index 2cac8f3882df..e97cba014adf 100644
> > --- a/drivers/staging/vt6655/rxtx.c
> > +++ b/drivers/staging/vt6655/rxtx.c
> > @@ -87,7 +87,7 @@ static const unsigned short w_fb_opt_1[2][5] = {
> >  /*---------------------  Static Functions  --------------------------*/
> >  static void s_v_fill_rts_head(struct vnt_private *p_device,
> >                             unsigned char by_pkt_type,
> > -                           void *pvRTS,
> > +                           void *pv_rts,
>
> "pvRTS" is using Hungarian Notation.  Look it up on Wikipedia for what
> it means, and why people used to use it.
>
> For us, we don't need that at all as the type of the variable is obvious
> in the code and the compiler checks it.
>
> So "pvRTS" is trying to say "this is a pointer to void called "RTS".
>
> We don't care about the "describe the variable type in the name" thing,
> so it should just be called "RTS", or better yet, "rts", right?
>
> But then, step back.  Why is this a void pointer at all?  This is really
> a structure of type struct vnt_rts_g_fb.  So why isn't that being passed
> here instead?
>
> So try to work on both, fixing up the names to be sane, and then,
> getting rid of the void * stuff, to better reflect how data is flowing
> around and what type that data is in.
>
> thanks,
>
> greg k-h

I see. thank you for the pointers

Tanju

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-10-27  6:12 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 23:36 [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c Tanjuate Brunostar
2022-10-25 23:36 ` [PATCH 01/17] staging: vt6655: changed variable names: wFB_Opt0 Tanjuate Brunostar
2022-10-26  2:46   ` Philipp Hortmann
2022-10-26  3:24   ` Philipp Hortmann
2022-10-25 23:36 ` [PATCH 02/17] staging: vt6655: changed variable names: s_vFillRTSHead Tanjuate Brunostar
2022-10-26  2:56   ` Philipp Hortmann
2022-10-26 13:52   ` Greg KH
2022-10-25 23:36 ` [PATCH 03/17] staging: vt6655: changed variable name: pDevice Tanjuate Brunostar
2022-10-26  3:03   ` Philipp Hortmann
2022-10-25 23:37 ` [PATCH 04/17] staging: vt6655: changed variable name: byPktType Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 05/17] staging: vt6655: changed variable name: pvRTS Tanjuate Brunostar
2022-10-26 13:51   ` Greg KH
2022-10-27  6:12     ` Tanju Brunostar
2022-10-25 23:37 ` [PATCH 06/17] staging: vt6655: changed variable name: cbFrameLength Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 07/17] staging: vt6655: changed variable name: b_need_ack Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 08/17] staging: vt6655: changed variable name: bDisCRC Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 09/17] staging: vt6655: changed variable name: byFBOption Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 10/17] staging: vt6655: changed variable name: s_vGenerateTxParameter Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 11/17] staging: vt6655: changed variable name: pvRrvTime Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 12/17] staging: vt6655: changed variable name: cbFrameSize Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 13/17] staging: vt6655: changed variable name: bNeedACK Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 14/17] staging: vt6655: changed variable name: uDMAIdx Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 15/17] staging: vt6655: changed variable name: psEthHeader Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 16/17] staging: vt6655: changed variable name: s_cbFillTxBufHead Tanjuate Brunostar
2022-10-25 23:37 ` [PATCH 17/17] staging: vt6655: changed variable name: pbyTxBufferAddr Tanjuate Brunostar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).