2022-10-20 18:55:13

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 0/6] staging: vt6655: a series of checkpatch fixes on

The fixes are similar, mostly long lines splitting. I had to make
serveral patches to ease the work of inspectors

Tanjuate Brunostar (6):
staging: vt6655: fix lines ending in a '('
staging: vt6655: refactor long lines of code in s_uGetRTSCTSDuration
staging: vt6655: refactor long lines of code in s_uFillDataHead
staging: vt6655: refactor long lines of code in s_vGenerateTxParameter
staging: vt6655: refactor long lines of code in the rest of the file
staging: vt6655: refactor code to avoid a line ending in '('

drivers/staging/vt6655/rxtx.c | 535 ++++++++++++++++++++--------------
1 file changed, 323 insertions(+), 212 deletions(-)

--
2.34.1


2022-10-20 18:57:59

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH v3] staging: vt6655: Fix Lines should not end with a '('

Code style warnings reported by checkpatch.
Improve the layout of a function header:
Put the first parameter immediately after the '(' and align the other
parameters underneath it.

Signed-off-by: Tanjuate Brunostar <[email protected]>

---
v2: put static and void on the same line and adjusted the indentation as
suggested by Greg KH
---
drivers/staging/vt6655/rxtx.c | 78 +++++++++++++++--------------------
1 file changed, 33 insertions(+), 45 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 5bdb5176772c..1e5036121665 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -85,35 +85,27 @@ static const unsigned short wFB_Opt1[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_vGenerateTxParameter(
- struct vnt_private *pDevice,
- unsigned char byPktType,
- struct vnt_tx_fifo_head *,
- void *pvRrvTime,
- void *pvRTS,
- void *pvCTS,
- unsigned int cbFrameSize,
- bool bNeedACK,
- unsigned int uDMAIdx,
- void *psEthHeader,
- unsigned short wCurrentRate
-);
+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_vGenerateTxParameter(struct vnt_private *pDevice,
+ unsigned char byPktType,
+ struct vnt_tx_fifo_head *,
+ void *pvRrvTime,
+ void *pvRTS,
+ void *pvCTS,
+ unsigned int cbFrameSize,
+ bool bNeedACK,
+ unsigned int uDMAIdx,
+ void *psEthHeader,
+ unsigned short wCurrentRate);

static unsigned int
s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
@@ -121,22 +113,18 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
unsigned int uDMAIdx, struct vnt_tx_desc *pHeadTD,
unsigned int uNodeIndex);

-static
-__le16
-s_uFillDataHead(
- struct vnt_private *pDevice,
- unsigned char byPktType,
- void *pTxDataHead,
- unsigned int cbFrameLength,
- unsigned int uDMAIdx,
- bool bNeedAck,
- unsigned int uFragIdx,
- unsigned int cbLastFragmentSize,
- unsigned int uMACfragNum,
- unsigned char byFBOption,
- unsigned short wCurrentRate,
- bool is_pspoll
-);
+static __le16 s_uFillDataHead(struct vnt_private *pDevice,
+ unsigned char byPktType,
+ void *pTxDataHead,
+ unsigned int cbFrameLength,
+ unsigned int uDMAIdx,
+ bool bNeedAck,
+ unsigned int uFragIdx,
+ unsigned int cbLastFragmentSize,
+ unsigned int uMACfragNum,
+ unsigned char byFBOption,
+ unsigned short wCurrentRate,
+ bool is_pspoll);

/*--------------------- Export Variables --------------------------*/

--
2.34.1

2022-10-20 19:23:38

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter

fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter

Signed-off-by: Tanjuate Brunostar <[email protected]>
---
drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++-----------
1 file changed, 48 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index dc853b83459b..42f4261293ba 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice,
}

