|
@@ -1643,12 +1643,10 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
|
|
|
struct vnt_tx_mgmt *pPacket)
|
|
|
{
|
|
|
struct vnt_beacon_buffer *pTX_Buffer;
|
|
|
+ struct vnt_tx_short_buf_head *short_head;
|
|
|
u32 cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
|
|
|
u32 cbHeaderSize = 0;
|
|
|
- u16 wTxBufSize = sizeof(STxShortBufHead);
|
|
|
- PSTxShortBufHead pTxBufHead;
|
|
|
struct ieee80211_hdr *pMACHeader;
|
|
|
- struct vnt_tx_datahead_ab *pTxDataHead;
|
|
|
u16 wCurrentRate;
|
|
|
u32 cbFrameBodySize;
|
|
|
u32 cbReqCount;
|
|
@@ -1664,39 +1662,40 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
|
|
|
}
|
|
|
|
|
|
pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->Data[0];
|
|
|
- pbyTxBufferAddr = (u8 *)&(pTX_Buffer->wFIFOCtl);
|
|
|
+ short_head = &pTX_Buffer->short_head;
|
|
|
+ pbyTxBufferAddr = (u8 *)&short_head->fifo_ctl;
|
|
|
|
|
|
cbFrameBodySize = pPacket->cbPayloadLen;
|
|
|
|
|
|
- pTxBufHead = (PSTxShortBufHead) pbyTxBufferAddr;
|
|
|
- wTxBufSize = sizeof(STxShortBufHead);
|
|
|
+ cbHeaderSize = sizeof(struct vnt_tx_short_buf_head);
|
|
|
|
|
|
- if (pDevice->byBBType == BB_TYPE_11A) {
|
|
|
- wCurrentRate = RATE_6M;
|
|
|
- pTxDataHead = (struct vnt_tx_datahead_ab *)
|
|
|
- (pbyTxBufferAddr + wTxBufSize);
|
|
|
- //Get SignalField,ServiceField,Length
|
|
|
- BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11A,
|
|
|
- &pTxDataHead->ab);
|
|
|
- //Get Duration and TimeStampOff
|
|
|
- pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
|
|
|
- PK_TYPE_11A, false);
|
|
|
- pTxDataHead->wTimeStampOff = vnt_time_stamp_off(pDevice, wCurrentRate);
|
|
|
- cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
|
|
|
- } else {
|
|
|
- wCurrentRate = RATE_1M;
|
|
|
- pTxBufHead->wFIFOCtl |= FIFOCTL_11B;
|
|
|
- pTxDataHead = (struct vnt_tx_datahead_ab *)
|
|
|
- (pbyTxBufferAddr + wTxBufSize);
|
|
|
- //Get SignalField,ServiceField,Length
|
|
|
- BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11B,
|
|
|
- &pTxDataHead->ab);
|
|
|
- //Get Duration and TimeStampOff
|
|
|
- pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
|
|
|
+ if (pDevice->byBBType == BB_TYPE_11A) {
|
|
|
+ wCurrentRate = RATE_6M;
|
|
|
+
|
|
|
+ /* Get SignalField,ServiceField,Length */
|
|
|
+ BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
|
|
|
+ PK_TYPE_11A, &short_head->ab);
|
|
|
+
|
|
|
+ /* Get Duration and TimeStampOff */
|
|
|
+ short_head->duration = s_uGetDataDuration(pDevice,
|
|
|
+ PK_TYPE_11A, false);
|
|
|
+ short_head->time_stamp_off =
|
|
|
+ vnt_time_stamp_off(pDevice, wCurrentRate);
|
|
|
+ } else {
|
|
|
+ wCurrentRate = RATE_1M;
|
|
|
+ short_head->fifo_ctl |= FIFOCTL_11B;
|
|
|
+
|
|
|
+ /* Get SignalField,ServiceField,Length */
|
|
|
+ BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
|
|
|
+ PK_TYPE_11B, &short_head->ab);
|
|
|
+
|
|
|
+ /* Get Duration and TimeStampOff */
|
|
|
+ short_head->duration = s_uGetDataDuration(pDevice,
|
|
|
PK_TYPE_11B, false);
|
|
|
- pTxDataHead->wTimeStampOff = vnt_time_stamp_off(pDevice, wCurrentRate);
|
|
|
- cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
|
|
|
- }
|
|
|
+ short_head->time_stamp_off =
|
|
|
+ vnt_time_stamp_off(pDevice, wCurrentRate);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//Generate Beacon Header
|
|
|
pMACHeader = (struct ieee80211_hdr *)(pbyTxBufferAddr + cbHeaderSize);
|