From patchwork Thu Jun 18 16:07:37 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: 11612797 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 20C2A912 for ; Thu, 18 Jun 2020 16:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 03A9F20888 for ; Thu, 18 Jun 2020 16:08:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="UD84f3t4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731921AbgFRQIC (ORCPT ); Thu, 18 Jun 2020 12:08:02 -0400 Received: from mail-eopbgr760112.outbound.protection.outlook.com ([40.107.76.112]:7750 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731674AbgFRQIA (ORCPT ); Thu, 18 Jun 2020 12:08:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gx0RSXJqWfQH0Zt8AkB1JkMfDq3B5T/PuUXCa6YzYULMNBxytJUPjpvF+MrGRcw83mSfmxHg6oT7aAi4P86Sa98z3uF+P5BvSJi6JnYwrHVLNgtVRTOaz0tsvlAiuqv3gKdxPU8X0JhLbHN1gwxu16rrkTL6C0BEol1YjuJ/hXaxqPKVBWVDFAOeVSxYZLTBLWggudU/XPgrwjfUzGilVIcEJCakbmomlC6Mjj+UW0Wkdi2GOa8SzOEN905qUHEiHSETgYPYZFi076n6c7fOutrPFOCMiq9dv7dKDnEmGlm22ptdnSP/E3YBa6p2bpctnapj9kEUkkHhv1tv8Hg6mg== 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=BMmeJhq8cVm18APXEJqjyDDjf/ynFwRURp3iakrr+nI=; b=bNyvlyMa+Q6hi4LpDrexYdXZ3QwXHHxecwQGlY5zU/bMjBqX7Uzim4YmMNiaRb0HooHUQNwXqxwAc/5LKzJpzvDv7ntpQJm0VpLwaxpH890XdW469jIrEt5SPYrSjevKRqUOBLX/lafLW47p9cWDUu9/7M2LJXeSn5zyfUZ3ymwht9AcESicIeIy+Jyl1gn8v0R2DRTyz8I8pmZr70RY4cGjZi2r/ThTmzVwn7aprgALYp5hYZ/hVrT+CA7ZiEo041PnHxfhSiwtDTzRTU3gH97xHDsIF0nq1VfTrqmj2FSgb2RkdLlMsPizD82WrBVI9U3UaOqaJAXbRmmUFwcs/A== 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=BMmeJhq8cVm18APXEJqjyDDjf/ynFwRURp3iakrr+nI=; b=UD84f3t4M6zYqmf8SBaOKh6gu1WL8K2O30ukSDpSnh9aNFNxdDiNEhT3VDwajzRZCzJtA3qXZrIut0uowdFiv/WUTj4qx0nVjATa+RiHkOZoenCql48WW226l6pM6X9K01jBaWMaX8pHBXYZr870WZbJVTMF0AZM0+4JQnK4IZc= 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 BYAPR06MB4549.namprd06.prod.outlook.com (2603:10b6:a03:4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 16:07:54 +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.029; Thu, 18 Jun 2020 16:07:54 +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 , Soontak Lee , Chi-Hsien Lin Subject: [PATCH 1/3] brcmfmac: Fix for unable to return to visible SSID Date: Thu, 18 Jun 2020 11:07:37 -0500 Message-Id: <20200618160739.21457-2-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200618160739.21457-1-chi-hsien.lin@cypress.com> References: <20200618160739.21457-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) 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 BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Thu, 18 Jun 2020 16:07: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: ac1eaa66-9867-47c6-f134-08d813a1c1d7 X-MS-TrafficTypeDiagnostic: BYAPR06MB4549: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:605; X-Forefront-PRVS: 0438F90F17 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T+0UiwDHuVF0m4TNbtCvQT+Q+Itl6NCQqkNLQyTyqDuHkk1C0u29wjilz3wi+adPMBCxCUxjYploYRpttlOJPY3n9J3jWooz/S2khpMAc6b1tG6o5LM9Kz4fkhhXpzXqImlbFxJmr+T1vFQMTCo1MKztYRRprsEBJrkivFRoLKeQ4oJtJNo9/eGrWQm1JhSGY5UiZF6KndIhI8G1C8x/n2YOZA9pjAwV49IdyVPmYuW20cY6ZPmIktWiR2JAhOPJZlkOouEYpujj4QcrAHxaT0Myy+89nwdIJNFXeQig1beRqXnfNKFulhDYqmDdzNhHEgynt968Jf3HBVUNo7MEoA== 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:(366004)(346002)(376002)(136003)(396003)(39860400002)(107886003)(5660300002)(316002)(86362001)(6666004)(16526019)(186003)(4326008)(1076003)(54906003)(26005)(66946007)(2616005)(6916009)(8676002)(6486002)(7696005)(66476007)(478600001)(66556008)(36756003)(83380400001)(956004)(2906002)(8936002)(52116002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: qiQOwBiiNLZhptf8AAqaTRUaMTAjlwNXUAfoxlO9GzZZjOOp+TTL2eLLlanTscDSJ8LNDhhLYnv4m17wHYEGrKiFgV9kfF2uL3Q/jxdd6U6XT9eeeEBGJHq6bAPlpwkN4BRwKNFLG26IjtJYETaVsitLmPngNKPxznCffXqAKWdb/qCy9+FNfYZ04J2KD6nVaoX8JIpMEyhrxCPL+c9eShCixQpRCbvV/eaxmNP2gUUchZhDmGfgkEgBFIV+AauMHEut8k4rCzDewSopc6zBr1mSjeXxyurZqdvVEiKjhkCubpdJasZT7/2NXu8WzLnBaVOs8Plhgsps4aG70TFJV8YEY00hvxtwfRVsHA8vR4nhbdxYIL/Okd1iBWYYwu854vHpGicVlqdKqmj9jknja97/fAki99TcqM1cCVRUcKkDms5H1ON79Jgn6uXHS7K7d/UX7wPf+FbCtoozFgSqyCQR4oQ2+99oCLYBTVnC0H9kO52sr0xaBloKbjNFcMKV X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac1eaa66-9867-47c6-f134-08d813a1c1d7 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2020 16:07:54.2138 (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: /8m2FBl8CFRa66Q8hzR74Tl/WqSCkI8azcG/Di+JMPZ//FF6phXRaNF3tbGPOOX8uqeuAPWrPRHAkGmCmNMT7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4549 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Soontak Lee Unable to change back to visiable SSID because there is no disable hidden ssid routine. Signed-off-by: Soontak Lee Signed-off-by: Chi-Hsien Lin --- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a757abd7a599..d3d1100d56a7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4835,12 +4835,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, goto exit; } - if (settings->hidden_ssid) { - err = brcmf_fil_iovar_int_set(ifp, "closednet", 1); - if (err) { - bphy_err(drvr, "closednet error (%d)\n", err); - goto exit; - } + err = brcmf_fil_iovar_int_set(ifp, "closednet", + settings->hidden_ssid); + if (err) { + bphy_err(drvr, "%s closednet error (%d)\n", + settings->hidden_ssid ? + "enabled" : "disabled", + err); + goto exit; } brcmf_dbg(TRACE, "AP mode configuration complete\n"); From patchwork Thu Jun 18 16:07:38 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: 11612795 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 022D714B7 for ; Thu, 18 Jun 2020 16:08:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D984420888 for ; Thu, 18 Jun 2020 16:08:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="VqRlDNEg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731924AbgFRQIC (ORCPT ); Thu, 18 Jun 2020 12:08:02 -0400 Received: from mail-mw2nam10on2114.outbound.protection.outlook.com ([40.107.94.114]:35040 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731871AbgFRQH6 (ORCPT ); Thu, 18 Jun 2020 12:07:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cu10AEyJNQAmpVpTbhdnMe/TeuVmSCLo8TgDZ5XpjBLauaRVYOBqXn6nRJBdGAadfZ5HS2EDCqONtmQ3UxJ+hB1x/FMRD1k9/thyyMCgWM2xIRrAVu4FMMG1qDynp2bQ/Ys7qcgH5lwOxZ1t4Ta2C+cL3Il/eaFc98k7NlzBe3fPyr2x6UpNlXZ2edg12CTR+fuigmm3nAkyjt4MICdkuDQUHm8+5Nf8p+Z7264/Ip+J8QOE4L4aYYqBlNL1l8Qz4Fuz1sQwGI6fjz1ymtonS9KfIj8k1iDDx64cwtQpNHENMrboSCggQkAS6YsRMbQtM9qyXPcF9MMTu4bEgOgYZg== 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=Up0+J+1C8povG4/mOMMEJPy0Rup7OYbgK07xssNcERw=; b=cRaOb+Y07MRtVFGKPQ0wNAcQTk+jeGbu55Lj7DxzygdqWg7MKT6E8UJODzXtupf8uocBLoADXbK4yqBdg11HdWd4gz4e/vJGMABUKlEesw5Ka3VScXaAcDYzC+r84x73730NUgU+BJRQaayX9V8bvZbELKhgNaZ2/BJmA7Ey+IgZ90Ods1YkmaEE2AcME1xmxaG8gKqpq94gyhPQrJp9SzniSjwYf38f355tPDRnsMqWcSmMMvhLLxbqZJXTzhEozCRn5IUiIF7poYg28k1OTSnTCKu4d86uePXXPpFP3Gp8S34tbWO54nZRK71p0iISdGwwwtfiqIOPF8qDh1qu2w== 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=Up0+J+1C8povG4/mOMMEJPy0Rup7OYbgK07xssNcERw=; b=VqRlDNEghcaVOZ0THIYZT3Qr5uAcLE5JbX8/efDsu9Ml8oA6ul7SBuGEwZGXCXq+N0m5H31i0GWO66cpVcTZu2OHeKUMYp2tuXzYsd2j1rkYx1+SjpRHyerEEr7MoO5l+dsY2NOy4qwRPxONmEYeuTS6cZ8X45d1R1zEH0nHGEg= 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 BY5PR06MB6547.namprd06.prod.outlook.com (2603:10b6:a03:233::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 16:07:55 +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.029; Thu, 18 Jun 2020 16:07:55 +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 , Soontak Lee , Chi-Hsien Lin Subject: [PATCH 2/3] brcmfmac: Fix for wrong disconnection event source information Date: Thu, 18 Jun 2020 11:07:38 -0500 Message-Id: <20200618160739.21457-3-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200618160739.21457-1-chi-hsien.lin@cypress.com> References: <20200618160739.21457-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) 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 BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Thu, 18 Jun 2020 16:07:54 +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: 2af8f08b-e206-46c6-9d0e-08d813a1c2ab X-MS-TrafficTypeDiagnostic: BY5PR06MB6547: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-Forefront-PRVS: 0438F90F17 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pVj96yBoUXwgi+U0+QcQMXmBs8z0YlFnXZYRVjZrivOUCQ9F7cSNmho/WEDKgWklb3UAXFps0rjOFKhRiW6hp0DrTrPbvAE4SlYpVxMW6Uk6ivhpn2mnL7c4AXXLkseVPqBaZ0DYZo8ZbdLE6zgjvEG2ONAh2c088CeYSEwegVIxcdqBWlZilitoT+JDNNLROi0VkGrDDVyNPMUs5imSnvpngDBFYaQo9DSMbXx4EINN1x7PIA84aHvth7axYaGtemMjB5132qkZztoNohN58/HkOvISuvPyykPtl15PjZl5p06dFOwQq6rXYSk+v2eW 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:(346002)(396003)(136003)(366004)(39860400002)(376002)(316002)(478600001)(5660300002)(26005)(6666004)(8936002)(36756003)(107886003)(2616005)(86362001)(83380400001)(6486002)(2906002)(54906003)(8676002)(66556008)(7696005)(66946007)(52116002)(186003)(66476007)(1076003)(4326008)(16526019)(6916009)(956004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: UDyhiNFw8QjSCL9Esa1h8JlUMyvQ7uuyT1yRPBFiEPVVpAp1eQ8ndeBPzRfuafEVencaVicq+0xG5iMyjAQlLxIvou+dt/3Wo/Xt+9ofSxJdjFnHlhhtDYgwlp7zpzfiO77gMSSIj9x5tPZx3rynxff1rniiGrlzZdpRc6qCSqEU3Sx/NK008XsRddvLQOUeHT7kzPuXgZ91KCRVTLD3SoUOfTtvzfqWRLd/3rzUtjL4tTBo+ZiC1qOnPfuwxBJ+ycsVp/w20yCtt2wsp+ZJ3HzjXSQdRFB+IzcyUrtLHPAUrvIx6Es6o/M2IyiANnG7WTRg2QXfw28if39fxG9zPd8vowXCJZEx2aX0ST9gtzsyJLcUvBRIF7se7In662OdHFMjdY+Tf1Jq3iQJMxlYe0sfd9M0fsyZqHq5y5rbY8qmD3QKWRDIu86Tm8fkg8Obwu6IqL0fdt9TtkUDDxHdXsspsOXqT1smVPIam4rhFDhKryQ+MgEnrMO9fYhoD+2f X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2af8f08b-e206-46c6-9d0e-08d813a1c2ab X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2020 16:07:55.5171 (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: 7m/lgBysh0s55CbA0yzeo592kd9guwvOgAsjpKbTaJYMATTPyyCDk9L9+JQ+Nhp6vB4qdQQig36Wm9hguaKj7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR06MB6547 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Soontak Lee Current brcmf_link_down() always call cfg80211_disconnected() with locally_generated=1, which is not always the case. Add event source argument on link down handler and set locally_generated based on the real trigger. Signed-off-by: Soontak Lee Signed-off-by: Chi-Hsien Lin --- .../broadcom/brcm80211/brcmfmac/cfg80211.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index d3d1100d56a7..4717867949bb 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -1387,7 +1387,8 @@ static int brcmf_set_sae_password(struct brcmf_if *ifp, const u8 *pwd_data, return err; } -static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason) +static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason, + bool locally_generated) { struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(vif->wdev.wiphy); struct brcmf_pub *drvr = cfg->pub; @@ -1409,7 +1410,7 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason) if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) || (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT)) cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0, - true, GFP_KERNEL); + locally_generated, GFP_KERNEL); } clear_bit(BRCMF_VIF_STATUS_CONNECTING, &vif->sme_state); clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status); @@ -1588,7 +1589,7 @@ brcmf_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *ndev) return 0; } - brcmf_link_down(ifp->vif, WLAN_REASON_DEAUTH_LEAVING); + brcmf_link_down(ifp->vif, WLAN_REASON_DEAUTH_LEAVING, true); brcmf_net_setcarrier(ifp, false); brcmf_dbg(TRACE, "Exit\n"); @@ -3907,7 +3908,7 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy, * disassociate from AP to save power while system is * in suspended state */ - brcmf_link_down(vif, WLAN_REASON_UNSPECIFIED); + brcmf_link_down(vif, WLAN_REASON_UNSPECIFIED, true); /* Make sure WPA_Supplicant receives all the event * generated due to DISASSOC call to the fw to keep * the state fw and WPA_Supplicant state consistent @@ -6029,7 +6030,11 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, if (!brcmf_is_ibssmode(ifp->vif)) { brcmf_bss_connect_done(cfg, ndev, e, false); brcmf_link_down(ifp->vif, - brcmf_map_fw_linkdown_reason(e)); + brcmf_map_fw_linkdown_reason(e), + e->event_code & + (BRCMF_E_DEAUTH_IND | + BRCMF_E_DISASSOC_IND) + ? false : true); brcmf_init_prof(ndev_to_prof(ndev)); if (ndev != cfg_to_ndev(cfg)) complete(&cfg->vif_disabled); @@ -7182,7 +7187,7 @@ static s32 __brcmf_cfg80211_down(struct brcmf_if *ifp) * from AP to save power */ if (check_vif_up(ifp->vif)) { - brcmf_link_down(ifp->vif, WLAN_REASON_UNSPECIFIED); + brcmf_link_down(ifp->vif, WLAN_REASON_UNSPECIFIED, true); /* Make sure WPA_Supplicant receives all the event generated due to DISASSOC call to the fw to keep From patchwork Thu Jun 18 16:07:39 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: 11612803 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 17303912 for ; Thu, 18 Jun 2020 16:08:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE9CD20890 for ; Thu, 18 Jun 2020 16:08:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="Ztnvvo1w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731887AbgFRQII (ORCPT ); Thu, 18 Jun 2020 12:08:08 -0400 Received: from mail-eopbgr760112.outbound.protection.outlook.com ([40.107.76.112]:7750 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731908AbgFRQID (ORCPT ); Thu, 18 Jun 2020 12:08:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=joGDlrviDJFnofGW7DEod/QV7fJmB6ng7zv9424c90uJ1rb/o/frhiFy9mka6mzq4LzCvXycSHyqpMmULjDT9RyYOuur4z/BiR6JqcdL1emhP4Q35nUTz+H8O6gRZxPoGWWe5jWdcHCPKH83Lm8REdIyICbzFeIhraYDLydxyD/wo4cDx2VgGx7Y3p+iWKJ7LPZH299XPNlQ8nWPoChJ/P9NCC4RAlmreMA+ykzrgDnp/1brvFv37aVZK/DXJPCf5jMtQLkHh7DLZhjAJIx0A8e/0CH5VbVZF66CkghX128UVIlD1qWg/icFLFMg9tZvQUTFvRxFKCZSfWSkw+i5wg== 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=X+SVmunytF6+GF3Pj/HA4/SoInC8aZpfSxK/8Ql8K5A=; b=Tqe/IzBanziyETfogE+0Lv26KWBmAkREBk6cqAW2Sf2H6W3e93DFDI1OYao8KfdC0Cs1SC/T6Vw2V9LoX09OKw7NLgQz76DwRUv/Wqy5ga2mGSjjrAVXE9oZ4e0IqUD8ofxY6EieDOy1euqzjq38EQ8Tw1KP/2Fqzx2+L1TjWQxWf/oAa290t9GScBlVI3wDNNlzTO3HF9KGRM9XcW04ez57HGtZYO45sXp1fIsARuMHx/WAWUx/0GjXaqY0lq2bFABg5MC6SRDL9Xx9UeSl0c+IsbkccCAP7v1GLzFoCoiop+MNeLwNjaaM+IhURzw+A3SHMgNR+e/skKwdXbFymg== 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=X+SVmunytF6+GF3Pj/HA4/SoInC8aZpfSxK/8Ql8K5A=; b=Ztnvvo1wBRg9J+5C++0RP6KBxVtXde4drMW/OuNuVLj6JddxVWyiA/7ku1UJ0rwTzm0W94i/iPz3jkkN8FlgfTUcYU4FdybyqO7s0l3lTTZaLM3R5EwCc49Yc930x1j/3wBEJRDU/pUcWTaxn7OkgubfPT8eC394vRoYVF+jH1c= 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 BYAPR06MB4549.namprd06.prod.outlook.com (2603:10b6:a03:4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Thu, 18 Jun 2020 16:07:57 +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.029; Thu, 18 Jun 2020 16:07:57 +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 , Able Liao , Chi-hsien Lin Subject: [PATCH 3/3] brcmfmac: do not disconnect for disassoc frame from unconnected AP Date: Thu, 18 Jun 2020 11:07:39 -0500 Message-Id: <20200618160739.21457-4-chi-hsien.lin@cypress.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200618160739.21457-1-chi-hsien.lin@cypress.com> References: <20200618160739.21457-1-chi-hsien.lin@cypress.com> X-ClientProxiedBy: BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) 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 BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Thu, 18 Jun 2020 16:07: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: 2b0bb82a-bf46-423b-1486-08d813a1c3c2 X-MS-TrafficTypeDiagnostic: BYAPR06MB4549: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0438F90F17 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: plV7UwlsRsvpftohrOD5hdlucMO2h1AHQygEuf0ZIkbv83bUsYOtPiejb0eWLdt+k63LJoZ/Aj4xMkToSyyoVrszlEikSRXYj4SQFZ8BB/T3wkQOeSGGg7HNqVIzw7oIvPYgeyTZMGlrqCYxDnPyCdW8hz+U0U48qEM0vNWrbgOsl8EzqFjs+DBRIQ3bsfdSVFuHZ2BURnKaG03VW3daVVgswXWv0KVq12ugb3S2d0HqTtyCzjBAZa+E6yaSckYGwXQWeOEQlQ5OwMYozobZBk6h+gTkZ57161jxNmy7Pwu+UpCJaDa/XCz8NHMdLYbjm0cCabzoJkZfeo0qfM8zzQ== 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:(366004)(346002)(376002)(136003)(396003)(39860400002)(107886003)(5660300002)(316002)(86362001)(6666004)(16526019)(186003)(4326008)(1076003)(54906003)(26005)(66946007)(2616005)(6916009)(8676002)(6486002)(7696005)(66476007)(478600001)(66556008)(36756003)(83380400001)(956004)(2906002)(8936002)(52116002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData: HHXVPzBYiR5eAeLBqe106C8VX/qg9XYpBEP0qijLxHvjHQAvo1sKzNIg90HqVak+wCMyoftDzEJ++3u5rw6ZxnGPHpYCZSQSf3rxQYJdsT5AIaDKzlTd4zC3qdQrrgkbh7uLzb/IXnkdIJgtHICF8heo0K8zY7exnwSbh24AcMIL3tPvQlHHK6lda2BTBvY5pGXmBeXgRxbjOkLDu03RWCRJJ914u7VdBtVK4GNVxUNGwLdm+/dnldUWjVc9SpthmWeu9p1bQdFgmWAnZ+DEx6huwAX7OWrsvaVF4hJCEXtunTRbOSE8GSnJQfOkr/mv6VicdH8MlWbjaSo3GWHMhm7Dt6vAy8rcOQQKkVtqJep1c7wq2Tx60Q6eENcJTA6RfnardO+sfKPHXM3wqRDH0aHIfegH8KHiqPsS2LbmRvvBefA98akLOdknkDouLKQ1V2XWsRjkLd9g7eGN2Vryt2xWuU3IirbP30bRaPrB7ZMqEyd91ALBZKzWOyIn+Xmm X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b0bb82a-bf46-423b-1486-08d813a1c3c2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2020 16:07:57.5859 (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: axhf3Q/b8tJM5AeWq3PbabHoYt5KGRNsayl2tstbzJns8ztmLQsUawW6CS9RifA2opDaZw1NSsruXVKkX9ZQrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR06MB4549 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Able Liao Ignore FW event if the event's BSSID is different form the BSSID of the currently connected AP. Check interface state is connected or not, if state is not connected that can ignore link down event. Signed-off-by: Able Liao Signed-off-by: Chi-hsien Lin --- .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 4717867949bb..ac28fb943471 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -6027,7 +6027,12 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, brcmf_net_setcarrier(ifp, true); } else if (brcmf_is_linkdown(e)) { brcmf_dbg(CONN, "Linkdown\n"); - if (!brcmf_is_ibssmode(ifp->vif)) { + if (!brcmf_is_ibssmode(ifp->vif) && + test_bit(BRCMF_VIF_STATUS_CONNECTED, + &ifp->vif->sme_state)) { + if (memcmp(profile->bssid, e->addr, ETH_ALEN)) + return err; + brcmf_bss_connect_done(cfg, ndev, e, false); brcmf_link_down(ifp->vif, brcmf_map_fw_linkdown_reason(e),