if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
- if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
+ if (byFBOption != AUTO_FB_NONE && uDMAIdx !=
+ TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
/* Auto Fall back */
struct vnt_cts_fb *buf = pvCTS;
/* Get SignalField, ServiceField & Length */
@@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice,

ether_addr_copy(buf->data.ra,
pDevice->abyCurrentNetAddr);
- } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */
+ } else {
+ /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA &&
+ * uDMAIdx != TYPE_BEACONDMA)
+ */
struct vnt_cts *buf = pvCTS;
/* Get SignalField, ServiceField & Length */
vnt_get_phy_field(pDevice, uCTSFrameLen,
@@ -964,50 +968,72 @@ 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, wCurrentRate);
- buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate);
- buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate);
- buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
- buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
-
- s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+ buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
+ wCurrentRate);
+ buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
+ wCurrentRate);
+ buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
+ wCurrentRate);
+ buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+ wCurrentRate, bNeedACK);
+ buf->rrv_time_b =
+ vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+ pDevice->byTopCCKBasicRate, bNeedACK);
+
+ s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
- buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
- buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate);
+ buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+ wCurrentRate, bNeedACK);
+ buf->rrv_time_b =
+ vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+ pDevice->byTopCCKBasicRate, bNeedACK);
+ buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
+ wCurrentRate);

/* Fill CTS */
- s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption);
+ s_vFillCTSHead(pDevice, 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;
+ struct vnt_rrv_time_ab *buf = pvRrvT
+ ime;

- buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate);
- buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
+ buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
+ wCurrentRate);
+ buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
+ wCurrentRate, bNeedACK);

/* Fill RTS */
- s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+ s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
+ buf->rrv_time =
+ vnt_rxtx_rsvtime_le16(pDevice, 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, wCurrentRate);
- buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK);
+ buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
+ wCurrentRate);
+ buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+ wCurrentRate, bNeedACK);

/* Fill RTS */
- s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
+ s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
+ buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
+ wCurrentRate, bNeedACK);
}
}
}
--
2.34.1

2022-10-20 19:24:30

by Tanjuate Brunostar

[permalink] [raw]
Subject: [PATCH 5/6] staging: vt6655: refactor long lines of code in the rest of the file

fix checkpatch errors by refactoring long lines of code in the rest of
the file

Signed-off-by: Tanjuate Brunostar <[email protected]>
---
drivers/staging/vt6655/rxtx.c | 105 ++++++++++++++++++++++------------
1 file changed, 67 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 42f4261293ba..b8b21cd39534 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -1106,44 +1106,60 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
if (byFBOption == AUTO_FB_NONE) {
if (bRTS) {/* RTS_need */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
- pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_rts));
+ pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
pvCTS = NULL;
- pvTxDataHd = (void *)(pbyTxBufferAddr + 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);
+ pvTxDataHd = (void *)(pbyTxBufferAddr + 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 */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts));
pvRTS = NULL;
- pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
+ pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
- sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts));
+ sizeof(struct vnt_rrv_time_cts) +
+ cbMICHDR + sizeof(struct vnt_cts));
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- cbMICHDR + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g);
+ cbMICHDR + sizeof(struct vnt_cts) +
+ sizeof(struct vnt_tx_datahead_g);
}
} else {
/* Auto Fall Back */
if (bRTS) {/* RTS_need */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
- pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_rts));
+ pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
pvCTS = NULL;
- pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
+ pvTxDataHd = (void *)(pbyTxBufferAddr + 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);
+ cbMICHDR + sizeof(struct vnt_rts_g_fb) +
+ sizeof(struct vnt_tx_datahead_g_fb);
} else { /* RTS_needless */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts));
pvRTS = NULL;
- pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
- pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- cbMICHDR + sizeof(struct vnt_cts_fb));
+ pvCTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
+ pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts) +
+ cbMICHDR + sizeof(struct vnt_cts_fb));
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- cbMICHDR + sizeof(struct vnt_cts_fb) + sizeof(struct vnt_tx_datahead_g_fb);
+ cbMICHDR + sizeof(struct vnt_cts_fb) +
+ sizeof(struct vnt_tx_datahead_g_fb);
}
} /* Auto Fall Back */
} else {/* 802.11a/b packet */
@@ -1151,19 +1167,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
if (byFBOption == AUTO_FB_NONE) {
if (bRTS) {
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
- pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab));
+ pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
pvCTS = NULL;
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
- sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_ab));
+ 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);
+ cbMICHDR + sizeof(struct vnt_rts_ab) +
+ sizeof(struct vnt_tx_datahead_ab);
} else { /* RTS_needless, need MICHDR */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab));
pvRTS = NULL;
pvCTS = NULL;
- pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
+ pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
cbMICHDR + sizeof(struct vnt_tx_datahead_ab);
}
@@ -1171,19 +1193,25 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
/* Auto Fall Back */
if (bRTS) { /* RTS_need */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
- pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab));
+ pvRTS = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
pvCTS = NULL;
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
- sizeof(struct vnt_rrv_time_ab) + cbMICHDR + sizeof(struct vnt_rts_a_fb));
+ 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);
+ cbMICHDR + sizeof(struct vnt_rts_a_fb) +
+ sizeof(struct vnt_tx_datahead_a_fb);
} else { /* RTS_needless */
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
- pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab));
+ pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab));
pvRTS = NULL;
pvCTS = NULL;
- pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
+ pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
cbMICHDR + sizeof(struct vnt_tx_datahead_a_fb);
}
@@ -1198,8 +1226,9 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
s_vGenerateTxParameter(pDevice, byPktType, tx_buffer_head, pvRrvTime, pvRTS, pvCTS,
cbFrameSize, bNeedACK, uDMAIdx, hdr, pDevice->wCurrentRate);
/* Fill DataHead */
- uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize, uDMAIdx, bNeedACK,
- 0, 0, uMACfragNum, byFBOption, pDevice->wCurrentRate, is_pspoll);
+ uDuration = s_uFillDataHead(pDevice, byPktType, pvTxDataHd, cbFrameSize,
+ uDMAIdx, bNeedACK, 0, 0, uMACfragNum, byFBOption,
+ pDevice->wCurrentRate, is_pspoll);

