From patchwork Thu Jun 4 07:18:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11587075 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3653E913 for ; Thu, 4 Jun 2020 07:18:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19CF3206DC for ; Thu, 4 Jun 2020 07:18:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="IdSMSVCM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727858AbgFDHSx (ORCPT ); Thu, 4 Jun 2020 03:18:53 -0400 Received: from mail-mw2nam12on2098.outbound.protection.outlook.com ([40.107.244.98]:49249 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726411AbgFDHSw (ORCPT ); Thu, 4 Jun 2020 03:18:52 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=akIgUjhy1VH+vYSHIsEsyQZizUevbiJ+6J4dccYv49nM4J/cfq+kDjdmteD8cKgffWfSqq41o16mYwOM3lFOzOFzhe1nUX+of8xtFLH7xlnELkvFpEpE196iA9a5VjA9QCi5rjtoBSls1dbtUZjDjPWO/ptMJxfWuVeJQw6mdneGerhMjdsLFywysV8euVy9Y5hPMXeewSDyaWJ3gfgWGeJtcYkJYBz/Av0rEKuLHPaHmJMrOc9Ar+OqtiHGV6uFuIwdxj1HVoL8SXDWw12yzsopjG+czjFJaM0p8WyCV9Z8V38VYOhxXt3KJHsY2+Ao5zQUz5KKIkeaJ/pZspMY8A== 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=aSnGP7Y8jrd9BSsjmh5ESzAhzBAl9L2a+sunRjMAUm8=; b=WJrrI+UWdF3CLvdNZfuurOt1nqCwMpg+3RMwP0w3E7cguc8ITYSQmrDvKlmqONlKhspuEMfop0Z65IUb7nHdqXyCT8iLs4EuRz75aPdrT7/lrI54x4bFXBHQMZ26sCEKi4adAOEVFa21k4nMpbiLqlVu7YI2Gt12gPJFgdbZu/QAk2dLYM4pfBJWrz4NVV9aEHne5ANVINVac37zVQRwcDONS3Y8Ct4DipP2n4CBY5usT2fu2xGga7VHXxPQsYW7hMn2jKa5hMk9tv/L/dkXz18mtyZx8Bb8lSnhdmryNSF7u4Jh60j6oim1OMexZVCEp/QbBRX3g3JWpbiB9UbONQ== 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=aSnGP7Y8jrd9BSsjmh5ESzAhzBAl9L2a+sunRjMAUm8=; b=IdSMSVCM1ecJVJ4MtPEgbWjoCwqlhoCynzRLKr2p68WJSHttyOsfmaiH/ErcrqxncbyIQSQmJufVp0CrDtzYtJjRjxyB+1lvjkUaCm7D/CWr9MasFT1WzBM0AQapi6Fib7Z0ZTZEk5s8knrHyKEUBVv2R5bVB7I0d3uUEpa3VGk= 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 DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB5146.namprd06.prod.outlook.com (2603:10b6:5:112::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Thu, 4 Jun 2020 07:18:50 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb%5]) with mapi id 15.20.3066.018; Thu, 4 Jun 2020 07:18:50 +0000 From: Wright Feng To: linux-wireless@vger.kernel.org Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , chi-hsien.lin@cypress.com, Raveendran Somu Subject: [PATCH v2 1/5] brcmfmac: To fix kernel crash on out of boundary access Date: Thu, 4 Jun 2020 02:18:31 -0500 Message-Id: <20200604071835.3842-2-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com> References: <20200604071835.3842-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from iot-wlan-dev-u02.aus.cypress.com (12.110.209.245) by MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Thu, 4 Jun 2020 07:18:49 +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: b578fada-3a8c-43b6-a473-08d808578742 X-MS-TrafficTypeDiagnostic: DM6PR06MB5146: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:785; X-Forefront-PRVS: 04244E0DC5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eqLgGVyLvH7rRpPmglaHVXg2cQnF7RmMdH7+A8TXvr8rlXguSXR6ir/FyKnwQOmGe93iBGIKqzLgl87lb+3YwHXOZ+Snsnn529EoNRtbhlFjaRsvsnMj35OZZRK8jBNubUwCYSkzdsGG7vRykORukYkjBRZe0SIASKSyPlDUX4ZOPjCdseEJqj7T6fdy3C202T9uG2km/p5w1+NkxIIveS6bpI46JfFrVvenAMRlSraU3dLfrGB3Bsc+OzFKWXSwrUyKbb/0x0NgoLsloq7VrHCHK9JXX4rRYQPG4/aIzzxwjBFcjuMZ6LGFoTeNeeDXvqxcdlpselk9guu+O801AQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR06MB4748.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(39860400002)(346002)(396003)(366004)(136003)(316002)(54906003)(6666004)(26005)(16526019)(186003)(2616005)(52116002)(36756003)(956004)(7696005)(44832011)(1076003)(8936002)(8676002)(83380400001)(107886003)(6916009)(5660300002)(2906002)(4326008)(86362001)(6486002)(478600001)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: DPzvmifythxjCwVnm/4Jy4QJENyrZJ5edMiPBJnKW3yMvXo/GSl7b7tVnPxZv277EWMUArKuA2ZvgRNhl+sSInEOrmcdKeczW2CW+0uHEuTEfFBBBnc6yuf1A9feqvO1zL0gF3x81FyP0YRMUWtFwyVZyHotlh+CWK9+coBHjs626Tm5Mc2BpxPp0E1cYI4/VFkF9/npXXUeg4Esb/SgpMUequDObJQMmvpCI34ew4wbeAk4fsfmQb8KHXZp43J5283PkFNjk8SQ8YcODalMDo8wQmkuM8fdAepr7KkZDRnC7+0G3/3qTFBvapMMXTYIycLC5MJ1k2zSzEBnovmieZcMaRgFi+U8B/VtZHJFSwO+H0S7yEM7mIkc9VHNqxHqx5fEYs7G3A3nlar8OsjkVa2dsJvS2XX94B+4psLpsI0YKNj7JFNMzJqDjgoBRrHCiv3jk2w3M0DK0gTiYst6obQ6wyAbgdBmzc9ye1IjqdW+SNfil2btIvz7sb3Vuv57 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: b578fada-3a8c-43b6-a473-08d808578742 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2020 07:18:50.1546 (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: IG9UH+NtSl6LVsRQ+2j/0chh1FrLhJmEsFlhcShNdpj/oLtIE+y1nIjUkIaAHa+x+7cJ5m4LsqL7FeBl9PPuYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB5146 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Raveendran Somu To truncate the additional bytes, if extra bytes have been received. Current code only have a warning and proceed without handling it. But in one of the crash reported by DVT, these causes the crash intermittently. So the processing is limit to the skb->len. Signed-off-by: Raveendran Somu Signed-off-by: Chi-hsien Lin Signed-off-by: Wright Feng --- v2: - Correct all typos in commit message drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c index 09701262330d..531fe9be4025 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c @@ -1843,6 +1843,9 @@ void brcmf_fws_hdrpull(struct brcmf_if *ifp, s16 siglen, struct sk_buff *skb) WARN_ON(siglen > skb->len); + if (siglen > skb->len) + siglen = skb->len; + if (!siglen) return; /* if flow control disabled, skip to packet data and leave */ From patchwork Thu Jun 4 07:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11587077 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 003E560D for ; Thu, 4 Jun 2020 07:18:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAF03206DC for ; Thu, 4 Jun 2020 07:18:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="F3xJW8XR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727868AbgFDHSz (ORCPT ); Thu, 4 Jun 2020 03:18:55 -0400 Received: from mail-mw2nam12on2097.outbound.protection.outlook.com ([40.107.244.97]:32608 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726411AbgFDHSy (ORCPT ); Thu, 4 Jun 2020 03:18:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=coxv0CyPKOuvv9DsTp3HhWamPnXZV+F3v9Dqk7TwOYtca5MoIjkcn/w+tsFg9OAcEDgtHz8+B5bwTHBaPVKuKo1n4dX65vqOPcP6JhskVBRRpMO2Bc/dlUCzQ2PT62rAEZYtCYw7f8w5QESR2nN4DuWKgEV/ZfcZWYW3MvONL9tQOxZT6SpM5FphfgTu3Cvl5fWi/quOFhkThXp7iIeQmEwbTvaQC6G5PttBPeTNrG6edUlE+pgfmW+QNX5s17AzE0g3VWtPtVXOhUpS6Cz+zHRE/A2d0isjkUlxqN3iXYJU5RyIyHH0SHzxgEnIFVY1IdZCajlC1lkCSx5dLAxKrA== 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=8LHqh6MfvZyJ/44AUtOGLku5BaYHKkmqsov0nWxOtyA=; b=bVWf5VO92+J8GY19YINQXcEu2wilkbthXj3+rHqEOYGvEUX/vszdHvOiMAkd/igHveZFpaeRYviGxdH/5A7ojATPxuqkE5EZPO6nkX/ylm1Gl7jiLEXaM0etGXGJtddoaUXR6pjldNh1sdcjN/yoqzneRuQpVI1bdHcInSNGsonrt5QiKHfW5bJZ1w2vf5LOh910SN4TgXYvMY9fL2BmnFga6SokxOziAJX9GjdAac98MDzyIStGvSivgK9bru6Jl26j+1j7TqV/H0dfSsG62zZ/ztEj2u9GbGzolB8QYvmG/Q5ZWdDnOcrLc/cuSmNhoenZJwvja05j3Q2iBtDOJA== 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=8LHqh6MfvZyJ/44AUtOGLku5BaYHKkmqsov0nWxOtyA=; b=F3xJW8XRcXIngWj6WCTcChhCQwc88v+MkvihP5cdluNCcQZbiCYL33cLhdCY0E2E/1mKPlxjTAL9vTfWq7glOxZSqcXSLoH2dKlWS5/t1PqpQi7l/4UhwlQGoyTgGiVv2jcGerPLFkzE7MQLYgbZjONf8sSz89YuX4JRCyfmLX8= 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 DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB5146.namprd06.prod.outlook.com (2603:10b6:5:112::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Thu, 4 Jun 2020 07:18:52 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb%5]) with mapi id 15.20.3066.018; Thu, 4 Jun 2020 07:18:52 +0000 From: Wright Feng To: linux-wireless@vger.kernel.org Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , chi-hsien.lin@cypress.com Subject: [PATCH v2 2/5] brcmfmac: fix invalid permanent MAC address in wiphy Date: Thu, 4 Jun 2020 02:18:32 -0500 Message-Id: <20200604071835.3842-3-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com> References: <20200604071835.3842-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from iot-wlan-dev-u02.aus.cypress.com (12.110.209.245) by MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Thu, 4 Jun 2020 07:18:51 +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: 2de5c2da-33d9-4183-f62d-08d80857889e X-MS-TrafficTypeDiagnostic: DM6PR06MB5146: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1775; X-Forefront-PRVS: 04244E0DC5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1sSQzzfYXLsSw5D/nP+vN0CP9RGiBfqgFgTKDanPza3SoxZAHChPixvZ2hMhh+7Tu7ydZKhzfQoZOxuJYE5l042mUrkC0/jVLYY8UFBtOtOtfecYK3s8QyuHT5YhYv77SsoGOoMXT5VQY0pZpkKfwjj84hDO63lYzdtKovvzHyBrfPJpOoVVWL96w9hlxlJVkx8bh1v6YZ8d0VhRH6Zb7aei/W0Wndfimq9Zvf0ZUlEFPFGdZR2VybIebt1vx1w97wE94LVcpPM1WnGnLmh1VjKUA7JjyPi8709w08csLex3w3XncShqQJaCcDAknr20 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR06MB4748.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(39860400002)(346002)(396003)(366004)(136003)(316002)(54906003)(6666004)(26005)(16526019)(186003)(2616005)(52116002)(36756003)(956004)(7696005)(44832011)(1076003)(8936002)(8676002)(83380400001)(107886003)(6916009)(5660300002)(2906002)(4326008)(86362001)(6486002)(478600001)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: Zs2/gu6BhKNZ66EIE/Q0S2P9Df+dfxRLGnCHGcquh6C9599U0xnnaDOhiZd8Bf6fGcu1qEa+qdI3ZFljGNkD/g2+BoRTr11SP/oy/9Lu3WjF8kloZecIP6AmbNpJ2A4KTtcjYiAeLYb58GcYbtQHF55Yb20xUkKQEvsQhLOYjoMdSUkAWYwcCPiepZd3kiRxDTA3YCRJ8PVs9OUr7AD7MCEjlRoI2m/hexp6c99yWw23ARtFGAWQ1Up+sCuhXWIoZ8h8xxS7kyUWGdISTc1vrxmVKiQ7eJifX7au1/PkYd61T4lNBjrGYfDlmizMbIQ9mH4xTrxp1GN2vl5XA1QnvH/PxDyKTbGhikSh0HbCH6OCshc0gpT0PSIt5tQK4C9VLYB5my8Vrvs1OSCpGa3hpdbwz+8L/iGoSdo7s377Cv/QamEPhsXertdMQdOumWbIHjCfzm25ihZCS9w5LdIw5cY263zkg6hinwwIPtUW0Jv7gqOdpRoH8VICdbSM/3ud X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2de5c2da-33d9-4183-f62d-08d80857889e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2020 07:18:52.4039 (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: xo4jZm3q215782NyS4tDy5e6p5EUdLvJmhkLrxKtsIGxPmDsY8gtBQgVNnDwBamoH7AYKziKBJAHjg/XhBdwZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB5146 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When host driver retrieves mac addresses from dongle, driver copies memory from drvr->mac to perm_addr. But at the moment, drvr->mac is all zero array which causes permanent MAC address in wiphy is all zero as well. To fix this, we set drvr->mac before setting perm_addr. Signed-off-by: Wright Feng --- v2: - Correct the typo in commit subject drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index dec25e415619..e3758bd86acf 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -209,8 +209,8 @@ int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) bphy_err(drvr, "Retrieving cur_etheraddr failed, %d\n", err); goto done; } - memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN); memcpy(ifp->drvr->mac, ifp->mac_addr, sizeof(ifp->drvr->mac)); + memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN); bus = ifp->drvr->bus_if; ri = &ifp->drvr->revinfo; From patchwork Thu Jun 4 07:18:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11587079 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEA0C913 for ; Thu, 4 Jun 2020 07:18:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5E932074B for ; Thu, 4 Jun 2020 07:18:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="WGQKsSqs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727874AbgFDHS6 (ORCPT ); Thu, 4 Jun 2020 03:18:58 -0400 Received: from mail-bn7nam10on2105.outbound.protection.outlook.com ([40.107.92.105]:24672 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726411AbgFDHS5 (ORCPT ); Thu, 4 Jun 2020 03:18:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLgOyvLuioGCqdVvGk82wuGzrVMY0nwiUteekpjCMq235LpdY5mc8y1NYTNGNNuZqcYChs5Ej37Nb1y9ddd6G+dvgP7TWUO0EzfaE+ZtPXKrNdLQRJ3yyFRXLTHHZjpPHcFkmqOsj2muq2eEgN7lnDLykpkVnI2zTN4qEQj4+D3Mh4i0qBNA6ROc7vlYH4EwTnVGZWeR+DoTf+BksIymsf9l98/CV2Xlj7VhwPUKQLJUYTFPDd5DHUfcW/QMgOtr9ZfICNCyqbuCS/aZjcl7ckM4g9nbhDSKpR7C0G3JVmycfq5M2SH9FJ4cnaAuaQW4lSOGqEPe/C1Nl36dtXXZFw== 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=ibNoBsucNltPwbEOckqM4A27xcl752GRwIYqZ7p9IFU=; b=cfX+XnIIloW1WrwK3Jiu3krzcuVRp5u82n+GH+uu+BvCIRgP00xx2hlF2UMd72iIQ2I/XSLw3P6SeyGBhU+dgYaGF3In9bf/gN5XyPivkXK0UgShEtLl7REWlSdqKCllJXt2QrxJ40bek+Jzqh5Wsi3rB4IyI1YRgTZd2yZlrBzdhxa6QdOd1u9UQbMQz+1fQB+1C0Er31TLLqy4WbMWcdWNv4nKrifDQyumGhcM+l1bP714GGSa9by4TjcdoDutZgyvySGlvS1jDEtHfqxCp2oOLMIeLFkGlALS8HHdOctBpjJ2v3SZPj/jci38LwMohyGbhwG2iiHQKNU+GjTpiA== 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=ibNoBsucNltPwbEOckqM4A27xcl752GRwIYqZ7p9IFU=; b=WGQKsSqsWb173EyhkdSa+mfufuWXRVUvI8FbuSUmKLUcL+EELaKqroSZrS/OwgxvRsFYaMN6YPs4StCpHrbqyzxo1oziB7+p5oIzxeL7D5bUltc4Z3GVjwZibi+0JFLWxPii3Tzp2wJ3G0ARBlyd06rDdS0HwEf3EkUzrDc6Xb4= 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 DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB5146.namprd06.prod.outlook.com (2603:10b6:5:112::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Thu, 4 Jun 2020 07:18:54 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb%5]) with mapi id 15.20.3066.018; Thu, 4 Jun 2020 07:18:54 +0000 From: Wright Feng To: linux-wireless@vger.kernel.org Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , chi-hsien.lin@cypress.com Subject: [PATCH v2 3/5] brcmfmac: keep SDIO watchdog running when console_interval is non-zero Date: Thu, 4 Jun 2020 02:18:33 -0500 Message-Id: <20200604071835.3842-4-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com> References: <20200604071835.3842-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from iot-wlan-dev-u02.aus.cypress.com (12.110.209.245) by MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Thu, 4 Jun 2020 07:18:53 +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: 352be13f-3534-4bf2-3782-08d8085789e3 X-MS-TrafficTypeDiagnostic: DM6PR06MB5146: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-Forefront-PRVS: 04244E0DC5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fDut9LO4wHEQyo8OjGMk2a2bfaYbp735SncgcJr4uIbMdPu0v69uFrK9T0GKeCv0wqTDnDWK9CPqg8Ht2KJVDbyLdXf8EfpcRtW+8pOdCujfWDZFshtm8ytZqMt/wRPBEHqO3VGT0/WexswmEK/aNDUyOck4p1WOYuOl1ntp1NOmg1UyDmQ87h3q1t6aRoAc+tVI8n1CgJ0x6cMuTfdBcc8JtCPuYLykJ5YJf8w561R48hJnwu2BwasTQz0hvTqRdFmDQnp/Y3PB7WEZwB68dBjjC9XqXayhsqqpuXSs55xozZpQttLFhdkVUR+SXCEFc2U5PRyz2pG6qy7cw7+EZg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR06MB4748.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(39860400002)(346002)(396003)(366004)(136003)(316002)(54906003)(6666004)(26005)(16526019)(186003)(2616005)(52116002)(36756003)(956004)(7696005)(44832011)(1076003)(8936002)(8676002)(83380400001)(107886003)(6916009)(5660300002)(2906002)(4326008)(86362001)(6486002)(478600001)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: pPUf9Xy85O1SO81KjHzHLwzHeuUVVSyLzRgthDYiP5KUzey0nxt9zncoDB2+hGzLGVJtX3/SrNAeZ6dBKqkqFAmbLfoTDuI0EzJa/q14DDv2eaka/hGhrLm4JUnRBqeJ3bSOwIQeD5jZJvcQtmcdofWMZKC4XZIHBdRFHkZG64GVQZkDTwN81XdVzTDfhiwjhB2KoIRHsWdS3D9pp0Qf9EE4Z8J9Td0z3Um4n7634C9KA9DSZnYiohvMWDyZltDJxHP+JMmVkSVfhqolZGuqut4uRr27qgRI9NVgIEaZOtPbtNR4d22g+2REX+BgrkTriR1Y4RoGZGTmAbw1atNe/fLZmWeuJCEEcpFbH3Uoegp1/+L7wMycOOJL755MmjxMT9flRDjEBDron7aQUwXeMimCOdAGlS2cK9cJyqpHNL+gaFCG8MZoyXSHaZM6g9n9oghZUJI8WzEM8JmW8jr7xmXkUzgs93MPXtHtUT8wy5KY12X6bwu0b9LIEXMbv1w9 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 352be13f-3534-4bf2-3782-08d8085789e3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2020 07:18:54.5813 (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: V/tS+O2p1tvnhNRAWcJ980XKMmVBdXPa8roHpZbBynFsRFbtY7IsGMZrimyne+P7zzfkL46SUcCzVuE/AxykCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB5146 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org brcmfmac host driver makes SDIO bus sleep and stops SDIO watchdog if no pending event or data. As a result, host driver does not poll firmware console buffer before buffer overflow, which leads to missing firmware logs. We should not stop SDIO watchdog if console_interval is non-zero in debug build. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index ce6f15284277..50444989ae09 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3686,7 +3686,11 @@ static void brcmf_sdio_bus_watchdog(struct brcmf_sdio *bus) if (bus->idlecount > bus->idletime) { brcmf_dbg(SDIO, "idle\n"); sdio_claim_host(bus->sdiodev->func1); - brcmf_sdio_wd_timer(bus, false); +#ifdef DEBUG + if (!BRCMF_FWCON_ON() || + bus->console_interval == 0) +#endif + brcmf_sdio_wd_timer(bus, false); bus->idlecount = 0; brcmf_sdio_bus_sleep(bus, true, false); sdio_release_host(bus->sdiodev->func1); From patchwork Thu Jun 4 07:18:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11587081 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D70060D for ; Thu, 4 Jun 2020 07:19:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00432206DC for ; Thu, 4 Jun 2020 07:19:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="dYACxgBb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727879AbgFDHTA (ORCPT ); Thu, 4 Jun 2020 03:19:00 -0400 Received: from mail-bn7nam10on2107.outbound.protection.outlook.com ([40.107.92.107]:50472 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726411AbgFDHTA (ORCPT ); Thu, 4 Jun 2020 03:19:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RA+Zx2kmzGTlehEM8LU25ho7CP/tSXnPI1WKXH08WRwMPhXZAFsNI547M3F9LGv5X3tZYbvH4KtpSUl1VziJUohTn1QUnxkOX3hFQY6fFA5CcNzr5CQ9PUK+KXX4MrF+6LnTMUdRwYLD1X5K85FGfuQA14GLOsrqXpwWhxQvka1A66GFoLcKkqSfBQ4Ym4xXBzbbWLeCL+Xqnxk8PImqjy3jGsW5kXqwiqSvcWMkngD3GYeZOoeaOzTk+PqWX+y9Li2z7dq4tIsXX3jhJPYAV5IsiQBlWfQrwD6RUQqiEcxkSmte4hSCaLfqM4Ufqlu/YnS1V+IwlIXBPpiFUcTOQQ== 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=5EEWxLAn4JisYgPe95IvJblyHv1izWVJ9nxhtQRuTKs=; b=hs9xgRCGH0Hy/IieQVcWI68Epxcin5FPphZJ0bSDMc748bwuMzsPkqoWMS2MrbyJTfTRQbBPWWaeXd9LgFDFJT7v8hWWM7pLrzP4FF+odBpV7cvJlgwRW5Hi+Wls2Hfc9ZENiouGqk+2OrpA+ygYZ1r/dY/0KsdCakmpK6nqrF/yoWSaT5XnwC0ntZhq3EFip81B/2gduGLzDUXscu3HLQoIibclI+HqjIOjDj3CTpEOyBfmq8TQj4w1geUytI99jPJ4pPcUh27gUcZDkKaNQ27NVJkahMLWQ7Ulk/g1BSPuPZdAN+gKe6EozCbsFNLTp/BJzEqvGnI1yi0wzZRE7Q== 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=5EEWxLAn4JisYgPe95IvJblyHv1izWVJ9nxhtQRuTKs=; b=dYACxgBbvY0SHCWtCECXwg/7aACliBVM0IplkX0/xXuOZ0Iig9CpTbSJ74RTATSNFqjev3bQmJLtj54+RcJkzFSbSI0Bk03/x2PLDEOsIVmn0JAIS3zyPFLGHE/ybRkMZWZguvv3BpPp7eYR9l3HJ/CNZGrz+frhUiblSYlleiU= 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 DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB5146.namprd06.prod.outlook.com (2603:10b6:5:112::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Thu, 4 Jun 2020 07:18:57 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb%5]) with mapi id 15.20.3066.018; Thu, 4 Jun 2020 07:18:56 +0000 From: Wright Feng To: linux-wireless@vger.kernel.org Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , chi-hsien.lin@cypress.com Subject: [PATCH v2 4/5] brcmfmac: reduce maximum station interface from 2 to 1 in RSDB mode Date: Thu, 4 Jun 2020 02:18:34 -0500 Message-Id: <20200604071835.3842-5-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com> References: <20200604071835.3842-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from iot-wlan-dev-u02.aus.cypress.com (12.110.209.245) by MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Thu, 4 Jun 2020 07:18:55 +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: a6b5ad76-b1a6-4cf8-e714-08d808578b48 X-MS-TrafficTypeDiagnostic: DM6PR06MB5146: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 04244E0DC5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o122OfIu6GC2SdJiPXC0uwwGyDTMeDDJFDXWcx0Rfeqzb+RQzEckqY1JqDqm+34nouj/Z61g72ePQ27Du9b8DO8x27io0WPa2xCJL3qAypD7UHTgMvNBcv4k3D+rIIZIQAzzJ5e49nofFpLE4aD36x68lHV87HTEduiNmrv9wnP7vJsTtf50eZhOiZ0bUB3yfJkR/iAY9UhNPXvOnfKi7oPEJ/4VHPjtKe92eJ70A8SNPKWKHLQ5u6aCCNtApa5vhf6/Qiw09MBUkNkdOkQkfsx1VhV0xaY1pk984RXWWKQC70MSWHIJfWzvOQh4GZbB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR06MB4748.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(39860400002)(346002)(396003)(366004)(136003)(316002)(54906003)(6666004)(26005)(16526019)(186003)(2616005)(52116002)(36756003)(956004)(7696005)(44832011)(1076003)(8936002)(8676002)(83380400001)(107886003)(6916009)(5660300002)(2906002)(4326008)(86362001)(6486002)(478600001)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: NDqOk47HBKW/AbXpM8Uz1f9Jd9ffzy+8wO+yjHtwqh4zeTcs6YA8/Jr82mJ6fdwIofy2LnVl2y6HdJ16A//w+p0QSg3UefiOLzLPzTsYERX8tEunJgSmBAivR745FILcASetYZvbuZnmpjo7kCFlIA7DgGdb+cHACqg2Ptlp7KU8h9FhlCwd/rB1kfqQ0gV/KtFkeUrViH3mdgAyxaJuhC6UFSTFfoAq151lDgvma1c8agAcaD2heuJZegdLnQDSqEq7/3E2fpYMc8Bh17/pXp8nyV+fSPB2jlwyZ5wvkuQ4lJ0hQxrqB5PU3YWqo8LUcmVl58iZ5O7pXKuApTaufXp6eqlaQIMNyK2nSZNT6X/JfvQkftC53DSZmjeyyPuYIltJQgNMCxjVXNd7g5CpZlU6i1FmElz5QbkBS0EZTTQ+t4GqIHQL4Vr29tKmGxGVoT9PrI3YnyjbkIAZnKUBk2Rm68qfnsCoNrzEZD1WcF4ACoA4v+hA6rL8Umxq85bk X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: a6b5ad76-b1a6-4cf8-e714-08d808578b48 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2020 07:18:56.8511 (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: 55SDyfhzlztOhmkh7oWOHyRSqW2rWN1NXgUj0QAGv3xotNM5A7BDRJMz4d56dDRfiNmtRb2OVyAfnm9P4q6jDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB5146 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The firmware state machines are not fully suitable for concurrent station interface support, it may hit unexpected error if we have 2 different SSIDs and the roaming scenarios concurrently. To avoid the bad user-experience if this is not fully validated, we dis-allow user to create two concurrent station interfaces. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 8 ++++---- 1 file changed, 4 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..8c1801fb59e7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -6801,7 +6801,7 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = { * #AP <= 4, matching BI, channels = 1, 4 total * * no p2p and rsdb: - * #STA <= 2, #AP <= 2, channels = 2, 4 total + * #STA <= 1, #AP <= 2, channels = 2, 4 total * * p2p, no mchan, and mbss: * @@ -6816,7 +6816,7 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] = { * #AP <= 4, matching BI, channels = 1, 4 total * * p2p, rsdb, and no mbss: - * #STA <= 2, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 2, AP <= 2, + * #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 2, AP <= 2, * channels = 2, 4 total */ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) @@ -6857,7 +6857,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) goto err; combo[c].num_different_channels = 1 + (rsdb || (p2p && mchan)); - c0_limits[i].max = 1 + rsdb; + c0_limits[i].max = 1; c0_limits[i++].types = BIT(NL80211_IFTYPE_STATION); if (mon_flag) { c0_limits[i].max = 1; @@ -6873,7 +6873,7 @@ static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) if (p2p && rsdb) { c0_limits[i].max = 2; c0_limits[i++].types = BIT(NL80211_IFTYPE_AP); - combo[c].max_interfaces = 5; + combo[c].max_interfaces = 4; } else if (p2p) { combo[c].max_interfaces = i; } else if (rsdb) { From patchwork Thu Jun 4 07:18:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11587083 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9F6560D for ; Thu, 4 Jun 2020 07:19:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B12A92074B for ; Thu, 4 Jun 2020 07:19:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="IBBTh5l0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbgFDHTC (ORCPT ); Thu, 4 Jun 2020 03:19:02 -0400 Received: from mail-mw2nam12on2131.outbound.protection.outlook.com ([40.107.244.131]:62176 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727881AbgFDHTB (ORCPT ); Thu, 4 Jun 2020 03:19:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qugv5kg7iqNoE6PB4neAaidv4BzcpDDqnYPYJ3GST6e7ZYJ52ps8/1CluSQrx7Jj9/g/gfiQ8GhWYP8TkYjDwCWlQHSqL2tFVGhZ/ScbNWyDFA1zbd4nApdj5uFMzSxblvZ4yHiXXqAd7Fvn/BUSrPZmmRowaR6QtLkHggZXjUDewKFpvOkYC8mfy4Sn3bjMWA26wZC3Ioz8vP801itadieXi49YqzqfbNhjONdqAHPp4UDFKnfGKnXH1c50sS7wIggozxdWFf6ok14ffz1M2g37s/jkuJnLYWBQ+CHg0q1fy2DmipTID6Bba8QNnfCw0EeZaLVPGnkW2wFiNpS30A== 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=KXW1dYlIpU3N+IiooStW+231FDUJf74Mcqp8d+lNAiw=; b=GnmnJd+MMgU7YEiZT/e7sp0MnsG2yLLpuww264lxiRi+VKcRBKfsLQ267Sriq+UGUmJpqr/VSsjQrQJtmlqyyFZSzD9hE7worgvz3PtgFR454CLDEAedC8GHxXctKtOS1mL7xglHHU1cHHQJG2Z8lLFA5DB3Oi6lbXDI86rp9jEff3H7tYe3UucxfkMhfJ4U8pmvFPeWs42vft0h/62bgCUXfYW9SdSkvDV3Dq/DYW/yNPuf5dlt4qUwAxISvrusZcc97hlAU5TOlXtOgwCfklVdUnBZDVVI6aQJNP2OfHwNhRqZB3sG8U4x0vHKp+GVnaz+nTln8Cg86w0/KvA1jQ== 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=KXW1dYlIpU3N+IiooStW+231FDUJf74Mcqp8d+lNAiw=; b=IBBTh5l0HRiAPDiiJbQavXud1c7c8/BTtwSOOcs+xTpJwEOhxnYlWDSyhohSuhmQoRdg1s0HIFOJRDQgXGd2xUpM1Dy6FDCsAY/uOZaRkvPpYw1zFohZadIlo/voq8QM2UGjFCXAm4rgmWn2T/Hpg2gmSbGT8w39C/oGFO4GIkk= 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 DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB5146.namprd06.prod.outlook.com (2603:10b6:5:112::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.19; Thu, 4 Jun 2020 07:18:59 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::9f0:c02f:7b54:51eb%5]) with mapi id 15.20.3066.018; Thu, 4 Jun 2020 07:18:59 +0000 From: Wright Feng To: linux-wireless@vger.kernel.org Cc: wright.feng@cypress.com, brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com, Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , chi-hsien.lin@cypress.com, Prasanna Kerekoppa Subject: [PATCH v2 5/5] brcmfmac: To fix Bss Info flag definition Bug Date: Thu, 4 Jun 2020 02:18:35 -0500 Message-Id: <20200604071835.3842-6-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200604071835.3842-1-wright.feng@cypress.com> References: <20200604071835.3842-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from iot-wlan-dev-u02.aus.cypress.com (12.110.209.245) by MN2PR01CA0049.prod.exchangelabs.com (2603:10b6:208:23f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3066.18 via Frontend Transport; Thu, 4 Jun 2020 07:18:58 +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: 739377bd-5981-4c9d-3e6f-08d808578cb2 X-MS-TrafficTypeDiagnostic: DM6PR06MB5146: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 04244E0DC5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u82YQwIIh9y3VKosaGpbH082mbP2UzXoMio8TLZsiNfO40u8MlDoiWamDQH4im5h8VZCjjGog8kBHl6FENE2ZK6w5Lax7MMG62SSO3f7p3Z5qj4KXV87gxYH/BXvPNDs+2syKi7GOh3n6u0oerVqBGlc3ti7Nt4iORlVEZZoURg5ta0rBtLCeBBva0KQ2faIiOuWXMWBSLM81j5KQWrA/tQ5l4TVZPMR9cGBrcmXPqDTtrOWp94HKbNEp4bToHgB0EJ/1wfbghQwPQXc/F3ozihaN9cohhkWDTVXQ+xPEZ11N8kax1DHqqjkJrMh4QPG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR06MB4748.namprd06.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(376002)(39860400002)(346002)(396003)(366004)(136003)(316002)(54906003)(6666004)(26005)(16526019)(186003)(2616005)(52116002)(36756003)(956004)(7696005)(44832011)(1076003)(8936002)(8676002)(83380400001)(107886003)(6916009)(5660300002)(2906002)(4326008)(86362001)(6486002)(478600001)(66476007)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: 3XDnTAKQSmEyXITCIFvI+3Vpg6FB2kJ2rxKCQq5QZqS1UZ0SA4bZjpklrCC2lWpbUlN5EkkiyPTdw+OOX5AqLnZ4C03+AuLT7yKBRfTkob7ovFBm2GgbiECO1CjLXs0aEskzMuV7n49DF6yFXu4dPLwnVBem9nRmGlkhasEFw3P9KAWCsPeRlZlSn08M0tMkmuskuxNgz9SfYKTpwAC8B7tZJNYqHnHuIh9yK8O9H61lPSU/nMFzBGBFNgL4kU8b4GpP8CzeufVcgSDtLzNBHz6cRD8lYJ9SmMaU/gIy+F5DKEuyJ9lXvVKqUmtGb36rCjMUnDafLgFKUWAWq4CIExVVj7I62A0wJZpKnctmbGHIlAQQx5RU53DHYRNpELNYiE1+qCdezypN6VFVP+1wWtyU98L7E52DOXq9Iuz9VKXcsg+55xJx056VyvKQIBhpeivZgc4zIuFMyY2Ykaj0KvcRmCFiotmLvVtpq9ocNGo9XGWLvo7nG+UfjDjtT8GB X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 739377bd-5981-4c9d-3e6f-08d808578cb2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2020 07:18:59.2461 (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: wmpKzmga9OWE7tbL08x1RNMLzD4bbSnqHwKAC0WqPbL/xowaL6dWGgV4jM3mgL+aeEi8r9fz/glSU0Iqp8m8pQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB5146 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Prasanna Kerekoppa Bss info flag definition need to be fixed from 0x2 to 0x4 This flag is for rssi info received on channel. All Firmware branches defined as 0x4 and this is bug in brcmfmac. Signed-off-by: Prasanna Kerekoppa Signed-off-by: Chi-hsien Lin Signed-off-by: Wright Feng --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h index de0ef1b545c4..2e31cc10c195 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil_types.h @@ -19,7 +19,7 @@ #define BRCMF_ARP_OL_PEER_AUTO_REPLY 0x00000008 #define BRCMF_BSS_INFO_VERSION 109 /* curr ver of brcmf_bss_info_le struct */ -#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0002 +#define BRCMF_BSS_RSSI_ON_CHANNEL 0x0004 #define BRCMF_STA_BRCM 0x00000001 /* Running a Broadcom driver */ #define BRCMF_STA_WME 0x00000002 /* WMM association */