From: Malcolm Priestley Date: Mon, 5 Aug 2013 21:12:42 +0000 (+0100) Subject: staging: vt6656: desc.h remove typedef struct tagSCTSData X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=14840cdd9647a80a988f26a707f2caa16abed5e5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/desc.h b/drivers/staging/vt6656/desc.h index aa5e249092a1..1a1cf34e4113 100644 --- a/drivers/staging/vt6656/desc.h +++ b/drivers/staging/vt6656/desc.h @@ -254,21 +254,14 @@ typedef const SRTS_a_FB *PCSRTS_a_FB; /* * CTS buffer header */ -typedef struct tagSCTSData { - u16 wFrameControl; - u16 wDurationID; - u8 abyRA[ETH_ALEN]; - u16 wReserved; -} __attribute__ ((__packed__)) -SCTSData, *PSCTSData; - typedef struct tagSCTS { u8 bySignalField_b; u8 byServiceField_b; u16 wTransmitLength_b; u16 wDuration_ba; u16 wReserved; - SCTSData Data; + struct ieee80211_cts data; + u16 reserved2; } __attribute__ ((__packed__)) SCTS, *PSCTS; @@ -282,7 +275,8 @@ typedef struct tagSCTS_FB { u16 wReserved; u16 wCTSDuration_ba_f0; u16 wCTSDuration_ba_f1; - SCTSData Data; + struct ieee80211_cts data; + u16 reserved2; } __attribute__ ((__packed__)) SCTS_FB, *PSCTS_FB; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index fd6f817fdda5..1d58d1f2688f 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -958,13 +958,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, //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 = cpu_to_le16(pBuf->wCTSDuration_ba_f1); - //Get CTS Frame body - pBuf->Data.wDurationID = pBuf->wDuration_ba; - pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4 - pBuf->Data.wReserved = 0x0000; - memcpy(&(pBuf->Data.abyRA[0]), - &(pDevice->abyCurrentNetAddr[0]), - ETH_ALEN); + /* Get CTS Frame body */ + pBuf->data.duration = pBuf->wDuration_ba; + pBuf->data.frame_control = TYPE_CTL_CTS; + memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN); } else { //if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA) PSCTS pBuf = (PSCTS)pvCTS; //Get SignalField,ServiceField,Length @@ -975,14 +972,10 @@ static void s_vFillCTSHead(struct vnt_private *pDevice, u32 uDMAIdx, //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(pBuf->wDuration_ba); - - //Get CTS Frame body - pBuf->Data.wDurationID = pBuf->wDuration_ba; - pBuf->Data.wFrameControl = TYPE_CTL_CTS;//0x00C4 - pBuf->Data.wReserved = 0x0000; - memcpy(&(pBuf->Data.abyRA[0]), - &(pDevice->abyCurrentNetAddr[0]), - ETH_ALEN); + /*Get CTS Frame body*/ + pBuf->data.duration = pBuf->wDuration_ba; + pBuf->data.frame_control = TYPE_CTL_CTS; + memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN); } } }