From patchwork Fri Apr 10 13:32:32 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: 221283 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, URIBL_BLOCKED, 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 01390C2BB1D for ; Fri, 10 Apr 2020 13:34:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C64B920769 for ; Fri, 10 Apr 2020 13:34:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="nl5nd+6m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgDJNeY (ORCPT ); Fri, 10 Apr 2020 09:34:24 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726878AbgDJNdd (ORCPT ); Fri, 10 Apr 2020 09:33:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjcVnDgT/kpUY9C443We4/V1Bh+tqS3ZJm8dGR/q3PSUXGRHQ77G3mWzuBijqOCysEkcVu1rKOfgdfJe6H773LGdxa553n0W0uu0sW8IlcyQlbh9/7qBNDk/bbx0UPjTwGLuV5ya5d9TTObDn5rWvXhzh0Bqr8Kd0jgv1ysDVD2R7i9rlWvpzTT0S/QkQoNqppM8sN6gZ+Wf47zG+s7ydhk/ZcKKfRSyRAG7lhkUzrepz/zxHXyNj3dCwjC43X+SSB7W3hNVqCM9v/Mf14g3CN3r/mZKNom2+RN0JSJbhUHxtLI56Z3cCu0H/KKX6kKdgg3Ep8eBw4beIeKyztn0og== 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=sYn8EeJqHkBzXGtW91SPJndcamQP1AoszTMhx31mvTg=; b=irggwoTcbN+1jQPy4CDk0tvMPSEWK492izA9vFAZMywsNCSRFp9lfebux9mofzobhOBRZIMA5W+B2tZSsgFpmvFmrFW1jIfWp4l+HLHolvB8zgEPPwc5yDtbXkyMJkUppsfrMgfdQqAh3oMyF3b3qZi35K9VnT6URoWiExm2eWLML7ffP/y1/F/Ez13/F7HnSHUjLa7hsSoqkGUln5im69DuK+mHsW/2CA+dQYupXN82dB9LccXlbtzyEyBIItCUDzE7mTZKuVUm9xo5Eq9LCL8pDfi1gZdf1xyAaPE/xpE7lBjFvNehnMWCg3vvKyU5YriedfF0LSp+BNRkpZBJeg== 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=sYn8EeJqHkBzXGtW91SPJndcamQP1AoszTMhx31mvTg=; b=nl5nd+6morrG06AXrNaIGSlGnHdi7E7AswbZ+w7LDDdMjnlw4mQiG1q8NYD3TFtghw4O9+86z7pfO9vh+M0BKx1sgwc289EVbCbX1Mzfoe7yVNf3C32F7cp9iLC4pRY9LmaN2gM1D7ycvRKViohX3EZI5TN/Z7BVCpvcGvqjzE4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:22 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:22 +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/19] staging: wfx: remove unnecessary conditions in wfx_bss_info_changed() Date: Fri, 10 Apr 2020 15:32:32 +0200 Message-Id: <20200410133239.438347-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:20 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df234838-656e-487a-9dbc-08d7dd53bccc X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: w1exqkQ5OPIBN7mVCGzw5gZGjmiiRkrmY6sZoNLKY4qvRww6t7EocahJBsfGO7f5vgLO9xwz7MZKq4AkJ0Rb4H3LB02D1xornNi4Ng8Y6/d4t+kHmYioNFXmwoMHU1o00pqMds+34Cg4BgWvGIPndBNUhXBsLZ8htA+Q1SvfDFJJMG3i+18dYaqi+91S6SbclIzkMJmI89hdQJW6+JltMBz152dIe6K0NyEZf/QTtpdcvwNR4524h3dtPRb73aXKdlVkWkXEOmjYw5jQ8I7HKqh1ZxSeFfhvqWPLaqiIHzBUAOLbcTgbBu6uPlkEqB7A50wNDtYBSDtzwJeTdFl2bIBOvt38LzHDZFwGVEAR/VgJ9u+/v8uGcXAmv8z8apCSZfsdJSb1zHc9tfvF5xDhv/zaRrokWn1o0WBFF194H6DC6A3lD2St90xZEACAof2l X-MS-Exchange-AntiSpam-MessageData: 3wV1dZaWkdXRCil3cA/YqKtJ40rQekQTmF5FPezzyFIAuZramoHFq51wr9GuYaEbWLC7xXEdfZcUqWL9lf3R8u4pEnVcNA9zhdDxvYfZvvIY2qm+dnz6eHvFykyUjzJcem/stH48Ne7e3IEAXue3fPzP0qOdlqJMC8GuL4ko0iJJOSfbgyNAQMM6Y6ZxpZRXRrfB4Fxb5oLBq1lWeb1DBQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: df234838-656e-487a-9dbc-08d7dd53bccc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:21.8643 (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: Cv2jPwoHeYD3ECL7LmenIamPGAmQt5fldtZOMvaLPdErDreL65GSYKKUP8QaAngmSERhMPJd+I0HW6Vs2gYk8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_bss_info_changed() update ERP and CQM related stuff. Thus, it check the flags BSS_CHANGED_ERP_* and BSS_CHANGED_CQM. It also update ERP and CQM on join and leave by checking the flag BSS_CHANGED_ASSOC. This check is useless. Mac80211 already do that job and set necessary flags as expected. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 3512e59f0968..11d62de531e7 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -725,8 +725,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, hif_keep_alive_period(wvif, info->max_idle_period * USEC_PER_TU / USEC_PER_MSEC); - if (changed & BSS_CHANGED_ASSOC || - changed & BSS_CHANGED_ERP_CTS_PROT || + if (changed & BSS_CHANGED_ERP_CTS_PROT || changed & BSS_CHANGED_ERP_PREAMBLE) { u8 erp_ie[3] = { WLAN_EID_ERP_INFO, 1, 0 }; @@ -739,10 +738,10 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, hif_update_ie_beacon(wvif, erp_ie, sizeof(erp_ie)); } - if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_ERP_SLOT) + if (changed & BSS_CHANGED_ERP_SLOT) hif_slot_time(wvif, info->use_short_slot ? 9 : 20); - if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_CQM) + if (changed & BSS_CHANGED_CQM) hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, info->cqm_rssi_hyst);