hdr->duration_id = uDuration;

@@ -1447,8 +1476,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
/* Get Duration and TimeStampOff */
short_head->duration =
cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B,
- frame_size, PK_TYPE_11A, current_rate,
- false, 0, 0, 1, AUTO_FB_NONE));
+ frame_size, PK_TYPE_11A, current_rate,
+ false, 0, 0, 1, AUTO_FB_NONE));

short_head->time_stamp_off =
vnt_time_stamp_off(priv, current_rate);
@@ -1463,8 +1492,8 @@ static int vnt_beacon_xmit(struct vnt_private *priv,
/* Get Duration and TimeStampOff */
short_head->duration =
cpu_to_le16((u16)s_uGetDataDuration(priv, DATADUR_B,
- frame_size, PK_TYPE_11B, current_rate,
- false, 0, 0, 1, AUTO_FB_NONE));
+ frame_size, PK_TYPE_11B, current_rate,
+ false, 0, 0, 1, AUTO_FB_NONE));

short_head->time_stamp_off =
vnt_time_stamp_off(priv, current_rate);
--
2.34.1

2022-10-20 21:27:34

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter

Hi Tanjuate,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url: https://github.com/intel-lab-lkp/linux/commits/Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139
patch link: https://lore.kernel.org/r/03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0%40gmail.com
patch subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter
config: ia64-allyesconfig
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/15a1ddd8d558d352c2381105b7f025740f73ba00
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139
git checkout 15a1ddd8d558d352c2381105b7f025740f73ba00
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/vt6655/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/staging/vt6655/rxtx.c: In function 's_vGenerateTxParameter':
>> drivers/staging/vt6655/rxtx.c:1014:55: error: 'pvRrvT' undeclared (first use in this function)
1014 | struct vnt_rrv_time_ab *buf = pvRrvT
| ^~~~~~
drivers/staging/vt6655/rxtx.c:1014:55: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/staging/vt6655/rxtx.c:1015:33: error: expected ',' or ';' before 'ime'
1015 | ime;
| ^~~


vim +/pvRrvT +1014 drivers/staging/vt6655/rxtx.c

