memcpy(&pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
} else { //if (byFBOption != AUTO_FB_NONE && uDMAIdx != TYPE_ATIMDMA && uDMAIdx != TYPE_BEACONDMA)
- PSCTS pBuf = (PSCTS)pvCTS;
+ struct vnt_cts *buf = pvCTS;
/* Get SignalField, ServiceField & Length */
vnt_get_phy_field(pDevice, uCTSFrameLen,
pDevice->byTopCCKBasicRate,
- PK_TYPE_11B, &pBuf->b);
+ PK_TYPE_11B, &buf->b);
- //Get CTSDuration_ba
- pBuf->wDuration_ba = cpu_to_le16((unsigned short)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 += pDevice->wCTSDuration;
- pBuf->wDuration_ba = cpu_to_le16(pBuf->wDuration_ba);
+ /* Get CTSDuration_ba */
+ buf->duration_ba =
+ cpu_to_le16((u16)s_uGetRTSCTSDuration(pDevice, CTSDUR_BA, cbFrameLength,
+ byPktType, wCurrentRate, bNeedAck,
+ byFBOption));
+ buf->duration_ba += pDevice->wCTSDuration;
+ buf->duration_ba = cpu_to_le16(buf->duration_ba);
- //Get CTS Frame body
- pBuf->data.duration = pBuf->wDuration_ba;
+ /* Get CTS Frame body */
+ buf->data.duration = buf->duration_ba;
- pBuf->data.frame_control =
+ buf->data.frame_control =
cpu_to_le16(IEEE80211_FTYPE_CTL |
IEEE80211_STYPE_CTS);
- pBuf->reserved2 = 0x0;
- memcpy(&pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
+ buf->reserved2 = 0x0;
+ memcpy(&buf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
}
}
}
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
pMICHDR = (struct vnt_mic_hdr *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts));
pvRTS = NULL;
- pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
- pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS));
+ pvCTS = (void *) (pbyTxBufferAddr + wTxBufSize + sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
+ pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
+ sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts));
cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- cbMICHDR + sizeof(SCTS) + sizeof(struct vnt_tx_datahead_g);
+ cbMICHDR + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g);
}
} else {
// Auto Fall Back
unsigned char byPktType;
unsigned char *pbyTxBufferAddr;
void *pvRTS;
- PSCTS pCTS;
+ struct vnt_cts *pCTS;
void *pvTxDataHd;
unsigned int uDuration;
unsigned int cbReqCount;
pvRrvTime = (void *) (pbyTxBufferAddr + wTxBufSize);
pMICHDR = NULL;
pvRTS = NULL;
- pCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize +
+ pCTS = (struct vnt_cts *)(pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_cts));
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
- sizeof(struct vnt_rrv_time_cts) + sizeof(SCTS));
+ sizeof(struct vnt_rrv_time_cts) + sizeof(struct vnt_cts));
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- sizeof(SCTS) + sizeof(struct vnt_tx_datahead_g);
+ sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g);
} else { // 802.11a/b packet
pvRrvTime = (void *)(pbyTxBufferAddr + wTxBufSize);
pMICHDR = NULL;
pMICHDR = (struct vnt_mic_hdr *)(pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_cts));
pvRTS = NULL;
- pvCTS = (PSCTS) (pbyTxBufferAddr + wTxBufSize +
+ pvCTS = (struct vnt_cts *)(pbyTxBufferAddr + wTxBufSize +
sizeof(struct vnt_rrv_time_cts) + cbMICHDR);
pvTxDataHd = (void *)(pbyTxBufferAddr + wTxBufSize +
- sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(SCTS));
+ sizeof(struct vnt_rrv_time_cts) + cbMICHDR + sizeof(struct vnt_cts));
cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
- cbMICHDR + sizeof(SCTS) + sizeof(struct vnt_tx_datahead_g);
+ cbMICHDR + sizeof(struct vnt_cts) + sizeof(struct vnt_tx_datahead_g);
} else {//802.11a/b packet