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

staging: vt6656: Replace typedef struct INT_BUFFER, *PINT_BUFFER

Replace with struct vnt_interrupt_buffer.

Using only the live member of old structure
pDataBuf -> data_buf
bInUse -> in_use

uDataLen is unused and dropped.
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5f38b783
...@@ -206,12 +206,10 @@ typedef struct _DEFAULT_CONFIG { ...@@ -206,12 +206,10 @@ typedef struct _DEFAULT_CONFIG {
/* /*
* Structure to keep track of USB interrupt packets * Structure to keep track of USB interrupt packets
*/ */
typedef struct { struct vnt_interrupt_buffer {
unsigned int uDataLen; u8 *data_buf;
u8 * pDataBuf; bool in_use;
/* struct urb *pUrb; */ };
bool bInUse;
} INT_BUFFER, *PINT_BUFFER;
/*++ NDIS related */ /*++ NDIS related */
...@@ -420,7 +418,7 @@ struct vnt_private { ...@@ -420,7 +418,7 @@ struct vnt_private {
struct vnt_tx_pkt_info pkt_info[16]; struct vnt_tx_pkt_info pkt_info[16];
/* Variables to track resources for the Interrupt In Pipe */ /* Variables to track resources for the Interrupt In Pipe */
INT_BUFFER intBuf; struct vnt_interrupt_buffer int_buf;
int bEventAvailable; int bEventAvailable;
/* default config from file by user setting */ /* default config from file by user setting */
......
...@@ -84,7 +84,7 @@ void INTnsProcessData(struct vnt_private *priv) ...@@ -84,7 +84,7 @@ void INTnsProcessData(struct vnt_private *priv)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsInterruptProcessData\n"); 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_VALID) {
if (int_data->tsr0 & (TSR_TMO | TSR_RETRYTMO)) if (int_data->tsr0 & (TSR_TMO | TSR_RETRYTMO))
...@@ -178,8 +178,8 @@ void INTnsProcessData(struct vnt_private *priv) ...@@ -178,8 +178,8 @@ void INTnsProcessData(struct vnt_private *priv)
bScheduleCommand((void *) priv, bScheduleCommand((void *) priv,
WLAN_CMD_RADIO, WLAN_CMD_RADIO,
NULL); NULL);
priv->intBuf.uDataLen = 0;
priv->intBuf.bInUse = false; priv->int_buf.in_use = false;
stats->tx_errors = priv->wstats.discard.retries; stats->tx_errors = priv->wstats.discard.retries;
stats->tx_dropped = priv->wstats.discard.retries; stats->tx_dropped = priv->wstats.discard.retries;
......
...@@ -800,8 +800,8 @@ static void usb_device_reset(struct vnt_private *pDevice) ...@@ -800,8 +800,8 @@ static void usb_device_reset(struct vnt_private *pDevice)
static void device_free_int_bufs(struct vnt_private *pDevice) static void device_free_int_bufs(struct vnt_private *pDevice)
{ {
kfree(pDevice->intBuf.pDataBuf); kfree(pDevice->int_buf.data_buf);
return; return;
} }
static bool device_alloc_bufs(struct vnt_private *pDevice) static bool device_alloc_bufs(struct vnt_private *pDevice)
...@@ -873,8 +873,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice) ...@@ -873,8 +873,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
goto free_rx_tx; goto free_rx_tx;
} }
pDevice->intBuf.pDataBuf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL); pDevice->int_buf.data_buf = kmalloc(MAX_INTERRUPT_SIZE, GFP_KERNEL);
if (pDevice->intBuf.pDataBuf == NULL) { if (pDevice->int_buf.data_buf == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc int buf\n"); DBG_PRT(MSG_LEVEL_ERR,KERN_ERR"Failed to alloc int buf\n");
usb_free_urb(pDevice->pInterruptURB); usb_free_urb(pDevice->pInterruptURB);
goto free_rx_tx; goto free_rx_tx;
......
...@@ -302,16 +302,16 @@ int PIPEnsInterruptRead(struct vnt_private *priv) ...@@ -302,16 +302,16 @@ int PIPEnsInterruptRead(struct vnt_private *priv)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"---->s_nsStartInterruptUsbRead()\n"); "---->s_nsStartInterruptUsbRead()\n");
if (priv->intBuf.bInUse == true) if (priv->int_buf.in_use == true)
return STATUS_FAILURE; return STATUS_FAILURE;
priv->intBuf.bInUse = true; priv->int_buf.in_use = true;
priv->ulIntInPosted++; priv->ulIntInPosted++;
usb_fill_int_urb(priv->pInterruptURB, usb_fill_int_urb(priv->pInterruptURB,
priv->usb, priv->usb,
usb_rcvbulkpipe(priv->usb, 1), usb_rcvbulkpipe(priv->usb, 1),
priv->intBuf.pDataBuf, priv->int_buf.data_buf,
MAX_INTERRUPT_SIZE, MAX_INTERRUPT_SIZE,
s_nsInterruptUsbIoCompleteRead, s_nsInterruptUsbIoCompleteRead,
priv, priv,
...@@ -321,7 +321,7 @@ int PIPEnsInterruptRead(struct vnt_private *priv) ...@@ -321,7 +321,7 @@ int PIPEnsInterruptRead(struct vnt_private *priv)
if (status) { if (status) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Submit int URB failed %d\n", status); "Submit int URB failed %d\n", status);
priv->intBuf.bInUse = false; priv->int_buf.in_use = false;
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
...@@ -360,7 +360,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) ...@@ -360,7 +360,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
case -ECONNRESET: case -ECONNRESET:
case -ENOENT: case -ENOENT:
case -ESHUTDOWN: case -ESHUTDOWN:
priv->intBuf.bInUse = false; priv->int_buf.in_use = false;
return; return;
default: default:
break; break;
...@@ -373,7 +373,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) ...@@ -373,7 +373,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
if (status != STATUS_SUCCESS) { if (status != STATUS_SUCCESS) {
priv->ulBulkInError++; priv->ulBulkInError++;
priv->intBuf.bInUse = false; priv->int_buf.in_use = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"IntUSBIoCompleteControl STATUS = %d\n", status); "IntUSBIoCompleteControl STATUS = %d\n", status);
...@@ -389,7 +389,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) ...@@ -389,7 +389,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"Submit int URB failed %d\n", status); "Submit int URB failed %d\n", status);
} else { } else {
priv->intBuf.bInUse = true; priv->int_buf.in_use = true;
} }
return; return;
......
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