From patchwork Mon Jun 1 07:19:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11581541 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 769F8139A for ; Mon, 1 Jun 2020 07:20:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 592232076B for ; Mon, 1 Jun 2020 07:20:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="GtaF6ZUv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727779AbgFAHUw (ORCPT ); Mon, 1 Jun 2020 03:20:52 -0400 Received: from mail-bn8nam11on2127.outbound.protection.outlook.com ([40.107.236.127]:32224 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726145AbgFAHUv (ORCPT ); Mon, 1 Jun 2020 03:20:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bmX3Kq74FOBN37r9C4P5nNHFaOIjI8QIeLo+6Zpa9bOrZuWG0XZHxwtv1vdKf6PePTeBtaODl5HD8HqYQf3XlWL9PUQzW8zb6u7Tyh3HQ3JF2ZP7hARvpyXeN1zbSUoLR9k/1cQy+c254iCjLIRxYkiREft0uphmgHZmVuYcf6PSWsRim4RpkL2Ofl1q+P09ztJ9EDCOXY0xxACXz4/NE7oXoMzfFUOZ6j+bJBsC8WNtxHVQB3Ui8Prh2NUAz83eNS5t2B89LNtrQObWujqmE6npiXIxQk9OXHSWtUIDdby37crDr4GpdVOFCu+bGzj1EI8rj65VmT1149UdHU5Vhw== 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=rVgVCiwGe2QdObhm3/mt8qh8vx7zfJ83c8PjuBOSLLA=; b=N/TPuWAlbxc1q4EA4TA+6YAAvxQqtcy7NBP2dqGl8x/6rtOxjSl0LuSkBOrg/DHHi9w1yOFRh3l8mOTKDeHeK33uDWHmytZDnuNbvoMNmPT2KOUDDW067CY4EXXFeJl/BLn1d565YYRqNFzYU+K18nDKzzW5a3hlCrU5746hl0p8alOnyTO3xmj8RFlR0JxclTpGzTy/4E6SbkGHujucyIHy3A19QNGfx2tzKEXagm181XXdnEQu9tv7npb+//HVo9qi7q4zx4QiZCguknmf3OFkkB7DgzSLMOT/1jgvXEaFhJVQD5G09LNuPQAxjYZccQzzBwTqi2FEPf06+FShvw== 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=rVgVCiwGe2QdObhm3/mt8qh8vx7zfJ83c8PjuBOSLLA=; b=GtaF6ZUvLI1VbJe74bRR1ye+8F5VPlbOAu3o+8XqTAuL6ZZBZZaR9XEUXLPDgdGpaVFSmM37dIENvWT9uASYhiJXnIgjjTqtuENRyCrm7wRRb1ifLPwMZaIozkUyWh60sCBwK5l9ohWaoK8C1m2OkyrwL2hsepeVe0ZycjiiwK8= 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 DM6PR06MB6074.namprd06.prod.outlook.com (2603:10b6:5:10f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 07:20:49 +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.3045.018; Mon, 1 Jun 2020 07:20:49 +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 1/5] brcmfmac: To fix kernel crash on out of boundary access Date: Mon, 1 Jun 2020 02:19:49 -0500 Message-Id: <20200601071953.23252-2-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200601071953.23252-1-wright.feng@cypress.com> References: <20200601071953.23252-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) 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 MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3045.21 via Frontend Transport; Mon, 1 Jun 2020 07:20:48 +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: 731c1a6e-d9bb-4c9e-161d-08d805fc4f1f X-MS-TrafficTypeDiagnostic: DM6PR06MB6074: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jnsQAFySTwwi8OCKDsDzruqbFd5zrIWyQ4cOAhbiLo+aepEBj6AKWIirbsCE04Gy68JlIVTbYQewInwjMqII99PW8NMnbhwERa/B0KXcVryAa96NZAnUUnATU6i9eFn3RMQD/Cza4wwk6MU4Blq3ybY4g7kT0mgXBxYkJoy13eJyzqvs1GNyFRZ4J3zLH/pNzxQoTT/cYBlS31t327eTkLI9BfJPIVKYwoc3SBuFa3GzQ1hdnig8eDvUpzbVN/SwG3mjopnoEm+0rP4+sWG/GOM8bcqUW3rTvcTZJhgYtTxWQc4O/ixvdurVs4JdiNVHv/NPQheLBnl8qt1Axeoi2g== 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:(396003)(366004)(136003)(346002)(39860400002)(376002)(107886003)(6486002)(83380400001)(66476007)(66556008)(66946007)(4326008)(316002)(54906003)(8676002)(8936002)(36756003)(7696005)(52116002)(5660300002)(6916009)(44832011)(186003)(16526019)(478600001)(86362001)(2616005)(26005)(1076003)(956004)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: hnQxL+fQrlSoFYpCWNnnW5kps0kuPSOTYb0qlFeePP97BhBP5Yi6LxHsneze6XBIY3004HLTooqnx8jOyebnqi50XEoc5X2M4Bb8bYCNvB7luuD/wgtDQVaSTST+Ns+f59PPSlPUNDmC9vuE4MPHs1s+01/eS9fc6u2samxJm6xvWt43lmXZRs0A4cTkWpJ6z1V0Qmiw8ptZHLYYzi7A8JsckYgSmvPyve6CJoLfYU5PeZUUy6UPzrOxogt/37dF7lQlVVj3waLYoyDOV/1SOHUc57v0ag61ejpjC43pjMBJ+JqBC5JoY3iqGOfi3N4baI0Zs7galxYnVk6Y3qAonJeKv2znQF+S+Njl38n3jaqM5m2AZO+Lsy5OHHqrvRML7szdBJAjyl+2vt+mtSBOx/GqnR0nDX9rYs2ff+b0Ny3pulVcnCgbjOqgskhLBGEBQeWmBThWToCs1cHzY0cdlI4/fX5J2SBErEE91kj4zFNu1/bHgd4MogYkGjdOY/9U X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 731c1a6e-d9bb-4c9e-161d-08d805fc4f1f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 07:20:49.4447 (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: Zrin8LAbfMogFGJbbNc3zuvRJZFBVv6qcVGO8t065+8E60hKdfvhnowI5kf2OYzYQ0EZeeXlXMzvyvvqcz1ZRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB6074 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Raveendran Somu To trunkcate the addtional bytes, if extra bytes 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 --- 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 Mon Jun 1 07:19:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11581543 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 6245A13B6 for ; Mon, 1 Jun 2020 07:20:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 48694206C3 for ; Mon, 1 Jun 2020 07:20:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="ofztFMlQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgFAHUz (ORCPT ); Mon, 1 Jun 2020 03:20:55 -0400 Received: from mail-bn8nam11on2111.outbound.protection.outlook.com ([40.107.236.111]:48577 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727828AbgFAHUz (ORCPT ); Mon, 1 Jun 2020 03:20:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a6w3gmQuN5WE9d9of50gJEjkecxOQ9vIO/zAqvmFIZ5uGEA9O+kqaEsxwfJBsJQvStMWce22hnmuJ/L3Fnw3Jz1XvZaOqFTeVSnd3zx82nqOjRjOwrVY2CW00YW9PrKUzz4yhHvaIkV6M2SHKsiQ/ZwKlbnVo4X2+PYihAFGFrd/0i6biH5P7uWnrRLbzNHuVVQbs53ObAsDr4FW4YHpn9xHU4mthMA+q8r8qq+y9fhLce90W2S31DXzrLfNGMK3LPyWO4vXUctjzdf3SXs/SBbahEg0IgOPNxWi9N1VrQWePKX3g1Q9PpD7EVqiAGqu4xnDgPdJRUypM57Ayl6tGQ== 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=dNrP6AUVLo8moojQgM0qRxJpcgEtsDhnxfjfijiqpEY=; b=oQBR0yeCtiYvaGsllxkJJzivq0w7qp2oKf3qT4OOlXciXMwIB2SxUqR+UnFPfMSz+ipKKTVvnSicyadJr5Me3nKxa2DCDvHPCR6h3Conbi8Q8B3CHEcAc4ETXmWK02N/c2WM4CBKDYCm9BWFcCGHRg1C4ccepcVFe7CQLSiiW5He6bugfSgtdqn0WOmNKx1n2Joq5LnPkn4Essng/6F5V0eF5e6Z+QEtUEOtuCqQZSTDQC3Xr5Wtfl0xPn0Cznr/OriFe03O/c7NdTWHL/Rtq6TWbXTT4XgwQbJ8D2wyeAITc7xG1RzKgsF+TtHU5TIxYm5uUeXNZAZcV2modsLShA== 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=dNrP6AUVLo8moojQgM0qRxJpcgEtsDhnxfjfijiqpEY=; b=ofztFMlQC/+SOYGbkAvjnc+oY3Ro3JAVQLR7cXstS24cfzYgOe0aIsqRGqHNEEa6YhkK+umCwC/Z/KFRF0JeGbc5gjfrt1syH4GIt5W1F4ASJLM1zHqIphbJWkEKGFIkZN/b5QEAAWbGT5cxeW/ogx6Bp5qTt/O8SfCkB1Qyy48= 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 DM6PR06MB6074.namprd06.prod.outlook.com (2603:10b6:5:10f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 07:20: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.3045.018; Mon, 1 Jun 2020 07:20:51 +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 2/5] brcmfmac: fix invliad permanent MAC address in wiphy Date: Mon, 1 Jun 2020 02:19:50 -0500 Message-Id: <20200601071953.23252-3-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200601071953.23252-1-wright.feng@cypress.com> References: <20200601071953.23252-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) 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 MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3045.21 via Frontend Transport; Mon, 1 Jun 2020 07:20:50 +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: d69385c3-2d39-413e-beed-08d805fc5090 X-MS-TrafficTypeDiagnostic: DM6PR06MB6074: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6AFevSvUNC9E4CanBnByN0UQJ4nw53H3S9eh2bVSDzV97pcmTjaSuRGX0DGq0raZAnMmWl7k22dfA4L3KXecgtr219D+a5PS3vaUj36Ne7qG7IrBvo1tx6hSABbfjs354WG9EDprWFXWKWn5GAEZdUn3NcN5suEkj+ZKaNNGedioK/FYCKYuRdLFBuWdBat30tmoHnIiTJchDZutHWA6kcQp4ZebLOGmzFMc/u2jl6H6mD9NVOQQ4wvIMqSIl3RkYDa5Vo+dWQGK0CPufdTE41v6HH0CfqZsVyzvg55O81LD/uWgkpkq9maU+ciZrHYD 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:(396003)(366004)(136003)(346002)(39860400002)(376002)(107886003)(6486002)(83380400001)(66476007)(66556008)(66946007)(4326008)(316002)(54906003)(8676002)(8936002)(36756003)(7696005)(52116002)(5660300002)(6916009)(44832011)(186003)(16526019)(478600001)(86362001)(2616005)(26005)(1076003)(956004)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: fWr3E97gn109+zBuutU7FMWo+/GRrwcxkXO4PjIZj+gWNwMcm9Zz1EAHbvJ7j2T2ZAozfq0upFQacSAXCV0xwsj8n2qDpEkFBR+G1qp4X4fK0m5hHfOvL6pVrUBys9gZq8xMbPcjudDfJTbE4Gh/YmHD6DaiYmgc8Gm2irzC8btSAVpiYJf+lSlPbDcLht5VLNYtV/EJkkvJ6DSA9KvT+uI7qpdPwjWT9lS5J6sq2NlUt9Q6VNMvNsjrLvvojGNqbxKEAlGcWv7XPtn2NDZW/NPh8D65BOs77VmGASyt2pEX6HfEPfy4K0qjfMEIWo4OQoifDbPc4yBzbaDduZb3RtiyCcfz3QYPFgE51y6kcP3/Ne0BxOYP0CjGlc8IDuoqmgr9gbjIX8uch2YUcNXE0JHWZeuTh2jTcNB5ikLwmo5PvX0KKXFWhDQLf7BB4vMuJ2feMQN44UpiHlnYI0f+g1S3cK2/LvYOGnwfd5DoxrSDz2SavryvsH1ELB92jzS+ X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: d69385c3-2d39-413e-beed-08d805fc5090 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 07:20:51.8533 (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: QByFnSex8ypNewdnsY5aM6GbMiqBOddGc2SP/gO+tFKvv3DhEQFc4gbHgC+5ACULqGDWxkvAbTtfEqveLK2owg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB6074 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 --- 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 Mon Jun 1 07:19:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11581545 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 A1EB3139A for ; Mon, 1 Jun 2020 07:20:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82F0D206C3 for ; Mon, 1 Jun 2020 07:20:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="OUE17tgk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727863AbgFAHU5 (ORCPT ); Mon, 1 Jun 2020 03:20:57 -0400 Received: from mail-bn8nam11on2111.outbound.protection.outlook.com ([40.107.236.111]:48577 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726145AbgFAHU5 (ORCPT ); Mon, 1 Jun 2020 03:20:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cp1n6k//K1O8e3uTFfG5IKzwkPdzaoTpAehE5TQwLg2Kaa69aym+4+8W6PnumSes+c+yM4ufvZGaYAMoRbCIz/qF3pfzFC1cUnecz1IuhWme0gbS5BBEx9MFV1jTDbmwboK1O+G3XkZ/h5FT+LdQu5CsEAPTXV0z+uIt7WooXhgbkHXT/8+yarqw7a3yySnAS4UXizU/OQ2PKFWw3DrI9CBf21ZQKtXjRLy45vvSIAOD/PRn5TKshCpB3rrFXjjBqjdJqs9ouvPRlDbuzZEitOdpOfuFjOAclxZdX08JShbeg2nF6u75w+YfnANpD02+m+R03o7d6Lv4PIp0zeG+Kg== 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=IFBSixPBVZPNNARnhRB6Y/GJXhz8jYvX9ZJoGFwXRKBZfRg0zWB9DHwcJ2PKPUkrbkv3KhoDRl1POKVebWQF3A8A1nAycNuBNCudUwOcAJmuN27iCWOheRmYKnwwgOoTlNO39TnxQbqDtYaknLGzk6nk4ObwoHnJu89RQFV3Uwlbgds8ICOKp76cLtpP8vGIUvQK4DCmhLoSKG67+TtQ74rb/POaFTNW1N3tC/GIXOvGJctjoA0zgMJtjZwx6I1572JBnsxLZQ8UfPNE//tqq9fZ5ygmFtY74xsP2cFoCjq1TDaBrpYrBIoQwvTiBhM4PQHJO7jD/TPfNXafS3Cdcw== 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=OUE17tgkEXIt33FAQaZBfKikLbZJ1hxa2EqIhAgP3FKXYVybr5yRnON4Z6Ct2T//yVu7YhjXlYShaDNDEy8gVGfMNXQwJAAkY4xLvvsLQmaecz/gRAIhTvFw2wLIjrzRS2a9x25UxJjTZ7tDsnTdsHWPEXoQJorH2VZfriZKKVs= 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 DM6PR06MB6074.namprd06.prod.outlook.com (2603:10b6:5:10f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 07:20: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.3045.018; Mon, 1 Jun 2020 07:20: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 3/5] brcmfmac: keep SDIO watchdog running when console_interval is non-zero Date: Mon, 1 Jun 2020 02:19:51 -0500 Message-Id: <20200601071953.23252-4-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200601071953.23252-1-wright.feng@cypress.com> References: <20200601071953.23252-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) 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 MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3045.21 via Frontend Transport; Mon, 1 Jun 2020 07:20:52 +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: d4f48885-721b-42a4-e7be-08d805fc51e3 X-MS-TrafficTypeDiagnostic: DM6PR06MB6074: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UWNLaySN85fTP2gmzvuVG41XFw/0xnxFU+ht/q07uYFauZWFys+0hGfp5LxSZSVf9Jl0yBbjfWj8teG4SMBYHjLIfO7q/NRqeHeK+12e5IBVZXwVbp7WE8Zp1G8KBHQaD8BNB++3QEox62qZg/gNtUCvEShmr6Z2BezdyYMLXstedr1qlHV8RkS/Vr/REYxizLtmwKlH52gFfc8ZIfhoRTF86Cj7xy4YU1exlEQ/7gq+sJxZ3UFS+YkaiJX/3ZTMUi+mhiMC/zGSYDxcwFK7LQ7FdIwD0Cpp44rcT346JEkU3t9E/nhqp/FIMfMXyRMeuEN2Ye3YevqF1T/FKciIKw== 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:(396003)(366004)(136003)(346002)(39860400002)(376002)(107886003)(6486002)(83380400001)(66476007)(66556008)(66946007)(4326008)(316002)(54906003)(8676002)(8936002)(36756003)(7696005)(52116002)(5660300002)(6916009)(44832011)(186003)(16526019)(478600001)(86362001)(2616005)(26005)(1076003)(956004)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: hy2+2A+wgWedaSBsFfL1Fwi6JBVCgYwqqXdEvmHBCtp+/HF8ya5VOqtdY6kP1lrNZOYN9Q+oCUXW6iOSEE5Es+bnnBAtCut69rpoCKr+0fi3s7Z+aG66bBUVbOCbCn9U2wOqsygJKetzJfrRXASkrCMEx+HvpDvyqaOVhDD68VBsYGtRjXxjpAR6k9kBzxXlAqQF2JlmhiIpOhArm0VOukPoAdvSaWWNlPPoHh/Lr6BMxt3ZrsHXIkNTT37BIl7+CR1cDLP07nawack5oShZtnvG6x6E0B1XIJyiy5NMiRztntJYKNxJH/XeR6emKMoS7hVrnoGaUdfRcvFpk0XzzqUc9EnW2Szm1TrvcjADKIMHJaXyZhg6qZtw51yArnbQVVXQhtlmJEfJg9riosMVH2W2k4zs40G2Rr7LIrJaJNbT19NI6zkZ2jXbrYrjhVQsIwtKf6x+UuO63atTsFezTgrvocRu02i+CJvE0LijcKlhT+o3WpDnjTQt0NBevpw8 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4f48885-721b-42a4-e7be-08d805fc51e3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 07:20:54.0810 (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: g1br+Ae3UhZvFjkxBdkKernengCTtgAutzTw4ftt5JagC5zF4dbakr+UxAn3tvPAsjhqUFGR9nAHSbfTlMs/dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB6074 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 Mon Jun 1 07:19:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11581547 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 CCF7513B6 for ; Mon, 1 Jun 2020 07:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF35D206C3 for ; Mon, 1 Jun 2020 07:21:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="RSZrUiU2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbgFAHVA (ORCPT ); Mon, 1 Jun 2020 03:21:00 -0400 Received: from mail-bn8nam11on2111.outbound.protection.outlook.com ([40.107.236.111]:48577 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727826AbgFAHU7 (ORCPT ); Mon, 1 Jun 2020 03:20:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SajcKI5+WUEgjF38jtEulj6AQgLc3WNznVkAqak/BM+UkX5l5Nse9kxO7J5FYYpfC5znEw1h61vvaqmUbMVsqYxnhdCXqHsOLFJRufAYxzYiV9bLJw9ghYlIwK4N2lejZ42JHcx3Ng5fcVIjk3/j87oq92qI6vSsvhjcHJqDyDVCAS0O+o+Yr9GMT6ZsXIRNzzMnBwSc1X1GzTLZA2oCB97ax4/ZDlsfNy1tPoXp0zQEFRYfsmFryf2tiSAJpmiwjsV8lcrzgP+Nb3GXw0X5nI99pAU5nHD0qWe4K+nZiiRflXALxjZln0cETpRwZVVO8D1PnaxG8y5YVE39SdRhyg== 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=iYplFLroO+8D/z8R5jkFTQ11ezrGAtLQ3vspBDigr+PAAahyK2KcWQagZm9Ri/WinsWPTTRGI/W4VdJ19fZWI4RWBUEVwft8ShZ0MS31VYtG9iT8314O8kgK4ZdAy9qasKFXskqPGHGrG+A3IYTymya4pqNtf3XGwbE5WsEQq/PFVfnH0vHEwVGe2r5KvRBvCPF4YwFyNBJnILN6wqdjx4IjTpOvlMxFPuxCFt/wK8o/kZ8IetHA1sMn3L+Ztg7i3aVDTRPFo/j3OZbpTeHb6Kp2S0YlJf7JfTZQent3ZYXGM6QUY6YLjYNuf2d/kGMHsgxWdpFNF73HtSQxONVlLg== 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=RSZrUiU22c8RMt7/y0GnYq/1eH371FsJvNDqJkCXdEIjXyWJ2cNuKKu6qcX6yGWekJzHpUoEPDo36jbGSg/T7fzYE7IKx2TxsT7e6iNg4pBrahGeK298c5D519bwLXot8a2jxSK5iFYuH7gyGbm/hSclR30RpTPOZ3GAsSunAmA= 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 DM6PR06MB6074.namprd06.prod.outlook.com (2603:10b6:5:10f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 07:20:56 +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.3045.018; Mon, 1 Jun 2020 07:20: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 4/5] brcmfmac: reduce maximum station interface from 2 to 1 in RSDB mode Date: Mon, 1 Jun 2020 02:19:52 -0500 Message-Id: <20200601071953.23252-5-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200601071953.23252-1-wright.feng@cypress.com> References: <20200601071953.23252-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) 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 MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3045.21 via Frontend Transport; Mon, 1 Jun 2020 07:20: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: bd01fe6f-e589-4bf4-38e5-08d805fc5325 X-MS-TrafficTypeDiagnostic: DM6PR06MB6074: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c19BgR5V+GewOBuFIPvVGrKZquODkmNVqrVdvexGORTMQj3+MAQfpEyXDrDKyaMPYFUoOHzNFWtR2b5llVo7BVkS7M+Cfwrp+/qnGvSj0pvsCxJv+r1wCpxqt79QwHrHZkGQ1coiUpD763V4SRemeQP9Ryw3yTBD696wVa3B8C6gDHaAPN6+rl5jPrboEN2TEDmDME5b6IisuOqdNBO2BMIZtSTUB3I92DcTCu2CzXzHvBfP2BdEQizkp+0bEp4RCcgz/JF4F34kxFvx6buBXvL5XtnPu1i++RVIjnEq+qtsV/Z0edDZyChSJLpMBt8f 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:(396003)(366004)(136003)(346002)(39860400002)(376002)(107886003)(6486002)(83380400001)(6666004)(66476007)(66556008)(66946007)(4326008)(316002)(54906003)(8676002)(8936002)(36756003)(7696005)(52116002)(5660300002)(6916009)(44832011)(186003)(16526019)(478600001)(86362001)(2616005)(26005)(1076003)(956004)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: lZWicxpFZpn4kG/pjyQp/6OsLAYzYKtTVvbj7FqTDmnH/0ZZIr7hUlUAl19AMMuOcailCHmFcqfXa4Lvi9PNofuYAAPyjW/cTwsOIPkrdWUXu7KCS7jisCAcAWfD1xRcmr4uj5f2FC1jXMkqPs6Pp80jTi256uTVHE+MhwG0t79bBEIVHPYS7JOFYOLdKqUvzHxpfrH6Qwo4oSl328RKWcewG2BKsE/LGUugGSkkSnMfo1tOezZGUAeyetifPPe2IxDW/2iCgQP5TGyGii/5m7eo0t6zxlxriAYCZNWFMXuWRpLCcur6vLfAEHIaO2o8Obv/jL28+OupeAm29F5vnNu9LBxsZUrRd1UsmutQwk6KS5DjhJc23kPUaixvlv1+cw627ML9P4Xz0fNGSNN5yIPM65WACXxU4RqFltzNXQ0gzdEMFNcL+VfWRl816wTVPL0xbvlG7eigSgxdDuLpRdEFJlxx7aLO7K7cbs/0CIVqjRZzBucBsb5oxQw4qd+E X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd01fe6f-e589-4bf4-38e5-08d805fc5325 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 07:20:56.1538 (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: Uh2FipZG+exbTwaD/sDADvVVLEm90ubDnE7cIpsA4FY3ykZYOojSASN/RZX3FtK1MJp+kfyBSMTkugz2izek4w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB6074 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 Mon Jun 1 07:19:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11581549 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 1E9E913B6 for ; Mon, 1 Jun 2020 07:21:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 035E2206C3 for ; Mon, 1 Jun 2020 07:21:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="XiQGl4NU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727953AbgFAHVC (ORCPT ); Mon, 1 Jun 2020 03:21:02 -0400 Received: from mail-bn8nam11on2111.outbound.protection.outlook.com ([40.107.236.111]:48577 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726145AbgFAHVB (ORCPT ); Mon, 1 Jun 2020 03:21:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=daNbPrstdoJh7QCnWd4gAKELVFRiGO+BeEvUL++cP/2uG9MgUxZ9I8AZkb7weddaDC9A8m3XZnveqgrIM+DEUsoLwRX6eYEZd0zhpWFpn5PeAG61riff0NYlillXhWbU+MR87BcB/rV9E2xOEJFm2i6x2weHmJJyq+Xumn8J1yXOClKkOB5PYXloXOjKjGDHCX27t7kl+UCT47ta5x2NTUj+hUZYcXeZ3lx6lbSPgZZV2bCiDtl2O6dydw+s1VgrGxiyMpr58epczzxKWYb18BlTiLc1YB5nYMe+oRSom9QvxCLdIzIZ8mbfJCQnaSd1lsJf/e7XC17bSvyO7QjW0A== 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=BUMxYM29r4d57o7LIXsnVa5nRP/ZyrfiHjEr95luMsu1D/D+HZj7nKb358MZh5fA/urhAgUoZ80276DENnFqfCqBp6SPSQlu+RsdcFZ3hRfeP20JMAqWZCz81l0iIyMPVufzQdCj32lmldVfGYGvX1B76WtgmQJRbbTIyQ1pMLyxs1p8RnPbpuztXOC72vCqVTRO5FB+Wc+1PgY/rcNNizLz4Lt45e6xMnE7LRSX3i5TOL49/o2KVqPQ99NA+w8BC0N0FI5VIALLDJiJN5mpNrzDb/R3axP9z+KsHlOl+X76FmE2NBBsYdKZ1bw3SEtlhz434p66oRmdgbSE3FmJGg== 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=XiQGl4NU4RTc4KCrPa4xpd2NSObhT6Vk/RdjzwFTHX+XrdKT5aN1wEahdR5W9jxjKH4uiu6OxHDL882ZrSiwLhHRZfBlmEIK0vKz68Khsf5qiGd5nXbBtzZUvbAqz8XHzo9e8/raJ9OW7FhOAek0n1DA0A3smejL4wK1HMk+sXQ= 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 DM6PR06MB6074.namprd06.prod.outlook.com (2603:10b6:5:10f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17; Mon, 1 Jun 2020 07:20:58 +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.3045.018; Mon, 1 Jun 2020 07:20:58 +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 5/5] brcmfmac: To fix Bss Info flag definition Bug Date: Mon, 1 Jun 2020 02:19:53 -0500 Message-Id: <20200601071953.23252-6-wright.feng@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200601071953.23252-1-wright.feng@cypress.com> References: <20200601071953.23252-1-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) 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 MN2PR15CA0048.namprd15.prod.outlook.com (2603:10b6:208:237::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3045.21 via Frontend Transport; Mon, 1 Jun 2020 07:20:57 +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: 9d66dce3-b9c6-4d30-177b-08d805fc547f X-MS-TrafficTypeDiagnostic: DM6PR06MB6074: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0421BF7135 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RziA3AdpsgVkooRie4Ja7oMEMgO6DPDeb6V+TchvFYjdg7TAUeyjo+Y5ABb+K8jN2n3TCVMon2OlM7Gs/LIXMghy9o+Fkfy31wz8RztblrH8XD2HX+/EfbZaSunOm1UMWH50z02VDsyLNfscLvezKmiaeOn5t6wRtIPlUJyUTDGx/jW0Osq8UNo7OR8oyLakZKC2RD5Ov8oiMx1OeTpuMKJDkL0FJq6aUYF8mA4XvWBQ5hQNVEedwOeeDTf3kYMnDFIv+QIJGRr4iN1Gvg4z17L9py/xSh95x4rfjt5ytMI/t9Kzq0QBC0UMWBobsjVU 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:(396003)(366004)(136003)(346002)(39860400002)(376002)(107886003)(6486002)(83380400001)(6666004)(66476007)(66556008)(66946007)(4326008)(316002)(54906003)(8676002)(8936002)(36756003)(7696005)(52116002)(5660300002)(6916009)(44832011)(186003)(16526019)(478600001)(86362001)(2616005)(26005)(1076003)(956004)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: AoBg2niJQ/35zAAN3TRO8+9eDxHi37ie8N7w+7WXuL/M1AwJ6UQ1G/E9Cm23+YnBPUgUZE0nABUrwU1QvD8PhOnlgwJIVX0lTbxjUm2v3XNmW1uDfXJZg3Ms+kjbxfuJgUq8LIJkCyYCfrJIKxBPw9w9jZxxSjm36bIIumvS+Th0tR521dpDvi62xag4geJdsHmXFl3ZDLLwHqxhZ8tcTz/rduYqTUJXPl4ce8+javujxu3dcS+QeTAG3Lraq9bemPjHjzl+lAd0StaeUWkjES412fVZFm0QoUcSM3QK8FqRofejoZeYx1IsLtT/FQwfb86Z7CHTbzvnScJ8JRqwoBmgbwpPOT2khfG0DQcnaRy8UsXjUfTn4HVfM6rtwk7sNDaEzeO42FIf60FyaCLVR4yp8iJAWBV7DDy/uPg5vKMbh4UW1T5vyV7foawSCTb703YBK66Y6cv8HFSI156i6T0tMP/vnHchljKZ+bKXvwyLVv5HTgQuDT+PuwTXe0/0 X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d66dce3-b9c6-4d30-177b-08d805fc547f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2020 07:20:58.4245 (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: 1i96WoVA/7Vfw86eVR8r4XNhyVt5MKNCBWsA/ukBwjjQu1hHkHXwcpW/RH4Rg3F6oL41XuQ+MufuS5W8U0B9QQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB6074 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 */