924
925 /*
926 *
927 * Description:
928 * Generate FIFO control for MAC & Baseband controller
929 *
930 * Parameters:
931 * In:
932 * pDevice - Pointer to adapter
933 * pTxDataHead - Transmit Data Buffer
934 * pTxBufHead - pTxBufHead
935 * pvRrvTime - pvRrvTime
936 * pvRTS - RTS Buffer
937 * pCTS - CTS Buffer
938 * cbFrameSize - Transmit Data Length (Hdr+Payload+FCS)
939 * bNeedACK - If need ACK
940 * uDescIdx - Desc Index
941 * Out:
942 * none
943 *
944 * Return Value: none
945 *
946 -
947 * unsigned int cbFrameSize, Hdr+Payload+FCS
948 */
949 static void s_vGenerateTxParameter(struct vnt_private *pDevice,
950 unsigned char byPktType,
951 struct vnt_tx_fifo_head *tx_buffer_head,
952 void *pvRrvTime,
953 void *pvRTS,
954 void *pvCTS,
955 unsigned int cbFrameSize,
956 bool bNeedACK,
957 unsigned int uDMAIdx,
958 void *psEthHeader,
959 unsigned short wCurrentRate)
960 {
961 u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
962 bool bDisCRC = false;
963 unsigned char byFBOption = AUTO_FB_NONE;
964
965 tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate);
966
967 if (fifo_ctl & FIFOCTL_CRCDIS)
968 bDisCRC = true;
969
970 if (fifo_ctl & FIFOCTL_AUTO_FB_0)
971 byFBOption = AUTO_FB_0;
972 else if (fifo_ctl & FIFOCTL_AUTO_FB_1)
973 byFBOption = AUTO_FB_1;
974
975 if (!pvRrvTime)
976 return;
977
978 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
979 if (pvRTS) { /* RTS_need */
980 /* Fill RsvTime */
981 struct vnt_rrv_time_rts *buf = pvRrvTime;
982
983 buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
984 wCurrentRate);
985 buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
986 wCurrentRate);
987 buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
988 wCurrentRate);
989 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
990 wCurrentRate, bNeedACK);
991 buf->rrv_time_b =
992 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
993 pDevice->byTopCCKBasicRate, bNeedACK);
994
995 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
996 psEthHeader, wCurrentRate, byFBOption);
997 } else {/* RTS_needless, PCF mode */
998 struct vnt_rrv_time_cts *buf = pvRrvTime;
999
1000 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
1001 wCurrentRate, bNeedACK);
1002 buf->rrv_time_b =
1003 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1004 pDevice->byTopCCKBasicRate, bNeedACK);
1005 buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
1006 wCurrentRate);
1007
1008 /* Fill CTS */
1009 s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK,
1010 bDisCRC, wCurrentRate, byFBOption);
1011 }
1012 } else if (byPktType == PK_TYPE_11A) {
1013 if (pvRTS) {/* RTS_need, non PCF mode */
> 1014 struct vnt_rrv_time_ab *buf = pvRrvT
> 1015 ime;
1016
1017 buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
1018 wCurrentRate);
1019 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
1020 wCurrentRate, bNeedACK);
1021
1022 /* Fill RTS */
1023 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
1024 psEthHeader, wCurrentRate, byFBOption);
1025 } else if (!pvRTS) {/* RTS_needless, non PCF mode */
1026 struct vnt_rrv_time_ab *buf = pvRrvTime;
1027
1028 buf->rrv_time =
1029 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize,
1030 wCurrentRate, bNeedACK);
1031 }
1032 } else if (byPktType == PK_TYPE_11B) {
1033 if (pvRTS) {/* RTS_need, non PCF mode */
1034 struct vnt_rrv_time_ab *buf = pvRrvTime;
1035
1036 buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
1037 wCurrentRate);
1038 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1039 wCurrentRate, bNeedACK);
1040
1041 /* Fill RTS */
1042 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
1043 psEthHeader, wCurrentRate, byFBOption);
1044 } else { /* RTS_needless, non PCF mode */
1045 struct vnt_rrv_time_ab *buf = pvRrvTime;
1046
1047 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1048 wCurrentRate, bNeedACK);
1049 }
1050 }
1051 }
1052

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (7.26 kB)
config (328.31 kB)
Download all attachments

2022-10-21 05:17:49

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter

Hi Tanjuate,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]

