From patchwork Tue Jun 9 10:59:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 215372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36311C433E0 for ; Tue, 9 Jun 2020 10:59:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C51A207C3 for ; Tue, 9 Jun 2020 10:59:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="LYKGmHm7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728639AbgFIK7f (ORCPT ); Tue, 9 Jun 2020 06:59:35 -0400 Received: from mail-dm6nam10on2129.outbound.protection.outlook.com ([40.107.93.129]:26720 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbgFIK7e (ORCPT ); Tue, 9 Jun 2020 06:59:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DywDNjU67naqKAnlLQvDFFzphm8pG1dtMVobvT4Wzc45HFN6n8GanJhMPaOCvVwQjavvkdbGlLBY7M+lWWmcffW1sz4tnfyRW2qBc9jXaSWsRixvCMuGBu3u+1wPZJbtLcmV2Z+DBS6BhmvxzfMctL0V3gGouA99t1qPf3AtM6cTQvOXaA7bk5uLmb12o2yJ507BCx++C39SM3RWWwK3wYuhVYGWiMY+98O08R6O2VMZyzOE4Xz7wG79L9Lc3G/pTfTvO5L6axgD+GwoZcHxasw4mT+j0NcYUiPOfrBLCjY+f6z4eHW46y2E+TeUuApGaqJjL9Eilm5heM+V6rMPmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lgHi90gclLmqwIbuKaHiH64HqaDm0VrmDfo80pCUMsU=; b=M502k5uFDQ3fRYrjLRKpCj9X4+FIL98VBYaAm9Rr4vy91sFIOXXCyqjbXididq6V1eAp/dbXBi4UtlHL4+KXaDU+KZHs6yVYam+ZSBb3U99dRvS/YSoeSX9M5WHFLnL/ozBtD1f7afb/zs6rW8qmBTisI2zEm3Ilae/ZBmTtd4QVVN90SXpKUis0OcdfQgVMAaUiOz/7UsNGMAPTSJQtwGl3T7oeXPU5Y3HANsf0PJPbnU3nNI4WRvuSEJSZICtDD94ETuHO349t5pcT28yZststB7E7fGL7hoeG/xXLodyxnAaO9cRvsJtsQx5bxZKgS8yzVLo87CPFpSJZkLO+cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lgHi90gclLmqwIbuKaHiH64HqaDm0VrmDfo80pCUMsU=; b=LYKGmHm7+kvnXfLOjJ0ViyVwbL9wX71j4AaAoEetlJTh6xUN4D9HQUYVdt5sis1VXsb3O5ju5xeandskCbBqFUUjbxv7dvw5Es91XtE1U6xkQI6/lz3u0SorR89H69dtZgv6e+x9mpcVqvixLgkvAlSeBb1hESJPoJ8FQsD4nP0= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB5064.namprd06.prod.outlook.com (2603:10b6:a03:19::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 10:59:27 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3088.018; Tue, 9 Jun 2020 10:59:27 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Jia-Shyr Chuang , Soontak Lee , Chi-Hsien Lin Subject: [PATCH 2/6] brcmfmac: increase message buffer size for control packets Date: Tue, 9 Jun 2020 05:59:09 -0500 Message-Id: <20200609105913.163239-3-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200609105913.163239-1-chi-hsien.lin@cypress.com> References: <20200609105913.163239-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 10:59:25 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f0afcf06-8575-41e6-df69-08d80c642d77 X-MS-TrafficTypeDiagnostic: BYAPR06MB5064: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ndH/7FDrgHn+bPGHh9KMte66qmeS4sIglvLhRN+h20pEdJ7HYpFJW08/nEjCFENoxP9P2Si3eV8bN9Q0Ng8j4TbR3g3KoMZ7CxoyQFlztRCgQBIM3xSkpSSuUY7858E4L9Y6HloBNctMMwsLdIGEoq1kl5ddek0kU5azXBgP3M8F+pPrsffodLYm33K2jElu4KqCdQVh9iktkWk6leUaEwxKH7gBEAPneOUExcixFjk4C7GIKBjqJih/JKl8EgHfuiongAZ3O9rt2fNZRvdz4J41jLP5Ghqsz3lm2kjNgyg23BiOqbBIupS4WKn2BR/9 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR06MB4901.namprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(346002)(396003)(39860400002)(366004)(36756003)(316002)(2616005)(52116002)(66946007)(8936002)(956004)(83380400001)(16526019)(4326008)(2906002)(186003)(5660300002)(6916009)(7696005)(8676002)(66556008)(107886003)(15650500001)(478600001)(1076003)(26005)(86362001)(6486002)(54906003)(6666004)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: TAtBAwCxryo8SQnwUIdriIhCNMgsjxKWdjj3cATxaa+Z82fXJMC3P3LtQPA/i6YGMY36z22ODP/HN7RpOO17RRYdskv//rjxzjNTPrMNQLwlMn33sbzetdci9gZGYHMDb+qsbtEnXguFtGQmAlDMeyEsU85tCWwsIw6G2DB7gXdq6UnWpEiE/5IzPqrrsX8ttqksiPFmswdzprmDN2oF/QpPWCwGUGQhULuxQgQTyvOOmTFF2FM9OLjzCSg9VKzXiRo9Tg32vEnX9o04jxCAeItZ4UK1zgMi/vnUvinFlZ+jElUZdZxGYNbf+cCOVE8gdQsezPB3tRWEG1Zo+5PSkWB6Sxfgrtnx3jH0FoVW45SuF2ljECCa9Jw4NbFwD4NObiDMYShRg8hAmCDff60cnKsNLkISx3QEdSOIlTUT9HiMl86R64guOEjh7r05SyaJgkzws0oLCZ9DngOim/C8UbozqpajdWa/n2pi2QHpZ/8WYyTXq1rfhKlsLX1tmGDi X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0afcf06-8575-41e6-df69-08d80c642d77 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 10:59:27.5756 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5XI7/0S2HRAt7yUpH+oM2ljK+to1JvrL0Q1fkUA+Lt9GKMg5UZSlrFYJ6C1ejJKt6mIG5ssaWeLWHUBaTV+6dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB5064 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jia-Shyr Chuang In wifi firmware, max length of IOCTL/IOVAR buffer size is 8192. Increase the message buffer max size same as wifi firmware for control packets so return buffers can come back. Signed-off-by: Soontak Lee Signed-off-by: Jia-Shyr Chuang Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c index 8bb4f1fa790e..f1a20db8daab 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -54,6 +54,7 @@ #define BRCMF_IOCTL_REQ_PKTID 0xFFFE #define BRCMF_MSGBUF_MAX_PKT_SIZE 2048 +#define BRCMF_MSGBUF_MAX_CTL_PKT_SIZE 8192 #define BRCMF_MSGBUF_RXBUFPOST_THRESHOLD 32 #define BRCMF_MSGBUF_MAX_IOCTLRESPBUF_POST 8 #define BRCMF_MSGBUF_MAX_EVENTBUF_POST 8 @@ -1028,7 +1029,7 @@ brcmf_msgbuf_rxbuf_ctrl_post(struct brcmf_msgbuf *msgbuf, bool event_buf, rx_bufpost = (struct msgbuf_rx_ioctl_resp_or_event *)ret_ptr; memset(rx_bufpost, 0, sizeof(*rx_bufpost)); - skb = brcmu_pkt_buf_get_skb(BRCMF_MSGBUF_MAX_PKT_SIZE); + skb = brcmu_pkt_buf_get_skb(BRCMF_MSGBUF_MAX_CTL_PKT_SIZE); if (skb == NULL) { bphy_err(drvr, "Failed to alloc SKB\n"); From patchwork Tue Jun 9 10:59:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 215371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EAF5C433DF for ; Tue, 9 Jun 2020 10:59:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 004022078D for ; Tue, 9 Jun 2020 10:59:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="iRsovIsy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728774AbgFIK7l (ORCPT ); Tue, 9 Jun 2020 06:59:41 -0400 Received: from mail-dm6nam10on2129.outbound.protection.outlook.com ([40.107.93.129]:26720 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbgFIK7j (ORCPT ); Tue, 9 Jun 2020 06:59:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O9KZXagqo8VPAMNGvivATSAyPtBZqPydd99iAmYzsbEgPbrq2h+VzCeZyLUmKTvwzVq2+rwt7CHWj6ez5aLYVuv1YEGG+q1KzXFTq6lpnUIkMwWQ+t5FNX2hrjvCgZxGdSBVbBdKZt8ouX4mAlTb+BG9+fA/cAJcHyagzSY8HJjItK4jYkYdWTjIsaSUqqJF9kGfDq50I78PRnjsQ6V77JOX6qMSubT0VCmV/FLmntMjuD8MRAkunvrTVDEHI/wyRhJEP5JIXeyd0R/fI1TiWFRaY/c1Su3T7s5640+hp5xyAO/1RYCbal7lIr6spnM9ejZx0HI1dQzgwvktlePq8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9oTcvlhQieqo502sxUGI7vgIZdSYAA2sHcjDKoWqD0A=; b=TfKxnKxJ4qbtGpFyGDC1e7rY9uRPkK2v0aZst7AJSF/MH3UMlFMGzXeZLd2nXbiU0QIRxywXwlaWd6B2MSYzBl+Io4efoK+ow0qB7snydrvTili0oKfEvbzymXYKUs6lcEPqSmMxCV+QqxSc9Qb6nj1no5UHe13aoOUkUaucQFvt7VCUJxJE+GHUXmv76QGVcOZo22Kk3vIamvSx4I93f1kZ/zrmuHkSSA2bypEmrZ3brR4yFMtZmd+hdLV8ocwhHmZBU9JjVWPxBjD58JQVU8kq/clrwb3Fa3UwczRREvhShjiZt7UWyTZWWHlWWDF1sSIQyaA9Q7OAkWJelHHgIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9oTcvlhQieqo502sxUGI7vgIZdSYAA2sHcjDKoWqD0A=; b=iRsovIsyJ14s9XUIDxTSEZMcNKqMCASQEuHlDx6v/v3xpEmk6dp+untn2OBZgIrNoL1JtKij1p6KAcV3ekT1U9HgC8ZbSAZxCj3ad8+hqe/SMgaMXCxcdE6Npl+YyEfGu9dhsqLoqMEfLirjl3pAt+YhmAwdIvguOQMWxQ0xWmA= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB5064.namprd06.prod.outlook.com (2603:10b6:a03:19::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 10:59:32 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3088.018; Tue, 9 Jun 2020 10:59:32 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Chung-Hsien Hsu , Chi-hsien Lin Subject: [PATCH 4/6] brcmfmac: update tx status flags to sync with firmware Date: Tue, 9 Jun 2020 05:59:11 -0500 Message-Id: <20200609105913.163239-5-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200609105913.163239-1-chi-hsien.lin@cypress.com> References: <20200609105913.163239-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 10:59:30 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7532d243-0238-49e8-81bb-08d80c643030 X-MS-TrafficTypeDiagnostic: BYAPR06MB5064: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W4nWINNKWJ8jUvhtONUrSXMP030miRcWElj27ZVLTno1aeyusESIxkPn5/FLGqO9xsqn5D+UFUlCA8rY5imBf2E4LZMEhS+9dtJnwIuW1poMnOP2sKARuSvLk5pRroMzkLFyCvc3PIQ53KO4Bms8Jx4wHF+dpGkXqwciTgSfkM1/xxQ7tSRvq1NthMP041ycjO6hlShJTbzfNU1InakXXK1ZF/aL4rk0+oqC3iuPH85ozpJYBOD0djm9HqApL7sKQlilicNkAjtHQ6+haqJFKtQxA8DR4+KFSu3W+vk6jf6/bSOX7eczp9KBHbS1itXU1PbakHq+W5iqrIJdOGwcEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR06MB4901.namprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(346002)(396003)(39860400002)(366004)(36756003)(316002)(2616005)(52116002)(66946007)(8936002)(956004)(83380400001)(16526019)(4326008)(2906002)(186003)(5660300002)(6916009)(7696005)(8676002)(66556008)(107886003)(15650500001)(478600001)(1076003)(26005)(86362001)(6486002)(54906003)(6666004)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: IgmoSwgC8fEpFGyt3WDg8xkG0Em3Ocxt1txFRr3uooP2+RWFC5aDTGfYULFveWz1UsjxpJSgqmHRfm2svzUe686BUEJpreLNH9aV3t9FpDCIONYZb/BsT3HG5J0ULClI7e4/gFOnOYEba5ixNLV6d5y8MzdGgsa3YRPdYhT4CEQA3YVVZl3tEDNvCuGx6UvBltk41rPlB4h0wLKaLCcbGAoc6Hme0WA4d1zCxYM24WhU9TWyVw2k5Vatjify1qdzZIQKiZx3GTrW9qetwfTkH5dSalCW+SfcLeuReOcU5W+wwGzpI+9me+CXjwgux3qL+vEjFrEn8Ky00qFIgTGD6QjMXD12P0hTjfUWVwyB4Sdu9DfN7DDpBv5DSEBjaX+p7BYaR0moOadRHm23LxL67RacfcG7cXHTnucQA71jvRh+xCi+GQClcNUBf1x+ndYIdZQkYVK2dPrq+rz/ERESf4pp4ci0GaupIru9Ot8HKHbiPiW2sqiaW4MRjdMFsCkD X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7532d243-0238-49e8-81bb-08d80c643030 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 10:59:32.7108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tokVNd5EjcP5nXiL5bjRvGX/WLszFd3f1L46J9ihBuCgAZNHwv49Ll21kkrsNaqtRXlGyAFK6VpIG6xVvip9zg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB5064 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Chung-Hsien Hsu There is a mismatch of tx status flag values between host and firmware. It makes the host mistake the flags and have incorrect behavior of credit returns. So update the flags to sync with the firmware ones. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c index d7c36af4b566..ce8c6ceafc58 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c @@ -323,6 +323,10 @@ struct brcmf_skbuff_cb { * firmware suppress the packet as device is already in PS mode. * @BRCMF_FWS_TXSTATUS_FW_TOSSED: * firmware tossed the packet. + * @BRCMF_FWS_TXSTATUS_FW_DISCARD_NOACK: + * firmware tossed the packet after retries. + * @BRCMF_FWS_TXSTATUS_FW_SUPPRESS_ACKED: + * firmware wrongly reported suppressed previously, now fixing to acked. * @BRCMF_FWS_TXSTATUS_HOST_TOSSED: * host tossed the packet. */ @@ -331,6 +335,8 @@ enum brcmf_fws_txstatus { BRCMF_FWS_TXSTATUS_CORE_SUPPRESS, BRCMF_FWS_TXSTATUS_FW_PS_SUPPRESS, BRCMF_FWS_TXSTATUS_FW_TOSSED, + BRCMF_FWS_TXSTATUS_FW_DISCARD_NOACK, + BRCMF_FWS_TXSTATUS_FW_SUPPRESS_ACKED, BRCMF_FWS_TXSTATUS_HOST_TOSSED }; @@ -1455,6 +1461,10 @@ brcmf_fws_txs_process(struct brcmf_fws_info *fws, u8 flags, u32 hslot, remove_from_hanger = false; } else if (flags == BRCMF_FWS_TXSTATUS_FW_TOSSED) fws->stats.txs_tossed += compcnt; + else if (flags == BRCMF_FWS_TXSTATUS_FW_DISCARD_NOACK) + fws->stats.txs_discard += compcnt; + else if (flags == BRCMF_FWS_TXSTATUS_FW_SUPPRESS_ACKED) + fws->stats.txs_discard += compcnt; else if (flags == BRCMF_FWS_TXSTATUS_HOST_TOSSED) fws->stats.txs_host_tossed += compcnt; else From patchwork Tue Jun 9 10:59:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chi-Hsien Lin X-Patchwork-Id: 215370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2AB7C433DF for ; Tue, 9 Jun 2020 10:59:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9AC2207F9 for ; Tue, 9 Jun 2020 10:59:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="P3u5jTNJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728739AbgFIK7s (ORCPT ); Tue, 9 Jun 2020 06:59:48 -0400 Received: from mail-dm6nam10on2129.outbound.protection.outlook.com ([40.107.93.129]:26720 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726463AbgFIK7r (ORCPT ); Tue, 9 Jun 2020 06:59:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8UfpPll2iQaeEyXRJluGQsYb0E9vvNUOMQE92djcDLk6WByusZXtyeJ9xcRcFrLfDcPW33pPcOpr+ozl9OWmqf3bD1g7DRQyTn5HwV7y53W+6fzYH7H47g7+K6FVWM+SCDkOblUxqj4Oe0khOT9ad/J4dGN7K8EnpkZxlEK9x9xkVaLhIYdsisR7wjVvb6btp3OHhqYvNelKbD/exvvUuxPOhCJDxU37vmrZ32c8qafZdHKA59b0oZj5UX3epppY2k/d1xm21j3INmR+HD4Cw2wcvPczdmUwjgmgVomJeY7DPRi3ksVCZGoECyA/P3w/6g7G75sOFn/EPPw6U8EYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gnGTJGIUbPjb/3tbGz/NsAiSFlHk0P+ln5+n0bI1Z4o=; b=h97ds22DjvqfM4FgHLDFR6NAtY/fCHzrVpidpAJ27LjdSM9ECmxsAH8QCN93wexZBvbY7kdrtQo60hifFJC7u0GJpU5CV5L+vqXIqVqn9t+OgUWSO1H3vPIMGDgKbB4aZ1dGtI3kLRM/HlWQFV7zLg8iYcDxqhl27iT+XomXejcFBYKffNpk2tweQ7qkRMvDSBhz7C/pcM+ERZMH9MNrCjZXBjKabLnzTZcQ2LsMkbBiyQUVPfDjis4T2pobX49G0rcICg3oDTdFLyTW+epzcw9CndrM11hbYmVjsqvmAaoENXX6ZHcdDlVG0KdGFa/Ch0fVcXQbycEZZqHZoosQEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cypress.com; dmarc=pass action=none header.from=cypress.com; dkim=pass header.d=cypress.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cypress.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gnGTJGIUbPjb/3tbGz/NsAiSFlHk0P+ln5+n0bI1Z4o=; b=P3u5jTNJ92SClilowQrDqW6+ugo10El2baKstMktMJZUxFAVw/SzxYgqbPaaN3zhGuSvJA6d4wL/QRRWJwUyfoS0/1aPpEys2VAqPRb0fct+uDjFgEbB+KMlVWDmCppTX9bo+qP0XzFow1mBBuDM3iDzxss0wW0jkYNosY3YxQI= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cypress.com; Received: from BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) by BYAPR06MB5064.namprd06.prod.outlook.com (2603:10b6:a03:19::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Tue, 9 Jun 2020 10:59:37 +0000 Received: from BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e]) by BYAPR06MB4901.namprd06.prod.outlook.com ([fe80::b972:c25d:c8fc:fc0e%7]) with mapi id 15.20.3088.018; Tue, 9 Jun 2020 10:59:37 +0000 From: Chi-Hsien Lin To: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Wright Feng , Kalle Valo , Joseph Chuang , Chi-Hsien Lin Subject: [PATCH 6/6] brcmfmac: initialize the requested dwell time Date: Tue, 9 Jun 2020 05:59:13 -0500 Message-Id: <20200609105913.163239-7-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200609105913.163239-1-chi-hsien.lin@cypress.com> References: <20200609105913.163239-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) To BYAPR06MB4901.namprd06.prod.outlook.com (2603:10b6:a03:7a::30) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote02.aus.cypress.com (12.110.209.245) by MN2PR19CA0068.namprd19.prod.outlook.com (2603:10b6:208:19b::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18 via Frontend Transport; Tue, 9 Jun 2020 10:59:35 +0000 X-Mailer: git-send-email 2.25.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9b778b7b-7d3d-478b-050e-08d80c643334 X-MS-TrafficTypeDiagnostic: BYAPR06MB5064: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:862; X-Forefront-PRVS: 042957ACD7 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fzv+4IKNUc/You4LQdepRiz1dakjzjmMzWRRVrT1CeTOEmK56KMW62c1erOoOArb+WQxfL6x8phnerLfaWquRU1mQL+A9DNa+qTvAMg4H1ks1lZdi9lx/mR2WX3h9NCFJgZBR7y1SDlDYzKYpreD+Xq9VecZjalY/lyrMYsEKb3XoiV2fCHWj/C2sAiE1n0oSNg94AcpmE8sJY6+kT3zRszCX7Vp0rDutci/9MbwIRLz6WG2mpwy6G23Ph8WwyiRTLzoT5zTXPYv54w+aDo02j/6xUUQ5WAbhnnXmlvg0cWvYdKRnXE3GDm/rmNUw75RIa7ElegDJCYv0gyDmZLP+g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR06MB4901.namprd06.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(136003)(376002)(346002)(396003)(39860400002)(366004)(36756003)(316002)(2616005)(52116002)(66946007)(8936002)(956004)(83380400001)(16526019)(4326008)(2906002)(186003)(5660300002)(6916009)(7696005)(8676002)(66556008)(107886003)(478600001)(1076003)(26005)(86362001)(6486002)(54906003)(6666004)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: /9qkeiWsMZPTeyRzgFmb/yoY4GCnagartyKu5uHtCGU4pkAENRguKXMGfefdJDE1pJXDOzTu8YmTQuLYtMqw0j5HM87w4I2NK3Z38KvLmqIQFCcc1YwLEHkol8DQG/8gBzOasIJfHgIcAutY7LnMXYu6yyaZwS1frjDcRmPYxAadcTe0HvLxSRaYOXtBsqyxPT02ONy+kea7hw3K/9P/qMwG80FsANFBRimroNj/j8JrB+rLCd2NyvsCQvawSbutj1VzagcQmcskC7v1Xg7Zf87vcRJ10QaDAn19C7MrI2sXzUnFV7aXUXUcdE8Y2bdelBFBh9Qlu/MmAM2CmgmnlDis/P2cD5kCO5yCQFq9XFC+EkmHpjYP3qjGzBpoH23UTtgu5OWbVdMXensgI+WO+6caX5zTkwDMgIeiJPddY4k6bF8qVCH+htxQSnC/vqpd1I4yerR4R1oMad+YDi4KhugSCUGwZdxt0oOO56Pj2ixv2jbwLMeaz8Z4v77r61id X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b778b7b-7d3d-478b-050e-08d80c643334 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2020 10:59:37.2372 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 011addfc-2c09-450d-8938-e0bbc2dd2376 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A8IP7dg04Whp+RVdBlLBoc7AuUZUN89r/TZL6pT0DIKib3mUHIqm6/Wna5+8p2X9bNk69sMZmjVhn5LAnWJzwA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB5064 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Joseph Chuang Commit 9c29da3f4e7e ("brcmfmac: Fix P2P Group Formation failure via Go-neg method") did not initialize requested_dwell properly, resulting in an always-false dwell time overflow check. Fix it by setting the correct requested_dwell value. Fixes: 4905432b28b7 ("brcmfmac: Fix P2P Group Formation failure via Go-neg method") Signed-off-by: Joseph Chuang Signed-off-by: Chi-Hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a757abd7a599..bddd23240609 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5129,7 +5129,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, &freq); chan_nr = ieee80211_frequency_to_channel(freq); af_params->channel = cpu_to_le32(chan_nr); - + af_params->dwell_time = cpu_to_le32(params->wait); memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN], le16_to_cpu(action_frame->len)); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index d2795dc17c46..debd887e159e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c @@ -1700,7 +1700,7 @@ static s32 brcmf_p2p_pub_af_tx(struct brcmf_cfg80211_info *cfg, return err; } -static bool brcmf_p2p_check_dwell_overflow(s32 requested_dwell, +static bool brcmf_p2p_check_dwell_overflow(u32 requested_dwell, unsigned long dwell_jiffies) { if ((requested_dwell & CUSTOM_RETRY_MASK) && @@ -1738,8 +1738,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, unsigned long dwell_jiffies = 0; bool dwell_overflow = false; - s32 requested_dwell = af_params->dwell_time; - + u32 requested_dwell = le32_to_cpu(af_params->dwell_time); action_frame = &af_params->action_frame; action_frame_len = le16_to_cpu(action_frame->len);