From patchwork Mon Sep 13 08:30:29 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: 12488289 X-Patchwork-Delegate: kuba@kernel.org 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,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 497A8C433EF for ; Mon, 13 Sep 2021 08:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36DD060F46 for ; Mon, 13 Sep 2021 08:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238849AbhIMIgI (ORCPT ); Mon, 13 Sep 2021 04:36:08 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238190AbhIMIeW (ORCPT ); Mon, 13 Sep 2021 04:34:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+tdtzAd2mFuhcwcpBUl+Yx3eLay8nHeERMrUB+V2YjPt2tcrRmjis8J9+bVr0t6TUeKWVQcZsenDmfmYNlct0FH9Ak4f8pt2YJhocT+FQ4f4R2U7CIztSkBDRrSRP7CJS3FcbBVj32TogzmKPKby0d8+bgr10WeJCq6GudshQNvZqVqdKMKGg9EPVodADwXsQeJkeHbMztThY9hsBxpAjPA9h4AeBHDnO5QEn7HaVE5vD3oj3UEihZ/97YCuZajYj6FeIOg21TK83eXwKvIzYnYyi+ewTFxLOu83GHF+LGVejxRtu9+/NRZA9ML42wW6lgYS+yPA3OXk2mTgFtTWg== 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=HjWid1f5pHPJRuDZHHNqEX0vZ/8YJlqrzuVlEZDhYt7v/pqJ3MxenQ2BTsoKeoy4Anf78Twh9AH5GOhmxT4WpeeERVwZxXY2xd2bH5u85UG3+6k2rPs39NDS7KLM2pp58976y5dXmWQy/Td36PtEKwpdo/7GLzJe/mN/mrXGauUKIoVhy8RyoXyGUTFK78D5rvnqjySuMiqBbek+zo4EmnFpU6OCHmqNogVVsHZVjuTuPvwysJw+ZIA7tMztx1cAMwiMjt/PrvS/aIPN9bGzg/rWua2WmOSFZ8JJiygeFxSqADCCxjX6MmpuWWd8Gwh0/U35+y2TPNIpOkr1uB5pGA== 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=ZyVyReZ1chk2SieeemPJQ31/JruwM5HRLOBoHypo2Idy0Xez83G6BDzvIlQdmEgzC16YEyfGJ37m4udpxIHG+2FVnfkmXM+7ptdG7se54eOX7Cye8vkjQ12gcWUNCjaFm3sU0O47fb47qIDZZ9A13za0MlESbQz0Xs/FjfbHFmk= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:55 +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; Mon, 13 Sep 2021 08:31: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 v2 17/33] staging: wfx: simplify hif_join() Date: Mon, 13 Sep 2021 10:30:29 +0200 Message-Id: <20210913083045.1881321-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 08:31:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17359336-8c5b-454e-8355-08d97690e548 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 6FhBSh4WxkL2hUFKHUjAN/mNQyi6JnqQufVfgar5zrsjz5E9y1lLyBGBHyntoDce1m404nXlZ9S/zCNgwnnpVBQ08vu/BBMZK4bwq6rN530qXHAs8TcVSP9gDfAmMwxFvHD6j/cpHcx7+8Ecwcc1q88Sn2XkJDSQIlLHxQIl5po56jxtlCSItb70SD9l5R1m3BSRXCGDRg7ACS21Yga3vv9X5JgW8XKPjfobs940TN/NZwS3eTNPfRQO0fRFl6pix9j5Pby8Z0ViAuLXzYwdvYHiW2XpA8TcqnfL0kFJD9TkjJcYyQcs13whPpYe1JdH7XqgEt27iTTAGSyiFKJ3IZhxKgEDYtBIQWKGI/gkcHN04CjXN1Z0xY8/tcesYlVTztaruplDAL9NUoQBjHPbJDCJJWef7P4zP93Ti9+wUL9/c8is+R8HGvk/ACsIp2ZTdZGoiWZeaw/A8abb7wEYLEDIrPxFSCwzeZoR5XnDpXw/OA25w3QoDUhY+t/cxraj95PqnIkwBf/t8Pxv/yQ+cIKPW7VfF7kuOyFZ810VsowYgh4yMmOs0vExIxFTn8bSm37w3/N2ZfCEyceqMiG21E6wkjWPECRBrZ3ycwk8wH5wN/s9l/FlfE6xSX6vO/8ac/rrHEtPf5Qevpj9q46vC0TlAQH0ORugFjoMyEM8j3fmlKq5IEMRDoL1YNAHz9NPvardIVBir6XFFqj0l3FXxg== 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)(83380400001)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(4744005)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?35npqTaKseBwdaYj3L8WwfKJj3xI?= =?utf-8?q?j4Ucu52N6IqMfXqN9+A3amlpmFlo9VeAGhahKErAbZAxtgzD9KVGs+ESoNw3ffH+V?= =?utf-8?q?WgIHyt51T+0ldeEIqqddfzQOQ9UUx0cnR6icdyQCuKXwYlA7LHwUyekN/fHo/XbZ9?= =?utf-8?q?iMZbzjGqYKDRLloG1W6ytr8NIUYQIcL47NiKwwFn6Or454hIj83azUApv0t9QG6kR?= =?utf-8?q?R64TIMWgH3sXuDRkonROqxgwMZoomjFBkoQwKxgurc3sXx/qxMBp54glDaJR558iW?= =?utf-8?q?y5c0Y4ML04qL//DL9swRIchYUZytMBuiHegMPu9wSBEgc1viISlKRV0KD0l0+Nrqi?= =?utf-8?q?TRDXUMsXZx4W/478AcPYvAHCiRL/0nqK9vB0S4SzHiF6jo0Ak2Aj0NlWPf7Ymw2P5?= =?utf-8?q?IDtUfTOQmZHlzLVedtapMm4+dk2GAg3z/21RmZlOBoH+tMYuR0RLVnHw3qPOQJ0nf?= =?utf-8?q?jEtjYaz+rx+aw+mfOP9x4dIGoSOee+yaovuncwwwRGPMnLcekgScX+87gM2HqBKN/?= =?utf-8?q?JkkLMUqRBVdrtfb9laCs6E/UN2VM3+MSpF9V674zQZQnBhCqCs0AYFkUwK8dyYtrG?= =?utf-8?q?U40e0msgzNMyY9PztxhQ5LHL9CRWeNWwD3AlNd3W1DyxaZLAMF1rVP+ntVfGV4GtJ?= =?utf-8?q?S1lpfBTJG53csni9BXsiz3//G0QrDVCzr/n9TuT+asJuw32u9GlnUb3VQsgBRZ5OF?= =?utf-8?q?sjxvXceJVRCtx3uhBFV77VFu7nTPRpXwzOXXFGpRetXPpD/7UCaN5vB2IND+G8B8r?= =?utf-8?q?MU8F2wABF7eyOfal/Lmk+aJdBW6m01QrNx6bEV4z/6TSKzPg9Q9vKWRDPR5vBy9bp?= =?utf-8?q?hIEUnP7w+qN1P8g68yMmXCvOjL+l1wIHB+Y2GgXsp7OqXudPdkEn4aEqk0kjsUp0V?= =?utf-8?q?yDb2Teeqk484oL2CCxZuu6zfvw4+q3Xp1yXBpqjLbuPqXGMofZkzpiwN4BnKMAzPh?= =?utf-8?q?lYCuAJcHS8u/UmiQepONZECFNko0GyIAq05xfkZSXuwEZmql0yH7j8xi2tuEYelh+?= =?utf-8?q?6s4gMcRPo8yO+luNz7ZhkdVg4CtLpTWlMr2JcrGxwcHVMuvpwSFl8bSk8X60M2nL0?= =?utf-8?q?VomczO96Khw3/OOUPv9ixolDKPEnDfUAQfawTTG1IE0itATk7zOpk5esgt1we7v8/?= =?utf-8?q?0NW8VwV/qVGCKS5sPZX9ZA2PBJGgoyNXxZM0ni0LhIUGGsyo3WU5LChAJo+hhtM6E?= =?utf-8?q?LZBp/UaHUPEMCdyXPmGjN75By7EoQlsW5lUrhljpXk2fRRkUicHVFrKyb1cMeMtKN?= =?utf-8?q?krQIX2sNW8sLFmqM?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17359336-8c5b-454e-8355-08d97690e548 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:34.6367 (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: +y7i/nbSx6JKFVod8ZMoKoKM9qUJ2ubUotPsu/77bOeuD8P0kNzFJkSDZmb0GB/MZYzwPZZn+oKJE9VLP0aOKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 =