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

staging: vt6656: desc.h remove typedef struct tagSCTSData

Replace structures with struct ieee80211_cts data

typedef struct tagSCTSData include extra packing wReserved
not in struct ieee80211_cts

This is corrected by adding reserved2 to the structures.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0773893a
...@@ -254,21 +254,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB; ...@@ -254,21 +254,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB;
/* /*
* CTS buffer header * CTS buffer header
*/ */
typedef struct tagSCTSData {
u16 wFrameControl;
u16 wDurationID;
u8 abyRA[ETH_ALEN];
u16 wReserved;
} __attribute__ ((__packed__))
SCTSData, *PSCTSData;
typedef struct tagSCTS { typedef struct tagSCTS {
u8 bySignalField_b; u8 bySignalField_b;
u8 byServiceField_b; u8 byServiceField_b;
u16 wTransmitLength_b; u16 wTransmitLength_b;
u16 wDuration_ba; u16 wDuration_ba;
u16 wReserved; u16 wReserved;
SCTSData Data; struct ieee80211_cts data;
u16 reserved2;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SCTS, *PSCTS; SCTS, *PSCTS;
...@@ -282,7 +275,8 @@ typedef struct tagSCTS_FB { ...@@ -282,7 +275,8 @@ typedef struct tagSCTS_FB {
u16 wReserved; u16 wReserved;
u16 wCTSDuration_ba_f0; u16 wCTSDuration_ba_f0;
u16 wCTSDuration_ba_f1; u16 wCTSDuration_ba_f1;
SCTSData Data; struct ieee80211_cts data;
u16 reserved2;
} __attribute__ ((__packed__)) } __attribute__ ((__packed__))
SCTS_FB, *PSCTS_FB; SCTS_FB, *PSCTS_FB;
......
...@@ -958,13 +958,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, ...@@ -958,13 +958,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
//Get CTSDuration_ba_f1 //Get CTSDuration_ba_f1
pBuf->wCTSDuration_ba_f1 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wCTSDuration_ba_f1 = (u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA_F1, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption); //9:CTSDuration_ba_f1, 1:2.4G, 2,3:2.4G OFDM Data
pBuf->wCTSDuration_ba_f1 = cpu_to_le16(pBuf->wCTSDuration_ba_f1); pBuf->wCTSDuration_ba_f1 = cpu_to_le16(pBuf->wCTSDuration_ba_f1);
//Get CTS Frame body /* Get CTS Frame body */
pBuf->Data.wDurationID = pBuf->wDuration_ba; pBuf->data.duration = pBuf->wDuration_ba;
pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4 pBuf->data.frame_control = TYPE_CTL_CTS;
pBuf->Data.wReserved = 0x0000; memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
memcpy(&(pBuf->Data.abyRA[0]),
&(pDevice->abyCurrentNetAddr[0]),
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; PSCTS pBuf = (PSCTS)pvCTS;
//Get SignalField,ServiceField,Length //Get SignalField,ServiceField,Length
...@@ -975,14 +972,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, ...@@ -975,14 +972,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx,
//Get CTSDuration_ba //Get CTSDuration_ba
pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data pBuf->wDuration_ba = cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength, byPktType, wCurrentRate, bNeedAck, byFBOption)); //3:CTSDuration_ba, 1:2.4G, 2,3:2.4G OFDM Data
pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba); pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba);
/*Get CTS Frame body*/
//Get CTS Frame body pBuf->data.duration = pBuf->wDuration_ba;
pBuf->Data.wDurationID = pBuf->wDuration_ba; pBuf->data.frame_control = TYPE_CTL_CTS;
pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4 memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
pBuf->Data.wReserved = 0x0000;
memcpy(&(pBuf->Data.abyRA[0]),
&(pDevice->abyCurrentNetAddr[0]),
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