url: https://github.com/intel-lab-lkp/linux/commits/Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139
patch link: https://lore.kernel.org/r/03dd39114b1e5c029cd8022245403a079ff03ae7.1666288416.git.tanjubrunostar0%40gmail.com
patch subject: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter
config: x86_64-allmodconfig
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/15a1ddd8d558d352c2381105b7f025740f73ba00
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Tanjuate-Brunostar/staging-vt6655-a-series-of-checkpatch-fixes-on/20221021-023139
git checkout 15a1ddd8d558d352c2381105b7f025740f73ba00
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/staging/vt6655/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> drivers/staging/vt6655/rxtx.c:1014:34: error: use of undeclared identifier 'pvRrvT'
struct vnt_rrv_time_ab *buf = pvRrvT
^
>> drivers/staging/vt6655/rxtx.c:1014:40: error: expected ';' at end of declaration
struct vnt_rrv_time_ab *buf = pvRrvT
^
;
2 errors generated.


vim +/pvRrvT +1014 drivers/staging/vt6655/rxtx.c

924
925 /*
926 *
927 * Description:
928 * Generate FIFO control for MAC & Baseband controller
929 *
930 * Parameters:
931 * In:
932 * pDevice - Pointer to adapter
933 * pTxDataHead - Transmit Data Buffer
934 * pTxBufHead - pTxBufHead
935 * pvRrvTime - pvRrvTime
936 * pvRTS - RTS Buffer
937 * pCTS - CTS Buffer
938 * cbFrameSize - Transmit Data Length (Hdr+Payload+FCS)
939 * bNeedACK - If need ACK
940 * uDescIdx - Desc Index
941 * Out:
942 * none
943 *
944 * Return Value: none
945 *
946 -
947 * unsigned int cbFrameSize, Hdr+Payload+FCS
948 */
949 static void s_vGenerateTxParameter(struct vnt_private *pDevice,
950 unsigned char byPktType,
951 struct vnt_tx_fifo_head *tx_buffer_head,
952 void *pvRrvTime,
953 void *pvRTS,
954 void *pvCTS,
955 unsigned int cbFrameSize,
956 bool bNeedACK,
957 unsigned int uDMAIdx,
958 void *psEthHeader,
959 unsigned short wCurrentRate)
960 {
961 u16 fifo_ctl = le16_to_cpu(tx_buffer_head->fifo_ctl);
962 bool bDisCRC = false;
963 unsigned char byFBOption = AUTO_FB_NONE;
964
965 tx_buffer_head->current_rate = cpu_to_le16(wCurrentRate);
966
967 if (fifo_ctl & FIFOCTL_CRCDIS)
968 bDisCRC = true;
969
970 if (fifo_ctl & FIFOCTL_AUTO_FB_0)
971 byFBOption = AUTO_FB_0;
972 else if (fifo_ctl & FIFOCTL_AUTO_FB_1)
973 byFBOption = AUTO_FB_1;
974
975 if (!pvRrvTime)
976 return;
977
978 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
979 if (pvRTS) { /* RTS_need */
980 /* Fill RsvTime */
981 struct vnt_rrv_time_rts *buf = pvRrvTime;
982
983 buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
984 wCurrentRate);
985 buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
986 wCurrentRate);
987 buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
988 wCurrentRate);
989 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
990 wCurrentRate, bNeedACK);
991 buf->rrv_time_b =
992 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
993 pDevice->byTopCCKBasicRate, bNeedACK);
994
995 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
996 psEthHeader, wCurrentRate, byFBOption);
997 } else {/* RTS_needless, PCF mode */
998 struct vnt_rrv_time_cts *buf = pvRrvTime;
999
1000 buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
1001 wCurrentRate, bNeedACK);
1002 buf->rrv_time_b =
1003 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1004 pDevice->byTopCCKBasicRate, bNeedACK);
1005 buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
1006 wCurrentRate);
1007
1008 /* Fill CTS */
1009 s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK,
1010 bDisCRC, wCurrentRate, byFBOption);
1011 }
1012 } else if (byPktType == PK_TYPE_11A) {
1013 if (pvRTS) {/* RTS_need, non PCF mode */
> 1014 struct vnt_rrv_time_ab *buf = pvRrvT
1015 ime;
1016
1017 buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
1018 wCurrentRate);
1019 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
1020 wCurrentRate, bNeedACK);
1021
1022 /* Fill RTS */
1023 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
1024 psEthHeader, wCurrentRate, byFBOption);
1025 } else if (!pvRTS) {/* RTS_needless, non PCF mode */
1026 struct vnt_rrv_time_ab *buf = pvRrvTime;
1027
1028 buf->rrv_time =
1029 vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, cbFrameSize,
1030 wCurrentRate, bNeedACK);
1031 }
1032 } else if (byPktType == PK_TYPE_11B) {
1033 if (pvRTS) {/* RTS_need, non PCF mode */
1034 struct vnt_rrv_time_ab *buf = pvRrvTime;
1035
1036 buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
1037 wCurrentRate);
1038 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1039 wCurrentRate, bNeedACK);
1040
1041 /* Fill RTS */
1042 s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC,
1043 psEthHeader, wCurrentRate, byFBOption);
1044 } else { /* RTS_needless, non PCF mode */
1045 struct vnt_rrv_time_ab *buf = pvRrvTime;
1046
1047 buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
1048 wCurrentRate, bNeedACK);
1049 }
1050 }
1051 }
1052

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (7.23 kB)
config (290.32 kB)
Download all attachments

