staging: vt6656: don't stop TX queue unless buffer full.
authorMalcolm Priestley <tvboxspy@gmail.com>
Sun, 27 Sep 2015 08:17:43 +0000 (09:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 02:19:54 +0000 (04:19 +0200)
Presently the TX buffer stops while filling the buffer and urb.

However, this does not make use of the available buffer
space, it also lags the speed of the TX troughtput.

Only stop the queue when the buffer becomes full. The
URB complete will start the queue again when a
buffer and URB is available.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/rxtx.c

index 3fc6862541cc39961623e2547ffcfd2a4169a01c..01e642db311e5cc4d977ab262c6c912dbe23351b 100644 (file)
@@ -507,13 +507,8 @@ static void vnt_tx_80211(struct ieee80211_hw *hw,
 {
        struct vnt_private *priv = hw->priv;
 
-       ieee80211_stop_queues(hw);
-
-       if (vnt_tx_packet(priv, skb)) {
+       if (vnt_tx_packet(priv, skb))
                ieee80211_free_txskb(hw, skb);
-
-               ieee80211_wake_queues(hw);
-       }
 }
 
 static int vnt_start(struct ieee80211_hw *hw)
index da075f4852989840568e9cca434a975822dc8efd..efb54f53b4f9eddd496a987078055041f559a895 100644 (file)
@@ -101,9 +101,12 @@ static struct vnt_usb_send_context
                }
        }
 
-       if (ii == priv->num_tx_context)
+       if (ii == priv->num_tx_context) {
                dev_dbg(&priv->usb->dev, "%s No Free Tx Context\n", __func__);
 
+               ieee80211_stop_queues(priv->hw);
+       }
+
        return NULL;
 }