From patchwork Tue Dec 17 16:15:05 2019 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: 11298083 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A65A26C1 for ; Tue, 17 Dec 2019 16:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7096421835 for ; Tue, 17 Dec 2019 16:15:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="dC8vAyOo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728901AbfLQQPZ (ORCPT ); Tue, 17 Dec 2019 11:15:25 -0500 Received: from mail-bn7nam10on2081.outbound.protection.outlook.com ([40.107.92.81]:11510 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728718AbfLQQPO (ORCPT ); Tue, 17 Dec 2019 11:15:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GX/Xat2GVV+uKhN+JY0sJ06q+T7q5GuqFoBUGMl/w05st1o0NHw/Gh/4oXxk1lc5ROezJXSH7Ss6Jx5eXxg0mZ4puwgodM9xfXGKIlRwVozykmQsYqFVCMiJlbhNyFhya8eCdfA3ns6iiliy2I/Q+QGbTpK2XvxEDzEeQrcvvBuFm3TFNxieltw7VVWcBt/f5+Ey1duClk+pJov288IGi23BFdYVgMPOazoxFk+asINAMZz08TTDOT/QBAo5qaKPGb4V5ZV7xr4KYdWBcYQvSnNC66jgpSil8jt0VjFhO+dpUEJ3I08vRU7cuHZtUQbmJ0Aty6Tjuqhbsh04PMC8iA== 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=00C7yvUiSw61drLH3nKSkuEhkRj+FBYQcpu+d0wiUzU=; b=JKbCLZ2v6B259A9cM/PiP6Qv3tZ8J5FyW6Ne/rydNSmoa+lAXCG1+MVWD5eVH8dKkcsTP15p5cNY4F60nurVRaKc7r7RISLHpJ6ag2WAVmmrvmcDpLFP5btnkV7IlhV32aMpACXqz5E07YgNoa4oh/BKkQoo3PotfoBcXL28xWo8nJ22a8NH7JSoYku7kjrhMn5t9NBJCBPEgkk67KyFqVL/Rw4PKP5hylIIquCn/cuJJD7fUCKhH14t8RT3U96WcMLTcZy+0Ol5PxhuNJdWiUEccQ6r7reS6XCWGgMcB/Mg/jLu4cYA7iREvJq1kDq6ePKyI9ZvnpPabfeC1JuYEw== 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=00C7yvUiSw61drLH3nKSkuEhkRj+FBYQcpu+d0wiUzU=; b=dC8vAyOoM8MkUZlxwjtnz71lWA53lPOv39I7GeEnN3ZXP1HqKQZRoKnmzEfC5Eqn50Zww6MxreeYZeiHXICyBgK2RU9E41gK5OXdH0ThQCGH8i6vFVSaBBSb0HL0uNsspV95enpJegaDLVtb5DSajXSoVCC3jLI3X2Eciv0h6wA= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4208.namprd11.prod.outlook.com (52.135.36.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.20; Tue, 17 Dec 2019 16:15:06 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2538.019; Tue, 17 Dec 2019 16:15:06 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= 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 27/55] staging: wfx: better naming for hif_req_join->short_preamble Thread-Topic: [PATCH v2 27/55] staging: wfx: better naming for hif_req_join->short_preamble Thread-Index: AQHVtPUlIxdb1YHkuU+OJUWlibw5eg== Date: Tue, 17 Dec 2019 16:15:05 +0000 Message-ID: <20191217161318.31402-28-Jerome.Pouiller@silabs.com> References: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9581d860-6c3e-4472-9e3c-08d7830c4779 x-ms-traffictypediagnostic: MN2PR11MB4208: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(396003)(366004)(136003)(376002)(346002)(199004)(189003)(5660300002)(316002)(6506007)(85182001)(478600001)(71200400001)(2906002)(36756003)(186003)(26005)(81166006)(54906003)(1076003)(110136005)(4326008)(8676002)(86362001)(6486002)(52116002)(6512007)(64756008)(85202003)(66946007)(66476007)(66446008)(66556008)(8936002)(107886003)(2616005)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4208;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; 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: kdjzFlrNMrOz1k9EAfgFUjwagve7r+OQLiyC72ZQqTyc0UlF2iLV/3sOZ2hpveiu7VmwjFUCLyr3779LDkJuXoIyT7cG6+hu32VnlV/f87YjEQ93xZXXlhtUZw9JLVLpEy6BUmfrmVgt7tQ3ZQuTu1MFJSDqpVrAMN/mOEx6aEP8+TAym0XmlZaGvwts5QHSOUwKkuiw0HPE0nAlbz6jQOsfQHpvr3HBCGUoOheDfFJtgwa08A3ZfyF7p+Y6uRToviujzavs3slfdGSdZWlXK+YhYinSsDKwza7+EaB4l/XmkntECV8vxUU1i+kouBo67zSeKt4DGk+xvffOQ1Ffchk1u+DxXm975PPKfoZ5ABtG6HsQpc3Mjncrt8PRmwXmNUhlaDCW0CLgFE5dn9COz5o23xAGhmeGaNCa6Jx3TA0Y6KbXZp5D+j3UQjCjS5GY Content-ID: <6C5B07B352ECAC46A3F6198AEC361D19@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9581d860-6c3e-4472-9e3c-08d7830c4779 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:15:05.9802 (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: /ZJEcQzMAMa8MGz3cS7zG2lq9HkGpU8e7pZwWJakTnNouztf92aZrNfFV6U9giJTW6EInbfPQP8W5seWzW3+Cw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4208 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller HIF_PREAMBLE_SHORT_LONG12 is never used. So it is possible to change "preamble_type" into a boolean and drop "enum hif_preamble". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 16 ++++++---------- drivers/staging/wfx/hif_api_mib.h | 5 +++-- drivers/staging/wfx/sta.c | 6 +++--- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index e848bd3073a2..fc078d54bfbf 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -377,12 +377,6 @@ struct hif_cnf_edca_queue_params { u32 status; } __packed; -enum hif_preamble { - HIF_PREAMBLE_LONG = 0x0, - HIF_PREAMBLE_SHORT = 0x1, - HIF_PREAMBLE_SHORT_LONG12 = 0x2 -}; - struct hif_join_flags { u8 reserved1:2; u8 force_no_beacon:1; @@ -397,9 +391,10 @@ struct hif_req_join { u16 channel_number; u8 bssid[ETH_ALEN]; u16 atim_window; - u8 preamble_type; + u8 short_preamble:1; + u8 reserved2:7; u8 probe_for_join; - u8 reserved; + u8 reserved3; struct hif_join_flags join_flags; u32 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; @@ -462,8 +457,9 @@ struct hif_req_start { u32 reserved1; u32 beacon_interval; u8 dtim_period; - u8 preamble_type; - u8 reserved2; + u8 short_preamble:1; + u8 reserved2:7; + u8 reserved3; u8 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; u32 basic_rate_set; diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 94b789ceb4ff..34e4310ad71f 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -471,8 +471,9 @@ struct hif_mib_set_association_mode { u8 mode:1; u8 rateset:1; u8 spacing:1; - u8 reserved:4; - u8 preamble_type; + u8 reserved1:4; + u8 short_preamble:1; + u8 reserved2:7; u8 mixed_or_greenfield_type; u8 mpdu_start_spacing; u32 basic_rate_set; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 23ec7a4a926b..e5c933678c47 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -652,7 +652,7 @@ static void wfx_do_join(struct wfx_vif *wvif) struct cfg80211_bss *bss = NULL; struct hif_req_join join = { .infrastructure_bss_mode = !conf->ibss_joined, - .preamble_type = conf->use_short_preamble ? HIF_PREAMBLE_SHORT : HIF_PREAMBLE_LONG, + .short_preamble = conf->use_short_preamble, .probe_for_join = 1, .atim_window = 0, .basic_rate_set = wfx_rate_mask_to_hw(wvif->wdev, @@ -843,7 +843,7 @@ static int wfx_start_ap(struct wfx_vif *wvif) .channel_number = wvif->channel->hw_value, .beacon_interval = conf->beacon_int, .dtim_period = conf->dtim_period, - .preamble_type = conf->use_short_preamble ? HIF_PREAMBLE_SHORT : HIF_PREAMBLE_LONG, + .short_preamble = conf->use_short_preamble, .basic_rate_set = wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates), }; @@ -994,7 +994,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, association_mode.mode = 1; association_mode.rateset = 1; association_mode.spacing = 1; - association_mode.preamble_type = info->use_short_preamble ? HIF_PREAMBLE_SHORT : HIF_PREAMBLE_LONG; + association_mode.short_preamble = info->use_short_preamble; association_mode.basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, info->basic_rates)); association_mode.mixed_or_greenfield_type = wfx_ht_greenfield(&wvif->ht_info); association_mode.mpdu_start_spacing = wfx_ht_ampdu_density(&wvif->ht_info);