2022-10-21 07:26:11

by Tanjuate Brunostar

[permalink] [raw]
Subject: Re: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter

On Fri, Oct 21, 2022 at 8:16 AM Julia Lawall <[email protected]> wrote:
>
>
>
> On Fri, 21 Oct 2022, Praveen Kumar wrote:
>
> > On 20-10-2022 23:57, Tanjuate Brunostar wrote:
> > > fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter
> > >
> > > Signed-off-by: Tanjuate Brunostar <[email protected]>
> > > ---
> > > drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++-----------
> > > 1 file changed, 48 insertions(+), 22 deletions(-)
> > >
> > > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> > > index dc853b83459b..42f4261293ba 100644
> > > --- a/drivers/staging/vt6655/rxtx.c
> > > +++ b/drivers/staging/vt6655/rxtx.c
> > > @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice,
> > > }
> > >
> > > if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
> > > - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> > > + if (byFBOption != AUTO_FB_NONE && uDMAIdx !=
> > > + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> > > /* Auto Fall back */
> > > struct vnt_cts_fb *buf = pvCTS;
> > > /* Get SignalField, ServiceField & Length */
> > > @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice,
> > >
> > > ether_addr_copy(buf->data.ra,
> > > pDevice->abyCurrentNetAddr);
> > > - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */
> > > + } else {
> > > + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA &&
> > > + * uDMAIdx != TYPE_BEACONDMA)
> > > + */
> > > struct vnt_cts *buf = pvCTS;
> > > /* Get SignalField, ServiceField & Length */
> > > vnt_get_phy_field(pDevice, uCTSFrameLen,
> > > @@ -964,50 +968,72 @@ 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, wCurrentRate);
> > > - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate);
> > > - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate);
> > > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> > > -
> > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > > + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > > + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > > + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > > + wCurrentRate, bNeedACK);
> > > + buf->rrv_time_b =
> > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > > + pDevice->byTopCCKBasicRate, bNeedACK);
> > > +
> > > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> > > - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate);
> > > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > > + wCurrentRate, bNeedACK);
> > > + buf->rrv_time_b =
> > > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > > + pDevice->byTopCCKBasicRate, bNeedACK);
> > > + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > >
> > > /* Fill CTS */
> > > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption);
> > > + s_vFillCTSHead(pDevice, 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;
> > > + struct vnt_rrv_time_ab *buf = pvRrvT
> > > + ime;
> >
> > I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks.
>
> In particular, always be sure that you have a .o file for the .c file that
> you changed. The safest is to first try just compiling the file:
>
> make path/to/my/file.o
>
> Some files can't be compiled in that way. You may need to do, eg
>
> make path/to/my/
>
> instead, but then there is a risk that even if you have compiled the
> directory, you have not actually compled the file that you changed. So
> always check for the .o file.
>
> julia
>
>
> >
> > >
> > > - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate);
> > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > > + wCurrentRate, bNeedACK);
> > >
> > > /* Fill RTS */
> > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > > + buf->rrv_time =
> > > + vnt_rxtx_rsvtime_le16(pDevice, 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, wCurrentRate);
> > > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK);
> > > + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> > > + wCurrentRate);
> > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > > + wCurrentRate, bNeedACK);
> > >
> > > /* Fill RTS */
> > > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > > + wCurrentRate, bNeedACK);
> > > }
> > > }
> > > }
> >
> > Regards,
> >
> > ~Praveen.
> >
> >
Thanks for the guidance. Will do that

