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

staging: vt6656: desc.h remove typedef struct tagSRTSData

Replace structures with struct ieee80211_rts data.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0de17e4
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#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"
...@@ -187,16 +188,6 @@ typedef const SRrvTime_atim *PCSRrvTime_atim; ...@@ -187,16 +188,6 @@ typedef const SRrvTime_atim *PCSRrvTime_atim;
/* /*
* RTS buffer header * RTS buffer header
*/ */
typedef struct tagSRTSData {
u16 wFrameControl;
u16 wDurationID;
u8 abyRA[ETH_ALEN];
u8 abyTA[ETH_ALEN];
} __attribute__ ((__packed__))
SRTSData, *PSRTSData;
typedef const SRTSData *PCSRTSData;
typedef struct tagSRTS_g { typedef struct tagSRTS_g {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
...@@ -208,7 +199,7 @@ typedef struct tagSRTS_g { ...@@ -208,7 +199,7 @@ typedef struct tagSRTS_g {
u16 wDuration_aa; u16 wDuration_aa;
u16 wDuration_bb; u16 wDuration_bb;
u16 wReserved; u16 wReserved;
SRTSData Data; struct ieee80211_rts data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_g, *PSRTS_g; SRTS_g, *PSRTS_g;
typedef const SRTS_g *PCSRTS_g; typedef const SRTS_g *PCSRTS_g;
...@@ -228,7 +219,7 @@ typedef struct tagSRTS_g_FB { ...@@ -228,7 +219,7 @@ typedef struct tagSRTS_g_FB {
u16 wRTSDuration_aa_f0; u16 wRTSDuration_aa_f0;
u16 wRTSDuration_ba_f1; u16 wRTSDuration_ba_f1;
u16 wRTSDuration_aa_f1; u16 wRTSDuration_aa_f1;
SRTSData Data; struct ieee80211_rts data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_g_FB, *PSRTS_g_FB; SRTS_g_FB, *PSRTS_g_FB;
...@@ -240,7 +231,7 @@ typedef struct tagSRTS_ab { ...@@ -240,7 +231,7 @@ typedef struct tagSRTS_ab {
u16 wTransmitLength; u16 wTransmitLength;
u16 wDuration; u16 wDuration;
u16 wReserved; u16 wReserved;
SRTSData Data; struct ieee80211_rts data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_ab, *PSRTS_ab; SRTS_ab, *PSRTS_ab;
...@@ -254,7 +245,7 @@ typedef struct tagSRTS_a_FB { ...@@ -254,7 +245,7 @@ typedef struct tagSRTS_a_FB {
u16 wReserved; u16 wReserved;
u16 wRTSDuration_f0; u16 wRTSDuration_f0;
u16 wRTSDuration_f1; u16 wRTSDuration_f1;
SRTSData Data; struct ieee80211_rts data;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SRTS_a_FB, *PSRTS_a_FB; SRTS_a_FB, *PSRTS_a_FB;
......
...@@ -795,32 +795,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -795,32 +795,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
pBuf->wDuration_bb = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData pBuf->wDuration_bb = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData
pBuf->wDuration_aa = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData pBuf->wDuration_aa = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3: 2.4G OFDMData
pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data
pBuf->data.duration = pBuf->wDuration_aa;
/*Get RTS Frame body */
pBuf->data.frame_control = TYPE_CTL_RTS;
pBuf->Data.wDurationID = pBuf->wDuration_aa; if (pDevice->eOPMode == OP_MODE_ADHOC ||
//Get RTS Frame body pDevice->eOPMode == OP_MODE_AP)
pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 memcpy(pBuf->data.ra, psEthHeader->h_dest, ETH_ALEN);
else
memcpy(pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
if ((pDevice->eOPMode == OP_MODE_ADHOC) || if (pDevice->eOPMode == OP_MODE_AP)
(pDevice->eOPMode == OP_MODE_AP)) { memcpy(pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
memcpy(&(pBuf->Data.abyRA[0]), else
&(psEthHeader->h_dest[0]), memcpy(pBuf->data.ta, psEthHeader->h_source, ETH_ALEN);
ETH_ALEN);
}
else {
memcpy(&(pBuf->Data.abyRA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
}
if (pDevice->eOPMode == OP_MODE_AP) {
memcpy(&(pBuf->Data.abyTA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
}
else {
memcpy(&(pBuf->Data.abyTA[0]),
&(psEthHeader->h_source[0]),
ETH_ALEN);
}
} }
else { else {
PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS; PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS;
...@@ -841,33 +829,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -841,33 +829,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
pBuf->wRTSDuration_aa_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData pBuf->wRTSDuration_aa_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData
pBuf->wRTSDuration_ba_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData pBuf->wRTSDuration_ba_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData
pBuf->wRTSDuration_aa_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData pBuf->wRTSDuration_aa_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData
pBuf->Data.wDurationID = pBuf->wDuration_aa; pBuf->data.duration = pBuf->wDuration_aa;
//Get RTS Frame body /*Get RTS Frame body*/
pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 pBuf->data.frame_control = TYPE_CTL_RTS;
if ((pDevice->eOPMode == OP_MODE_ADHOC) || if (pDevice->eOPMode == OP_MODE_ADHOC ||
(pDevice->eOPMode == OP_MODE_AP)) { pDevice->eOPMode == OP_MODE_AP)
memcpy(&(pBuf->Data.abyRA[0]), memcpy(pBuf->data.ra, psEthHeader->h_dest, ETH_ALEN);
&(psEthHeader->h_dest[0]), else
ETH_ALEN); memcpy(pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
}
else { if (pDevice->eOPMode == OP_MODE_AP)
memcpy(&(pBuf->Data.abyRA[0]), memcpy(pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
&(pDevice->abyBSSID[0]), else
ETH_ALEN); memcpy(pBuf->data.ta, psEthHeader->h_source, ETH_ALEN);
}
if (pDevice->eOPMode == OP_MODE_AP) {
memcpy(&(pBuf->Data.abyTA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
}
else {
memcpy(&(pBuf->Data.abyTA[0]),
&(psEthHeader->h_source[0]),
ETH_ALEN);
}
} // if (byFBOption == AUTO_FB_NONE) } // if (byFBOption == AUTO_FB_NONE)
} }
else if (byPktType == PK_TYPE_11A) { else if (byPktType == PK_TYPE_11A) {
...@@ -880,31 +855,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -880,31 +855,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
pBuf->wTransmitLength = cpu_to_le16(wLen); pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration //Get Duration
pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData
pBuf->Data.wDurationID = pBuf->wDuration; pBuf->data.duration = pBuf->wDuration;
//Get RTS Frame body /* Get RTS Frame body */
pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 pBuf->data.frame_control = TYPE_CTL_RTS;
if ((pDevice->eOPMode == OP_MODE_ADHOC) ||
(pDevice->eOPMode == OP_MODE_AP)) {
memcpy(&(pBuf->Data.abyRA[0]),
&(psEthHeader->h_dest[0]),
ETH_ALEN);
} else {
memcpy(&(pBuf->Data.abyRA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
}
if (pDevice->eOPMode == OP_MODE_AP) { if (pDevice->eOPMode == OP_MODE_ADHOC ||
memcpy(&(pBuf->Data.abyTA[0]), pDevice->eOPMode == OP_MODE_AP)
&(pDevice->abyBSSID[0]), memcpy(pBuf->data.ra, psEthHeader->h_dest, ETH_ALEN);
ETH_ALEN); else
} else { memcpy(pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
memcpy(&(pBuf->Data.abyTA[0]),
&(psEthHeader->h_source[0]),
ETH_ALEN);
}
if (pDevice->eOPMode == OP_MODE_AP)
memcpy(pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
else
memcpy(pBuf->data.ta, psEthHeader->h_source, ETH_ALEN);
} }
else { else {
PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS; PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS;
...@@ -917,29 +881,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -917,29 +881,20 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_aa, 0:5G, 0: 5G OFDMData
pBuf->wRTSDuration_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData pBuf->wRTSDuration_f0 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:RTSDuration_aa_f0, 0:5G, 0: 5G OFDMData
pBuf->wRTSDuration_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0: pBuf->wRTSDuration_f1 = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:RTSDuration_aa_f1, 0:5G, 0:
pBuf->Data.wDurationID = pBuf->wDuration; pBuf->data.duration = pBuf->wDuration;
//Get RTS Frame body /* Get RTS Frame body */
pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4 pBuf->data.frame_control = TYPE_CTL_RTS;
if ((pDevice->eOPMode == OP_MODE_ADHOC) || if (pDevice->eOPMode == OP_MODE_ADHOC ||
(pDevice->eOPMode == OP_MODE_AP)) { pDevice->eOPMode == OP_MODE_AP)
memcpy(&(pBuf->Data.abyRA[0]), memcpy(pBuf->data.ra, psEthHeader->h_dest, ETH_ALEN);
&(psEthHeader->h_dest[0]), else
ETH_ALEN); memcpy(pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
} else {
memcpy(&(pBuf->Data.abyRA[0]), if (pDevice->eOPMode == OP_MODE_AP)
&(pDevice->abyBSSID[0]), memcpy(pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
ETH_ALEN); else
} memcpy(pBuf->data.ta, psEthHeader->h_source, ETH_ALEN);
if (pDevice->eOPMode == OP_MODE_AP) {
memcpy(&(pBuf->Data.abyTA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
} else {
memcpy(&(pBuf->Data.abyTA[0]),
&(psEthHeader->h_source[0]),
ETH_ALEN);
}
} }
} }
else if (byPktType == PK_TYPE_11B) { else if (byPktType == PK_TYPE_11B) {
...@@ -951,31 +906,21 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType, ...@@ -951,31 +906,21 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
pBuf->wTransmitLength = cpu_to_le16(wLen); pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration //Get Duration
pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData pBuf->wDuration = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData
pBuf->Data.wDurationID = pBuf->wDuration;
//Get RTS Frame body
pBuf->Data.wFrameControl = TYPE_CTL_RTS;//0x00B4
if ((pDevice->eOPMode == OP_MODE_ADHOC) || pBuf->data.duration = pBuf->wDuration;
(pDevice->eOPMode == OP_MODE_AP)) { /* Get RTS Frame body */
memcpy(&(pBuf->Data.abyRA[0]), pBuf->data.frame_control = TYPE_CTL_RTS;
&(psEthHeader->h_dest[0]),
ETH_ALEN);
}
else {
memcpy(&(pBuf->Data.abyRA[0]),
&(pDevice->abyBSSID[0]),
ETH_ALEN);
}
if (pDevice->eOPMode == OP_MODE_AP) { if (pDevice->eOPMode == OP_MODE_ADHOC ||
memcpy(&(pBuf->Data.abyTA[0]), pDevice->eOPMode == OP_MODE_AP)
&(pDevice->abyBSSID[0]), memcpy(pBuf->data.ra, psEthHeader->h_dest, ETH_ALEN);
ETH_ALEN); else
} else { memcpy(pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
memcpy(&(pBuf->Data.abyTA[0]),
&(psEthHeader->h_source[0]), if (pDevice->eOPMode == OP_MODE_AP)
ETH_ALEN); memcpy(pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
} else
memcpy(pBuf->data.ta, psEthHeader->h_source, ETH_ALEN);
} }
} }
......
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