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: 509050 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?fyUZRIZLxHBuT7QLRiyCz1QuE?= =?utf-8?q?SJadjHY/m66o5IB5BKPlt5CtU+KXgdNiZTTspSkZVegCZnwY87N7iPIB?= =?utf-8?q?DmyJOLVq89lRDq1KHMlgrc9E9sIR7yRr11D0vgB575gAPg/Ky1qT7Omc?= =?utf-8?q?aSMLq6cIqmHHZ2BeGx6BNWMnaUfIaVpEYqK2C2H4aB9bq0QM0Vxr/f8m?= =?utf-8?q?RnZyO/nw+oQxX5Gr+Q8ER5LaCIeexZDhAbw6KlJYYMx2E6+zPW/hiu7t?= =?utf-8?q?UbGZVpZYkZS0D9Q8l6JHvzGm6QfBDdy5ktYL+GhpT71n3HzdCV9GDsS0?= =?utf-8?q?MvAzqx/yh8rDNZcxo0ZbajQ3lD3uV7JnKCNX4yAYtNfkwPv/h9V1YkIn?= =?utf-8?q?8mCTpj2OgRZy99IAllWilnqzvxJ0kJBAUmysTp4M08pcnSe8WAOas9lM?= =?utf-8?q?GYQthxRWm9i45u/AODOqWIulfHq2bUeAyGpTAnCk/1jkgPwtftJ7OOS4?= =?utf-8?q?D6iUy+TEhxZvKM/xEF4Depjn/DS/ljROpNMmqfGlhRMGIzaiy9unGURm?= =?utf-8?q?GzzKZuhFnwq5Da6BYyALupdjLJcOuuiBtLAmr5kL90W3gjfWTUUE9VPD?= =?utf-8?q?NzHO6rZrFOxjiMthRRFRBFAf9IcBhJDv8v+E71OQKve4KRVSeJQA7KDe?= =?utf-8?q?Loa0i2zEUKHpVvd6B4v4ixv232wjTN72PDkTQY6ipF7slDkMgMQY5zS1?= =?utf-8?q?UfM1JXv3zznrLiNjSwjJLIagMVmVZJxFXaIf/MPHyEWnN5TLI2GycoBO?= =?utf-8?q?Ljwtrwq2dpiWucdxF0dNdzXxWKXEDz7Rl0VOlOwHuOzZ+/xWIseaS6wO?= =?utf-8?q?pXW6MTFL6RedLdw9T6ObV29RUjC1F8aROqd8qyBSZaHMdKHE+ODVc/fa?= =?utf-8?q?Wdgvwg5jBNWFV0hO9bxAl5sP3yC2aUs3h3LjA0u/q+ZAz+bdcZ/35h42?= =?utf-8?q?hRO3E8sQCz1gPJrZs320GeUDwahNhF8nQFtDqKgD/DD+L7TFXcwyFXxR?= =?utf-8?q?NS01SpEdM8e5ANCylYvHhgdyAMSo7rurHYi9N4U7T+FCVN/brMJuzaOs?= =?utf-8?q?ni88GaG/13jDrVDr+bvNgrqAIy70kDxVjy37CHrfSdLlbhgwpfwu9twm?= =?utf-8?q?Cc5aOl9q+lKJLr2pqr3GjMXAM3YoN3lRLrCQzRDmOxY/+FgSlJ4B6RAf?= =?utf-8?q?SHzvpOQqTssi46mW0fEbIA7B9ngtnz4UPJmXPEQpBokq7OxI82fAOYMu?= =?utf-8?q?SRhyLL4RfeHZG8ZxMnZhhzxz/szTQ+PTGnu7eqf3dPcZCALyLz3asPY4?= =?utf-8?q?PmL7HPrAb7rpF/t4cseOyQKhlFflMS64Eu0UPvc7ETZ08QapkDqs5Ynd?= =?utf-8?q?57DvYQVsSc5HVIsb9mupYk0NhEXfBQw//djUWfEivi6lGKNtjQ+oOlYq?= =?utf-8?q?Pz18vt5Q77kOvkYe306zXF7LeBQ1sZyCBDqvqJk?= 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 =