Commit ad636ec4 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: better naming for hif_req_join->short_preamble

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: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20191217161318.31402-28-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2232d94
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment