Commit 0b71fe36 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: vnt_beacon_buffer attach mac header.

Attach ieee80211_hdr to vnt_beacon_buffer and remove pointer arithmetic.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c7c57b24
...@@ -1650,7 +1650,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ...@@ -1650,7 +1650,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
u16 wCurrentRate; u16 wCurrentRate;
u32 cbFrameBodySize; u32 cbFrameBodySize;
u32 cbReqCount; u32 cbReqCount;
u8 *pbyTxBufferAddr;
struct vnt_usb_send_context *pContext; struct vnt_usb_send_context *pContext;
CMD_STATUS status; CMD_STATUS status;
...@@ -1663,7 +1662,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ...@@ -1663,7 +1662,6 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->Data[0]; pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->Data[0];
short_head = &pTX_Buffer->short_head; short_head = &pTX_Buffer->short_head;
pbyTxBufferAddr = (u8 *)&short_head->fifo_ctl;
cbFrameBodySize = pPacket->cbPayloadLen; cbFrameBodySize = pPacket->cbPayloadLen;
...@@ -1697,13 +1695,14 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ...@@ -1697,13 +1695,14 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
} }
//Generate Beacon Header /* Generate Beacon Header */
pMACHeader = (struct ieee80211_hdr *)(pbyTxBufferAddr + cbHeaderSize); pMACHeader = &pTX_Buffer->hdr;
memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen); memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen);
pMACHeader->duration_id = 0; pMACHeader->duration_id = 0;
pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4); pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4);
pDevice->wSeqCounter++ ; pDevice->wSeqCounter++;
if (pDevice->wSeqCounter > 0x0fff) if (pDevice->wSeqCounter > 0x0fff)
pDevice->wSeqCounter = 0; pDevice->wSeqCounter = 0;
......
...@@ -243,6 +243,7 @@ struct vnt_beacon_buffer { ...@@ -243,6 +243,7 @@ struct vnt_beacon_buffer {
u8 byPKTNO; u8 byPKTNO;
u16 wTxByteCount; u16 wTxByteCount;
struct vnt_tx_short_buf_head short_head; struct vnt_tx_short_buf_head short_head;
struct ieee80211_hdr hdr;
} __packed; } __packed;
void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb); void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment