Commit 92928f13 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: rxtx.c cleanup s_vGenerateTxParameter

Remove white space and commented out code.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd94d281
...@@ -835,16 +835,13 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -835,16 +835,13 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
u16 wFifoCtl; u16 wFifoCtl;
u8 byFBOption = AUTO_FB_NONE; u8 byFBOption = AUTO_FB_NONE;
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter...\n");
pFifoHead->wReserved = wCurrentRate; pFifoHead->wReserved = wCurrentRate;
wFifoCtl = pFifoHead->wFIFOCtl; wFifoCtl = pFifoHead->wFIFOCtl;
if (wFifoCtl & FIFOCTL_AUTO_FB_0) { if (wFifoCtl & FIFOCTL_AUTO_FB_0)
byFBOption = AUTO_FB_0; byFBOption = AUTO_FB_0;
} else if (wFifoCtl & FIFOCTL_AUTO_FB_1)
else if (wFifoCtl & FIFOCTL_AUTO_FB_1) {
byFBOption = AUTO_FB_1; byFBOption = AUTO_FB_1;
}
if (!pFifoHead) if (!pFifoHead)
return 0; return 0;
...@@ -854,8 +851,8 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -854,8 +851,8 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
if (need_rts) { if (need_rts) {
//Fill RsvTime struct vnt_rrv_time_rts *pBuf =
struct vnt_rrv_time_rts *pBuf = &tx_buffer->tx_head.tx_rts.rts; &tx_buffer->tx_head.tx_rts.rts;
pBuf->wRTSTxRrvTime_aa = s_uGetRTSCTSRsvTime(pDevice, 2, pBuf->wRTSTxRrvTime_aa = s_uGetRTSCTSRsvTime(pDevice, 2,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
...@@ -863,48 +860,53 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -863,48 +860,53 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
pBuf->wRTSTxRrvTime_bb = s_uGetRTSCTSRsvTime(pDevice, 0, pBuf->wRTSTxRrvTime_bb = s_uGetRTSCTSRsvTime(pDevice, 0,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
pBuf->wTxRrvTime_a = vnt_rxtx_rsvtime_le16(pDevice, pBuf->wTxRrvTime_a = vnt_rxtx_rsvtime_le16(pDevice,
byPktType, cbFrameSize, wCurrentRate, bNeedACK); byPktType, cbFrameSize, wCurrentRate, bNeedACK);
pBuf->wTxRrvTime_b = vnt_rxtx_rsvtime_le16(pDevice, pBuf->wTxRrvTime_b = vnt_rxtx_rsvtime_le16(pDevice,
PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, PK_TYPE_11B, cbFrameSize,
bNeedACK); pDevice->byTopCCKBasicRate, bNeedACK);
if (need_mic) { if (need_mic) {
*mic_hdr = &tx_buffer->tx_head.tx_rts.tx.mic.hdr; *mic_hdr = &tx_buffer->
tx_head.tx_rts.tx.mic.hdr;
head = &tx_buffer->tx_head.tx_rts.tx.mic.head; head = &tx_buffer->tx_head.tx_rts.tx.mic.head;
} else { } else {
head = &tx_buffer->tx_head.tx_rts.tx.head; head = &tx_buffer->tx_head.tx_rts.tx.head;
} }
/* Fill RTS */ /* Fill RTS */
return s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize, return s_vFillRTSHead(pDevice, byPktType, head,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); cbFrameSize, bNeedACK, psEthHeader,
} wCurrentRate, byFBOption);
else {//RTS_needless, PCF mode
//Fill RsvTime } else {
struct vnt_rrv_time_cts *pBuf = &tx_buffer->tx_head.tx_cts.cts; struct vnt_rrv_time_cts *pBuf = &tx_buffer->
tx_head.tx_cts.cts;
pBuf->wTxRrvTime_a = vnt_rxtx_rsvtime_le16(pDevice, byPktType, pBuf->wTxRrvTime_a = vnt_rxtx_rsvtime_le16(pDevice,
cbFrameSize, wCurrentRate, bNeedACK); byPktType, cbFrameSize, wCurrentRate, bNeedACK);
pBuf->wTxRrvTime_b = vnt_rxtx_rsvtime_le16(pDevice, pBuf->wTxRrvTime_b = vnt_rxtx_rsvtime_le16(pDevice,
PK_TYPE_11B, cbFrameSize, PK_TYPE_11B, cbFrameSize,
pDevice->byTopCCKBasicRate, bNeedACK); pDevice->byTopCCKBasicRate, bNeedACK);
pBuf->wCTSTxRrvTime_ba = s_uGetRTSCTSRsvTime(pDevice, 3, pBuf->wCTSTxRrvTime_ba = s_uGetRTSCTSRsvTime(pDevice, 3,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
if (need_mic) { if (need_mic) {
*mic_hdr = &tx_buffer->tx_head.tx_cts.tx.mic.hdr; *mic_hdr = &tx_buffer->
tx_head.tx_cts.tx.mic.hdr;
head = &tx_buffer->tx_head.tx_cts.tx.mic.head; head = &tx_buffer->tx_head.tx_cts.tx.mic.head;
} else { } else {
head = &tx_buffer->tx_head.tx_cts.tx.head; head = &tx_buffer->tx_head.tx_cts.tx.head;
} }
/* Fill CTS */ /* Fill CTS */
return s_vFillCTSHead(pDevice, uDMAIdx, byPktType, head, return s_vFillCTSHead(pDevice, uDMAIdx, byPktType,
cbFrameSize, bNeedACK, wCurrentRate, byFBOption); head, cbFrameSize, bNeedACK, wCurrentRate,
} byFBOption);
} }
else if (byPktType == PK_TYPE_11A) { } else if (byPktType == PK_TYPE_11A) {
if (need_mic) { if (need_mic) {
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr; *mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;
head = &tx_buffer->tx_head.tx_ab.tx.mic.head; head = &tx_buffer->tx_head.tx_ab.tx.mic.head;
...@@ -913,29 +915,32 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -913,29 +915,32 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
} }
if (need_rts) { if (need_rts) {
//Fill RsvTime struct vnt_rrv_time_ab *pBuf = &tx_buffer->
struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; tx_head.tx_ab.ab;
pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 2, pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 2,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, byPktType,
cbFrameSize, wCurrentRate, bNeedACK); pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice,
byPktType, cbFrameSize, wCurrentRate, bNeedACK);
/* Fill RTS */ /* Fill RTS */
return s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize, return s_vFillRTSHead(pDevice, byPktType, head,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); cbFrameSize, bNeedACK, psEthHeader,
wCurrentRate, byFBOption);
} else { } else {
//Fill RsvTime struct vnt_rrv_time_ab *pBuf = &tx_buffer->
struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; tx_head.tx_ab.ab;
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11A, pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice,
cbFrameSize, wCurrentRate, bNeedACK); PK_TYPE_11A, cbFrameSize,
wCurrentRate, bNeedACK);
return vnt_rxtx_datahead_a_fb(pDevice, byPktType, wCurrentRate, return vnt_rxtx_datahead_a_fb(pDevice, byPktType,
&head->data_head_a_fb, cbFrameSize, bNeedACK); wCurrentRate, &head->data_head_a_fb,
} cbFrameSize, bNeedACK);
} }
else if (byPktType == PK_TYPE_11B) { } else if (byPktType == PK_TYPE_11B) {
if (need_mic) { if (need_mic) {
*mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr; *mic_hdr = &tx_buffer->tx_head.tx_ab.tx.mic.hdr;
head = &tx_buffer->tx_head.tx_ab.tx.mic.head; head = &tx_buffer->tx_head.tx_ab.tx.mic.head;
...@@ -944,30 +949,33 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -944,30 +949,33 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
} }
if (need_rts) { if (need_rts) {
//Fill RsvTime struct vnt_rrv_time_ab *pBuf = &tx_buffer->
struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab; tx_head.tx_ab.ab;
pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 0, pBuf->wRTSTxRrvTime = s_uGetRTSCTSRsvTime(pDevice, 0,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B,
cbFrameSize, wCurrentRate, bNeedACK); pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice,
PK_TYPE_11B, cbFrameSize, wCurrentRate,
bNeedACK);
/* Fill RTS */ /* Fill RTS */
return s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize, return s_vFillRTSHead(pDevice, byPktType, head,
cbFrameSize,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); bNeedACK, psEthHeader, wCurrentRate, byFBOption);
} } else {
else { //RTS_needless, non PCF mode struct vnt_rrv_time_ab *pBuf = &tx_buffer->
//Fill RsvTime tx_head.tx_ab.ab;
struct vnt_rrv_time_ab *pBuf = &tx_buffer->tx_head.tx_ab.ab;
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice,
cbFrameSize, wCurrentRate, bNeedACK); PK_TYPE_11B, cbFrameSize,
wCurrentRate, bNeedACK);
return vnt_rxtx_datahead_ab(pDevice, byPktType, wCurrentRate, return vnt_rxtx_datahead_ab(pDevice, byPktType,
&head->data_head_ab, cbFrameSize, bNeedACK); wCurrentRate, &head->data_head_ab,
cbFrameSize, bNeedACK);
} }
} }
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter END.\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment