summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/usbpipe.c
diff options
context:
space:
mode:
authorMalcolm Priestley2014-07-05 20:24:27 +0200
committerGreg Kroah-Hartman2014-07-09 01:03:57 +0200
commit71d764aefeb6010b496f2c47ea06d9389fa9b780 (patch)
tree786c836fed7a09f981bd938d0170e18ef40c7b92 /drivers/staging/vt6656/usbpipe.c
parentstaging: vt6656: Include re_alloc_skb within lock. (diff)
downloadkernel-qcow2-linux-71d764aefeb6010b496f2c47ea06d9389fa9b780.tar.gz
kernel-qcow2-linux-71d764aefeb6010b496f2c47ea06d9389fa9b780.tar.xz
kernel-qcow2-linux-71d764aefeb6010b496f2c47ea06d9389fa9b780.zip
stagingL vt6656: implement fall back rates reporting.
The driver reports the rate tried in struct vnt_interrupt_data tsr* variables which is available in INTnsProcessData via interrupt urb context. Instead of closing apTD tx context in s_nsBulkOutIoCompleteWrite by setting in_use to false. Keep the context open and allow vnt_int_report_rate to close it. If the tx_retry value is correct it will report back the sucessful RATE tried. struct vnt_usb_send_context add pkt_no which is index of apTD Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/usbpipe.c')
-rw-r--r--drivers/staging/vt6656/usbpipe.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index a7af4f58898e..c8b0ed5adf7a 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -398,7 +398,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
{
struct vnt_usb_send_context *context = urb->context;
struct vnt_private *priv = context->priv;
- struct ieee80211_tx_info *info;
switch (urb->status) {
case 0:
@@ -415,25 +414,15 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
break;
}
- if (context->skb) {
- s8 idx;
-
- info = IEEE80211_SKB_CB(context->skb);
-
- idx = info->control.rates[0].idx;
-
- ieee80211_tx_info_clear_status(info);
- info->status.rates[0].idx = idx;
- info->status.rates[0].count = 0;
- if (!urb->status)
- info->flags |= IEEE80211_TX_STAT_ACK;
- ieee80211_tx_status_irqsafe(priv->hw, context->skb);
- }
-
if (context->type == CONTEXT_DATA_PACKET)
ieee80211_wake_queues(priv->hw);
- context->in_use = false;
+ if (urb->status || context->type == CONTEXT_BEACON_PACKET) {
+ if (context->skb)
+ ieee80211_free_txskb(priv->hw, context->skb);
+
+ context->in_use = false;
+ }
return;
}