/*
* Structure to keep track of USB interrupt packets
*/
-typedef struct {
- unsigned int uDataLen;
- u8 * pDataBuf;
- /* struct urb *pUrb; */
- bool bInUse;
-} INT_BUFFER, *PINT_BUFFER;
+struct vnt_interrupt_buffer {
+ u8 *data_buf;
+ bool in_use;
+};
/*++ NDIS related */
struct vnt_tx_pkt_info pkt_info[16];
/* Variables to track resources for the Interrupt In Pipe */
- INT_BUFFER intBuf;
+ struct vnt_interrupt_buffer int_buf;
int bEventAvailable;
/* default config from file by user setting */
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsInterruptProcessData\n");
- int_data = (struct vnt_interrupt_data *)priv->intBuf.pDataBuf;
+ int_data = (struct vnt_interrupt_data *)priv->int_buf.data_buf;
if (int_data->tsr0 & TSR_VALID) {
if (int_data->tsr0 & (TSR_TMO | TSR_RETRYTMO))
bScheduleCommand((void *) priv,
WLAN_CMD_RADIO,
NULL);
- priv->intBuf.uDataLen = 0;
- priv->intBuf.bInUse = false;
+
+ priv->int_buf.in_use = false;
stats->tx_errors = priv->wstats.discard.retries;
stats->tx_dropped = priv->wstats.discard.retries;
static void device_free_int_bufs(struct vnt_private *pDevice)
{
- kfree(pDevice->intBuf.pDataBuf);
- return;
+ kfree(pDevice->int_buf.data_buf);
+ return;
}
static bool device_alloc_bufs(struct vnt_private *pDevice)
goto free_rx_tx;
}
- pDevice->intBuf.pDataBuf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
- if (pDevice->intBuf.pDataBuf == NULL) {
+ pDevice->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
+ if (pDevice->int_buf.data_buf == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc int buf\n");
usb_free_urb(pDevice->pInterruptURB);
goto free_rx_tx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"---->s_nsStartInterruptUsbRead()\n");
- if (priv->intBuf.bInUse == true)
+ if (priv->int_buf.in_use == true)
return STATUS_FAILURE;
- priv->intBuf.bInUse = true;
+ priv->int_buf.in_use = true;
priv->ulIntInPosted++;
usb_fill_int_urb(priv->pInterruptURB,
priv->usb,
usb_rcvbulkpipe(priv->usb, 1),
- priv->intBuf.pDataBuf,
+ priv->int_buf.data_buf,
MAX_INTERRUPT_SIZE,
s_nsInterruptUsbIoCompleteRead,
priv,
if (status) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Submit int URB failed %d\n", status);
- priv->intBuf.bInUse = false;
+ priv->int_buf.in_use = false;
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
- priv->intBuf.bInUse = false;
+ priv->int_buf.in_use = false;
return;
default:
break;
if (status != STATUS_SUCCESS) {
priv->ulBulkInError++;
- priv->intBuf.bInUse = false;
+ priv->int_buf.in_use = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"IntUSBIoCompleteControl STATUS = %d\n", status);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Submit int URB failed %d\n", status);
} else {
- priv->intBuf.bInUse = true;
+ priv->int_buf.in_use = true;
}
return;