From patchwork Sun Sep 27 08:17:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7273121 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73D3EBEEA4 for ; Sun, 27 Sep 2015 08:18:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 68FDE2095F for ; Sun, 27 Sep 2015 08:18:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77CC12090E for ; Sun, 27 Sep 2015 08:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755077AbbI0ISu (ORCPT ); Sun, 27 Sep 2015 04:18:50 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35561 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754853AbbI0IS3 (ORCPT ); Sun, 27 Sep 2015 04:18:29 -0400 Received: by wicge5 with SMTP id ge5so67942029wic.0 for ; Sun, 27 Sep 2015 01:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wjQ8byWSk37t4wrVpzVK/S6n98y8eMVBCqYcWh78/n4=; b=h6u1PjEzYA+RkXNVxSgwfHKMKjFJNdi1MbWNIS/lVWGNvOndwLmvbs8CW9Ndl8rxO8 xa48r74Ig/FHIV9SPxy2Nz6yuDFuXIz/zNUZoBl9Un8ZW2Ae1XuwahxmbucSIOO9DHuO SLtAJGa24joh/UtNjtuYz4sm8w5O7b9FnDAWiyeA4tGtL0IpeHio5dGekWV390Hd3qZx I6+2Fz1BA73xdgpdW8hOWL1hAb4jY5wOmD48z4quwVLVHNeZZ2FoT1AqnGYBqY7jQoHE 9O711mOpANtXZkAz5uZxn5wYCV/zZGf8wRPIcZFudL/lKgA3CfBsNhrrZqFIDg7E6Dq7 vd6A== X-Received: by 10.180.105.138 with SMTP id gm10mr1451847wib.37.1443341908587; Sun, 27 Sep 2015 01:18:28 -0700 (PDT) Received: from tipsey.3.home (188.31.176.126.threembb.co.uk. [188.31.176.126]) by smtp.gmail.com with ESMTPSA id o10sm11949040wia.4.2015.09.27.01.18.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Sep 2015 01:18:28 -0700 (PDT) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 5/6] staging: vt6656: don't stop TX queue unless buffer full. Date: Sun, 27 Sep 2015 09:17:43 +0100 Message-Id: <1443341864-2756-5-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1443341864-2756-1-git-send-email-tvboxspy@gmail.com> References: <1443341864-2756-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/staging/vt6656/main_usb.c | 7 +------ drivers/staging/vt6656/rxtx.c | 5 ++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 3fc6862..01e642d 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -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) diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index da075f4..efb54f5 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -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; }