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);