staging: vt6656: Remove vnt_interrupt_buffer in_use flag.
mac80211 is the only user of in_use to start it and should not be true when so. So internal toggling of this variable is not relevant. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/69585034-4318-4bec-7d9b-f64a167df237@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b26b1391df
commit
d1ec124246
@ -253,7 +253,6 @@ struct vnt_usb_send_context {
|
||||
*/
|
||||
struct vnt_interrupt_buffer {
|
||||
u8 *data_buf;
|
||||
bool in_use;
|
||||
};
|
||||
|
||||
/* flags for options */
|
||||
|
@ -221,8 +221,6 @@ static void vnt_int_process_data(struct vnt_private *priv)
|
||||
low_stats->dot11ACKFailureCount += int_data->ack_fail;
|
||||
low_stats->dot11FCSErrorCount += int_data->fcs_err;
|
||||
}
|
||||
|
||||
priv->int_buf.in_use = false;
|
||||
}
|
||||
|
||||
static void vnt_start_interrupt_urb_complete(struct urb *urb)
|
||||
@ -237,25 +235,19 @@ static void vnt_start_interrupt_urb_complete(struct urb *urb)
|
||||
case -ECONNRESET:
|
||||
case -ENOENT:
|
||||
case -ESHUTDOWN:
|
||||
priv->int_buf.in_use = false;
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (status) {
|
||||
priv->int_buf.in_use = false;
|
||||
|
||||
if (status)
|
||||
dev_dbg(&priv->usb->dev, "%s status = %d\n", __func__, status);
|
||||
} else {
|
||||
else
|
||||
vnt_int_process_data(priv);
|
||||
}
|
||||
|
||||
status = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
|
||||
if (status)
|
||||
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", status);
|
||||
else
|
||||
priv->int_buf.in_use = true;
|
||||
}
|
||||
|
||||
int vnt_start_interrupt_urb(struct vnt_private *priv)
|
||||
@ -264,13 +256,6 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
|
||||
|
||||
dev_dbg(&priv->usb->dev, "---->Interrupt Polling Thread\n");
|
||||
|
||||
if (priv->int_buf.in_use) {
|
||||
ret = -EBUSY;
|
||||
goto err;
|
||||
}
|
||||
|
||||
priv->int_buf.in_use = true;
|
||||
|
||||
usb_fill_int_urb(priv->interrupt_urb,
|
||||
priv->usb,
|
||||
usb_rcvintpipe(priv->usb, 1),
|
||||
@ -281,16 +266,9 @@ int vnt_start_interrupt_urb(struct vnt_private *priv)
|
||||
priv->int_interval);
|
||||
|
||||
ret = usb_submit_urb(priv->interrupt_urb, GFP_ATOMIC);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
dev_dbg(&priv->usb->dev, "Submit int URB failed %d\n", ret);
|
||||
goto err_submit;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_submit:
|
||||
priv->int_buf.in_use = false;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user