From: Malcolm Priestley Date: Fri, 16 Aug 2013 22:48:03 +0000 (+0100) Subject: staging: vt6656: desc.h: remove typedef struct tagSTxDataHead_g to new structure... X-Git-Tag: MMI-PSA29.97-13-9~13778^2~231 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e60a3de27db69ba072f9a9809aea21f8ff089eb;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: vt6656: desc.h: remove typedef struct tagSTxDataHead_g to new structure in rxtx.h To new structure. typedef struct tagSTxDataHead_g -> struct vnt_tx_datahead_g This is only needed by rxtc.c so moved to rxtx.h visible to vnt_rts*/vnt_cts* structures which it will eventually form part of their structure. 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 dc089ac27905..b0cb8c430c5c 100644 --- a/drivers/staging/vt6656/desc.h +++ b/drivers/staging/vt6656/desc.h @@ -166,22 +166,6 @@ typedef const STxShortBufHead *PCSTxShortBufHead; /* * TX data header */ -typedef struct tagSTxDataHead_g { - u8 bySignalField_b; - u8 byServiceField_b; - u16 wTransmitLength_b; - u8 bySignalField_a; - u8 byServiceField_a; - u16 wTransmitLength_a; - u16 wDuration_b; - u16 wDuration_a; - u16 wTimeStampOff_b; - u16 wTimeStampOff_a; -} __attribute__ ((__packed__)) -STxDataHead_g, *PSTxDataHead_g; - -typedef const STxDataHead_g *PCSTxDataHead_g; - typedef struct tagSTxDataHead_g_FB { u8 bySignalField_b; u8 byServiceField_b; diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index b21a4963f90d..585a2e327151 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -515,7 +515,8 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice, } else { // DATA & MANAGE Frame if (byFBOption == AUTO_FB_NONE) { - PSTxDataHead_g pBuf = (PSTxDataHead_g)pTxDataHead; + struct vnt_tx_datahead_g *pBuf = + (struct vnt_tx_datahead_g *)pTxDataHead; //Get SignalField,ServiceField,Length BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType, (u16 *)&(pBuf->wTransmitLength_a), (u8 *)&(pBuf->byServiceField_a), (u8 *)&(pBuf->bySignalField_a) @@ -1162,12 +1163,12 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pvRTS = (struct vnt_rts_g *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR); pvCTS = NULL; - pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_rts) + cbMICHDR + - sizeof(struct vnt_rts_g)); + pvTxDataHd = (struct vnt_tx_datahead_g *) (pbyTxBufferAddr + + wTxBufSize + sizeof(struct vnt_rrv_time_rts) + + cbMICHDR + sizeof(struct vnt_rts_g)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) + cbMICHDR + sizeof(struct vnt_rts_g) + - sizeof(STxDataHead_g); + sizeof(struct vnt_tx_datahead_g); } else { //RTS_needless pvRrvTime = (struct vnt_rrv_time_cts *) @@ -1177,12 +1178,12 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pvRTS = NULL; pvCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); - pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_cts) + cbMICHDR + - sizeof(struct vnt_cts)); + pvTxDataHd = (struct vnt_tx_datahead_g *)(pbyTxBufferAddr + + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + + cbMICHDR + sizeof(struct vnt_cts)); cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts) + - sizeof(STxDataHead_g); + sizeof(struct vnt_tx_datahead_g); } } else { // Auto Fall Back @@ -1688,10 +1689,10 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, pvRTS = NULL; pCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts)); - pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + + pvTxDataHd = (struct vnt_tx_datahead_g *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + sizeof(struct vnt_cts)); cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + - sizeof(struct vnt_cts) + sizeof(STxDataHead_g); + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g); } else { // 802.11a/b packet pvRrvTime = (struct vnt_rrv_time_ab *) (pbyTxBufferAddr + wTxBufSize); @@ -1784,10 +1785,12 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, // This will cause AID-field of PS-POLL packet be incorrect (Because PS-POLL's AID field is // in the same place of other packet's Duration-field). // And it will cause Cisco-AP to issue Disassociation-packet - if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - ((PSTxDataHead_g)pvTxDataHd)->wDuration_a = cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); - ((PSTxDataHead_g)pvTxDataHd)->wDuration_b = cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); - } else { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { + ((struct vnt_tx_datahead_g *)pvTxDataHd)->wDuration_a = + cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); + ((struct vnt_tx_datahead_g *)pvTxDataHd)->wDuration_b = + cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); + } else { ((PSTxDataHead_ab)pvTxDataHd)->wDuration = cpu_to_le16(pPacket->p80211Header->sA2.wDurationID); } } @@ -2093,11 +2096,11 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) pvRTS = NULL; pvCTS = (struct vnt_cts *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR); - pvTxDataHd = (PSTxDataHead_g) (pbyTxBufferAddr + wTxBufSize + - sizeof(struct vnt_rrv_time_cts) + cbMICHDR + + pvTxDataHd = (struct vnt_tx_datahead_g *) (pbyTxBufferAddr + + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts)); cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + - sizeof(struct vnt_cts) + sizeof(STxDataHead_g); + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g); } else {//802.11a/b packet @@ -2238,10 +2241,12 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) // This will cause AID-field of PS-POLL packet be incorrect (Because PS-POLL's AID field is // in the same place of other packet's Duration-field). // And it will cause Cisco-AP to issue Disassociation-packet - if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { - ((PSTxDataHead_g)pvTxDataHd)->wDuration_a = cpu_to_le16(p80211Header->sA2.wDurationID); - ((PSTxDataHead_g)pvTxDataHd)->wDuration_b = cpu_to_le16(p80211Header->sA2.wDurationID); - } else { + if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) { + ((struct vnt_tx_datahead_g *)pvTxDataHd)->wDuration_a = + cpu_to_le16(p80211Header->sA2.wDurationID); + ((struct vnt_tx_datahead_g *)pvTxDataHd)->wDuration_b = + cpu_to_le16(p80211Header->sA2.wDurationID); + } else { ((PSTxDataHead_ab)pvTxDataHd)->wDuration = cpu_to_le16(p80211Header->sA2.wDurationID); } } diff --git a/drivers/staging/vt6656/rxtx.h b/drivers/staging/vt6656/rxtx.h index 75737608d170..3c8262321795 100644 --- a/drivers/staging/vt6656/rxtx.h +++ b/drivers/staging/vt6656/rxtx.h @@ -54,6 +54,20 @@ struct vnt_rrv_time_ab { u16 wTxRrvTime; } __packed; +/* TX data header */ +struct vnt_tx_datahead_g { + u8 bySignalField_b; + u8 byServiceField_b; + u16 wTransmitLength_b; + u8 bySignalField_a; + u8 byServiceField_a; + u16 wTransmitLength_a; + u16 wDuration_b; + u16 wDuration_a; + u16 wTimeStampOff_b; + u16 wTimeStampOff_a; +} __packed; + /* RTS buffer header */ struct vnt_rts_g { u8 bySignalField_b;