From patchwork Fri May 5 12:08:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9713445 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5B7A60235 for ; Fri, 5 May 2017 12:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A480728627 for ; Fri, 5 May 2017 12:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 981072869A; Fri, 5 May 2017 12:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBB4E28627 for ; Fri, 5 May 2017 12:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753134AbdEEMIp (ORCPT ); Fri, 5 May 2017 08:08:45 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33878 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbdEEMIo (ORCPT ); Fri, 5 May 2017 08:08:44 -0400 Received: by mail-pg0-f68.google.com with SMTP id u187so584885pgb.1 for ; Fri, 05 May 2017 05:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8z/K0Sjp8OS7CA4oXh5Z/K1UlNp5YugcvD0gRLmT0BY=; b=eGcP5tlgRqWbc9ubM2O+rlKP6kyTpcsMXG1sHeiZasMjGIdKNpW0Lr6Pb6hxlIlvki z6W+ioNXQtKrqUpbreZm6bheMXR2ZzLFcw6eStaKN6ZQb5suHWAFi0W2rmM5ou8rKpFE e71Kxb2rUowLK+Clni0Zljsq3m8Z69My/ILXu2NxgjjBE+D+g+GaDTyPJhpSWk6xXD4S 0u9HaYPlvEn67MPXfVLXgZK9faKXla/K0SrcC07AjfZzCF4VKhJhWAzgox78jg7gQwsy VG8Vi0RcYp7d17goCMmU9qk3+RQPiF51YrTSTvKcKSU/ETo4YrkE1jXAMHTmt/qd+hLp d1rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8z/K0Sjp8OS7CA4oXh5Z/K1UlNp5YugcvD0gRLmT0BY=; b=hMc4UDzOcQ8WP9vWOycL69sa6GF1kvkSSsS/v5z4E7PYX7iJHGZPNyx6Kl7xaIV4QT LTeeTsdCXcMqAanRn99u35eTGtE2G/B8mLYSdUeOPiHu6CurzStELmhAfKTBhgxEGniX L+WZ3fPQyySNQTe+4l/hvlJjRxfSj7kdD2gZ3JJwS5A5Hp5b+Lt1jOm8BjSSbrOaUKTg O7/+IxCUY4JO5wu/CFSItOrg2PmQLhzc6CXOsoR1qpiMDI2ProqDPDd92HxoZnIUGX5D 6gC+QuREXoWdylr9xf/EPi6+oXeErEPc3VGnxxgt12mgGqvIDZ6FpXRcFR6BwYrV/XMz 45QQ== X-Gm-Message-State: AN3rC/4YBQVmha7nVrqAvkhEM4GpnCK5ubStcBu4Y1DKJHsUdmZq9g6E gs7oUXzeM9c4zA== X-Received: by 10.84.224.10 with SMTP id r10mr40289211plj.25.1493986123692; Fri, 05 May 2017 05:08:43 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id i15sm13743913pfj.51.2017.05.05.05.08.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 May 2017 05:08:43 -0700 (PDT) From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , rajatja@google.com, Zhiyuan Yang , Cathy Luo , Xinming Hu , Ganapathi Bhat Subject: [PATCH v2 6/6] mwifiex: check next packet length for usb tx aggregation Date: Fri, 5 May 2017 12:08:20 +0000 Message-Id: <1493986100-24509-6-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493986100-24509-1-git-send-email-huxinming820@gmail.com> References: <1493986100-24509-1-git-send-email-huxinming820@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xinming Hu The next packet length will be used by interface driver, to check if the next packet still could be aggregated. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Ganapathi Bhat --- v2: same as v1 --- drivers/net/wireless/marvell/mwifiex/11n_aggr.c | 8 ++++---- drivers/net/wireless/marvell/mwifiex/txrx.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/wmm.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c index cbf3bc2..8041f2d 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n_aggr.c +++ b/drivers/net/wireless/marvell/mwifiex/11n_aggr.c @@ -254,15 +254,15 @@ return 0; } - if (adapter->iface_type == MWIFIEX_USB) { - ret = adapter->if_ops.host_to_card(adapter, priv->usb_port, - skb_aggr, NULL); - } else { if (skb_src) tx_param.next_pkt_len = skb_src->len + sizeof(struct txpd); else tx_param.next_pkt_len = 0; + if (adapter->iface_type == MWIFIEX_USB) { + ret = adapter->if_ops.host_to_card(adapter, priv->usb_port, + skb_aggr, &tx_param); + } else { ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA, skb_aggr, &tx_param); diff --git a/drivers/net/wireless/marvell/mwifiex/txrx.c b/drivers/net/wireless/marvell/mwifiex/txrx.c index 15e92af..d848933 100644 --- a/drivers/net/wireless/marvell/mwifiex/txrx.c +++ b/drivers/net/wireless/marvell/mwifiex/txrx.c @@ -117,7 +117,7 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb, if (adapter->iface_type == MWIFIEX_USB) { ret = adapter->if_ops.host_to_card(adapter, priv->usb_port, - skb, NULL); + skb, tx_param); } else { ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA, @@ -185,7 +185,7 @@ static int mwifiex_host_to_card(struct mwifiex_adapter *adapter, if (adapter->iface_type == MWIFIEX_USB) { ret = adapter->if_ops.host_to_card(adapter, priv->usb_port, - skb, NULL); + skb, tx_param); } else { ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA, diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.c b/drivers/net/wireless/marvell/mwifiex/wmm.c index e4ff3b9..75cdd55 100644 --- a/drivers/net/wireless/marvell/mwifiex/wmm.c +++ b/drivers/net/wireless/marvell/mwifiex/wmm.c @@ -1363,13 +1363,13 @@ void mwifiex_rotate_priolists(struct mwifiex_private *priv, spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, ra_list_flags); + tx_param.next_pkt_len = + ((skb_next) ? skb_next->len + + sizeof(struct txpd) : 0); if (adapter->iface_type == MWIFIEX_USB) { ret = adapter->if_ops.host_to_card(adapter, priv->usb_port, - skb, NULL); + skb, &tx_param); } else { - tx_param.next_pkt_len = - ((skb_next) ? skb_next->len + - sizeof(struct txpd) : 0); ret = adapter->if_ops.host_to_card(adapter, MWIFIEX_TYPE_DATA, skb, &tx_param); }