2022-10-26 00:23:47

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 00/17] staging: vt6655: a series of checkpatch fixes on the file: rxtx.c

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



2022-10-26 00:34:18

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 08/17] staging: vt6655: changed variable name: bDisCRC

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 <[email protected]>
---
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


2022-10-26 00:36:13

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 13/17] staging: vt6655: changed variable name: bNeedACK

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 <[email protected]>
---
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


2022-10-26 00:37:10

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 15/17] staging: vt6655: changed variable name: psEthHeader

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 <[email protected]>
---
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


2022-10-26 00:39:00

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 14/17] staging: vt6655: changed variable name: uDMAIdx

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 <[email protected]>
---
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


2022-10-26 00:39:39

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 12/17] staging: vt6655: changed variable name: cbFrameSize

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 <[email protected]>
---
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