Commit 976467d3 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: desc.h remove typedef SRrvTime_ab to new structure.

To new structure.
typedef struct tagSRrvTime_ab -> struct vnt_rrv_time_ab

This is only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f990057
...@@ -146,14 +146,6 @@ ...@@ -146,14 +146,6 @@
/* /*
* RsvTime buffer header * RsvTime buffer header
*/ */
typedef struct tagSRrvTime_ab {
u16 wRTSTxRrvTime;
u16 wTxRrvTime;
} __attribute__ ((__packed__))
SRrvTime_ab, *PSRrvTime_ab;
typedef const SRrvTime_ab *PCSRrvTime_ab;
typedef struct tagSRrvTime_atim { typedef struct tagSRrvTime_atim {
u16 wCTSTxRrvTime_ba; u16 wCTSTxRrvTime_ba;
u16 wTxRrvTime_a; u16 wTxRrvTime_a;
......
...@@ -949,7 +949,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -949,7 +949,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
if (pvRTS != NULL) {//RTS_need, non PCF mode if (pvRTS != NULL) {//RTS_need, non PCF mode
//Fill RsvTime //Fill RsvTime
if (pvRrvTime) { if (pvRrvTime) {
PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; struct vnt_rrv_time_ab *pBuf =
(struct vnt_rrv_time_ab *)pvRrvTime;
pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 2, byPktType, cbFrameSize, wCurrentRate));//2:RTSTxRrvTime_aa, 0:5GHz
pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//0:OFDM
} }
...@@ -959,7 +960,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -959,7 +960,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
else if (pvRTS == NULL) {//RTS_needless, non PCF mode else if (pvRTS == NULL) {//RTS_needless, non PCF mode
//Fill RsvTime //Fill RsvTime
if (pvRrvTime) { if (pvRrvTime) {
PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; struct vnt_rrv_time_ab *pBuf =
(struct vnt_rrv_time_ab *)pvRrvTime;
pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK)); //0:OFDM pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11A, cbFrameSize, wCurrentRate, bNeedACK)); //0:OFDM
} }
} }
...@@ -969,7 +971,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -969,7 +971,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
if ((pvRTS != NULL)) {//RTS_need, non PCF mode if ((pvRTS != NULL)) {//RTS_need, non PCF mode
//Fill RsvTime //Fill RsvTime
if (pvRrvTime) { if (pvRrvTime) {
PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; struct vnt_rrv_time_ab *pBuf =
(struct vnt_rrv_time_ab *)pvRrvTime;
pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz pBuf->wRTSTxRrvTime = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 0, byPktType, cbFrameSize, wCurrentRate));//0:RTSTxRrvTime_bb, 1:2.4GHz
pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK));//1:CCK
} }
...@@ -979,7 +982,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, ...@@ -979,7 +982,8 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice,
else { //RTS_needless, non PCF mode else { //RTS_needless, non PCF mode
//Fill RsvTime //Fill RsvTime
if (pvRrvTime) { if (pvRrvTime) {
PSRrvTime_ab pBuf = (PSRrvTime_ab)pvRrvTime; struct vnt_rrv_time_ab *pBuf =
(struct vnt_rrv_time_ab *)pvRrvTime;
pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK)); //1:CCK pBuf->wTxRrvTime = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, wCurrentRate, bNeedACK)); //1:CCK
} }
} }
...@@ -1217,46 +1221,60 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -1217,46 +1221,60 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
else {//802.11a/b packet else {//802.11a/b packet
if (byFBOption == AUTO_FB_NONE) { if (byFBOption == AUTO_FB_NONE) {
if (bRTS == true) {//RTS_need if (bRTS == true) {//RTS_need
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *) (pbyTxBufferAddr +
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); wTxBufSize);
pMICHDR = (PSMICHDRHead)(pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_ab));
pvRTS = (struct vnt_rts_ab *) (pbyTxBufferAddr + wTxBufSize + pvRTS = (struct vnt_rts_ab *) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_ab) + cbMICHDR); sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
pvCTS = NULL; pvCTS = NULL;
pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize + pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_ab) + cbMICHDR + sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
sizeof(struct vnt_rts_ab)); sizeof(struct vnt_rts_ab));
cbHeaderLength = wTxBufSize + sizeof(PSRrvTime_ab) + cbMICHDR + cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
sizeof(struct vnt_rts_ab) + sizeof(STxDataHead_ab); cbMICHDR + sizeof(struct vnt_rts_ab) +
sizeof(STxDataHead_ab);
} }
else if (bRTS == false) { //RTS_needless, no MICHDR else if (bRTS == false) { //RTS_needless, no MICHDR
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *)(pbyTxBufferAddr +
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_ab));
pvRTS = NULL; pvRTS = NULL;
pvCTS = NULL; pvCTS = NULL;
pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize +
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR + sizeof(STxDataHead_ab); sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
cbMICHDR + sizeof(STxDataHead_ab);
} }
} else { } else {
// Auto Fall Back // Auto Fall Back
if (bRTS == true) {//RTS_need if (bRTS == true) {//RTS_need
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *)(pbyTxBufferAddr +
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_ab));
pvRTS = (struct vnt_rts_a_fb *) (pbyTxBufferAddr + wTxBufSize + pvRTS = (struct vnt_rts_a_fb *) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_ab) + cbMICHDR); sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
pvCTS = NULL; pvCTS = NULL;
pvTxDataHd = (PSTxDataHead_a_FB) (pbyTxBufferAddr + wTxBufSize + pvTxDataHd = (PSTxDataHead_a_FB) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_ab) + cbMICHDR + sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
sizeof(struct vnt_rts_a_fb)); sizeof(struct vnt_rts_a_fb));
cbHeaderLength = wTxBufSize + sizeof(PSRrvTime_ab) + cbMICHDR + cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
sizeof(struct vnt_rts_a_fb) + sizeof(STxDataHead_a_FB); cbMICHDR + sizeof(struct vnt_rts_a_fb) +
sizeof(STxDataHead_a_FB);
} }
else if (bRTS == false) { //RTS_needless else if (bRTS == false) { //RTS_needless
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *)(pbyTxBufferAddr +
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); wTxBufSize);
pMICHDR = (PSMICHDRHead)(pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_ab));
pvRTS = NULL; pvRTS = NULL;
pvCTS = NULL; pvCTS = NULL;
pvTxDataHd = (PSTxDataHead_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); pvTxDataHd = (PSTxDataHead_a_FB) (pbyTxBufferAddr + wTxBufSize +
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR + sizeof(STxDataHead_a_FB); sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
cbMICHDR + sizeof(STxDataHead_a_FB);
} }
} // Auto Fall Back } // Auto Fall Back
} }
...@@ -1676,12 +1694,14 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, ...@@ -1676,12 +1694,14 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
sizeof(struct vnt_cts) + sizeof(STxDataHead_g); sizeof(struct vnt_cts) + sizeof(STxDataHead_g);
} }
else { // 802.11a/b packet else { // 802.11a/b packet
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = NULL; pMICHDR = NULL;
pvRTS = NULL; pvRTS = NULL;
pCTS = NULL; pCTS = NULL;
pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize +
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_ab) + sizeof(STxDataHead_ab); sizeof(struct vnt_rrv_time_ab));
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
sizeof(STxDataHead_ab);
} }
memcpy(&(sEthHeader.h_dest[0]), memcpy(&(sEthHeader.h_dest[0]),
...@@ -2082,12 +2102,15 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) ...@@ -2082,12 +2102,15 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb)
} }
else {//802.11a/b packet else {//802.11a/b packet
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (struct vnt_rrv_time_ab *) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_ab));
pvRTS = NULL; pvRTS = NULL;
pvCTS = NULL; pvCTS = NULL;
pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize +
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR + sizeof(STxDataHead_ab); sizeof(struct vnt_rrv_time_ab) + cbMICHDR);
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_ab) + cbMICHDR +
sizeof(STxDataHead_ab);
} }
memcpy(&(sEthHeader.h_dest[0]), memcpy(&(sEthHeader.h_dest[0]),
&(p80211Header->sA3.abyAddr1[0]), &(p80211Header->sA3.abyAddr1[0]),
......
...@@ -49,6 +49,11 @@ struct vnt_rrv_time_cts { ...@@ -49,6 +49,11 @@ struct vnt_rrv_time_cts {
u16 wTxRrvTime_a; u16 wTxRrvTime_a;
} __packed; } __packed;
struct vnt_rrv_time_ab {
u16 wRTSTxRrvTime;
u16 wTxRrvTime;
} __packed;
/* RTS buffer header */ /* RTS buffer header */
struct vnt_rts_g { struct vnt_rts_g {
u8 bySignalField_b; u8 bySignalField_b;
......
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