From patchwork Fri Sep 10 16:04:50 2021 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: 12485409 X-Patchwork-Delegate: johannes@sipsolutions.net 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,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 67E9DC433F5 for ; Fri, 10 Sep 2021 16:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 365306120E for ; Fri, 10 Sep 2021 16:07:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbhIJQIP (ORCPT ); Fri, 10 Sep 2021 12:08:15 -0400 Received: from mail-dm6nam08on2067.outbound.protection.outlook.com ([40.107.102.67]:47841 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231781AbhIJQHR (ORCPT ); Fri, 10 Sep 2021 12:07:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XUJYlF9ab3logoViUHlIgmc+n7OvggGLKOWdzIUFvSlCSHjORSlqalFaxFkwE7Y1mtp6yuxNBmGGge3snSMEbUSO26LEPVMR2pGuY5MzXQoTNLAQcaKVqauFfXljNzh1xJmgTnnZtMSxayD5bLwFsq1uZcRUMuxUPIsuBAhoBJ2nOFmdS96iOMyW8sfSQqIlpCjT4NXXHacFCsRcIuWo+Eemw2B0VL6rNug5h6K9mRlvXP10Te06fz0juqZtAjDuC1rpVgRhcDcyCB5Gh/ghdmSDz7E/Y5LVvM9juHqDExPi89X9WNZmpfHZEo6s5ppPv38f7yRuHoj5tyk41MU04g== 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; bh=62Px7Pc9Wfa37Yp8kwwCsox0dv9QXvJNMbI8fHPQiLQ=; b=JSt3/884O+HAPVpZmk02cDBf+dkX8cJpaVYQA13Xg9+AsSHpDQR6cUULVj69V73i8i751A5lIULzfwZZI8bazPmUJaUu8Spxz0FtN0WKagjPiIQVRwbtTpWcTPWrgfIUXXssxiXuK6iJ5jUT20d8sOcvFp96jMwPeZV47JGQsYArD5X1sWQ+i5GT8Kg8M5H+9oHdOCnXsY80DwqH0x8hU9Zsbc0ZC+DvRQjg0vlp9wx8yp/wvRnf52Z1bExhZQnUs5FTcW2458gaOhJewnGIvdqzvh6XT/1WHEaLAeKl7suTFY/fcL8t6qZ1Wd1UZBruDAXKN/GvyhZylnErR+vt/g== 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=62Px7Pc9Wfa37Yp8kwwCsox0dv9QXvJNMbI8fHPQiLQ=; b=bbE79FzZKiQLuCoIz6/GQ1F1ws6s5mi/6qA+bmjIwsjqGzE6w4qm8YWgFRLRkWGyrbJxhG9Dm0ZvM1hhAeUTErfe4+baZedykafh6q4J53qpcW23Z51NNyV0aJZdLwQ2siS7TI5u94cVBsiM/wb2q7GS4DC9zjMKXhJTEdep69E= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA0PR11MB4592.namprd11.prod.outlook.com (2603:10b6:806:98::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Fri, 10 Sep 2021 16:06:05 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Fri, 10 Sep 2021 16:06:05 +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 17/31] staging: wfx: simplify hif_join() Date: Fri, 10 Sep 2021 18:04:50 +0200 Message-Id: <20210910160504.1794332-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> References: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (2a01:e34:ecb5:66a0:9876:e1d7:65be:d294) by SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Fri, 10 Sep 2021 16:06:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87b87beb-d28b-4297-8f1d-08d97474e497 X-MS-TrafficTypeDiagnostic: SA0PR11MB4592: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WC+xBuLWmtV6j0Q2lSSjm7WrPIFyM5w1NOVsx9RKwpfUzDEX8doIQrzdsYEOzOm10qMsyXGhVFNj/cra3hcO8FS6Gr5F4om20PKheCzghtDe1OEVBkO/HWexa+khIY7ZqW8AZh1mNS8ps0rOw/2cTeFoDyY4vsGPthUaIdBVAspX8pGVva/DVg3JTb72pG5A8NE9FZ2IShkWAwmQwxzQA2X9ay7T/r8iMzLCZkd+FjddiNCl+s7Bg0f4oUaesgeKnpyqgfAjdQzE+iIr8dT/bqPSDsVgNpoGyOMTJBhWLWfZUuJsM4PzsiKXsnLfabLgVl/eQjEgrF6gU+J4D59o+0HMvLF9XT6ll0TPNg7pixMnJqkIn8aPyxWQIGLrZkDetUQrxfedG6VkYua6bLFiC8EJ/6rifPjKHKc2hIU+rpkEiplLMpolD0Mxn56ebs2tIVXjfhwIawWgcAPNTcorDsDe2d6yueDKD/TvT1JpnjktBm5IQGJoq1YabK3i/gspNTWi35Kl/XULXPneFvkxFOrYUZ0rz70J4fTatBuZ2fGfTMUbowAp01gXvZnrOeI8g970Xp9t02HGcYDdRlFHvlyKrmOnTAgbFWsj1J7jZYO4i5vFzt/5FLyIzJa2xrBsoM7yYAI/DoNgeDGw856tTg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(508600001)(2906002)(66556008)(6666004)(66476007)(316002)(66946007)(83380400001)(8676002)(8936002)(36756003)(86362001)(6486002)(107886003)(4744005)(7696005)(52116002)(54906003)(2616005)(5660300002)(4326008)(38100700002)(1076003)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fyUZRIZLxHBuT7QLRiyCz1QuESJa?= =?utf-8?q?djHY/m66o5IB5BKPlt5CtU+KXgdNiZTTspSkZVegCZnwY87N7iPIBDmyJOLVq89lR?= =?utf-8?q?Dq1KHMlgrc9E9sIR7yRr11D0vgB575gAPg/Ky1qT7OmcaSMLq6cIqmHHZ2BeGx6BN?= =?utf-8?q?WMnaUfIaVpEYqK2C2H4aB9bq0QM0Vxr/f8mRnZyO/nw+oQxX5Gr+Q8ER5LaCIeexZ?= =?utf-8?q?DhAbw6KlJYYMx2E6+zPW/hiu7tUbGZVpZYkZS0D9Q8l6JHvzGm6QfBDdy5ktYL+Gh?= =?utf-8?q?pT71n3HzdCV9GDsS0MvAzqx/yh8rDNZcxo0ZbajQ3lD3uV7JnKCNX4yAYtNfkwPv/?= =?utf-8?q?h9V1YkIn8mCTpj2OgRZy99IAllWilnqzvxJ0kJBAUmysTp4M08pcnSe8WAOas9lMG?= =?utf-8?q?YQthxRWm9i45u/AODOqWIulfHq2bUeAyGpTAnCk/1jkgPwtftJ7OOS4D6iUy+TEhx?= =?utf-8?q?ZvKM/xEF4Depjn/DS/ljROpNMmqfGlhRMGIzaiy9unGURmGzzKZuhFnwq5Da6BYyA?= =?utf-8?q?LupdjLJcOuuiBtLAmr5kL90W3gjfWTUUE9VPDNzHO6rZrFOxjiMthRRFRBFAf9IcB?= =?utf-8?q?hJDv8v+E71OQKve4KRVSeJQA7KDeLoa0i2zEUKHpVvd6B4v4ixv232wjTN72PDkTQ?= =?utf-8?q?Y6ipF7slDkMgMQY5zS1UfM1JXv3zznrLiNjSwjJLIagMVmVZJxFXaIf/MPHyEWnN5?= =?utf-8?q?TLI2GycoBOLjwtrwq2dpiWucdxF0dNdzXxWKXEDz7Rl0VOlOwHuOzZ+/xWIseaS6w?= =?utf-8?q?OpXW6MTFL6RedLdw9T6ObV29RUjC1F8aROqd8qyBSZaHMdKHE+ODVc/faWdgvwg5j?= =?utf-8?q?BNWFV0hO9bxAl5sP3yC2aUs3h3LjA0u/q+ZAz+bdcZ/35h42hRO3E8sQCz1gPJrZs?= =?utf-8?q?320GeUDwahNhF8nQFtDqKgD/DD+L7TFXcwyFXxRNS01SpEdM8e5ANCylYvHhgdyAM?= =?utf-8?q?So7rurHYi9N4U7T+FCVN/brMJuzaOsni88GaG/13jDrVDr+bvNgrqAIy70kDxVjy3?= =?utf-8?q?7CHrfSdLlbhgwpfwu9twmCc5aOl9q+lKJLr2pqr3GjMXAM3YoN3lRLrCQzRDmOxY/?= =?utf-8?q?+FgSlJ4B6RAfSHzvpOQqTssi46mW0fEbIA7B9ngtnz4UPJmXPEQpBokq7OxI82fAO?= =?utf-8?q?YMuSRhyLL4RfeHZG8ZxMnZhhzxz/szTQ+PTGnu7eqf3dPcZCALyLz3asPY4PmL7HP?= =?utf-8?q?rAb7rpF/t4cseOyQKhlFflMS64Eu0UPvc7ETZ08QapkDqs5Ynd57DvYQVsSc5HVIs?= =?utf-8?q?b9mupYk0NhEXfBQw//djUWfEivi6lGKNtjQ+oOlYqPz18vt5Q77kOvkYe306zXF7L?= =?utf-8?q?eBQ1sZyCBDqvqJk?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87b87beb-d28b-4297-8f1d-08d97474e497 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2021 16:06:05.2110 (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: QTYzA2fyPMwj0kcQJIDMt7l/6duCn4IGQQhSkcdrCCKMs4TG39xB/IYlRvpx/Y3DZmQBSgcI+BVOq745jUgwEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4592 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The new code is smaller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 6ffbae32028b..aea0ed55edc6 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -306,10 +306,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return -ENOMEM; body->infrastructure_bss_mode = !conf->ibss_joined; body->short_preamble = conf->use_short_preamble; - if (channel->flags & IEEE80211_CHAN_NO_IR) - body->probe_for_join = 0; - else - body->probe_for_join = 1; + body->probe_for_join = !(channel->flags & IEEE80211_CHAN_NO_IR); body->channel_number = channel->hw_value; body->beacon_interval = cpu_to_le32(conf->beacon_int); body->basic_rate_set =