2022-10-21 07:31:53

by Praveen Kumar

[permalink] [raw]
Subject: Re: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter

On 20-10-2022 23:57, Tanjuate Brunostar wrote:
> fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter
>
> Signed-off-by: Tanjuate Brunostar <[email protected]>
> ---
> drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++-----------
> 1 file changed, 48 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> index dc853b83459b..42f4261293ba 100644
> --- a/drivers/staging/vt6655/rxtx.c
> +++ b/drivers/staging/vt6655/rxtx.c
> @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice,
> }
>
> if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
> - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> + if (byFBOption != AUTO_FB_NONE && uDMAIdx !=
> + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> /* Auto Fall back */
> struct vnt_cts_fb *buf = pvCTS;
> /* Get SignalField, ServiceField & Length */
> @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice,
>
> ether_addr_copy(buf->data.ra,
> pDevice->abyCurrentNetAddr);
> - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */
> + } else {
> + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA &&
> + * uDMAIdx != TYPE_BEACONDMA)
> + */
> struct vnt_cts *buf = pvCTS;
> /* Get SignalField, ServiceField & Length */
> vnt_get_phy_field(pDevice, uCTSFrameLen,
> @@ -964,50 +968,72 @@ 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, wCurrentRate);
> - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate);
> - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate);
> - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> -
> - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> + wCurrentRate);
> + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
> + wCurrentRate);
> + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> + wCurrentRate);
> + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> + wCurrentRate, bNeedACK);
> + buf->rrv_time_b =
> + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> + pDevice->byTopCCKBasicRate, bNeedACK);
> +
> + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate);
> + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> + wCurrentRate, bNeedACK);
> + buf->rrv_time_b =
> + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> + pDevice->byTopCCKBasicRate, bNeedACK);
> + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
> + wCurrentRate);
>
> /* Fill CTS */
> - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption);
> + s_vFillCTSHead(pDevice, 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;
> + struct vnt_rrv_time_ab *buf = pvRrvT
> + ime;

I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks.

>
> - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate);
> - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> + wCurrentRate);
> + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> + wCurrentRate, bNeedACK);
>
> /* Fill RTS */
> - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> + buf->rrv_time =
> + vnt_rxtx_rsvtime_le16(pDevice, 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, wCurrentRate);
> - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK);
> + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> + wCurrentRate);
> + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> + wCurrentRate, bNeedACK);
>
> /* Fill RTS */
> - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> + wCurrentRate, bNeedACK);
> }
> }
> }

Regards,

~Praveen.

2022-10-21 07:33:56

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH 4/6] staging: vt6655: refactor long lines of code in s_vGenerateTxParameter



On Fri, 21 Oct 2022, Praveen Kumar wrote:

