From patchwork Thu Mar 19 07:53:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11446635 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 522AF13B1 for ; Thu, 19 Mar 2020 07:53:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 303F020722 for ; Thu, 19 Mar 2020 07:53:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="Vax4GU4c" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbgCSHxy (ORCPT ); Thu, 19 Mar 2020 03:53:54 -0400 Received: from mail-dm6nam12on2100.outbound.protection.outlook.com ([40.107.243.100]:45696 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725812AbgCSHxy (ORCPT ); Thu, 19 Mar 2020 03:53:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ULg2Olz16TrDTLCs0a7nnrRf2ByKes8s7p6K39vVpV2BTdRdyueeNJtK09e4Nu69XNMdKdqQdb2jMnxn/KrVMJLE1pBDVpce+zv2mMMreFhuK0ZMSPbztZIPAGi//6ZOxT25dDvniGyRGaDWmI7IwXzyu8SFnBl+HGdhr7PB+lcPwDnZgMSGeJmUCgc+WdOIfEwI9QCMSj1d/1sJfYD+bzMt3zumvDG5z0Ap9Qjx0gcDGXOwc/vIDiv6IuuPIYbKlMd4dM/sLbCknZXnusuqRcNKZruQUCtVdGava3qDTSdGH+egkHCCzqx+SlUsV2HHuSPcnRMQcMj43VQnFhAPkA== 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=3r0Q4MVRGzNII3MDlnkxSMcbeTuCJpb9CboCrMyEeGc=; b=ZGKgPp0D/yXYuHi+IOlZIcROOH88jP2aIxmoeMQuM47oXWsgOzV+iWFqdL29g+W4AwvW8spigtlFrmc6i/jlgl8NAE+ChgQ/DjyjPaK/udYZiFi49ZHJJ5eMDuf2MBr6fkJwJXbFZ2ck1tABLg5APKYOLBhfFRKoHgPAwK4rBcqC63Pv0JAFnKcFhmHYDe6HDmJvTv4C4tJMBsf81fGGoYeahIKww5oqg/iF2+np2m63z5z2Krpi15HEpZ2QJJ6oo0ofWP5g4JdG/JChS2G2uJ2rUrU5FYZGUqm/ebSOhcHPbw8nzS1rmlJrctZtsBeWtqtYjACDfcNGMvALgkSHPQ== 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=3r0Q4MVRGzNII3MDlnkxSMcbeTuCJpb9CboCrMyEeGc=; b=Vax4GU4cWwD4kCKgH1gJCeFpwatUylMLwOx3itgyRvij9mMe1j4k7ueg05SqaH9rg5zxbWCgIsQ9A6pPJqKjpG0h2Rg0Z2kPkAHriCTU2VtrzrjiLSn755Gm+sy1fPEmky2Zhtilaw2NDVd0zoPhQN4bI1mgAQYNiC7GRk6Bg0g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wright.Feng@cypress.com; Received: from DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB4585.namprd06.prod.outlook.com (2603:10b6:5:17::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.23; Thu, 19 Mar 2020 07:53:50 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451%7]) with mapi id 15.20.2814.018; Thu, 19 Mar 2020 07:53:50 +0000 From: Wright Feng To: arend.vanspriel@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, kvalo@codeaurora.org, chi-hsien.lin@cypress.com Cc: wright.feng@cypress.com, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com Subject: [PATCH 1/3] brcmfmac: support AP isolate Date: Thu, 19 Mar 2020 02:53:24 -0500 Message-Id: <1584604406-15452-2-git-send-email-wright.feng@cypress.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> References: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote06.aus.cypress.com (12.110.209.245) by MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Thu, 19 Mar 2020 07:53:49 +0000 X-Mailer: git-send-email 2.1.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 22d8547e-fcd8-4114-22ec-08d7cbdaa96b X-MS-TrafficTypeDiagnostic: DM6PR06MB4585:|DM6PR06MB4585: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 0347410860 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(199004)(44832011)(52116002)(36756003)(8676002)(81156014)(81166006)(8936002)(6666004)(956004)(2616005)(316002)(16526019)(186003)(66476007)(478600001)(66946007)(6636002)(26005)(6486002)(7696005)(2906002)(4326008)(66556008)(5660300002)(86362001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR06MB4585;H:DM6PR06MB4748.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mSvl1b5kiG37jQIRaMrHOK/DN1PLIQVRSu53mUq47YVp8XQh8+DL23zRkJZ1fDi286Pl2QhZZ/XkjdmwySGzQTnFszJRl7t5x3kyAfAA8Imi4RMtkJEcN9trOD3//lbdn8EVmHIyswF0cEi2Zr8AHU9t8Au4pVNiLG7QY/Z9Rl9bYydTYrt9avgg6JMVOb/ExgrILnqYJoLFWwv9VT/lsoU/WPZbEUxvXBwAusJC/J/AJCGmNUjTZNHVgKAG9MxM36GYT4dT5XQ0Vndo3qhlBiMRgoVwTy2egMqi92Lo97QLZVx0VhsXtpTaLQw/aXFKbRVNf1dc3Ykkoafn+I7D7aBkRk5pn1MwbsRx2Bp2dKopiGIugyV6Gzh95ueqaAwT6TK/tBcfeAhh7C58upujcznS6dAoo0sUG2E6tSAu1FVeXJe7i/HDDwTDaSK3lAAz X-MS-Exchange-AntiSpam-MessageData: uKf/ffVAvVQ1OnwYdsXV32uEzWfValYqITrYMgrW/D+pCAXk5BAL0Hm5Vi4XAGZpSqAtDwGSXdag7pzAHS0tSoK979izMo4KZLTif9StW2jV3ADC4a6Wlln4SL3jd4OOpSbWWmS5zn8Z5SP7Jnwyqg== X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22d8547e-fcd8-4114-22ec-08d7cbdaa96b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 07:53:50.4792 (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: MwixINFVSwp8x5BxcpvQam+kwlvTk8wLq9VjG8OMZzfvjZP04f4flTOl5DDSENWkCufmqbnuU9Np/PgARP8GAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB4585 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hostap daemon has a parameter "ap_isolate" which is used to prevent low-level bridging of frames between associated stations in the BSS. For driver side, we add cfg80211 ops method change_bss to support setting AP isolate from user space. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index a2328d3..eb49900 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5376,6 +5376,26 @@ static int brcmf_cfg80211_del_pmk(struct wiphy *wiphy, struct net_device *dev, return brcmf_set_pmk(ifp, NULL, 0); } +static int +brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev, + struct bss_parameters *params) +{ + struct brcmf_if *ifp; + int ret = 0; + u32 ap_isolate; + + brcmf_dbg(TRACE, "Enter\n"); + ifp = netdev_priv(dev); + if (params->ap_isolate >= 0) { + ap_isolate = (u32)params->ap_isolate; + ret = brcmf_fil_iovar_int_set(ifp, "ap_isolate", ap_isolate); + if (ret < 0) + brcmf_err("ap_isolate iovar failed: ret=%d\n", ret); + } + + return ret; +} + static struct cfg80211_ops brcmf_cfg80211_ops = { .add_virtual_intf = brcmf_cfg80211_add_iface, .del_virtual_intf = brcmf_cfg80211_del_iface, @@ -5421,6 +5441,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = { .update_connect_params = brcmf_cfg80211_update_conn_params, .set_pmk = brcmf_cfg80211_set_pmk, .del_pmk = brcmf_cfg80211_del_pmk, + .change_bss = brcmf_cfg80211_change_bss, }; struct cfg80211_ops *brcmf_cfg80211_get_ops(struct brcmf_mp_device *settings) From patchwork Thu Mar 19 07:53:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11446637 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 21889139A for ; Thu, 19 Mar 2020 07:53:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8DE920724 for ; Thu, 19 Mar 2020 07:53:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="N/BwZeX+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726603AbgCSHx4 (ORCPT ); Thu, 19 Mar 2020 03:53:56 -0400 Received: from mail-dm6nam12on2100.outbound.protection.outlook.com ([40.107.243.100]:45696 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725768AbgCSHx4 (ORCPT ); Thu, 19 Mar 2020 03:53:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h8BZK/ojPMrYvmfK81DEywDXeKeUxL/gYN1/e12iMRwAiniXfFU9Liek/Umoks9dK+HBSusyTQlXe3C4pZfEtz0ymnW3EHEDVkS5LPIgUl3e77cSaSVHXJPCAqssamydmVuIF9bu2Tqo2jikPTEZ+L+Ljfz9RiHuO6kN/+uFPAwFxrZaaMfrC1XDs8ZE1yCh/KAbdl/LCSMv3kRjxZQUAKEP04LrRFjKNPQHj989qb1QH/gHyC+yb6em6OP3zH2t0MoNL2HlgzQvjbtTKXzlnesHm6KR83Mq0n2KInuoYpBKCzfybTOe5VZhLFcqmjwqaagmHs48tzwS888RGntBtw== 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=/BT5oMl2f1XwPIkelN1R6P9WF3/Pm5LyX5pvaNnd4Pw=; b=ELF3R1e9xqwd6hsWBb+Qj2iM96GShmMTnXZayBVxt4xvlplItoN/Px/ujlW0UsOLAVQL/Jzfg1f5bBDtV8ybIPDhUDYQvgsLPBCcLiz5/CYOsQ8A7NdrcWxTXhrUmK51Vtx/7icPt48Es44An9vfN8sH+obWitSEj6kmfVQmPmRGFaDhAmMZqYouATRJRXtmdvFYzD40SB+uJzZCowClhlzQO6LGcL7+FJSqcQqAhZPRK3YrveBo18bYhUEhg5Y/8H1MQTU2UipybuvMIWsZTHEG4jxN3vV0l+otkVSn+TWKWJsk3oi2+xrhEL9mDUFZBbULXGuxRfoONAIWRKe2vw== 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=/BT5oMl2f1XwPIkelN1R6P9WF3/Pm5LyX5pvaNnd4Pw=; b=N/BwZeX+8M1XQ38Xngn+vTw1NycU0R912UB6cmr8l5uK1xzkxn9Owt/LNyYIhd1QgAKYPmWISNktkXg6aucmT/0xLVVMjbyqpzV+oZADJuDQ92PF7EYXBXE08rx8b/kE5UY8gOcBc2S1NsRkVmvXEbkDGZJTKQUGuOjazLok8nI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wright.Feng@cypress.com; Received: from DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB4585.namprd06.prod.outlook.com (2603:10b6:5:17::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.23; Thu, 19 Mar 2020 07:53:51 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451%7]) with mapi id 15.20.2814.018; Thu, 19 Mar 2020 07:53:51 +0000 From: Wright Feng To: arend.vanspriel@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, kvalo@codeaurora.org, chi-hsien.lin@cypress.com Cc: wright.feng@cypress.com, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com Subject: [PATCH 2/3] brcmfmac: make firmware eap_restrict a module parameter Date: Thu, 19 Mar 2020 02:53:25 -0500 Message-Id: <1584604406-15452-3-git-send-email-wright.feng@cypress.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> References: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote06.aus.cypress.com (12.110.209.245) by MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Thu, 19 Mar 2020 07:53:50 +0000 X-Mailer: git-send-email 2.1.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a3944387-dca4-4795-25f9-08d7cbdaaa32 X-MS-TrafficTypeDiagnostic: DM6PR06MB4585:|DM6PR06MB4585: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0347410860 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(199004)(44832011)(52116002)(36756003)(8676002)(81156014)(81166006)(8936002)(6666004)(956004)(2616005)(316002)(16526019)(186003)(66476007)(478600001)(66946007)(6636002)(26005)(6486002)(7696005)(2906002)(4326008)(66556008)(5660300002)(86362001)(309714004);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR06MB4585;H:DM6PR06MB4748.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 59x/9b3z/WPyxxfT0lnngDgOLug4aiHC8ScZJfFRndItncmCCIiExHDwjCH7P3Mpqq9GrVD8JZl/XMyf6i1ukeVph7LNcEaW9ntnGiQ5DDe6Ej78mrVuLateG78Jo91tNQXAiIQiEfhxLySb7lMu+BedTSw/KGdyN84GPmKctqsDy38hG+p+6JKcNhc22oIY/RdKXeEl+fEQ21Hb2fueVZ+u16WOmBzpQEtjL2g8424ZJ/Xll5wZax8LzCEfvslfmJJ6WAwh+mwiQPzYTEM+KEnzd3kdr5fUdgyc0GRd19Q7xaefDOtfnXWbPYnWooEZSEHOrZPULMQ9qu9R4Mzt+ssiLE/47fGtVdIJt4+oWBcSnkne5cryJ5ZKbtrfXtIICg7Fwc6XGidBqJFkJXC/ACA8UVBqpxPAfSRODeDYeZMb4HPlLu37/J5JCPDteUNNwPMFTWRk8aNMSKJPTjLal9Chumr2jWpSB7afK3BIV40Jcsiic7otXhW/D+l0kFcT X-MS-Exchange-AntiSpam-MessageData: duxBb4G0hvTJqI+P1GAVhnC+ofHVwnuTQ4ChqTNQBOuA1ikKw0DdUXrgFTBaHic5g9zndvxzhy0+wDbi2nHGYV89SLL01LxiUE2jX+16cMF+0Mr9uCPt3ZpAL12ptmYEpefBeE3urghUFuzmRZFoqQ== X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3944387-dca4-4795-25f9-08d7cbdaaa32 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 07:53:51.6615 (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: LmTEPMDw+RDTKd5oNFn2TVDWoGaVub3i09L92cKkHbhKHlBMM9Q5+RYXO+vitCrEmmFKCn5cJSqlDBASWT5S1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB4585 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When eap_restrict is enabled, firmware will toss non-802.1x frames from tx/rx data path if station not yet authorized. Internal firmware eap_restrict is disabled by default. This patch makes it possible to enable firmware eap_restrict by specifying eap_restrict=1 as module parameter. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 9 +++++++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 5 +++++ drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ 3 files changed, 16 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index eb49900..07a231c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -6942,6 +6942,7 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg) struct wireless_dev *wdev; struct brcmf_if *ifp; s32 power_mode; + s32 eap_restrict; s32 err = 0; if (cfg->dongle_up) @@ -6966,6 +6967,14 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg) err = brcmf_dongle_roam(ifp); if (err) goto default_conf_out; + + eap_restrict = ifp->drvr->settings->eap_restrict; + if (eap_restrict) { + err = brcmf_fil_iovar_int_set(ifp, "eap_restrict", + eap_restrict); + if (err) + brcmf_info("eap_restrict error (%d)\n", err); + } err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype, NULL); if (err) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index dec25e4..cda6bef 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -67,6 +67,10 @@ static int brcmf_iapp_enable; module_param_named(iapp, brcmf_iapp_enable, int, 0); MODULE_PARM_DESC(iapp, "Enable partial support for the obsoleted Inter-Access Point Protocol"); +static int brcmf_eap_restrict; +module_param_named(eap_restrict, brcmf_eap_restrict, int, 0400); +MODULE_PARM_DESC(eap_restrict, "Block non-802.1X frames until auth finished"); + #ifdef DEBUG /* always succeed brcmf_bus_started() */ static int brcmf_ignore_probe_fail; @@ -413,6 +417,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, settings->fcmode = brcmf_fcmode; settings->roamoff = !!brcmf_roamoff; settings->iapp = !!brcmf_iapp_enable; + settings->eap_restrict = !!brcmf_eap_restrict; #ifdef DEBUG settings->ignore_probe_fail = !!brcmf_ignore_probe_fail; #endif diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h index 144cf45..059f09c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h @@ -37,6 +37,7 @@ extern struct brcmf_mp_global_t brcmf_mp_global; * @feature_disable: Feature_disable bitmask. * @fcmode: FWS flow control. * @roamoff: Firmware roaming off? + * @eap_restrict: Not allow data tx/rx until 802.1X auth succeeds * @ignore_probe_fail: Ignore probe failure. * @country_codes: If available, pointer to struct for translating country codes * @bus: Bus specific platform data. Only SDIO at the mmoment. @@ -47,6 +48,7 @@ struct brcmf_mp_device { int fcmode; bool roamoff; bool iapp; + bool eap_restrict; bool ignore_probe_fail; struct brcmfmac_pd_cc *country_codes; const char *board_type; From patchwork Thu Mar 19 07:53:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wright Feng X-Patchwork-Id: 11446639 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 D898A13B1 for ; Thu, 19 Mar 2020 07:53:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE29E20722 for ; Thu, 19 Mar 2020 07:53:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cypress.com header.i=@cypress.com header.b="nIq8o9YA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbgCSHx6 (ORCPT ); Thu, 19 Mar 2020 03:53:58 -0400 Received: from mail-dm6nam12on2100.outbound.protection.outlook.com ([40.107.243.100]:45696 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725812AbgCSHx5 (ORCPT ); Thu, 19 Mar 2020 03:53:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BN1xUzREBMJKd/PEMEjlkjiNjJbwgIcy9n/9m5Wq/BQIrsSUHfCYVsCljEPWfS4BNWQ2qe6xbctwajqXl0xoC8nzcYK10q7uJnQaKALDil/lz+1f+hTnj5ZZlbLstQ0CUnhb/JppgiqURi35ctS7p9WFBRkrR+85Nx4oKtU0jfnKMKqlPKctqK4Mkv4K1ork2YQFmJMjJeDBCdktsv2aMcRNE9nr6ejXxrNF/LF2pZXPUbsact/n+ZED3hjuNwySEBVzEuxyiqI+8ZKmAaTL2Imwfiusil/crc2VObItjiz4AV9XlFMBM/lsUc9Jp28I54rdOmdRJcAKxB+/J2qD9g== 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=Ch9/7mkktcUdo2uQ6Is5BkuAASNurzPXKun22Pcok4k=; b=Tkr1x8ZTVKs71auZzi1zPdzgA2ZmdaWtsByfUTq3i7fQ3akqPzuzsKzX101WlLfhOZhF6LlZ7S7PLYmxVzCamt6kqzA7nq8cQSbunleexTpfNMKnNX7ASK/o2tysVjODrTNqW0EQzvTP31dY9IZE1YlYH6m/yByds58rhpaWDElyIjIyO6/LXEHliauwzjrYk4BtQcy81p2JSAlnOgYMSxTQ/PhnPJC04Y1Umc4eC3fqpLlLSwXS2YMJzYdlm+HVjz9mkrDG/S7VWPMDcUfqQgaQwz5/Lo+a5Yy9Y/F5zmisQfVkKcLM7OI/gZIOcKSsfqRhcWssD7WjmKvMrQkheQ== 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=Ch9/7mkktcUdo2uQ6Is5BkuAASNurzPXKun22Pcok4k=; b=nIq8o9YAtaUasX1ZfupYKYvfe3DYoFwe458FP8CVFo+FvCA1qvPAAuzYAPKGbtrtMqyaemtVC/bzYEq7kqtZ7L+bMSGcemNj7I+KFcp4qjWwHJRO5u7h70eNoNAWZqYWS6peR3eJG3k5szZ7+Kr9KuFp8gaEnHFsrZiJKY2KViU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wright.Feng@cypress.com; Received: from DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) by DM6PR06MB4585.namprd06.prod.outlook.com (2603:10b6:5:17::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.23; Thu, 19 Mar 2020 07:53:52 +0000 Received: from DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451]) by DM6PR06MB4748.namprd06.prod.outlook.com ([fe80::299a:b6f7:1338:e451%7]) with mapi id 15.20.2814.018; Thu, 19 Mar 2020 07:53:52 +0000 From: Wright Feng To: arend.vanspriel@broadcom.com, franky.lin@broadcom.com, hante.meuleman@broadcom.com, kvalo@codeaurora.org, chi-hsien.lin@cypress.com Cc: wright.feng@cypress.com, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com Subject: [PATCH 3/3] brcmfmac: make setting SDIO workqueue WQ_HIGHPRI a module parameter Date: Thu, 19 Mar 2020 02:53:26 -0500 Message-Id: <1584604406-15452-4-git-send-email-wright.feng@cypress.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> References: <1584604406-15452-1-git-send-email-wright.feng@cypress.com> X-ClientProxiedBy: MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) To DM6PR06MB4748.namprd06.prod.outlook.com (2603:10b6:5:fd::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from aremote06.aus.cypress.com (12.110.209.245) by MN2PR20CA0043.namprd20.prod.outlook.com (2603:10b6:208:235::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Thu, 19 Mar 2020 07:53:51 +0000 X-Mailer: git-send-email 2.1.0 X-Originating-IP: [12.110.209.245] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f83298f4-4671-4436-8680-08d7cbdaaad8 X-MS-TrafficTypeDiagnostic: DM6PR06MB4585:|DM6PR06MB4585: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:483; X-Forefront-PRVS: 0347410860 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(376002)(136003)(396003)(366004)(199004)(44832011)(52116002)(36756003)(8676002)(81156014)(81166006)(8936002)(6666004)(956004)(2616005)(316002)(16526019)(186003)(66476007)(478600001)(66946007)(6636002)(26005)(6486002)(7696005)(2906002)(4326008)(66556008)(5660300002)(86362001)(309714004);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR06MB4585;H:DM6PR06MB4748.namprd06.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: cypress.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5/BUeUteEye06CAal7JSipT85a0xJUdWgbkGlqPBAADmW2PUbHmfYhgfGvMaE5LZ4doRL9BO3BxMpljEv95b/02v7TwjABRsix5DAJwE6EaeUZztrmTRWQ2gXeaJs5ri5qkA1PVMzaAVdGYRLGJH/CdGsGFNj3SkJtEphek6wvvobZZYY3ekJkfKs9Wo3s34iu/9+rQhts0NjDWJw79KYb7ySvPfY6c9R8wzwvVX3Ko4O0WgC+93md5sJA7z11qMZa+UXiTFryESe+nn56040mQdPeKoBTcVk7v5rK9Q9gVfCxDUMQGixpi+EGhZRnk9yxvu/GctwefE6+rgLL6k0rmUhM2WcZkaMX9sr1Z+V/VqscrkkntSOJcNzh299tmN3UsVKK4cquCP/sr17k8bCQ6RbtZXxjYzFzZ8hSPboX0SG9K5ON6lsXUnW4mOQt5TasRxX5a2NDXyEQkfJ74hPoolNFBoduLnFIDsFwGDbEYwPUcOfZ3tFRmIQifOqIfW X-MS-Exchange-AntiSpam-MessageData: hmV0Ei+sq2en5Hy3U28i3ImqDq+JX4Hz7bSw31cdDk9IXZJ3ysvuvbWRzPRAS3X9Dpndh1z8913L/1ZLf+R1UWkd+eAKXC3W9pDUFVYdJetDk8heeGFvdhqtGWG3n8/q7x+itotdZ2oJDNCwTnj/7A== X-OriginatorOrg: cypress.com X-MS-Exchange-CrossTenant-Network-Message-Id: f83298f4-4671-4436-8680-08d7cbdaaad8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2020 07:53:52.7709 (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: anZhjYyVxf8AN3lImTeRuDWb0byvHQ36CRbVd0lII6P0Xut0alpViOrQpWLbvVnvpu5VIB3h6jVSxr7RfFJRRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR06MB4585 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org With setting sdio_wq_highpri=1 in module parameters, tasks submitted to SDIO workqueue will put at the head of the queue and run immediately. This parameter is for getting higher TX/RX throughput with SDIO bus. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin --- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 5 +++++ .../wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 22 ++++++++++++++-------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index cda6bef..3cf0e74 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -71,6 +71,10 @@ static int brcmf_eap_restrict; module_param_named(eap_restrict, brcmf_eap_restrict, int, 0400); MODULE_PARM_DESC(eap_restrict, "Block non-802.1X frames until auth finished"); +static int brcmf_sdio_wq_highpri; +module_param_named(sdio_wq_highpri, brcmf_sdio_wq_highpri, int, 0); +MODULE_PARM_DESC(sdio_wq_highpri, "Set SDIO workqueue to high priority"); + #ifdef DEBUG /* always succeed brcmf_bus_started() */ static int brcmf_ignore_probe_fail; @@ -418,6 +422,7 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, settings->roamoff = !!brcmf_roamoff; settings->iapp = !!brcmf_iapp_enable; settings->eap_restrict = !!brcmf_eap_restrict; + settings->sdio_wq_highpri = !!brcmf_sdio_wq_highpri; #ifdef DEBUG settings->ignore_probe_fail = !!brcmf_ignore_probe_fail; #endif diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h index 059f09c..0cb39b6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h @@ -38,6 +38,7 @@ extern struct brcmf_mp_global_t brcmf_mp_global; * @fcmode: FWS flow control. * @roamoff: Firmware roaming off? * @eap_restrict: Not allow data tx/rx until 802.1X auth succeeds + * @sdio_wq_highpri: Tasks submitted to SDIO workqueue will run immediately. * @ignore_probe_fail: Ignore probe failure. * @country_codes: If available, pointer to struct for translating country codes * @bus: Bus specific platform data. Only SDIO at the mmoment. @@ -49,6 +50,7 @@ struct brcmf_mp_device { bool roamoff; bool iapp; bool eap_restrict; + bool sdio_wq_highpri; bool ignore_probe_fail; struct brcmfmac_pd_cc *country_codes; const char *board_type; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 3a08252..885e8bd 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4342,9 +4342,21 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) bus->txminmax = BRCMF_TXMINMAX; bus->tx_seq = SDPCM_SEQ_WRAP - 1; + /* attempt to attach to the dongle */ + if (!(brcmf_sdio_probe_attach(bus))) { + brcmf_err("brcmf_sdio_probe_attach failed\n"); + goto fail; + } + /* single-threaded workqueue */ - wq = alloc_ordered_workqueue("brcmf_wq/%s", WQ_MEM_RECLAIM, - dev_name(&sdiodev->func1->dev)); + if (sdiodev->settings->sdio_wq_highpri) { + wq = alloc_workqueue("brcmf_wq/%s", + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, + 1, dev_name(&sdiodev->func1->dev)); + } else { + wq = alloc_ordered_workqueue("brcmf_wq/%s", WQ_MEM_RECLAIM, + dev_name(&sdiodev->func1->dev)); + } if (!wq) { brcmf_err("insufficient memory to create txworkqueue\n"); goto fail; @@ -4353,12 +4365,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) INIT_WORK(&bus->datawork, brcmf_sdio_dataworker); bus->brcmf_wq = wq; - /* attempt to attach to the dongle */ - if (!(brcmf_sdio_probe_attach(bus))) { - brcmf_err("brcmf_sdio_probe_attach failed\n"); - goto fail; - } - spin_lock_init(&bus->rxctl_lock); spin_lock_init(&bus->txq_lock); init_waitqueue_head(&bus->ctrl_wait);