summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wfx
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2021-09-13 15:01:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-14 09:16:32 +0200
commit2af2790cb2f25ef5f47cae00d97c42abbb6ec8a8 (patch)
treed76a7d8c4774aaf15523f71c9006c980fe716cc8 /drivers/staging/wfx
parent07509c2a259916116a00c2b5b6e80b4ae2569e10 (diff)
downloadlinux-2af2790cb2f25ef5f47cae00d97c42abbb6ec8a8.tar.gz
linux-2af2790cb2f25ef5f47cae00d97c42abbb6ec8a8.tar.bz2
linux-2af2790cb2f25ef5f47cae00d97c42abbb6ec8a8.zip
staging: wfx: simplify hif_join()
The new code is smaller. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20210913130203.1903622-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx')
-rw-r--r--drivers/staging/wfx/hif_tx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index fcce78bb3005..c5ab1c2e1e07 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -305,10 +305,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 =