return NULL;
context = priv->apTD[ii];
- if (context->bBoolInUse == false) {
- context->bBoolInUse = true;
- memset(context->Data, 0,
+ if (context->in_use == false) {
+ context->in_use = true;
+ memset(context->data, 0,
MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
return context;
}
return CMD_STATUS_RESOURCES;
}
- pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0];
+ pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
cbFrameBodySize = pPacket->cbPayloadLen;
pTxBufHead = &pTX_Buffer->fifo_head;
pbyTxBufferAddr = (u8 *)&pTxBufHead->adwTxKey[0];
pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
pTX_Buffer->byType = 0x00;
- pContext->pPacket = NULL;
- pContext->type = CONTEXT_MGMT_PACKET;
- pContext->uBufLen = (u16)cbReqCount + 4; //USB header
+ pContext->skb = NULL;
+ pContext->type = CONTEXT_MGMT_PACKET;
+ pContext->buf_len = (u16)cbReqCount + 4; /* USB header */
if (WLAN_GET_FC_TODS(pMACHeader->frame_control) == 0) {
s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
return status ;
}
- pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->Data[0];
+ pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->data[0];
short_head = &pTX_Buffer->short_head;
cbFrameBodySize = pPacket->cbPayloadLen;
pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
pTX_Buffer->byType = 0x01;
- pContext->pPacket = NULL;
- pContext->type = CONTEXT_MGMT_PACKET;
- pContext->uBufLen = (u16)cbReqCount + 4; //USB header
+ pContext->skb = NULL;
+ pContext->type = CONTEXT_MGMT_PACKET;
+ pContext->buf_len = (u16)cbReqCount + 4; /* USB header */
PIPEnsSendBulkOut(pDevice,pContext);
return CMD_STATUS_PENDING;
return ;
}
- pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0];
+ pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
pTxBufHead = &pTX_Buffer->fifo_head;
pbyTxBufferAddr = (u8 *)&pTxBufHead->adwTxKey[0];
wTxBufSize = sizeof(struct vnt_tx_fifo_head);
pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
pTX_Buffer->byType = 0x00;
- pContext->pPacket = skb;
- pContext->type = CONTEXT_MGMT_PACKET;
- pContext->uBufLen = (u16)cbReqCount + 4; //USB header
+ pContext->skb = skb;
+ pContext->type = CONTEXT_MGMT_PACKET;
+ pContext->buf_len = (u16)cbReqCount + 4; /* USB header */
if (WLAN_GET_FC_TODS(pMACHeader->frame_control) == 0) {
s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
return STATUS_RESOURCES;
}
- pTX_Buffer = (struct vnt_tx_buffer *)&pContext->Data[0];
+ pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType,
pTX_Buffer, bNeedEncryption,
&uHeaderLen, &BytesToWrite
);
- if (fConvertedPacket == false) {
- pContext->bBoolInUse = false;
- dev_kfree_skb_irq(skb);
- return STATUS_FAILURE;
- }
+ if (fConvertedPacket == false) {
+ pContext->in_use = false;
+ dev_kfree_skb_irq(skb);
+ return STATUS_FAILURE;
+ }
if ( pDevice->bEnablePSMode == true ) {
if ( !pDevice->bPSModeTxBurst ) {
pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
pTX_Buffer->tx_byte_count = cpu_to_le16((u16)BytesToWrite);
- pContext->pPacket = skb;
- pContext->type = CONTEXT_DATA_PACKET;
- pContext->uBufLen = (u16)BytesToWrite + 4 ; //USB header
+ pContext->skb = skb;
+ pContext->type = CONTEXT_DATA_PACKET;
+ pContext->buf_len = (u16)BytesToWrite + 4 ; /* USB header */
s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
&pDevice->sTxEthHeader.h_dest[0],
bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (u8 *) &wReason);
}
- if(status!=STATUS_PENDING) {
- pContext->bBoolInUse = false;
- dev_kfree_skb_irq(skb);
- return STATUS_FAILURE;
- }
- else
- return 0;
+ if (status != STATUS_PENDING) {
+ pContext->in_use = false;
+ dev_kfree_skb_irq(skb);
+ return STATUS_FAILURE;
+ }
+
+ return 0;
}
/*
}
if ( bNeedEncryption && (pTransmitKey == NULL) ) {
- pContext->bBoolInUse = false;
+ pContext->in_use = false;
return false;
}
// 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];
+ pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType,
pTX_Buffer, bNeedEncryption,
);
if (fConvertedPacket == false) {
- pContext->bBoolInUse = false;
+ pContext->in_use = false;
return false;
}
pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
pTX_Buffer->tx_byte_count = cpu_to_le16((u16)BytesToWrite);
- pContext->pPacket = NULL;
- pContext->type = CONTEXT_DATA_PACKET;
- pContext->uBufLen = (u16)BytesToWrite + 4 ; //USB header
+ pContext->skb = NULL;
+ pContext->type = CONTEXT_DATA_PACKET;
+ pContext->buf_len = (u16)BytesToWrite + 4; /* USB header */
s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
&pDevice->sTxEthHeader.h_dest[0],
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n");
if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
- context->bBoolInUse = false;
+ context->in_use = false;
return STATUS_RESOURCES;
}
- urb = context->pUrb;
+ urb = context->urb;
usb_fill_bulk_urb(urb,
priv->usb,
usb_sndbulkpipe(priv->usb, 3),
- context->Data,
- context->uBufLen,
+ context->data,
+ context->buf_len,
s_nsBulkOutIoCompleteWrite,
context);
if (status != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Submit Tx URB failed %d\n", status);
- context->bBoolInUse = false;
+ context->in_use = false;
return STATUS_FAILURE;
}
static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
{
struct vnt_usb_send_context *context = urb->context;
- struct vnt_private *priv = context->pDevice;
+ struct vnt_private *priv = context->priv;
u8 context_type = context->type;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
switch (urb->status) {
case 0:
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
- "Write %d bytes\n", context->uBufLen);
+ "Write %d bytes\n", context->buf_len);
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- context->bBoolInUse = false;
+ context->in_use = false;
return;
case -ETIMEDOUT:
default:
return;
if (CONTEXT_DATA_PACKET == context_type) {
- if (context->pPacket != NULL) {
- dev_kfree_skb_irq(context->pPacket);
- context->pPacket = NULL;
+ if (context->skb != NULL) {
+ dev_kfree_skb_irq(context->skb);
+ context->skb = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
- "tx %d bytes\n", context->uBufLen);
+ "tx %d bytes\n", context->buf_len);
}
priv->dev->trans_start = jiffies;
netif_wake_queue(priv->dev);
}
- context->bBoolInUse = false;
+ context->in_use = false;
return;
}