> On 20-10-2022 23:57, Tanjuate Brunostar wrote:
> > fix checkpatch errors by refactoring long lines of code in the function: s_vGenerateTxParameter
> >
> > Signed-off-by: Tanjuate Brunostar <[email protected]>
> > ---
> > drivers/staging/vt6655/rxtx.c | 70 ++++++++++++++++++++++++-----------
> > 1 file changed, 48 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
> > index dc853b83459b..42f4261293ba 100644
> > --- a/drivers/staging/vt6655/rxtx.c
> > +++ b/drivers/staging/vt6655/rxtx.c
> > @@ -839,7 +839,8 @@ s_vFillCTSHead(struct vnt_private *pDevice,
> > }
> >
> > if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
> > - if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> > + if (byFBOption != AUTO_FB_NONE && uDMAIdx !=
> > + TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) {
> > /* Auto Fall back */
> > struct vnt_cts_fb *buf = pvCTS;
> > /* Get SignalField, ServiceField & Length */
> > @@ -878,7 +879,10 @@ s_vFillCTSHead(struct vnt_private *pDevice,
> >
> > ether_addr_copy(buf->data.ra,
> > pDevice->abyCurrentNetAddr);
> > - } else { /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) */
> > + } else {
> > + /* if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA &&
> > + * uDMAIdx != TYPE_BEACONDMA)
> > + */
> > struct vnt_cts *buf = pvCTS;
> > /* Get SignalField, ServiceField & Length */
> > vnt_get_phy_field(pDevice, uCTSFrameLen,
> > @@ -964,50 +968,72 @@ 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, wCurrentRate);
> > - buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize, wCurrentRate);
> > - buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize, wCurrentRate);
> > - buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> > -
> > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > + buf->rts_rrv_time_aa = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> > + wCurrentRate);
> > + buf->rts_rrv_time_ba = get_rtscts_time(pDevice, 1, byPktType, cbFrameSize,
> > + wCurrentRate);
> > + buf->rts_rrv_time_bb = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> > + wCurrentRate);
> > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > + wCurrentRate, bNeedACK);
> > + buf->rrv_time_b =
> > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > + pDevice->byTopCCKBasicRate, bNeedACK);
> > +
> > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > - buf->rrv_time_b = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK);
> > - buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize, wCurrentRate);
> > + buf->rrv_time_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > + wCurrentRate, bNeedACK);
> > + buf->rrv_time_b =
> > + vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > + pDevice->byTopCCKBasicRate, bNeedACK);
> > + buf->cts_rrv_time_ba = get_rtscts_time(pDevice, 3, byPktType, cbFrameSize,
> > + wCurrentRate);
> >
> > /* Fill CTS */
> > - s_vFillCTSHead(pDevice, uDMAIdx, byPktType, pvCTS, cbFrameSize, bNeedACK, bDisCRC, wCurrentRate, byFBOption);
> > + s_vFillCTSHead(pDevice, 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;
> > + struct vnt_rrv_time_ab *buf = pvRrvT
> > + ime;
>
> I'm not sure if this patch is compiled ? In my understanding the recommendation is have the patch compiled and if possible basic sanity done (can discuss with respective maintainers if they can help / guide) before sending here. Please do the needful. Thanks.

In particular, always be sure that you have a .o file for the .c file that
you changed. The safest is to first try just compiling the file:

make path/to/my/file.o

Some files can't be compiled in that way. You may need to do, eg

make path/to/my/

instead, but then there is a risk that even if you have compiled the
directory, you have not actually compled the file that you changed. So
always check for the .o file.

julia


>
> >
> > - buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize, wCurrentRate);
> > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK);
> > + buf->rts_rrv_time = get_rtscts_time(pDevice, 2, byPktType, cbFrameSize,
> > + wCurrentRate);
> > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, byPktType, cbFrameSize,
> > + wCurrentRate, bNeedACK);
> >
> > /* Fill RTS */
> > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > + buf->rrv_time =
> > + vnt_rxtx_rsvtime_le16(pDevice, 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, wCurrentRate);
> > - buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK);
> > + buf->rts_rrv_time = get_rtscts_time(pDevice, 0, byPktType, cbFrameSize,
> > + wCurrentRate);
> > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > + wCurrentRate, bNeedACK);
> >
> > /* Fill RTS */
> > - s_vFillRTSHead(pDevice, byPktType, pvRTS, cbFrameSize, bNeedACK, bDisCRC, psEthHeader, wCurrentRate, byFBOption);
> > + s_vFillRTSHead(pDevice, 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, wCurrentRate, bNeedACK);
> > + buf->rrv_time = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, cbFrameSize,
> > + wCurrentRate, bNeedACK);
> > }
> > }
> > }
>
> Regards,
>
> ~Praveen.
>
>