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

staging: vt6656: desc.h Move typedef struct tagSCTS* to new structures in rxtx.h

The new structures being
typedef struct tagSCTS -> struct vnt_cts
typedef struct tagSCTS_FB -> struct vnt_cts_fb

These are only needed by rxtc.c so moved to rxtx.h and
will eventually form part of the structure of
struct vnt_tx_buffer.

The linux/ieee80211.h in desc.h is no longer needed.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c521cb58
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/ieee80211.h>
#include "tether.h" #include "tether.h"
...@@ -185,37 +184,6 @@ SRrvTime_atim, *PSRrvTime_atim; ...@@ -185,37 +184,6 @@ SRrvTime_atim, *PSRrvTime_atim;
typedef const SRrvTime_atim *PCSRrvTime_atim; typedef const SRrvTime_atim *PCSRrvTime_atim;
/*
* CTS buffer header
*/
typedef struct tagSCTS {
u8 bySignalField_b;
u8 byServiceField_b;
u16 wTransmitLength_b;
u16 wDuration_ba;
u16 wReserved;
struct ieee80211_cts data;
u16 reserved2;
} __attribute__ ((__packed__))
SCTS, *PSCTS;
typedef const SCTS *PCSCTS;
typedef struct tagSCTS_FB {
u8 bySignalField_b;
u8 byServiceField_b;
u16 wTransmitLength_b;
u16 wDuration_ba;
u16 wReserved;
u16 wCTSDuration_ba_f0;
u16 wCTSDuration_ba_f1;
struct ieee80211_cts data;
u16 reserved2;
} __attribute__ ((__packed__))
SCTS_FB, *PSCTS_FB;
typedef const SCTS_FB *PCSCTS_FB;
/* /*
* TX FIFO header * TX FIFO header
*/ */
......
...@@ -822,7 +822,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, ...@@ -822,7 +822,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { 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 // Auto Fall back
PSCTS_FB pBuf = (PSCTS_FB)pvCTS; struct vnt_cts_fb *pBuf = (struct vnt_cts_fb *)pvCTS;
//Get SignalField,ServiceField,Length //Get SignalField,ServiceField,Length
BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b)
...@@ -844,7 +844,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, ...@@ -844,7 +844,7 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
pBuf->data.frame_control = TYPE_CTL_CTS; pBuf->data.frame_control = TYPE_CTL_CTS;
memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN); memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
} else { //if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) } else { //if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA)
PSCTS pBuf = (PSCTS)pvCTS; struct vnt_cts *pBuf = (struct vnt_cts *)pvCTS;
//Get SignalField,ServiceField,Length //Get SignalField,ServiceField,Length
BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B, BBvCalculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b) (u16 *)&(wLen), (u8 *)&(pBuf->byServiceField_b), (u8 *)&(pBuf->bySignalField_b)
...@@ -1165,9 +1165,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -1165,9 +1165,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
pvRTS = NULL; pvRTS = NULL;
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR); pvCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize +
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS)); sizeof(SRrvTime_gCTS) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g); pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_gCTS) + cbMICHDR +
sizeof(struct vnt_cts));
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR +
sizeof(struct vnt_cts) + sizeof(STxDataHead_g);
} }
} else { } else {
// Auto Fall Back // Auto Fall Back
...@@ -1187,9 +1191,14 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ...@@ -1187,9 +1191,14 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
pvRTS = NULL; pvRTS = NULL;
pvCTS = (PSCTS_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR); pvCTS = (struct vnt_cts_fb *) (pbyTxBufferAddr + wTxBufSize +
pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS_FB)); sizeof(SRrvTime_gCTS) + cbMICHDR);
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS_FB) + sizeof(STxDataHead_g_FB); pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr +
wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR +
sizeof(struct vnt_cts_fb));
cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gCTS) +
cbMICHDR + sizeof(struct vnt_cts_fb) +
sizeof(STxDataHead_g_FB);
} }
} // Auto Fall Back } // Auto Fall Back
} }
...@@ -1508,7 +1517,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, ...@@ -1508,7 +1517,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
PSTxBufHead pTxBufHead; PSTxBufHead pTxBufHead;
PUSB_SEND_CONTEXT pContext; PUSB_SEND_CONTEXT pContext;
struct ieee80211_hdr *pMACHeader; struct ieee80211_hdr *pMACHeader;
PSCTS pCTS; struct vnt_cts *pCTS;
struct ethhdr sEthHeader; struct ethhdr sEthHeader;
u8 byPktType, *pbyTxBufferAddr; u8 byPktType, *pbyTxBufferAddr;
void *pvRTS, *pvTxDataHd, *pvRrvTime, *pMICHDR; void *pvRTS, *pvTxDataHd, *pvRrvTime, *pMICHDR;
...@@ -1647,9 +1656,12 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, ...@@ -1647,9 +1656,12 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = NULL; pMICHDR = NULL;
pvRTS = NULL; pvRTS = NULL;
pCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); pCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize +
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + sizeof(SCTS)); sizeof(SRrvTime_gCTS));
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) + sizeof(SCTS) + sizeof(STxDataHead_g); pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_gCTS) + sizeof(struct vnt_cts));
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) +
sizeof(struct vnt_cts) + sizeof(STxDataHead_g);
} }
else { // 802.11a/b packet else { // 802.11a/b packet
pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
...@@ -2047,9 +2059,12 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) ...@@ -2047,9 +2059,12 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb)
pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS));
pvRTS = NULL; pvRTS = NULL;
pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR); pvCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize +
pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS)); sizeof(SRrvTime_gCTS) + cbMICHDR);
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(SCTS) + sizeof(STxDataHead_g); pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize +
sizeof(SRrvTime_gCTS) + cbMICHDR + sizeof(struct vnt_cts));
cbHeaderSize = wTxBufSize + sizeof(SRrvTime_gCTS) + cbMICHDR +
sizeof(struct vnt_cts) + sizeof(STxDataHead_g);
} }
else {//802.11a/b packet else {//802.11a/b packet
......
...@@ -85,6 +85,29 @@ struct vnt_rts_a_fb { ...@@ -85,6 +85,29 @@ struct vnt_rts_a_fb {
struct ieee80211_rts data; struct ieee80211_rts data;
} __packed; } __packed;
/* CTS buffer header */
struct vnt_cts {
u8 bySignalField_b;
u8 byServiceField_b;
u16 wTransmitLength_b;
u16 wDuration_ba;
u16 wReserved;
struct ieee80211_cts data;
u16 reserved2;
} __packed;
struct vnt_cts_fb {
u8 bySignalField_b;
u8 byServiceField_b;
u16 wTransmitLength_b;
u16 wDuration_ba;
u16 wReserved;
u16 wCTSDuration_ba_f0;
u16 wCTSDuration_ba_f1;
struct ieee80211_cts data;
u16 reserved2;
} __packed;
struct vnt_tx_buffer { struct vnt_tx_buffer {
u8 byType; u8 byType;
u8 byPKTNO; u8 byPKTNO;
......
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