diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2013-08-15 18:37:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-16 00:20:54 (GMT) |
commit | d0a2b8fa7663a09b66f54b77dbbf460fb762aa7d (patch) | |
tree | 0144aa165ac5195ceac7a9f828ba44490fb1c5f4 /drivers/staging | |
parent | f39c0d8e30c74a01b9883044e41fb339b97c006f (diff) | |
download | linux-fsl-qoriq-d0a2b8fa7663a09b66f54b77dbbf460fb762aa7d.tar.xz |
staging: vt6656: rxtx.c : s_bPacketToWirelessUsb remove usbPacketBuf.
Move vnt_tx_buffer *pTxBufHead to argument u8 *usbPacketBuf position.
Fix the calling to s_bPacketToWirelessUsb so it attached to
the calling struct vnt_tx_buffer pTX_Buffer.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6656/rxtx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 083f58f..e37e82c 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -991,12 +991,12 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, */ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, - u8 *usbPacketBuf, int bNeedEncryption, u32 uSkbPacketLen, u32 uDMAIdx, - struct ethhdr *psEthHeader, u8 *pPacket, PSKeyItem pTransmitKey, - u32 uNodeIndex, u16 wCurrentRate, u32 *pcbHeaderLen, u32 *pcbTotalLen) + struct vnt_tx_buffer *pTxBufHead, int bNeedEncryption, + u32 uSkbPacketLen, u32 uDMAIdx, struct ethhdr *psEthHeader, + u8 *pPacket, PSKeyItem pTransmitKey, u32 uNodeIndex, u16 wCurrentRate, + u32 *pcbHeaderLen, u32 *pcbTotalLen) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - struct vnt_tx_buffer *pTxBufHead; u32 cbFrameSize, cbFrameBodySize; u32 cb802_1_H_len; u32 cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, cbMACHdLen = 0; @@ -1026,8 +1026,6 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, bSoftWEP = true; /* WEP 256 */ } - pTxBufHead = (struct vnt_tx_buffer *)usbPacketBuf; - // Get pkt type if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN) { if (pDevice->dwDiagRefCount == 0) { @@ -2541,8 +2539,10 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } } + pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0]; + fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType, - (u8 *)(&pContext->Data[0]), bNeedEncryption, + pTX_Buffer, bNeedEncryption, skb->len, uDMAIdx, &pDevice->sTxEthHeader, (u8 *)skb->data, pTransmitKey, uNodeIndex, pDevice->wCurrentRate, @@ -2564,7 +2564,6 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } } - pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0]; pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->wTxByteCount = (u16)BytesToWrite; @@ -2701,8 +2700,10 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, // Convert the packet to an usb frame and copy into our buffer // and send the irp. + pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0]; + fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType, - (u8 *)(&pContext->Data[0]), bNeedEncryption, + pTX_Buffer, bNeedEncryption, uDataLen, TYPE_AC0DMA, &pDevice->sTxEthHeader, pbySkbData, pTransmitKey, uNodeIndex, pDevice->wCurrentRate, @@ -2714,7 +2715,6 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, return false; } - pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0]; pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F)); pTX_Buffer->wTxByteCount = (u16)BytesToWrite; |