[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191216170302.29543-28-Jerome.Pouiller@silabs.com>
Date: Mon, 16 Dec 2019 17:03:47 +0000
From: Jérôme Pouiller <Jerome.Pouiller@...abs.com>
To: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kalle Valo <kvalo@...eaurora.org>,
"David S . Miller" <davem@...emloft.net>,
Jérôme Pouiller <Jerome.Pouiller@...abs.com>
Subject: [PATCH 27/55] staging: wfx: better naming for
hif_req_join->short_preamble
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
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 <jerome.pouiller@...abs.com>
---
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);
--
2.20.1
Powered by blists - more mailing lists