From patchwork Wed May 3 11:48:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9709507 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 EAFD76021C for ; Wed, 3 May 2017 11:49:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D788828601 for ; Wed, 3 May 2017 11:49:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC52E2860D; Wed, 3 May 2017 11:49:12 +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 5DCF428601 for ; Wed, 3 May 2017 11:49:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752036AbdECLtL (ORCPT ); Wed, 3 May 2017 07:49:11 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32939 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751937AbdECLtI (ORCPT ); Wed, 3 May 2017 07:49:08 -0400 Received: by mail-pg0-f68.google.com with SMTP id s62so16366026pgc.0 for ; Wed, 03 May 2017 04:49:07 -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=C5pnu7ZkZ1ya+NA4Mbu+xM9Zg5d5atMCeajtyjVWUdE=; b=imOiMKwewITvuSz1bfXAsMHwe+4k0ur/LMm/0z/3PBnKNsyPIBJbGO3++7jidWu4jA eOdaiz1ZuBgkv9502TNm77ciJe4ID/JMMltkJgtEKYq4D7/AB4Y/0rWNEV5mgoIcR3px /9KfR2ElMNNupQsK55nayfPfjfCkmwH3/pVrPJQc1N5r5BFto/8x53GlzqlqWWgSH0aS 4kDXkWyqiSXSyrmQAgALNE8bIOGwV7NYr2c7sPbWienYQEOvU0AtAY0GiDzMYJzmXTo7 bUCdI/dsGlS6+KElz3Ow6ik0xQC/NQ32eJNpcAMf7cBrCMs1KZrm7u8NULwboWxw9Hpi 4S0w== 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=C5pnu7ZkZ1ya+NA4Mbu+xM9Zg5d5atMCeajtyjVWUdE=; b=WAVZ3P8LVd9YNy/9OcuOslVvKDGuNY/XHNMA/9185A45fO5OISfmCzhRKjUspefQ/T C0CPfyZef9sn/u1jVYTIDgeh/TFp6XD+5sycd4pd6tjRe3JcqtygW+bZqzqjDC/roUjw 0gDvxdxxES6+rEaks9Lg2JkRqh6NC/PUcjvyti0dmB63La7VE64rYcsEf18d4DExTBu6 yELTz0NT5jmXR0k9v6yK3JIIz1KJjYb4470Jsb5NhhH2Z92e2uuemz+W3vBQ87DHjk0W 7LWOTtZhoq+YKn5S/zOYKgwi+l4NIbgNDckB/QEFfrZE+9jbyhhBi0eVilaQ/cRHVDKI c6QA== X-Gm-Message-State: AN3rC/6gyQ12Bea2m5hEiCFzlsTIpoLULYx0tN0HdclPCPJOz4rMLGNG iohj0KITbSlz5w== X-Received: by 10.99.126.92 with SMTP id o28mr8347238pgn.63.1493812147291; Wed, 03 May 2017 04:49:07 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id f80sm4571976pff.84.2017.05.03.04.49.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 May 2017 04:49:06 -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 6/6] mwifiex: check next packet length for usb tx aggregation Date: Wed, 3 May 2017 11:48:43 +0000 Message-Id: <1493812123-12053-6-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493812123-12053-1-git-send-email-huxinming820@gmail.com> References: <1493812123-12053-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 --- 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); }