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

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: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/69585034-4318-4bec-7d9b-f64a167df237@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b26b1391
......@@ -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;
}
......
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