staging: vt6655: replace typedef struct tagSRTS_g_FB with struct vnt_rts_g_fb
Replacing members b, a, wDuration_ba, wDuration_aa, wDuration_bb, wReserved, wRTSDuration_ba_f0, wRTSDuration_aa_f0, wRTSDuration_ba_f1, wRTSDuration_aa_f1 and data with b, a, duration_ba, duration_aa, duration_bb, wReserved, rts_duration_ba_f0, rts_duration_aa_f0, rts_duration_ba_f1, rts_duration_aa_f1 and data replacing unsigned short with u16 or __le16 where endian correction is necessary. Creating the new structure in rxtx.h Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
17434f094a
commit
9587b09206
@ -352,22 +352,6 @@ union vnt_phy_field_swap {
|
|||||||
u32 field_write;
|
u32 field_write;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct tagSRTS_g_FB {
|
|
||||||
struct vnt_phy_field b;
|
|
||||||
struct vnt_phy_field a;
|
|
||||||
unsigned short wDuration_ba;
|
|
||||||
unsigned short wDuration_aa;
|
|
||||||
unsigned short wDuration_bb;
|
|
||||||
unsigned short wReserved;
|
|
||||||
unsigned short wRTSDuration_ba_f0;
|
|
||||||
unsigned short wRTSDuration_aa_f0;
|
|
||||||
unsigned short wRTSDuration_ba_f1;
|
|
||||||
unsigned short wRTSDuration_aa_f1;
|
|
||||||
struct ieee80211_rts data;
|
|
||||||
} __attribute__ ((__packed__))
|
|
||||||
SRTS_g_FB, *PSRTS_g_FB;
|
|
||||||
typedef const SRTS_g_FB *PCSRTS_g_FB;
|
|
||||||
|
|
||||||
typedef struct tagSRTS_ab {
|
typedef struct tagSRTS_ab {
|
||||||
struct vnt_phy_field ab;
|
struct vnt_phy_field ab;
|
||||||
unsigned short wDuration;
|
unsigned short wDuration;
|
||||||
|
@ -860,41 +860,62 @@ s_vFillRTSHead(
|
|||||||
memcpy(&buf->data.ta, psEthHeader->abySrcAddr, ETH_ALEN);
|
memcpy(&buf->data.ta, psEthHeader->abySrcAddr, ETH_ALEN);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS;
|
struct vnt_rts_g_fb *buf = pvRTS;
|
||||||
/* Get SignalField, ServiceField & Length */
|
/* Get SignalField, ServiceField & Length */
|
||||||
vnt_get_phy_field(pDevice, uRTSFrameLen,
|
vnt_get_phy_field(pDevice, uRTSFrameLen,
|
||||||
pDevice->byTopCCKBasicRate,
|
pDevice->byTopCCKBasicRate,
|
||||||
PK_TYPE_11B, &pBuf->b);
|
PK_TYPE_11B, &buf->b);
|
||||||
|
|
||||||
vnt_get_phy_field(pDevice, uRTSFrameLen,
|
vnt_get_phy_field(pDevice, uRTSFrameLen,
|
||||||
pDevice->byTopOFDMBasicRate,
|
pDevice->byTopOFDMBasicRate,
|
||||||
byPktType, &pBuf->a);
|
byPktType, &buf->a);
|
||||||
//Get Duration
|
/* Get Duration */
|
||||||
pBuf->wDuration_bb = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength, PK_TYPE_11B, pDevice->byTopCCKBasicRate, bNeedAck, byFBOption)); //0:RTSDuration_bb, 1:2.4G, 1:CCKData
|
buf->duration_bb =
|
||||||
pBuf->wDuration_aa = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //2:RTSDuration_aa, 1:2.4G, 2,3:2.4G OFDMData
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BB, cbFrameLength,
|
||||||
pBuf->wDuration_ba = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //1:RTSDuration_ba, 1:2.4G, 2,3:2.4G OFDMData
|
PK_TYPE_11B, pDevice->byTopCCKBasicRate,
|
||||||
pBuf->wRTSDuration_ba_f0 = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //4:wRTSDuration_ba_f0, 1:2.4G, 1:CCKData
|
bNeedAck, byFBOption));
|
||||||
pBuf->wRTSDuration_aa_f0 = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //5:wRTSDuration_aa_f0, 1:2.4G, 1:CCKData
|
buf->duration_aa =
|
||||||
pBuf->wRTSDuration_ba_f1 = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //6:wRTSDuration_ba_f1, 1:2.4G, 1:CCKData
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA, cbFrameLength,
|
||||||
pBuf->wRTSDuration_aa_f1 = cpu_to_le16((unsigned short)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //7:wRTSDuration_aa_f1, 1:2.4G, 1:CCKData
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
pBuf->data.duration = pBuf->wDuration_aa;
|
byFBOption));
|
||||||
|
buf->duration_ba =
|
||||||
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA, cbFrameLength,
|
||||||
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
|
byFBOption));
|
||||||
|
buf->rts_duration_ba_f0 =
|
||||||
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F0, cbFrameLength,
|
||||||
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
|
byFBOption));
|
||||||
|
buf->rts_duration_aa_f0 =
|
||||||
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F0, cbFrameLength,
|
||||||
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
|
byFBOption));
|
||||||
|
buf->rts_duration_ba_f1 =
|
||||||
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_BA_F1, cbFrameLength,
|
||||||
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
|
byFBOption));
|
||||||
|
buf->rts_duration_aa_f1 =
|
||||||
|
cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, RTSDUR_AA_F1, cbFrameLength,
|
||||||
|
byPktType, wCurrentRate, bNeedAck,
|
||||||
|
byFBOption));
|
||||||
|
buf->data.duration = buf->duration_aa;
|
||||||
/* Get RTS Frame body */
|
/* Get RTS Frame body */
|
||||||
pBuf->data.frame_control =
|
buf->data.frame_control =
|
||||||
cpu_to_le16(IEEE80211_FTYPE_CTL |
|
cpu_to_le16(IEEE80211_FTYPE_CTL |
|
||||||
IEEE80211_STYPE_RTS);
|
IEEE80211_STYPE_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.ra, psEthHeader->abyDstAddr, ETH_ALEN);
|
memcpy(&buf->data.ra, psEthHeader->abyDstAddr, ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
memcpy(&pBuf->data.ra, pDevice->abyBSSID, ETH_ALEN);
|
memcpy(&buf->data.ra, pDevice->abyBSSID, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDevice->eOPMode == OP_MODE_AP)
|
if (pDevice->eOPMode == OP_MODE_AP)
|
||||||
memcpy(&pBuf->data.ta, pDevice->abyBSSID, ETH_ALEN);
|
memcpy(&buf->data.ta, pDevice->abyBSSID, ETH_ALEN);
|
||||||
else
|
else
|
||||||
memcpy(&pBuf->data.ta, psEthHeader->abySrcAddr, ETH_ALEN);
|
memcpy(&buf->data.ta, psEthHeader->abySrcAddr, ETH_ALEN);
|
||||||
|
|
||||||
} // if (byFBOption == AUTO_FB_NONE)
|
} // if (byFBOption == AUTO_FB_NONE)
|
||||||
} else if (byPktType == PK_TYPE_11A) {
|
} else if (byPktType == PK_TYPE_11A) {
|
||||||
@ -1365,11 +1386,12 @@ s_cbFillTxBufHead(struct vnt_private *pDevice, unsigned char byPktType,
|
|||||||
if (bRTS == true) {//RTS_need
|
if (bRTS == true) {//RTS_need
|
||||||
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
|
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts));
|
||||||
pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
|
pvRTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR);
|
||||||
pvCTS = NULL;
|
pvCTS = NULL;
|
||||||
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(SRTS_g_FB));
|
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
|
||||||
|
cbMICHDR + sizeof(struct vnt_rts_g_fb));
|
||||||
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
|
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
|
||||||
cbMICHDR + sizeof(SRTS_g_FB) + sizeof(struct vnt_tx_datahead_g_fb);
|
cbMICHDR + sizeof(struct vnt_rts_g_fb) + sizeof(struct vnt_tx_datahead_g_fb);
|
||||||
} else { //RTS_needless
|
} else { //RTS_needless
|
||||||
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
|
||||||
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
|
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
|
||||||
|
@ -124,6 +124,20 @@ struct vnt_rts_g {
|
|||||||
struct ieee80211_rts data;
|
struct ieee80211_rts data;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
struct vnt_rts_g_fb {
|
||||||
|
struct vnt_phy_field b;
|
||||||
|
struct vnt_phy_field a;
|
||||||
|
__le16 duration_ba;
|
||||||
|
__le16 duration_aa;
|
||||||
|
__le16 duration_bb;
|
||||||
|
u16 wReserved;
|
||||||
|
__le16 rts_duration_ba_f0;
|
||||||
|
__le16 rts_duration_aa_f0;
|
||||||
|
__le16 rts_duration_ba_f1;
|
||||||
|
__le16 rts_duration_aa_f1;
|
||||||
|
struct ieee80211_rts data;
|
||||||
|
} __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