/* Variables to track resources for the BULK Out Pipe */
struct vnt_usb_send_context *tx_context[CB_MAX_TX_DESC];
- u32 cbTD;
+ u32 num_tx_context;
/* Variables to track resources for the Interrupt In Pipe */
struct vnt_interrupt_buffer int_buf;
u8 tx_retry = (tsr & 0xf0) >> 4;
s8 idx;
- if (pkt_no >= priv->cbTD)
+ if (pkt_no >= priv->num_tx_context)
return -EINVAL;
context = priv->tx_context[pkt_no];
{
/* Set number of TX buffers */
if (vnt_tx_buffers < CB_MIN_TX_DESC || vnt_tx_buffers > CB_MAX_TX_DESC)
- priv->cbTD = TX_DESC_DEF0;
+ priv->num_tx_context = TX_DESC_DEF0;
else
- priv->cbTD = vnt_tx_buffers;
+ priv->num_tx_context = vnt_tx_buffers;
/* Set number of RX buffers */
if (vnt_rx_buffers < CB_MIN_RX_DESC || vnt_rx_buffers > CB_MAX_RX_DESC)
struct vnt_usb_send_context *tx_context;
int ii;
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
tx_context = priv->tx_context[ii];
/* deallocate URBs */
if (tx_context->urb) {
struct vnt_rcb *rcb;
int ii;
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
GFP_KERNEL);
if (tx_context == NULL) {
dev_dbg(&priv->usb->dev, "%s\n", __func__);
- for (ii = 0; ii < priv->cbTD; ii++) {
+ for (ii = 0; ii < priv->num_tx_context; ii++) {
if (!priv->tx_context[ii])
return NULL;
}
}
- if (ii == priv->cbTD)
+ if (ii == priv->num_tx_context)
dev_dbg(&priv->usb->dev, "%s No Free Tx Context\n", __func__);
return NULL;