Commit 5fb8e412 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: rxtx.c s_vFillRTSHead/s_vFillCTSHead move union vnt_tx_data_head up one level.

Move
s_vFillRTSHead union vnt_tx_data_head to void *pvRTS argument.
s_vFillCTSHead union vnt_tx_data_head to void *pvCTS argument.

In s_vGenerateTxParameter create union vnt_tx_data_head
pointing to rts_cts;
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 351c7dc3
...@@ -125,11 +125,11 @@ static u16 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice, u8 byRTSRsvType, ...@@ -125,11 +125,11 @@ static u16 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice, u8 byRTSRsvType,
u8 byPktType, u32 cbFrameLength, u16 wCurrentRate); u8 byPktType, u32 cbFrameLength, u16 wCurrentRate);
static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
u8 byPktType, void *pvCTS, u32 cbFrameLength, int bNeedAck, u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength,
u16 wCurrentRate, u8 byFBOption); int bNeedAck, u16 wCurrentRate, u8 byFBOption);
static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
void *pvRTS, u32 cbFrameLength, int bNeedAck, union vnt_tx_data_head *head, u32 cbFrameLength, int bNeedAck,
struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption); struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption);
static u16 s_uGetDataDuration(struct vnt_private *pDevice, static u16 s_uGetDataDuration(struct vnt_private *pDevice,
...@@ -717,10 +717,9 @@ static int vnt_rxtx_rts_a_fb_head(struct vnt_private *priv, ...@@ -717,10 +717,9 @@ static int vnt_rxtx_rts_a_fb_head(struct vnt_private *priv,
} }
static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
void *pvRTS, u32 cbFrameLength, int bNeedAck, union vnt_tx_data_head *head, u32 cbFrameLength, int bNeedAck,
struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption) struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption)
{ {
union vnt_tx_data_head *head = pvRTS;
if (!head) if (!head)
return; return;
...@@ -757,10 +756,9 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -757,10 +756,9 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
} }
static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
u8 byPktType, void *pvCTS, u32 cbFrameLength, int bNeedAck, u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength,
u16 wCurrentRate, u8 byFBOption) int bNeedAck, u16 wCurrentRate, u8 byFBOption)
{ {
union vnt_tx_data_head *head = pvCTS;
u32 uCTSFrameLen = 14; u32 uCTSFrameLen = 14;
if (!head) if (!head)
...@@ -831,6 +829,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -831,6 +829,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
void *rts_cts, u32 cbFrameSize, int bNeedACK, u32 uDMAIdx, void *rts_cts, u32 cbFrameSize, int bNeedACK, u32 uDMAIdx,
struct ethhdr *psEthHeader, bool need_rts) struct ethhdr *psEthHeader, bool need_rts)
{ {
union vnt_tx_data_head *head = rts_cts;
u32 cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */ u32 cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */
u16 wFifoCtl; u16 wFifoCtl;
u8 byFBOption = AUTO_FB_NONE; u8 byFBOption = AUTO_FB_NONE;
...@@ -870,7 +869,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -870,7 +869,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate,
bNeedACK); bNeedACK);
/* Fill RTS */ /* Fill RTS */
s_vFillRTSHead(pDevice, byPktType, rts_cts, cbFrameSize, s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); bNeedACK, psEthHeader, wCurrentRate, byFBOption);
} }
else {//RTS_needless, PCF mode else {//RTS_needless, PCF mode
...@@ -885,7 +884,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -885,7 +884,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
pBuf->wCTSTxRrvTime_ba = s_uGetRTSCTSRsvTime(pDevice, 3, pBuf->wCTSTxRrvTime_ba = s_uGetRTSCTSRsvTime(pDevice, 3,
byPktType, cbFrameSize, wCurrentRate); byPktType, cbFrameSize, wCurrentRate);
/* Fill CTS */ /* Fill CTS */
s_vFillCTSHead(pDevice, uDMAIdx, byPktType, rts_cts, s_vFillCTSHead(pDevice, uDMAIdx, byPktType, head,
cbFrameSize, bNeedACK, wCurrentRate, byFBOption); cbFrameSize, bNeedACK, wCurrentRate, byFBOption);
} }
} }
...@@ -899,7 +898,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -899,7 +898,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, byPktType, pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, byPktType,
cbFrameSize, wCurrentRate, bNeedACK); cbFrameSize, wCurrentRate, bNeedACK);
/* Fill RTS */ /* Fill RTS */
s_vFillRTSHead(pDevice, byPktType, rts_cts, cbFrameSize, s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); bNeedACK, psEthHeader, wCurrentRate, byFBOption);
} else { } else {
//Fill RsvTime //Fill RsvTime
...@@ -919,7 +918,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -919,7 +918,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B, pBuf->wTxRrvTime = vnt_rxtx_rsvtime_le16(pDevice, PK_TYPE_11B,
cbFrameSize, wCurrentRate, bNeedACK); cbFrameSize, wCurrentRate, bNeedACK);
/* Fill RTS */ /* Fill RTS */
s_vFillRTSHead(pDevice, byPktType, rts_cts, cbFrameSize, s_vFillRTSHead(pDevice, byPktType, head, cbFrameSize,
bNeedACK, psEthHeader, wCurrentRate, byFBOption); bNeedACK, psEthHeader, wCurrentRate, byFBOption);
} }
else { //RTS_needless, non PCF mode else { //RTS_needless, non PCF mode
......
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