From: Jérôme Pouiller Date: Mon, 13 Sep 2021 13:01:48 +0000 (+0200) Subject: staging: wfx: simplify hif_join() X-Git-Tag: v6.6.17~8914^2~406 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2af2790cb2f25ef5f47cae00d97c42abbb6ec8a8;p=platform%2Fkernel%2Flinux-rpi.git staging: wfx: simplify hif_join() The new code is smaller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20210913130203.1903622-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index fcce78b..c5ab1c2 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 =