staging: vt6655: rxtx replace typedef struct tagSRrvTime_gCTS with struct vnt_rrv_time_cts
replacing members wCTSTxRrvTime_ba, wReserved, wTxRrvTime_b and wTxRrvTime_a with cts_rrv_time_ba, reserved, rrv_time_b and rrv_time_a; Creating the new structure in rxtx.h and Using __le16 where necessary pvRrvTime is a void pointer Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a9e6a2dcd3
commit
d66a5a7464
@ -331,15 +331,6 @@ typedef const STxSyncDesc *PCSTxSyncDesc;
|
|||||||
//
|
//
|
||||||
// RsvTime buffer header
|
// RsvTime buffer header
|
||||||
//
|
//
|
||||||
typedef struct tagSRrvTime_gCTS {
|
|
||||||
unsigned short wCTSTxRrvTime_ba;
|
|
||||||
unsigned short wReserved;
|
|
||||||
unsigned short wTxRrvTime_b;
|
|
||||||
unsigned short wTxRrvTime_a;
|
|
||||||
} __attribute__ ((__packed__))
|
|
||||||
SRrvTime_gCTS, *PSRrvTime_gCTS;
|
|
||||||
typedef const SRrvTime_gCTS *PCSRrvTime_gCTS;
|
|
||||||
|
|
||||||
typedef struct tagSRrvTime_ab {
|
typedef struct tagSRrvTime_ab {
|
||||||
unsigned short wRTSTxRrvTime;
|
unsigned short wRTSTxRrvTime;
|
||||||
unsigned short wTxRrvTime;
|
unsigned short wTxRrvTime;
|
||||||
|
@ -1095,11 +1095,11 @@ s_vGenerateTxParameter(
|
|||||||
|
|
||||||
//Fill RsvTime
|
//Fill RsvTime
|
||||||
if (pvRrvTime) {
|
if (pvRrvTime) {
|
||||||
PSRrvTime_gCTS pBuf = (PSRrvTime_gCTS)pvRrvTime;
|
struct vnt_rrv_time_cts *buf = pvRrvTime;
|
||||||
|
|
||||||
pBuf->wTxRrvTime_a = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));//2.4G OFDM
|
buf->rrv_time_a = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, byPktType, cbFrameSize, wCurrentRate, bNeedACK));
|
||||||
pBuf->wTxRrvTime_b = cpu_to_le16((unsigned short)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));//1:CCK
|
buf->rrv_time_b = cpu_to_le16((u16)s_uGetTxRsvTime(pDevice, PK_TYPE_11B, cbFrameSize, pDevice->byTopCCKBasicRate, bNeedACK));
|
||||||
pBuf->wCTSTxRrvTime_ba = cpu_to_le16((unsigned short)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));//3:CTSTxRrvTime_Ba, 1:2.4GHz
|
buf->cts_rrv_time_ba = cpu_to_le16((u16)s_uGetRTSCTSRsvTime(pDevice, 3, byPktType, cbFrameSize, wCurrentRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
//Fill CTS
|
//Fill CTS
|
||||||
@ -1319,12 +1319,12 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
|
|||||||
pvTxDataHd = (PSTxDataHead_g)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g));
|
pvTxDataHd = (PSTxDataHead_g)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g));
|
||||||
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g) + sizeof(STxDataHead_g);
|
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g) + sizeof(STxDataHead_g);
|
||||||
} else { //RTS_needless
|
} else { //RTS_needless
|
||||||
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
|
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
|
||||||
pvRTS = NULL;
|
pvRTS = NULL;
|
||||||
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR);
|
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
|
||||||
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS));
|
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS));
|
||||||
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g);
|
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Auto Fall Back
|
// Auto Fall Back
|
||||||
@ -1336,12 +1336,12 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
|
|||||||
pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g_FB));
|
pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g_FB));
|
||||||
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g_FB) + sizeof(STxDataHead_g_FB);
|
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g_FB) + sizeof(STxDataHead_g_FB);
|
||||||
} else { //RTS_needless
|
} else { //RTS_needless
|
||||||
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
|
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
|
||||||
pvRTS = NULL;
|
pvRTS = NULL;
|
||||||
pvCTS = (PSCTS_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR);
|
pvCTS = (PSCTS_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
|
||||||
pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS_FB));
|
pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS_FB));
|
||||||
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS_FB) + sizeof(STxDataHead_g_FB);
|
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS_FB) + sizeof(STxDataHead_g_FB);
|
||||||
}
|
}
|
||||||
} // Auto Fall Back
|
} // Auto Fall Back
|
||||||
} else {//802.11a/b packet
|
} else {//802.11a/b packet
|
||||||
@ -2183,13 +2183,15 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, PSTxMgmtPacket pPacket)
|
|||||||
|
|
||||||
//Set RrvTime/RTS/CTS Buffer
|
//Set RrvTime/RTS/CTS Buffer
|
||||||
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
|
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
|
||||||
|
pvRrvTime = (void *) (pbyTxBufferAddr + wTxBufSize);
|
||||||
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
|
|
||||||
pMICHDR = NULL;
|
pMICHDR = NULL;
|
||||||
pvRTS = NULL;
|
pvRTS = NULL;
|
||||||
pCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
|
pCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize +
|
||||||
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + sizeof(SCTS));
|
sizeof(struct vnt_rrv_time_cts));
|
||||||
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) + sizeof(SCTS) + sizeof(STxDataHead_g);
|
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
|
||||||
|
sizeof(struct vnt_rrv_time_cts) + sizeof(SCTS));
|
||||||
|
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
|
||||||
|
sizeof(SCTS) + sizeof(STxDataHead_g);
|
||||||
} else { // 802.11a/b packet
|
} else { // 802.11a/b packet
|
||||||
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = NULL;
|
pMICHDR = NULL;
|
||||||
@ -2668,12 +2670,16 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb,
|
|||||||
|
|
||||||
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
|
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
|
||||||
|
|
||||||
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
|
pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
|
||||||
|
sizeof(struct vnt_rrv_time_cts));
|
||||||
pvRTS = NULL;
|
pvRTS = NULL;
|
||||||
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR);
|
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize +
|
||||||
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS));
|
sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
|
||||||
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g);
|
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
|
||||||
|
sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS));
|
||||||
|
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
|
||||||
|
cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g);
|
||||||
|
|
||||||
} else {//802.11a/b packet
|
} else {//802.11a/b packet
|
||||||
|
|
||||||
|
@ -66,6 +66,13 @@ struct vnt_rrv_time_rts {
|
|||||||
__le16 rrv_time_a;
|
__le16 rrv_time_a;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
struct vnt_rrv_time_cts {
|
||||||
|
__le16 cts_rrv_time_ba;
|
||||||
|
u16 reserved;
|
||||||
|
__le16 rrv_time_b;
|
||||||
|
__le16 rrv_time_a;
|
||||||
|
} __packed;
|
||||||
|
|
||||||
struct vnt_tx_short_buf_head {
|
struct vnt_tx_short_buf_head {
|
||||||
__le16 fifo_ctl;
|
__le16 fifo_ctl;
|
||||||
u16 time_stamp;
|
u16 time_stamp;
|
||||||
|
Loading…
Reference in New Issue
Block a user