staging: vt6655: Replace typedef struct tagSCTSData with ieee80211_cts data
ieee80211_cts data needs extra padding with reserved2 set to 0 use IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS to set frame_control Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
52c4130bdb
commit
0864db15a0
2 changed files with 21 additions and 19 deletions
|
@ -403,19 +403,12 @@ typedef const SRTS_a_FB *PCSRTS_a_FB;
|
||||||
//
|
//
|
||||||
// CTS buffer header
|
// CTS buffer header
|
||||||
//
|
//
|
||||||
typedef struct tagSCTSData {
|
|
||||||
unsigned short wFrameControl;
|
|
||||||
unsigned short wDurationID;
|
|
||||||
unsigned char abyRA[ETH_ALEN];
|
|
||||||
unsigned short wReserved;
|
|
||||||
} __attribute__ ((__packed__))
|
|
||||||
SCTSData, *PSCTSData;
|
|
||||||
|
|
||||||
typedef struct tagSCTS {
|
typedef struct tagSCTS {
|
||||||
struct vnt_phy_field b;
|
struct vnt_phy_field b;
|
||||||
unsigned short wDuration_ba;
|
unsigned short wDuration_ba;
|
||||||
unsigned short wReserved;
|
unsigned short wReserved;
|
||||||
SCTSData Data;
|
struct ieee80211_cts data;
|
||||||
|
u16 reserved2;
|
||||||
} __attribute__ ((__packed__))
|
} __attribute__ ((__packed__))
|
||||||
SCTS, *PSCTS;
|
SCTS, *PSCTS;
|
||||||
typedef const SCTS *PCSCTS;
|
typedef const SCTS *PCSCTS;
|
||||||
|
@ -426,7 +419,8 @@ typedef struct tagSCTS_FB {
|
||||||
unsigned short wReserved;
|
unsigned short wReserved;
|
||||||
unsigned short wCTSDuration_ba_f0;
|
unsigned short wCTSDuration_ba_f0;
|
||||||
unsigned short wCTSDuration_ba_f1;
|
unsigned short wCTSDuration_ba_f1;
|
||||||
SCTSData Data;
|
struct ieee80211_cts data;
|
||||||
|
u16 reserved2;
|
||||||
} __attribute__ ((__packed__))
|
} __attribute__ ((__packed__))
|
||||||
SCTS_FB, *PSCTS_FB;
|
SCTS_FB, *PSCTS_FB;
|
||||||
typedef const SCTS_FB *PCSCTS_FB;
|
typedef const SCTS_FB *PCSCTS_FB;
|
||||||
|
|
|
@ -1016,11 +1016,15 @@ s_vFillCTSHead(
|
||||||
pBuf->wCTSDuration_ba_f1 = (unsigned short)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 = (unsigned short)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 += pDevice->wCTSDuration;
|
pBuf->wCTSDuration_ba_f1 += pDevice->wCTSDuration;
|
||||||
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.wReserved = 0x0000;
|
pBuf->data.frame_control =
|
||||||
memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyCurrentNetAddr[0]), ETH_ALEN);
|
cpu_to_le16(IEEE80211_FTYPE_CTL |
|
||||||
|
IEEE80211_STYPE_CTS);
|
||||||
|
|
||||||
|
pBuf->reserved2 = 0x0;
|
||||||
|
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;
|
PSCTS pBuf = (PSCTS)pvCTS;
|
||||||
|
@ -1035,10 +1039,14 @@ s_vFillCTSHead(
|
||||||
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.wDurationID = pBuf->wDuration_ba;
|
pBuf->data.duration = pBuf->wDuration_ba;
|
||||||
pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4
|
|
||||||
pBuf->Data.wReserved = 0x0000;
|
pBuf->data.frame_control =
|
||||||
memcpy(&(pBuf->Data.abyRA[0]), &(pDevice->abyCurrentNetAddr[0]), ETH_ALEN);
|
cpu_to_le16(IEEE80211_FTYPE_CTL |
|
||||||
|
IEEE80211_STYPE_CTS);
|
||||||
|
|
||||||
|
pBuf->reserved2 = 0x0;
|
||||||
|
memcpy(&pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue