From patchwork Thu Mar 12 08:29:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 5992091 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 94BB4BF90F for ; Thu, 12 Mar 2015 08:32:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD2042037F for ; Thu, 12 Mar 2015 08:32:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1D692037C for ; Thu, 12 Mar 2015 08:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751039AbbCLIcQ (ORCPT ); Thu, 12 Mar 2015 04:32:16 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:16549 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbbCLIcP (ORCPT ); Thu, 12 Mar 2015 04:32:15 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.14.5/8.14.5) with SMTP id t2C8U4DG007468 for ; Thu, 12 Mar 2015 01:32:14 -0700 Received: from sc-owa03.marvell.com ([199.233.58.149]) by mx0b-0016f401.pphosted.com with ESMTP id 1t20qjehyg-2 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 12 Mar 2015 01:32:14 -0700 Received: from maili.marvell.com (10.93.76.83) by SC-OWA03.marvell.com (10.93.76.24) with Microsoft SMTP Server id 8.3.327.1; Thu, 12 Mar 2015 01:32:13 -0700 Received: from pe-lt101 (unknown [10.31.131.124]) by maili.marvell.com (Postfix) with ESMTP id 0FAB23F703F; Thu, 12 Mar 2015 01:32:12 -0700 (PDT) Received: from pe-lt101 (pe-lt077 [127.0.0.1]) by pe-lt101 (8.14.4/8.14.4) with ESMTP id t2C8TYAk006132; Thu, 12 Mar 2015 01:29:34 -0700 Received: (from root@localhost) by pe-lt101 (8.14.4/8.14.4/Submit) id t2C8TYQW006131; Thu, 12 Mar 2015 01:29:34 -0700 From: Amitkumar Karwar To: CC: Cathy Luo , Avinash Patil , Amitkumar Karwar Subject: [PATCH 1/3] mwifiex: fix a bug in Rx multiport aggregation logic Date: Thu, 12 Mar 2015 01:29:31 -0700 Message-ID: <1426148971-6103-1-git-send-email-akarwar@marvell.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-03-12_03:2015-03-11, 2015-03-12, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503120089 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Cathy Luo It's been observed Rx aggregated packets are always followed by a single Rx packet. This patch improves our logic to add that extra packet in next aggregation. Signed-off-by: Cathy Luo Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/mwifiex/sdio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 57d85ab..9ef010b 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c @@ -1133,6 +1133,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, s32 f_do_rx_aggr = 0; s32 f_do_rx_cur = 0; s32 f_aggr_cur = 0; + s32 f_post_aggr_cur = 0; struct sk_buff *skb_deaggr; u32 pind; u32 pkt_len, pkt_type, mport; @@ -1169,7 +1170,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, } else { /* No room in Aggr buf, do rx aggr now */ f_do_rx_aggr = 1; - f_do_rx_cur = 1; + f_post_aggr_cur = 1; } } else { /* Rx aggr not in progress */ @@ -1280,9 +1281,13 @@ rx_curr_single: mwifiex_decode_rx_packet(adapter, skb, pkt_type); } + if (f_post_aggr_cur) { + dev_dbg(adapter->dev, "info: current packet aggregation\n"); + /* Curr pkt can be aggregated */ + mp_rx_aggr_setup(card, skb, port); + } return 0; - error: if (MP_RX_AGGR_IN_PROGRESS(card)) { /* Multiport-aggregation transfer failed - cleanup */