From patchwork Mon Apr 20 16:02:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ED06C3A5A0 for ; Mon, 20 Apr 2020 16:03:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCAED20775 for ; Mon, 20 Apr 2020 16:03:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="EiLCaAQK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbgDTQDg (ORCPT ); Mon, 20 Apr 2020 12:03:36 -0400 Received: from mail-dm6nam10on2078.outbound.protection.outlook.com ([40.107.93.78]:42592 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726067AbgDTQDd (ORCPT ); Mon, 20 Apr 2020 12:03:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d5hn2jbGsYFGA3GfgMunN3MbtdY6yZOIo4nJxA6lVi+wWYZuU6ku3ncv0IkIY7JHs43UFjho7Sjip/fol51AEIQsvzd/HE4T07OVceJjU4IsihdEHyCypfc4g4ilKNFZFZ+lnPYFzXS02Vu1pne51JhUQwHOLPwhp7/0/7ncjGs3PKr9s0xkI50FlI+wXk3T9/iV8MuEd/iFvoNYeVvNRC52pKo0c7cOiMXolvKt31+OM/CYEPFDFDYZ7dtnKdvCUOfK2iBmEt5VK4gy5WM8GyopZP+wV3qhengfx4MSF1op/HIidkrlPeFjJf0hCAljluyKAQaCTNjn24AK1/K4Wg== 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=AqA2+f9GFYHXZ6NB4wvy/DWJvlpjT/1XaQfi0f585U8=; b=FCK0D+uokm+2ynXe+plJW7ccvn226tsD5G/Qfrh0zMGUJCPFUC6HLRejuFqPsU8GomK62Bu3q/24HRGDINUX7IW9/j4XwVbK/kUfT8r246a+3R0nzSQ5/KDNtDy7mu4bE8k7JlLySMtvulPUiED2NgUe1vqtvcdz15NIwG/U0TidHU5KN17rlKIZGF0zzmnlsVPDeBKNHYNlldOftqeXpVB8y19rVIutsqhGkh0mcc3gK3IuZ8esL+CqfPy+u17W+g3TqbIdSSb8l24WXfk1izl8wBl+vy1KO15ouoPwP34qERkNUWae4VOFi8BR2AIHBYGPkiYrZZChFcbqJFgL8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AqA2+f9GFYHXZ6NB4wvy/DWJvlpjT/1XaQfi0f585U8=; b=EiLCaAQKQvm4EpVBW8n8ETQtzThFClP1kBOTXVa4b1GhX0fu43M3jQfShkRuS3fw+fO8EcErsm48CvF/kezR9gvYbZt8pPot5z/sSVaJYQ5Q571q/DR0oPMIP7yXlt+LyWW9Wp0JPGvrTpgB+8HbOu5rZLY5QcCsQ98vDj4CaCw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:03:29 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:29 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 01/16] staging: wfx: simplify the check if the the device is associated Date: Mon, 20 Apr 2020 18:02:56 +0200 Message-Id: <20200420160311.57323-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:27 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4030c4f4-1cc3-4dae-cf7d-08d7e5445df1 X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3631; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(4744005)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3gQx9ZADTHbuufVVxdN+TTFrWcX9MHzHkGdiQwc8LcLz0SRvKXN6uzZxu8seIl7TkweuA+RmREV669CsmuY/xW5lBH2NHwQoIxyAozPGddVLZTQK2nR8hGiqXJxf2F0oz49eFMEwVKaYQaJy0XAsb5YIU9INNf21f6DHq5fcVHTiLf5CdEhXySC1v2K37pFKbXyonkgUfECzChvEeSwvLVpHAUFuOTK5afYTz7Z6hc4EIjHdjGKzZswzf790v3omII1af84StaHDPvY3klNzy73MBVX+3dgi/UDX2iUbidgNXlBr67YzEQyJ7T4k66Y9UhWPE7n/vLySaN3Jr8bht+HNabNBH0e9BAaWyFTgyew46aZQMyuhA9YX857X50V1ztyaeP+4xSv1sy6KvfaKf6NKpGm2gNIx5XRunsKyrfGaa3fqvZmHVcBMg0An6a3n X-MS-Exchange-AntiSpam-MessageData: fiW+nvO5MgzdbzKNm8nUnyrqU13qLCLE7ZWfUqkPuh+a1JacSAlzun/UTrMLkNtO0kHXImSGjtgljwgIF0SKv4dyvZnK5yIvPHp+ddld0/vkK3b/HXgWTnwagGylc+fFNipdmjAimdcABGaHE+W0eHnIAp8s5ilI+yPxn1CxV6Z5YOhhEnqCc1IMsRnSsSW9kl6dGtCN29NsrvuNVba1g1uc2onEarzHqeX+zV1+o580yPrMVjGS59l8i/iv27vbVXZ/9ezZK612oEX1Da64fzLVvuFBZ53q8thtFvfteWODZ2kR/xTOGApsefPsr2qLYnAVzVMzzmtqacST6kFpXBNIPNhtfxp9Bd4ZxYQFOa2AIei9UYlzrVoRUq4N5vgok1rgPz28aM+m22zVUfn1zCzPIYFdSG3KLLsGPjTbfjTAQPXxbw3sd4ZIr8Evb44kyY2YRwzHTSSjET7k8DzWZw4cL6tnf4H4awtMp2BOZxPdJsmOnK7IXSa1ABuym+F/MsGUkcjJinarBde7MyL/CjHARhkxzjqpisgzQjvOYEQU2x0u/+HURi36tEPqTOnWfVhumR0E6m0D8MBxzEJ9j9HQMy0wenIub1UmyivWb9YPSTUWW6DZUPeHD/e4/C8WXwOU9o5vPKZtzuYvPNkqrPlzeRseEHkPAFr4hMtb0qYd29mVFM+/7NurHn70omvW/q9SlGHXj2Dw+bHVszMElqQqvCJPkQjRJH9QhCNs17zpmMkpm4UMA8RtePOofgU8S2rFQ9+T+s57cPybXXUEmnZCI1RSskv8H+n8euRNpbRw3AOeXg9PqYuLTcl7y4wjkRwAfwH/XJaxYtspzEtcjTUYTlKJX+/zV46qpaWpL80= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4030c4f4-1cc3-4dae-cf7d-08d7e5445df1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:29.6408 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Z6K8a9RZGnsM7KtoivQtB6DNHlCBQXzEuEhjDhCXx1+NJYDXeaInlLwI76GdJureZRs+blPqT++gGU1TiJf2Zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Firmware dislikes the driver enables PS when it is not yet associated. The current check for that condition is more complex than necessary. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index c73dbb3a0de8..c0c3eb945967 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -263,7 +263,7 @@ static int wfx_update_pm(struct wfx_vif *wvif) struct ieee80211_channel *chan0 = NULL, *chan1 = NULL; WARN_ON(conf->dynamic_ps_timeout < 0); - if (wvif->state != WFX_STATE_STA || !wvif->bss_params.aid) + if (!wvif->vif->bss_conf.assoc) return 0; if (!ps) ps_timeout = 0; From patchwork Mon Apr 20 16:03:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220942 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C6B3C3A5A0 for ; Mon, 20 Apr 2020 16:03:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 619DC20775 for ; Mon, 20 Apr 2020 16:03:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="pq9Dki7M" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729206AbgDTQDu (ORCPT ); Mon, 20 Apr 2020 12:03:50 -0400 Received: from mail-mw2nam10on2061.outbound.protection.outlook.com ([40.107.94.61]:6055 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728279AbgDTQDm (ORCPT ); Mon, 20 Apr 2020 12:03:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fwori2fQYLL3zoM2/UWYe/QQ3H6+bfCmk7dVMMwEe/WWfee9Fs6xFxpSJc3l7YlI+vamZaKhqaYrnf3R9epIj3vw8rp90wvVB2YeJRV6wdC5T4H71c+wYvDHBid4gwVaNsZpS/vq5WTS5n+nbWJGncnmmyLcSSKr+G6HEUkQjYw03zouL1zLUkRI0CMWsoxCERYCxwhpgc1czFVo3Or4jdTo5Uvyg34YW2ca/0sbyoQvzedO5P9rZ5HZsnMjmlSIuw+8lXswMZg0wg4KHZc4heZDRTnNjWJhTrlExqDHPhNjRG85LAbzISUzuzTgwaCEP594rg8f46llNm9WC0+xug== 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=XriGrlSX95bXHZj40QDpDZgOB9/D/eBvV6rjUtBDCyc=; b=G6A2PY5skh0JqIgZ1tlCBqcjN/jQLrVNZZR3gPXTbIsAKBYRwzv5NFbRh7PSzCBhK7fp4huGCINqBq9moxjtNWSFcSzDOCqcCeeSUdR2dmH7EyQQ5hr5DVwhq0SgX6kbQJalb2vrr/SYW+bp0qBknGBE3xkmq80gBSEYZ4mCnkw6ysyS4qG3/mZjienwQzOnQYr8rW3w3tBBNzwnv4J/B2KWjKzG86LbqDVZm6LhnIqTmq6y9UiSW9wEcafUJAsv6JyxGCGbAebYe+t1717LKhixdDqyFRogo8AesgTnJ/h+VaVHZ/HgFCV5HNgmUtp6d0wTKmvo2dCf6VEH00/oOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XriGrlSX95bXHZj40QDpDZgOB9/D/eBvV6rjUtBDCyc=; b=pq9Dki7MDumTXMqQSb4/9tdqv6g14Ml6ak4/mCPsi/WDhl3aexAemkXmrrzKXBOBsW4Quzo9epYs6xdMpGzQrCUvg/Jnfi8Vtpj5CAm9n0U31Mtrxq5Bouc2pyQGKLBfL1kSMqNMDAyzAeR1QnF9uGURXfYEpjy30qCSiFed61k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHSPR00MB249.namprd11.prod.outlook.com (2603:10b6:300:68::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Mon, 20 Apr 2020 16:03:39 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:39 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 05/16] staging: wfx: also fix network parameters for IBSS networks Date: Mon, 20 Apr 2020 18:03:00 +0200 Message-Id: <20200420160311.57323-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:36 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f9b80fd4-3510-4aa8-e25f-08d7e5446388 X-MS-TrafficTypeDiagnostic: MWHSPR00MB249: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(136003)(366004)(376002)(396003)(39850400004)(346002)(8676002)(7696005)(52116002)(6666004)(4326008)(8936002)(81156014)(66556008)(66476007)(66946007)(36756003)(186003)(54906003)(16526019)(107886003)(478600001)(2906002)(316002)(66574012)(1076003)(86362001)(6486002)(2616005)(5660300002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9GJBJTLQPjjmXmefPgq03BEeSWWhzHP0D/kF5YP/UEFLEaet0XwaOlSJ6uaCp0yRG0fKU9mbxdAUkbexg0pijfi8kt9NGonGCB6tqCaFn8gUIV0DaC65rx8rM71L2MhvvEUoUfA0CexvYS+zaqG45zfBCgRq5Cl+i+uS+W5YPI5aw2ncAgwUPwtb4K1BzYgcIDawn+7DjO/ABt6g/MIEW0kH0V8GJPqlM2YKtG8pVlvi16XEaM7xNX3xfPFFCi/UjXYtvf92mvkQP/74uF5Q+t9zREPAJIlyPxTiOW1VJgqwdU7Ts+ZVL5w9G1HiMlgELZvg4LCU3KDDvHdoVeDM1DJvGt2OG7tyT4SQM5QOzQarb0bMtVJ5mggqueNAVJ5blH4hVyySljGRylDWYHjxaL4+NHNST418CQ+0EiiMbmKlG0d6ZWBEyZB6Ihc/31Aj X-MS-Exchange-AntiSpam-MessageData: QtAArj4mOJ32biQWs4ZSVQltKg9U9i0E51TGCIoKXvl4g5tVOCNChTO/+RhZqFBHz96CXFxxNIQwx0/Uam2LzEQhXIZvIRLgh0STpaO8VTTgm4rSokjMNsHYwQwejY7Pe/gsOe52NYOCU5L0LYiX9E625glyWzZv7JNsz092OPsbA3O3321TtibAbwt492dbA7ZGzNQYHIGrVY1dQUrDFX5GfegY/RnPjTlSBekv9XPjBSVEXdd7RpoFPeJohn1XwazREAWoUzE544ieRbH2pWLa65XLMyozuoEY2J5V7I+cC/BYTYv/QsPJify4fgto7tuSFFVjgfF0S5iPSgaBdAJDHZadpnMlYRv6hh86JYqI8bQZO36UQXF2qlpTji0bAUqucUtSaCUZ+RXrVni+3s7jMy9qh011mTqIdOaF7ZyZOHis2xyAHWSpoh+X9E7vbtYShkYM7+oCSB4GkfpKgZh513hjMb54WFTFTGlrKkScOAi+8PPyGqrRhDVQjJtfAzAXGgXQB6seVkgPt+qGzwRtm2YfETrorpYMNfduSVjK3AtWZOyiuW26DfFoywr/Szj4pxSpeLJiTLvNKmFQPriKobZn51ABtoyVYePQGX45hN+RDFqZVHSlD+rTNMy6Z5dpoyuMffwRZS7xlVPskyMyzrk6GtWY5G7+Vdc/PM2WFrVsnHwoCkuL9ix0OcQO+Ul+JW/f+LJWu4Uv67guoLNe/DQKgqVuve0h8YU5JsZguSxUKD86UPjdkt+xyJ/QwMcioIem4rEUM19h8qcy99gQtI0km4LhvdXZ9NuvZoHtkYLVgAJpMqaxxWQdE6bNrpVoX1SQJUJzMhdz3x66mu20YXrbgghJLQoZAYVrNHk= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9b80fd4-3510-4aa8-e25f-08d7e5446388 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:39.0164 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2/noBMPFCBa1HRG1FQzUtd4DJclCDohta1CGHVtkEGmoxCzROQ/VO5JExQOzrXun4vT40CtKZah4RjqxZ0ry3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR00MB249 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Current code skip some configuration during joining an IBSS network. Indeed, it seems that this configuration is not used in IBSS. However, it would be harmless to set them. In add, we would prefer to keep association processes for ad-hoc and managed networks the closest as possible. It also ensures the values of internal parameters of the firmware. Therefore, apply them unconditionally. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a0c841658a0b..a0c7737903b9 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -494,14 +494,13 @@ static void wfx_join_finalize(struct wfx_vif *wvif, bss_params.aid = info->aid; hif_set_association_mode(wvif, info); + hif_keep_alive_period(wvif, 0); + hif_set_bss_params(wvif, &bss_params); + hif_set_beacon_wakeup_period(wvif, 1, 1); + wfx_update_pm(wvif); - if (!info->ibss_joined) { + if (!info->ibss_joined) wvif->state = WFX_STATE_STA; - hif_keep_alive_period(wvif, 0); - hif_set_bss_params(wvif, &bss_params); - hif_set_beacon_wakeup_period(wvif, 1, 1); - wfx_update_pm(wvif); - } } int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) From patchwork Mon Apr 20 16:03:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D3FC3815B for ; Mon, 20 Apr 2020 16:05:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5120520775 for ; Mon, 20 Apr 2020 16:05:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="atsxhcsD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729955AbgDTQFJ (ORCPT ); Mon, 20 Apr 2020 12:05:09 -0400 Received: from mail-mw2nam10on2061.outbound.protection.outlook.com ([40.107.94.61]:6055 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726067AbgDTQDr (ORCPT ); Mon, 20 Apr 2020 12:03:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WP3OCDMQVy4jXEeBFb0MqZjQMhnY4fdv+tEapJsxY9f4RYrSAN3rUZ4hqQMCx0Fxs4fTwzwjaR5a871tAjQlQEHtJ9oEisVHINdhTPgFJH/05ke29VZZxEJv2gBNJsTi6e0YkPtuyu+ifABteVhr2wkq/aVSuV3oKo1r8uN2T3sf+WWII3+Q0MLXHapeTv/XAHtxKeR3c4wwXsjycFYjFwFsFO5Ba5foTDSSqMDbs/iWWUp1wRiqDwJvlYqmO3GMyA66+f1l/69HkpLoEv7tf/VC+gc+av4OIIupV4v0c+DueTuDs3hqRxWET/s8OjCdgxtBJITXbOoHi/MTDgYBhw== 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=JiNhlmZDbk66but7bXaR9sdbK2SVjbBzmKhuoxaGOTw=; b=Xb+APXDtrmw851fkQgS2LU5N19wiB+sxJwcHg37Wk77shNHBqdN8dh7/WVNNNL6qjxZBroXixxA84nZRLvpszF93UInBSxSJ79ZrvakmedoPhW+ZDGRcNWspifhhKEWATMi+NOT47ZpbtYDHgysxPmYdsSPdfP3yCc0UYQuGf0PUJdNC9G9CTSdwG23/DPIpYG+QYDDFwldMSXwwm8tEDen8jUZvbAOV5XWXf6xFPnnnFE7DW10XkPf6d9Qo4wciNLfwHsYbwy/AmNo26MMVmF2NABEAR9X3QPOq/EiHdisz8GRfLKI1afso8bCMNOoAoUkbadkqavJdb7aHdGVOxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JiNhlmZDbk66but7bXaR9sdbK2SVjbBzmKhuoxaGOTw=; b=atsxhcsD4sxoocR6+cfRCCeyeRLWNXxK6lf63iC/T3D3BXMtBDT0nA+U3WCSCuiG3+Ogg+hO1zUIF5aCknlwKFqT+nzgmPXzYYflIo4koXdtDceIbFA/ix3H9MSbqw3Bya+cyPuXKM+keeaHR9vvGf7y5P9e6jPW8Lwzu1xyO9k= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHSPR00MB249.namprd11.prod.outlook.com (2603:10b6:300:68::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Mon, 20 Apr 2020 16:03:43 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:43 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 07/16] staging: wfx: field operational_rate_set is ignored by firmware Date: Mon, 20 Apr 2020 18:03:02 +0200 Message-Id: <20200420160311.57323-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:41 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6cfaa082-6090-4d95-a8ba-08d7e544661e X-MS-TrafficTypeDiagnostic: MWHSPR00MB249: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(136003)(366004)(376002)(396003)(39850400004)(346002)(8676002)(7696005)(52116002)(6666004)(4326008)(8936002)(81156014)(66556008)(66476007)(66946007)(36756003)(186003)(54906003)(16526019)(107886003)(478600001)(2906002)(316002)(66574012)(1076003)(86362001)(6486002)(2616005)(5660300002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dZyCU1X4D931YgyrOPUWW6ZlLUB2qNcL/eJrbl9drNfniExPsVRFdafZsR0+LFhYpdzCDt12HIHslXxbqrREnXxytmvZu2Z+lN37XspEWyV1Xsik2OAuMZ4WZSFLya6j2sliCGZxS1/DJasczUbPIe8DWEv9kKVkdMF6G78tmEBqE/wtfF1nrPsZFbx44iHMyNYUULS3hdffE8g6ZAMc8n5IRMb+8JZxyRcjBhtVosy0em9+F/2suqxeaJizI0XSF112jEzXqW5qP/nEUu3IV3IrSzWRm7YnWscR/NtW/lJFwVKEdE/td15Ku7TnMiALe3TGWcO9ofi/7tpKcTwkAYqdQui6jF4SUGOg5DczylwKwVWO00mB/xPVA29KY52AmJ058UqPQ7wmv1Fy8dkVOC5/gBqPwUjR1a+HmrGgTQvK7o1OHgDisBopZdOYBow1 X-MS-Exchange-AntiSpam-MessageData: FfvpstT7NcSiV3BYdffTzdxW1Yx9GyGidmokxxfiLj0gaWy576uVO3wwvpLhkkAI1H+jwjnOJTFeryoy4imX/790d2VYprOgJ2OSNCh4q5ydUFYWGV0q3HdvzZtkcn+lp9GANk+mmlBtTpNHnDMUxtZahEtAXb3FgFDmZWgEf23P3RdKpTxWfzmeh7sC2E3DjdCksPSlQCZOZyCRsCracHscrqakSyEkTHQELePTfet+d39o6Hqm6GP0gXZiNsPpjdhH7PL0HpcEw1TZ5o7XgxRuO8Im9XObngtyV714hHa6Jf6aAj2gmHqyf54I0YUH68nucb2GTJZRgWq7uGvyjwpsLJjrYpqTUQDBnLUHM9lR9fx5uSSIWustxprrQYQIBS9TX2FtjmQBb+ZN/IZj+yWjtqzv/Y2FIIoMoAq70sYh3Kq+kuS1nDVkqjv9wKlyd/u486Jo/CZPL8YrJRvS49fO2uEZXoctb6ONF4POn5xI2j6io670bB0toTp//cbG5HIxeQHJOvpbCIPKY9bR/SRLJvPCrRNy3ibHYO9bPluVCvlN5XNgASslNbIVSjP7fcnPOhrG3tEJUv9kEwNrWNHRnCpyPq62l3/5bH/CdpnsHS53OexAy6nrk4xrJkF8fP1ThhU+PX/yePGPDaFMd34wsGCA7kHd8kKtrLoeOX5c1cU2bxJGsB3aExaOFvX6lKxzaAodCQVhqlfH2FKRjjK3PT08fI7ouBeGv5zVnOokXRPtb6bswZrW5MJ/HxxRLqpc0sbEb9uSUoLp0KNAk/5PGlwBX4lLVneFyQhYxBwv4vwrT9xNhL11D9S9YuetKEMD75/CLpMNcBu3cd2D9OswzMw1HkPkaWJfw+C71jI= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cfaa082-6090-4d95-a8ba-08d7e544661e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:43.3904 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: un3Gc/0KqqLpWGlh4boO6ES2/+CcewF+5MQA7izpsk7D8uHTveNCn+IQJ+mUr3UFDVdmgtlM13mUfEe1JBF+og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR00MB249 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The field bss_params.operational_rate_set is ignore by the firmware. It is not necessary to send it. This change greatly simplify wfx_join_finalize(). It is no more necessary to get sta and it allow to save a RCU. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 2a9c7f28d934..6cdb40a05991 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -470,22 +470,12 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *info) { - struct ieee80211_sta *sta = NULL; - struct hif_req_set_bss_params bss_params = { }; - - rcu_read_lock(); // protect sta - if (info->bssid && !info->ibss_joined) - sta = ieee80211_find_sta(wvif->vif, info->bssid); - if (sta) - bss_params.operational_rate_set = - wfx_rate_mask_to_hw(wvif->wdev, sta->supp_rates[wvif->channel->band]); - else - bss_params.operational_rate_set = -1; - rcu_read_unlock(); - // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use - // the same value. - bss_params.beacon_lost_count = 7; - bss_params.aid = info->aid; + struct hif_req_set_bss_params bss_params = { + // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. + // Let's use the same value. + .beacon_lost_count = 7, + .aid = info->aid, + }; hif_set_association_mode(wvif, info); hif_keep_alive_period(wvif, 0); From patchwork Mon Apr 20 16:03:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220941 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46367C54FCB for ; Mon, 20 Apr 2020 16:04:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1EE9C20775 for ; Mon, 20 Apr 2020 16:04:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="emiCZB7Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729389AbgDTQDx (ORCPT ); Mon, 20 Apr 2020 12:03:53 -0400 Received: from mail-mw2nam10on2061.outbound.protection.outlook.com ([40.107.94.61]:6055 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729034AbgDTQDu (ORCPT ); Mon, 20 Apr 2020 12:03:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pu6rmvG9FngW2RMdYdVCT1tYOsax5Tb3irHutRrpqpk65hT29ZWp9vZs5SYo1QeqmPth5eeMXaSe9Yz7fG6NZnCB6FMkOVBDZTkOCjJoWHeP9X7G1OpP3YhFWJTbwfKkwXC4R7bO+iZlC8DM3o/A0pL7CheBj7JVJxQJEuRbKIImC8NjEExTCn3MsENK9Qc59u2wPEdf2gyZ7pokYi8SOxFdad0fDFkEmpXJyoiCQJC4cTGgOkD7KK9Qo5PfdM3c9b/SjIvN9pMvKfvHQKX1GrVBB1JOU0K1Q5JCIu/IJQdrBFac5IZeUt2FK1PcGzXRE7i5J8OBBt65HLFufHNaUA== 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=l70JogB9AaE6R6l9OLobf5gNGV2JilUclRV6+SgLLhM=; b=XPABDJ7nfioAaMokHF4JlQPBnUEiMYWO6j7XtGM9e9sjGj1Lf3gph6xRsHjWRCrhyGM4mR+Mbj+IhNDhrYrcpePg0pkJYgSoX9ekBrywLsylFCiUJLEjQGL0kcFr3JVSK4i0G2DMkiQSz44lfkxpGBnpagAPqxxwzJKjpWnqPagC0GddoOHApC+ex+IKp6fN4llIFC2ihyAXFKlazfDRMQ4unsl0qQ59pV3KgfDNHQlx8W8WmurX6ruaqVq2rMs8YdYHK6k9Jb+C93otkZ+U5wKyk1eiDXpUptz/ECs+QTrdsO3C28kAbX7TlOgofJBbogg+sRyqnjA6diS+hRx7nA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l70JogB9AaE6R6l9OLobf5gNGV2JilUclRV6+SgLLhM=; b=emiCZB7Q8NVP/ZI2ycPpiaKnzzjcOgx1Tvj71BcYUS3R77r1jTGKNlcgx93YDU4Gh3RnpAXcnca1HLnDzPrHmAbXPXxZ59YtaGgEMugGj71xOlbSaW4OsvGOsdsg0vgm62iErpM26u67wajBQUYUml7OyhdqOBbCBfw6IBV+r1Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHSPR00MB249.namprd11.prod.outlook.com (2603:10b6:300:68::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Mon, 20 Apr 2020 16:03:45 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:45 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 08/16] staging: wfx: simplify hif_set_bss_params() Date: Mon, 20 Apr 2020 18:03:03 +0200 Message-Id: <20200420160311.57323-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:43 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b811b26b-b4bc-4264-25d8-08d7e544676b X-MS-TrafficTypeDiagnostic: MWHSPR00MB249: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(136003)(366004)(376002)(396003)(39850400004)(346002)(8676002)(7696005)(52116002)(6666004)(4326008)(8936002)(81156014)(66556008)(66476007)(66946007)(36756003)(186003)(54906003)(16526019)(107886003)(478600001)(2906002)(316002)(66574012)(1076003)(86362001)(6486002)(2616005)(5660300002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9An8SdGPqyeOGQtmpiowlgVhnWGL4VnT0YcP1Rgx83NJY8P2hGzyylxgfcNoAvyWliYygQ1XOru6/LkXYfK+VBIin25aRIXpybmdw4l5SpvQvEBS7TD4OqlkCOhbB0rAO+065WbPBXdz0ibID1t4i1vlW35ZpJneh8DW1bIW02B4AqTMNdXQtZAuCNsFeyraffffc4ql0d3pbAxggzQasgiQsgxYVJuVdYo1DSLMST77zSWPCE+Tm7GiC8IQOR0WjxtKCdoAuHbm3xY8vH7MBpmVAh1V2W6NMwj38FYXqiU0OhzKHplMiAP9KJqt5o408c5sa0MoiDXeUoEyPADZAY3qrqSe98hPBuhFm+wqRbZWH8HZHeJkiKlrxTOgbQRdjcjMR2fsF1jn32JZh7WeiV/JP+di7okbWM3RAXjXVXtpRWgUzL9hRJHmXvXnumwD X-MS-Exchange-AntiSpam-MessageData: NK+rS6zkyaWLH2XfPf++3e3QsgruV99K+PijUrDL73l7cV79CSefjxyaJLtx9P8E6twuC32ZreEJDFI//6Sm3WJPeWcLc5KUUSJSZsT0xtmWbSSVOwxk0aoDHjwwgEIxyum+bhz0Ouo8frfj2NPrUFRW1n4fF+CZfFEgRq9rZjxRkB04HDoSWiexCRFPil52AfscxdTtdjMqbILVTp7W3UGsrG1+hUu9dG17BVY9a+pKLisoH4o+APejO+dC7twOQfk05RrjnsKehmZOJ0stc0bIz2JfvfGm6T7TiMC+iKH+cAnhe0+kppRnPx3qMD4VkfGIN8tkEQKco9yhiiD1hLaEg878faOznhIqqTeaVB6xpnbjKuB8wC6m08tBxnF3r2vjyXuKfPMIjamp8CqEY3YBfELdtNSc5dyPSqcbyFNu1FwnsZAuK8yjxQSwYKUni9+AFONj7Ve+FK1jrmV44Mwk1t/PNb1Vot4HPV6p0HWEd7m4dylm1ymByhxPhoa603lTyxvPOdo7Na7FmpgP64Rwfb2kNbtngxm3F1Y9l4TX0dliBRiV1X0pV4HdXCh8+9acgTzQaCdcLBxNTbKWJRhDQ9tbUAQAHALNI0EjJTXbc2JDTFNObeJMih5y9gO2C/2qS6pS24T9I1jxxcxI/ODiICH4d7QNWsYK8VUL5CSWK+zNHvT8MNZX3aqUNM8NJfCEZ2yYtlUTJjjjsN6O1ReMxFaLxkeKWqv6Rqdherx6cFRRG3U8X8bxrsBYQAylPIypDdv7UWncx9Iq2VxLyaKXRF166txqSU+RLwyOPVc47819YnHE8jgY5l62/Epbh6OlOFgVoLfXzjUF/wP/s4MXBnudsbjf2XqFNKB4WYY= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b811b26b-b4bc-4264-25d8-08d7e544676b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:45.5464 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LUpqtIRDnyPAbUEQrOahzkJQrO4pdApRcsbEP3X7ARNm/gZ2cpaAIm/vTq0U7JR94DEk7TgE79f4AUR0EIracw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR00MB249 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The structure hif_req_set_bss_params come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_req_set_bss_params() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 12 +++++------- drivers/staging/wfx/hif_tx.h | 3 +-- drivers/staging/wfx/sta.c | 11 +++-------- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index f49ab67e1a6d..17721cf9e2a3 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -321,17 +321,15 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return ret; } -int hif_set_bss_params(struct wfx_vif *wvif, - const struct hif_req_set_bss_params *arg) +int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) { int ret; struct hif_msg *hif; - struct hif_req_set_bss_params *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct hif_req_set_bss_params *body = + wfx_alloc_hif(sizeof(*body), &hif); - memcpy(body, arg, sizeof(*body)); - cpu_to_le16s(&body->aid); - cpu_to_le32s(&body->operational_rate_set); + body->aid = cpu_to_le16(aid); + body->beacon_lost_count = beacon_lost_count; wfx_fill_header(hif, wvif->id, HIF_REQ_ID_SET_BSS_PARAMS, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index f8520a14c14c..038ea54e2574 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -48,8 +48,7 @@ int hif_stop_scan(struct wfx_vif *wvif); int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); -int hif_set_bss_params(struct wfx_vif *wvif, - const struct hif_req_set_bss_params *arg); +int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg); int hif_remove_key(struct wfx_dev *wdev, int idx); int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 6cdb40a05991..1cc437f0bc81 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -470,16 +470,11 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *info) { - struct hif_req_set_bss_params bss_params = { - // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. - // Let's use the same value. - .beacon_lost_count = 7, - .aid = info->aid, - }; - hif_set_association_mode(wvif, info); hif_keep_alive_period(wvif, 0); - hif_set_bss_params(wvif, &bss_params); + // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use + // the same value. + hif_set_bss_params(wvif, info->aid, 7); hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); From patchwork Mon Apr 20 16:03:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03139C54FCB for ; Mon, 20 Apr 2020 16:04:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6DFF20775 for ; Mon, 20 Apr 2020 16:04:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VAdgMxnA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729627AbgDTQEN (ORCPT ); Mon, 20 Apr 2020 12:04:13 -0400 Received: from mail-bn8nam11on2081.outbound.protection.outlook.com ([40.107.236.81]:58834 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729516AbgDTQEI (ORCPT ); Mon, 20 Apr 2020 12:04:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gz+Zn+oNBJL3CZHylf1NrXsxqPeH5yA0LU6ykHsHwFFd2rmGI7aj4Kvy7dosDcjRT/B3VozQy68Guz3sNPw84bdkrdKeQ/coMF9+++9++GtG4FbGQ3sJuxCk0SMGxSXyV7MCeTTU1BpPAK/QaUHQacCK+VzBwc80LY6VYJvkhpn/v6lebU5kL+db0M+tTQo90dgGONtkMwHL2XEY0Jf5SFZUfBvk+4mR1EfZTZYzuCMveQRXqjMtdbRUfDaKLEFtjth5alY0RIXtap6NV0KsUk9SZVJO8nVmJ8OTLnxGfamXAyVj4cIyaNyFKqSVKzrQe7ET3khGYs2rBDZELKL5pg== 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=s/fe2EPye3TxLdUjir7fkQWmAuOO7PeGw/P+52PQOIk=; b=f8xlZHiNxmj8e5rfAHx+IeyamegUrsIVZNr99xYLUQRU+I2I1EsosV0cILxyd1vHknq8Fgb21506K0Fz8Ocd163wwMbLAb92g271t5Kl0oPSiyC410oRlz284nRaTKV3wzif24UfyVv2ms8K/v3XLe81A8Jl33r56I/r+Xvs4Gr+LvPcOHd5p85Dmn1aY+juX1gRGIXDCOK5qLSxHGmsYaSmuq/PnT/sAUfPpNERMCxYkbmGrOaac9hunKJGDw8eUnhCUSQW/J2DNqN4fqhTeq02v7e/6X1maqYfDI5ZZwV/Xwf5NLDkAse8aR94iwuEwqNu9Ph6LBxWBLe+ECeBKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s/fe2EPye3TxLdUjir7fkQWmAuOO7PeGw/P+52PQOIk=; b=VAdgMxnAgGb7VhmxU2IuawFx1Ama0KdEafY1G2+JjBhp7LWll8ja3HXUmOz0WT1WWP2WhTZsGjpXlkWc5jjCHipmcrKQZ0CSA23ZyhBky0ByL3TRG2C7cwmSuAHdHPIH/StzCbL2HbU/E3CZsb4BZ1fFkL5Ygv5SgnAM0NvPeKk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:03:50 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:50 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 10/16] staging: wfx: introduce wfx_set_default_unicast_key() Date: Mon, 20 Apr 2020 18:03:05 +0200 Message-Id: <20200420160311.57323-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:48 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cc6a231f-9de3-4c87-ebe8-08d7e5446a09 X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1728; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zb7uyjdtE3mHKE/2Pw4ZFz8DkyzSN/L5hLKzUL3jaIaIYkkfoPSIsuIGfjYSg/P70wk71lJagl7SqPffG2jqsVnd/7xXTHnPtPzEaosDz+esYKz8D/apVkbCty5nIuGSa9k16xv4DqxyjZQGMUYeFWa5Fv6tfDrXJ0NTa0w1a+q0O2pXr/J0gZZfjmMtBNMkjQrDAoA7F8nfW9yw4vVAFjTIgqTLUCixgvAQXIbSWgJ7/usbsr73x6CT53BKCGcjLlxtISPyZVg1SiBmJ8yJbE+i0Q6PZd0itk7y+fpGDVMlXveWCjbBlAnel5yfjnrc8Qk9xsPAVj2f+ItRW0uC/4g9PM0gG7KXXk0h5IvmoiuZTJilMEm6YMRsbAgeF32HJuEQrHF2cRdU8fbrK96GPy0PALyFXEl7qPZLzKUZuH3vyXhL2Ug25ndO1GNLXUlC X-MS-Exchange-AntiSpam-MessageData: isUYapJzr+2Q32UloR2uiwTeJi7NKpBNlFlwzDlpu2VnV/hCZumsVRd1DKihNmTHwqmP5QyyI65gbAqE2NNngfjZjcyM9h+OT49vqGcPCKZuarLr9KdAeRdZyB3Ck5+ykXRJ6DKcuy3RrQtdP10s7QMjTujGJbp6FazRuGTkDzIAf97YSFk/RX15pV7IWmpinSFj4tLW7ms+WR2hXcRCl3KEdtfg7ApCk9Ln/gtO3uxX4QSvr2yxfp+PrTSVhNYFuT1KiX8LCpUkpgLw3O56s1tPw+Rf3gTm+G9/RUQBWrm3Y/hCED/reuNuyLzCWgWrlxuLUf5aRasMDGQTvA/c2zqyrcyJEAq8ip6RZ5Mfuo7OdeavTaUIUtW+qzSRxKgNubG1+f+P5alRPH1q57NbgHJCMYriy+7xY5cbaN5cxoAOXfDHKLv/sWrUOD4NlpUZwir1TGrpnNTzUcsKFQv/EKeY+x+4AJHBTqbECQk5m+qVvpVUC83FDV49IOVPJxIhZ68rWPeL3WWNxiKbWcRwCQnyc9Yfs8SQiCf2quz4Cpp0lDI2rIGkL62twKgXyEn/ZTl74se6kIn4l1UD7ogb+X2cnjTwQoZ17D3nMao/5wS7a32lIXa1l3dIoHMP2Rtx7WDF5U482iHNNtLk4sSA7RiZWK8qtqbCxmZ62hcEvEoq0tn+Ia4EmkAVP4FT9pbHfodmARbCvzH5YLAlpTWl6JO1edwGbGASeCbbOfkXCiDqIPSM7SpXAkYqjrB913COfxIFR/ZKSywo+xF5LKXCL+6fzo3MjGUckbiz/ppy6i35Asbwl8xm1Nyau2dAQ6E6E2Jg0GIl/p1jgc0ppgsDgrl25kTHq4WXfvZINpa6SSM= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc6a231f-9de3-4c87-ebe8-08d7e5446a09 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:50.3952 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jetWrDLqWvD//sIfFVc6ZNB2EAOJZpwNvnRjgRANhF5MZ88+0rEtGdiKZ67qa7xNmnxBXN0vNa0tq7Gc3yHwsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Currently code handle WEP keys manually. It is far easier to use the set_default_unicast_key() callback provided by mac80211. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/key.c | 10 ---------- drivers/staging/wfx/key.h | 1 - drivers/staging/wfx/main.c | 1 + drivers/staging/wfx/queue.c | 33 --------------------------------- drivers/staging/wfx/sta.c | 18 ++++++++---------- drivers/staging/wfx/sta.h | 2 ++ drivers/staging/wfx/wfx.h | 4 ---- 7 files changed, 11 insertions(+), 58 deletions(-) diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 7b79b6175372..e3853cbf431c 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -257,13 +257,3 @@ int wfx_upload_keys(struct wfx_vif *wvif) return 0; } -void wfx_wep_key_work(struct work_struct *work) -{ - struct wfx_vif *wvif = container_of(work, struct wfx_vif, wep_key_work); - - wfx_tx_flush(wvif->wdev); - hif_wep_default_key_id(wvif, wvif->wep_default_key_id); - wfx_pending_requeue(wvif->wdev, wvif->wep_pending_skb); - wvif->wep_pending_skb = NULL; - wfx_tx_unlock(wvif->wdev); -} diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h index 9436ccdf4d3b..2c334f9fb2a8 100644 --- a/drivers/staging/wfx/key.h +++ b/drivers/staging/wfx/key.h @@ -17,6 +17,5 @@ int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key); int wfx_upload_keys(struct wfx_vif *wvif); -void wfx_wep_key_work(struct work_struct *work); #endif /* WFX_STA_H */ diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 8a2c96dacd63..cc7f924f3106 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -145,6 +145,7 @@ static const struct ieee80211_ops wfx_ops = { .set_tim = wfx_set_tim, .set_key = wfx_set_key, .set_rts_threshold = wfx_set_rts_threshold, + .set_default_unicast_key = wfx_set_default_unicast_key, .bss_info_changed = wfx_bss_info_changed, .prepare_multicast = wfx_prepare_multicast, .configure_filter = wfx_configure_filter, diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index e9573e9d009f..2f6f9faf15be 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -254,36 +254,6 @@ bool wfx_tx_queues_has_cab(struct wfx_vif *wvif) return false; } -static bool wfx_handle_tx_data(struct wfx_dev *wdev, struct sk_buff *skb) -{ - struct hif_req_tx *req = wfx_skb_txreq(skb); - struct ieee80211_key_conf *hw_key = wfx_skb_tx_priv(skb)->hw_key; - struct ieee80211_hdr *frame = - (struct ieee80211_hdr *)(req->frame + req->data_flags.fc_offset); - struct wfx_vif *wvif = - wdev_to_wvif(wdev, ((struct hif_msg *)skb->data)->interface); - - if (!wvif) - return false; - - // FIXME: identify the exact scenario matched by this condition. Does it - // happen yet? - if (ieee80211_has_protected(frame->frame_control) && - hw_key && hw_key->keyidx != wvif->wep_default_key_id && - (hw_key->cipher == WLAN_CIPHER_SUITE_WEP40 || - hw_key->cipher == WLAN_CIPHER_SUITE_WEP104)) { - wfx_tx_lock(wdev); - WARN_ON(wvif->wep_pending_skb); - wvif->wep_default_key_id = hw_key->keyidx; - wvif->wep_pending_skb = skb; - if (!schedule_work(&wvif->wep_key_work)) - wfx_tx_unlock(wdev); - return true; - } else { - return false; - } -} - static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) { struct wfx_queue *sorted_queues[IEEE80211_NUM_ACS]; @@ -348,9 +318,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) return NULL; skb_queue_tail(&wdev->tx_pending, skb); wake_up(&wdev->tx_dequeue); - // FIXME: is it useful? - if (wfx_handle_tx_data(wdev, skb)) - continue; tx_priv = wfx_skb_tx_priv(skb); tx_priv->xmit_timestamp = ktime_get(); return (struct hif_msg *)skb->data; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1cc437f0bc81..876952f39fc9 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -275,6 +275,14 @@ static void wfx_beacon_loss_work(struct work_struct *work) msecs_to_jiffies(bss_conf->beacon_int)); } +void wfx_set_default_unicast_key(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, int idx) +{ + struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; + + hif_wep_default_key_id(wvif, idx); +} + // Call it with wdev->conf_mutex locked static void wfx_do_unjoin(struct wfx_vif *wvif) { @@ -560,13 +568,6 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, wfx_filter_beacon(wvif, true); } - /* assoc/disassoc, or maybe AID changed */ - if (changed & BSS_CHANGED_ASSOC) { - wfx_tx_lock_flush(wdev); - wvif->wep_default_key_id = -1; - wfx_tx_unlock(wdev); - } - if (changed & BSS_CHANGED_ASSOC) { if (info->assoc || info->ibss_joined) wfx_join_finalize(wvif, info); @@ -757,9 +758,6 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) INIT_WORK(&wvif->update_tim_work, wfx_update_tim_work); INIT_DELAYED_WORK(&wvif->beacon_loss_work, wfx_beacon_loss_work); - wvif->wep_default_key_id = -1; - INIT_WORK(&wvif->wep_key_work, wfx_wep_key_work); - init_completion(&wvif->set_pm_mode_complete); complete(&wvif->set_pm_mode_complete); INIT_WORK(&wvif->tx_policy_upload_work, wfx_tx_policy_upload_work); diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 767b794fa398..fe728e642cfc 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -36,6 +36,8 @@ int wfx_start(struct ieee80211_hw *hw); void wfx_stop(struct ieee80211_hw *hw); int wfx_config(struct ieee80211_hw *hw, u32 changed); int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value); +void wfx_set_default_unicast_key(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, int idx); u64 wfx_prepare_multicast(struct ieee80211_hw *hw, struct netdev_hw_addr_list *mc_list); void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 913b80d024a3..0fa88de64907 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -74,10 +74,6 @@ struct wfx_vif { bool after_dtim_tx_allowed; struct delayed_work beacon_loss_work; - s8 wep_default_key_id; - struct sk_buff *wep_pending_skb; - struct work_struct wep_key_work; - struct tx_policy_cache tx_policy_cache; struct work_struct tx_policy_upload_work; From patchwork Mon Apr 20 16:03:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220937 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C495C54FCB for ; Mon, 20 Apr 2020 16:04:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CE5320775 for ; Mon, 20 Apr 2020 16:04:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="O66d837x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729913AbgDTQEs (ORCPT ); Mon, 20 Apr 2020 12:04:48 -0400 Received: from mail-bn8nam11on2081.outbound.protection.outlook.com ([40.107.236.81]:58834 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729643AbgDTQEQ (ORCPT ); Mon, 20 Apr 2020 12:04:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y7Hd0KyN06YMD8bt8yVekDxaQ/vEW8zXHmVRFG82Ug/Dz3RZnR6uIE7Zjj5FIFPeUOKVxfZtvv6NNObZINGIv+pI2E2otKz/CNEQHVSEnWJEt05PaNoBY5x92lgstiex2jTbmg14eXmQ5DFi+44jE+kFCCa2/B8uHFSbjZpspAulO3QAJIUgk+/+g9VQe2Q5qoLKl7JUHhCZklfEEbrdl1+ljMESgDx7srewifKx0/VAqZEfD01+94c81Vd9TcrijBR8rjIie+YumesS7cTvwyg2GvE0IjW5fF1Giy3DV4BX5D5AYVpO5sm7yO30msTz0u2dcW7xi17fTl6BVok4tQ== 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=Kk/HpxK0GTj7b/iN2wwOyMcMXOJ8aVE8FEbqA47Wvxk=; b=FPmSd24cXPOFJ+wepHJDQv1Px8PubHSNFS5BltsJ0Y+S1o57NJEjKeLsrQ9kHAjycfOMiKcpghpXemaCSRxIbLRTgrxaAlsrFA59lPYlUH9HE26uqFhXmdSFLIcIpsyX6I3cdbAOqhwRoPNackWplPwIu1ZYguyTg6dQek5uyRmj0GUpwug8zjNuLaQhT4xtFLJFBTMdqd1rpCN1PgSv1LiaeJfvB6nWAma6CBOP0RRI63NV8lCcWfMTxgz9jecZHcaRuf6sL6/ZGVeSpVWSNeeab3tVHoF8G9PDO6N/3opH9SSQoLTk6gJNmUbe9WkFJMfFrJ02NTxc1WfgNZd81A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kk/HpxK0GTj7b/iN2wwOyMcMXOJ8aVE8FEbqA47Wvxk=; b=O66d837x5T8TAT6CWUzZu1y4D0MlUjyaJkLpIZxq+MB6pH029WP1sU55Kx+fk2dzhZW5uo8L/d9n6ThEf4e1xU28PS6vrJYAvnQNRdOXTSAE0OecoFjzBxjae3RnN+EuptTwR0b3vzAVwIEsHmdNjkgg++UUK6V0PK6mRdVHGb8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:03:55 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:55 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 12/16] staging: wfx: drop protection for asynchronous join during scan Date: Mon, 20 Apr 2020 18:03:07 +0200 Message-Id: <20200420160311.57323-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:53 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a12be56-8fe5-41c6-c817-08d7e5446d08 X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(4744005)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4Zu+kwzgwpuhIyeNKBw24REyj6JO4wqWR2oVXyPtaX4pNlPVAnAVYph6z5EZYkmdw1V8HG1COaQD6lkf5V36Wifkl8FYlh32nb0XE1OlrGMez2gsuErGhVQyHTQraAxvO90OfwJOKXwU/gsepL6vOnKLzSWliCWxbQgqfl6K095yPrwDjjzXphUdwrjFoIxyeWh/Rvd4NhJN3zsFVM+ieIxtL8OlLWkDEPINhzAZdnVSmPQ+6fbkV7n/jN0FzMtfmxmV4FRCP6VC4W8IZvy8c4aOH+zPffDnS6y3mG1hS61DK2GXrVxlIkzoKmEUpjvqSpBHErpSwLRZ+JWx6H9jx8TPgj6Ds6rdvVmwynyRaOni/DOT3aoFq0fm3uSVNemdgdb1KJJRm6A/vs87n9fZBMQ/VNXQihe4oJ37oigGz+a1hCxP5z2nMKNkRt1gVZ7X X-MS-Exchange-AntiSpam-MessageData: rINdKNBa022eden3QJGWbFuGxCN3P9qGfwwme5oqHvMnmU94flXL/g0lXdlTnCpAMebqaEGYAZ5XDn1vXZOp2MKbPVbFQQ7RXcCQWGcD/lpITJo4ZU8Qxn4k+T4UGruGSmH3e5tGIKxzk6gv36zivUsgIARQg6eusbilAKu2lBpIsAQeFub/EXLVzGn79+V5JeQPgKNH9zsaDIUK7FwCjte3smydO6CedTTLvO7/4ZNEm7ST3JRIEc8oTLZjXVAZlv/g7p8Y+crfYc+CF6SXPQXixX7S0zhkxBv80tiD92AhaQW+nFlQjDovXjLIi5PcChgAJaCWJIQwqIbuNkvTcI5hXtHXCTMXIktbUMgWYn8azIcB+ioXsD3nAYpj+z8/JT7AzOgQYo4CXfD0O2DGuL6o+HzhW3j1fsgEM77Ez3kyanZzvR3FsB3NlfhwGHdSTM0juT00xxYFhhkntHaainN7Wxct9N85fEw3nyhBgV1E63JEm9+kKc0QCFsTzKwqY3MUbc+JMsYsYX/jIcwd+6snE2Fxe8eRh8IlhpiYaIvIEOyVRprGgzw6Vqpvd39GLY98i9u9WiODEo7AXlG99Vd0tT33bkiHqAa8PgWBd0SIX+g/3boWdTofMzrfTmdAOkc7FBgW64U03KPhCT4KIz1KiR8V11zlgu55SRia06X8X8286Pc+VXS4+eyu5vb5ewMnnobm+jHWsjsSRb+2blmcppkoktiDfwlbRrXZc2vFbnRrnz+1DaDAyZxhLzaXIGKQBDiEcQjI+VnEoO5wkroI+2+hP0gGBQseUBHNeNBx9LhqlngEffwhmUBm+kwLC+whe6cH/+LoNEIxo2Qf0zC1zB3Zo1n7QUx+Prq/DdI= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2a12be56-8fe5-41c6-c817-08d7e5446d08 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:54.9461 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f+nuxCNeehYLXg6ze5AIkQrTiuXcNC1/6/iGMEVb6iEmhe1/sMrsz2kVzA8cK0wC3O+A9Lkg57ydDEU/Q+kDiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller In former code (before the inclusion of the driver in mainline kernel), hif_join() could run asynchronously. When a join request was in progress, it was forbidden to launch hif_scan(). Now, hif_join() is always run synchronously. There is no more reasons to keep a protection against this case. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 276fdacd7143..76761e4960dd 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -110,9 +110,6 @@ int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (vif->type == NL80211_IFTYPE_AP) return -EOPNOTSUPP; - if (wvif->state == WFX_STATE_PRE_STA) - return -EBUSY; - wvif->scan_req = hw_req; schedule_work(&wvif->scan_work); return 0; From patchwork Mon Apr 20 16:03:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90657C54FCB for ; Mon, 20 Apr 2020 16:04:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72EF520775 for ; Mon, 20 Apr 2020 16:04:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="g8eUQ3z5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729838AbgDTQEY (ORCPT ); Mon, 20 Apr 2020 12:04:24 -0400 Received: from mail-bn8nam11on2081.outbound.protection.outlook.com ([40.107.236.81]:58834 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729710AbgDTQEU (ORCPT ); Mon, 20 Apr 2020 12:04:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MExWu/qY9IvU5qoSY25HcYgSBGny0vDk0w0QadxJxCEQMbasC4PcB23PTfUbmsmDEZ9XGQHB6S7agulGNJA1zxPkzXTn7xh85Edz0HkMmxjvjKD3g60lRJ5NAZXy8t4uzAPKSTUbI6qKURrUlrVDxqx3Apu72EYhx4NUdQoLiCBGDNQnt/5kwo2A98dTygUF+dLgT7xiy8GndZAsXwEXOO0SqYkHGIR2edbnv5II/JZZM8WCDORUBC7vhxBoFy73/O/8wCsJDQnppXGYbsPQ0sfvxJtSU8cVLQzc7Kea8/4rWlHXh3ZxApRgkcSYfbOyKkylw6L53hptDZznr9O9Xw== 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=DURtoK7Eo/KOt2TOBS3HLim3hNZQVHhh43H5x2GAUvo=; b=exbhzELWKN7hhBPh4Rz7AjxHWIJMF+U1pKcyHz0Glw2HKDTjMZxjtdY9lVNrFwaoj64x33lm8ztAdG+iSilr2ypeBa++aYBgAxIsGbBega45lnhJ8HDLqDkPnTcrfAbUftVNqbyGUZAgTdP7v0/ok5UOplWpJM5McIb7C3PDT905vy/fcXVTpuXtf1iBrZVOLsq+ifcn8u3YZ8D5zzhC+p4LNDH+re8+3MO3pd+55OgPfPLKgr7FRu7rGLIGMvRIYnxiR6hjJ2wmAOniJyoFdLxSHQ44NoQtq0lTnfHZ2i6rUA3h6syoy2pFjjm8OYfaH5YHq8T0oWoaXxYR4W7/IA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DURtoK7Eo/KOt2TOBS3HLim3hNZQVHhh43H5x2GAUvo=; b=g8eUQ3z5xYOm92twCWDkWwNDxgrygID4zrYbJULAArgEHOCbbis0Mct8LrDJsklko0j+HjKONr2vEHSibp0Ss0YvUt3szo1c7OZeb62alQe7j4Fub3IYwgXZZ5HXXxbGWhxFYlcQ03dnNeCF0vvuVZgMo3QsT4go/9DOogQPuPU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:03:57 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:03:57 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 13/16] staging: wfx: drop useless checks in wfx_do_unjoin() Date: Mon, 20 Apr 2020 18:03:08 +0200 Message-Id: <20200420160311.57323-14-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:03:55 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0046ccdc-f3a6-41c9-99a9-08d7e5446e90 X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(4744005)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MCXO44sGTc7ItFqXhccfQ5FLRj0q8yOg4QtBxxTOXlMAG6Td8bQAAasXdsznPZXWxfh52cMaZpP+cEiMBu4oElWhK1ZeZH61W0YOufUm6/j0tU9j4gC4Gk2H6PVN8GoICbjFwV0Ayt80yHlRsSo+fz9O+2rCjOlgOnDgp+TDh9KozLAZRI5QV4H9c2sTPXjbrCstzOQpzXwjw7raO+odJDW8uMxVtbTuEUGtxD219VZxR9ILFC5lVCVZFseFBFbFo4HnFEUpVY0TVQEuStjeFdjn9Uq4hQ1rJEGWXNRGaxeUytGOc9uuqdL/sXyb59UDzawgmjAqUWGqZgQLK4cqP788JssRxj8XDBMTCfRdgu36W4TJ/UIwm8jMDPF3GRM60+21OJMgUUbtv4P3WDCeglGc4j+VoO4vqmiQ8X+YzVM4TcK8RR/9fmjKNZNvXDsy X-MS-Exchange-AntiSpam-MessageData: 2L65xFSs9gGcpRE87XR7DFRt7htDr8UWSwRIvZYC/eUeJ4VXchld1EypyngKnbN1YtCyV3qEqgrYepm6huTAY/q41tu5CmoIyIUuOg2+VcSOEwLpZe20kP4H0dMcOlnxD3gBPsBgbOw9TpfBv7fyXda4jm+3KVjLJ1BzL2np7ZpRu8q2G/GJoRBfZJhXKJHPW4Z2DjDPjiDYBi6774c8Ii/jmi/BYNZw5h6Rds+7uadQzoQH/sTZMjLURblSIXgNrIrqQ7tBiQ67G7RL3KMI3bKmu8Z2Soum3d+4luYJyD2B7yVaT54K7zw555Ba4UVJR+RAXAIGn+Yb2DbI3ZE0G/wnlWMWdHeK+f81GATuBEhJkoQ1N1S0V/+vIzJTw5NIYiH2HPrt6j8V8z+8A1JS5ehHg0JtLliiST3K4lhP1iKp93aDh3dV+ly1IqwW5HQE5zAcBzWLDzAXefmxFgjoYqscoIFiF0GHFBjWohyxX/XU62lnuG7EBg9efkQefBz0CrFHyA6GfmUhzd26lEtJwIkxShGbxaE+GxKx2EQh+9AlUTn6OQBcehbdGWEmYr5yyD647tdb+fjfbHjo78HHymQ/npzIOpLFtGsE13gLSoTabn34tgYl70qRwHrAHF+69EKtN+XwzY88smIWfJswyruTqrnZzuY9M2+nNgetq0dXKe4y5CBE8gsunqc2LRLgEBP6htZT/jiQnbnUIufz3KAgVaZwvMoql8PKMd1fCryioasOr2P9i0GgAb8gbH8XvHQJ3enLUBZhIHG+uuDeOClovmSPaubbvSoHDhlSqotpE1OidJngmCJNEznNnkInQxVxScMkIBpGsCnubthxSUb7Jn30R5Wo6wNZBlaFKZ4= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0046ccdc-f3a6-41c9-99a9-08d7e5446e90 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:03:57.5329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yz7mZRQeVWsGF6FpiessTpCAjKx+uV6IyNokODaP6Z/yrv49l3Cdwwsvkt5tG3dbhM83qPm15lqLC5mpmv9IRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The callers of wfx_do_unjoin() already take care of vif state. Therefore, it is not necessary to take care of the status of the interface. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 56cb6fff4a06..bc891b6e4392 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -286,12 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, // Call it with wdev->conf_mutex locked static void wfx_do_unjoin(struct wfx_vif *wvif) { - if (!wvif->state) - return; - - if (wvif->state == WFX_STATE_AP) - return; - wvif->state = WFX_STATE_PASSIVE; /* Unjoin is a reset. */ From patchwork Mon Apr 20 16:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 220938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E6DEC54FCB for ; Mon, 20 Apr 2020 16:04:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2369520775 for ; Mon, 20 Apr 2020 16:04:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="OAhQ0f3+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729883AbgDTQEd (ORCPT ); Mon, 20 Apr 2020 12:04:33 -0400 Received: from mail-dm6nam10on2078.outbound.protection.outlook.com ([40.107.93.78]:42592 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729774AbgDTQEW (ORCPT ); Mon, 20 Apr 2020 12:04:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L4M4eydqaMyCK/goeNXQ5c5Psu0+7f0hhaX8M4mvMTrsuQus7+oKDtX+m0zg1rpkpR/YMz+OciYLrEWJlMNTW1lFLmD3CTkethW/VrFD83AnAeEXuBnd9XiFZb+lciLbOW9jIZ+P6FgcBLBuq6PxBmW+7Hf24dOiGG1w43oM6lFgfplFS1+OAFwu/7Y3FvxekAIGys7XgS1f58Zh8Re1tYzFb1ZUS6qgOtFDuAZC8DQxdipBFA7Tyw9meqe59mj+nrZzHx3Eir2x76p+/XdV4LsQpz1JoTfPWtrmm5tPatVADNQ9SAIfHSBhVzosMXWAgOosIx5ygJVY3lxOj2oFmQ== 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=5GYORL9S6ag8yEDGlBsbGblMNWbfeLXB8ypnNKgy/cc=; b=ZNjzvhti9Er1wPeWMaqEDWstKrDjZKPspQn+78Kmc1o3BgZIQYDqMmqNCuMoq/cVjZQFqT1VM5rrhB6P65coZPIt7NzuAnZjH8VKdjgXVXASB6Rmd6W8BvU3LI0Cq4LCw56i8ifgJj4pg8C68DiZpNJCbu9BKNDnOLELpYlwFOsUMtNpCkfpIs67xb85UnR+YsdAYign7APiyPseIf+qG4VX9wCnpzLmN1kEG+iS2g084ivdOqXvVXAyJe+8UocVxVebHD6miHGlmsb/5zHXvklLgqueM+DTNchwNP//HX3oYoPDnadUe0V1pqNJHyqIzvRLIC7XYf48/g0gCanGBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5GYORL9S6ag8yEDGlBsbGblMNWbfeLXB8ypnNKgy/cc=; b=OAhQ0f3+a5fXftSKoNQ1fZHj/KNw6xXoaCL9Rj3vT8bw55EwVqyPTQF3jsm5NEcPFw6RmH8VRt33Ue9Mx6Y1zgY+NIgBUgr8km5NlGT9+Xmwa229GnwaEeRfbb/t+DGFYYZ3DcJCzRHQmI9BcuGuhLcc9kXQ/2Ut+gO1+KCfvLw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1792.namprd11.prod.outlook.com (2603:10b6:300:10b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Mon, 20 Apr 2020 16:04:04 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.030; Mon, 20 Apr 2020 16:04:04 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 16/16] staging: wfx: drop unused attribute 'join_complete_status' Date: Mon, 20 Apr 2020 18:03:11 +0200 Message-Id: <20200420160311.57323-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> References: <20200420160311.57323-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM6PR07CA0065.namprd07.prod.outlook.com (2603:10b6:5:74::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.26 via Frontend Transport; Mon, 20 Apr 2020 16:04:02 +0000 X-Mailer: git-send-email 2.26.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd0b966c-a30c-40fc-d7ef-08d7e544728f X-MS-TrafficTypeDiagnostic: MWHPR11MB1792: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(39850400004)(346002)(376002)(366004)(396003)(136003)(66476007)(66556008)(186003)(66946007)(4326008)(86362001)(16526019)(107886003)(6666004)(81156014)(7696005)(478600001)(52116002)(8676002)(66574012)(54906003)(316002)(6486002)(1076003)(2616005)(36756003)(8936002)(5660300002)(2906002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Xqp/e7gvyTxWJPzZfltW3oBlzyzGmXe7iCnXCQKeA42uBHd3lU4gnl50yyu79TEKL4jgnWsGaZcTsWGv2Vhm9ODd0ZNbb2TbZQ4Jp5XWBgonoRFS7MpfAGZmns1nNfVqhG9EZ9aLHDpN1nhakRuQAmZ3xALj6L1BC4952+DX4Vm97TavCNzhRDeVaZGMoRkJVD6dIswDdCTHkrVGhviWjngwqtfzJMxaTBtM1+j7LhkCpqMGdnOyjcg9izZpmNdm4zV/O2O1O+qYzY5o0Dted+A6/eEEFlM5iy/iHrC1DDIVN7T3o03BuzjzKZm6CRx1/NyateyDRaO/knerBmyJvCFByn5MpwbLIVdmbr7yuQuf0ULQvzJjb1bH2IkmjaJafEbKByrYd1PNZ8sM9K9NlEXPxxW0jaFxZLPIRoMG99WcrTuU58QiHVOw2Ogd4P6K X-MS-Exchange-AntiSpam-MessageData: EfOukIfnxptBy3qLWXBoYi+GH+uNviOmdgJJ9qE6NM9+R+4RTiyNPsMrp/P5dGd79NM1Fvvdt4dhvLOImPVtQDA50o9bFfPwyDxI+9ZASOCOWgfCHgYWDIbL+l0SIcthFAzTjUB9tnLWfZvMHAdX96reJoRpqPibwbB5GA0XqkjPAMhQtsD9qq0/fVDe4tonT+CYl2gP9ripZ6+wmmcClDLfygzK926nA0tYkk3yJYWZv2kU/fc++sMrTqz/j4aQ3971haqoIWv3hh21Rsqaf4BQljQm+x4ZEacKFZuOY3a2HfyZsdDdBXhQaRcDeivHaqkjWaQAkppaaj/JNiejv81RgOEC7eaqJ5+VjNYmINeQr4sWwbLICltb8dpVsVrlNReu2cZHaTqC93tFss+6OZ2SWNnldlUlflaYZja+UdLaKe+6Zb5se938+fWeFhz2To29k25+AJyhiZrs5KrZjoKy6le43Ty5MdLuePPgGgT98TR3Uy89tohmuslLxpzkMZhDVl8nkSwcOZCvI6+pa++WYLdj48iMRQVqkKqUueamJps3W07Y0pktspwY4x8VuEKuiRBTpE+3+GBdSWC+1im9qtUb69TPy/2cTEzvwr2RK5y8EiKUXhLz16ifOLrhgtb4+xfjHGQ0d3ygzlz8Wp1d971IS92/WDttjw8f2KUmSfVHHcG5h8W72KD/ZDbcTeqjK4QLkwZJtzF+Xgxwqs9LoLkLTPu6eheGNyWKBUIYRb3TkY3+Vy6iijZEQZIlrwwQVHgoSYfL+I7P6ybSVqT1sG7IUwTDJDjDDGDPcJUW+FFc6koeJHf9JXaFO1f2ClpL0UiwOMNPNOAQrDyxmqv7guZYNUkhODAQuXyc1C4= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd0b966c-a30c-40fc-d7ef-08d7e544728f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2020 16:04:04.2859 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wOmbIbVLCI4U+GdrrwYGebjUMCCViDwiCtSo/vkj+x9KSYSvHFL5hNSOxfYS+lYtoA3xdjgcfJMLUCizRNynYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The field join_complete_status is never read. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 -- drivers/staging/wfx/wfx.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1e43e3b65953..5d5c8951f50b 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -361,10 +361,8 @@ static void wfx_do_join(struct wfx_vif *wvif) ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); if (ret) { ieee80211_connection_loss(wvif->vif); - wvif->join_complete_status = -1; wfx_do_unjoin(wvif); } else { - wvif->join_complete_status = 0; /* Due to beacon filtering it is possible that the * AP's beacon is not known for the mac80211 stack. * Disable filtering temporary to make sure the stack diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 8d29bf77cfed..706e95cd1092 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -82,8 +82,6 @@ struct wfx_vif { unsigned long uapsd_mask; - int join_complete_status; - /* avoid some operations in parallel with scan */ struct mutex scan_lock; struct work_struct scan_work;