From patchwork Mon Dec 16 17:03:47 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: 11294727 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 1EA0B1580 for ; Mon, 16 Dec 2019 17:06:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD686207FF for ; Mon, 16 Dec 2019 17:06:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="JoZir7kx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727578AbfLPRGJ (ORCPT ); Mon, 16 Dec 2019 12:06:09 -0500 Received: from mail-dm6nam11on2086.outbound.protection.outlook.com ([40.107.223.86]:11937 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727205AbfLPRGH (ORCPT ); Mon, 16 Dec 2019 12:06:07 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QVfwmmtjROWoXbJ8m627VciLhCprikCOHN7jxSslfUZeclOVeF3hUNlAnewEclbtDbU/jV/aWHiBquOVk5wyd3z4YbqZupV4JA3PCGxXbnTnmKJSOwVJaDzq4W4wxUvNrzSS/N0/phyAKa+qLlZna1eJiX8peYi3n6KTJ6zv1HNtk8SqfuSn2SK2dUnq2CE/2wxmm3TMkbHEd30Nv393kNp/Ou11mM5DsFisPtimuibC/ptHb4Ulel2zn6L62dW5bexq8OPaf9b1BCT4xuIrc+DQsC5KcawMwbzCitCAPgtn2YFSU7H/Uscnle8VqxQotB+43Y9+jVe1r5H3BOHsbQ== 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=jV0pqkKIqUnv4oBmI5heTeVQkO+OV5RwEFoWmFK8KT8=; b=Ksz/Koz44v2Tg0x7F1gqzSeB9RING7FZnq9YCa+spe9k2NJKd+DlTZAOTm4RZWY4uT/yp3AjLKanJMebjZN8BkRmxm/nIaIHflYnAR31+7pyT4P0tEfseDAD40lCno3CpknmP0PwD2IKtNG036VOEdszas3U9lmI+nl5xX1BVJ1uQMCNuozGiCYOarEvHOIWVLMANnkGHlYP4MJm3kmxNW1BldDmZQWKZUWczIrUy+rFmqY6i2xMghkibJf5FkdWoqa0+wsAFhjM0+JGriQ2tEi5AoSx8iG0l2HpsfP52lZtMjefT7OD9Ss3fEeLDqGfvRxH2T6MvEM+E8NIME67ng== 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=jV0pqkKIqUnv4oBmI5heTeVQkO+OV5RwEFoWmFK8KT8=; b=JoZir7kxwjOIjwcoKqvLQmVh6ivHHIkgzIHslwL4dccmMnA8/q1oDWj7zYfo2tMIIgBMCUmDl5RtLLJU5i0G+Gauzu4zz6Z4k3mlNXL2G/qycSIPp7DvX3hnhFv1eLS+lqcQ8mI6Kc386yij8DOTguheZ/scbd/Zg9duGEO8Xs4= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4445.namprd11.prod.outlook.com (52.135.37.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.18; Mon, 16 Dec 2019 17:03:54 +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; Mon, 16 Dec 2019 17:03:54 +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 27/55] staging: wfx: better naming for hif_req_join->short_preamble Thread-Topic: [PATCH 27/55] staging: wfx: better naming for hif_req_join->short_preamble Thread-Index: AQHVtDLIQHILEZBo3Ey3ISANheZTkA== Date: Mon, 16 Dec 2019 17:03:47 +0000 Message-ID: <20191216170302.29543-28-Jerome.Pouiller@silabs.com> References: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 48f1df4e-3ee3-4ab5-428d-08d78249eef5 x-ms-traffictypediagnostic: MN2PR11MB4445: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(39860400002)(366004)(396003)(136003)(189003)(199004)(110136005)(6486002)(107886003)(36756003)(186003)(316002)(66946007)(54906003)(5660300002)(66446008)(66556008)(85182001)(66476007)(76116006)(91956017)(64756008)(2616005)(6506007)(85202003)(2906002)(26005)(71200400001)(6512007)(4326008)(8936002)(81166006)(1076003)(478600001)(86362001)(81156014)(6666004)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4445;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:3;A: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: D76TUXBOu+mlDkK+2GC4tgoiGL1j4R+4fvKQHzesWVSorS5WMsyJ1S7lytYclz/dX0mMrNaLCvuWF4nymtlq9Pren9EkbynoocpRGx5qaAX/6FmzsmkHbfyEmOmjfEmXHaC54s8iq+jT+vbIOkWrur5bAnNVoG1dlvwRsbjwUtjeiGtSV77S//lyk/5vW1U/BvUqb7yIbJYc/JcgK2wHRzCTO7p/PLPslnC/2F3sncar4Gs7PTj0pPzuKRKekML9LcKafv4MxXtu44uL/5l1v/VKy+CrPpCBbammLA2F066q+ZVAOMbyG8u9vC2aGcpFesj3nuhY029hIrkfhsvL52owdF9tnCahhA7r/Mz9qMtpXvUH0Ei7WxpeQ7QTO/ULAICAst6NTsyXzbBCrR52ypl9hO5NSxxxuLHyxBqjRtqS/myxuKhOhWcvp4VKSRWQ Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48f1df4e-3ee3-4ab5-428d-08d78249eef5 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:03:47.8229 (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: eNkfRJHPunNzfTO3RfBG5/RxuQWOyp5nYjDUWoSKqhLGdew+IWDM6Esm2etw8FyuDm7QwmsOhdH+fgPY7RyiCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4445 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);