diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-04-20 18:03:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 13:26:03 +0200 |
commit | 2e885b18b1d96383814366cfe681b2f2db2833c0 (patch) | |
tree | 2cdb28684af696e27cc6b4c5db3304b3dea7cd02 /drivers/staging/wfx/sta.c | |
parent | d4620087d2ebc36077b0cd9d49773dcc29089fab (diff) |
staging: wfx: field operational_rate_set is ignored by firmware
The field bss_params.operational_rate_set is ignore by the firmware. It
is not necessary to send it. This change greatly simplify
wfx_join_finalize(). It is no more necessary to get sta and it allow to
save a RCU.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200420160311.57323-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/sta.c')
-rw-r--r-- | drivers/staging/wfx/sta.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 2a9c7f28d934..6cdb40a05991 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -470,22 +470,12 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *info) { - struct ieee80211_sta *sta = NULL; - struct hif_req_set_bss_params bss_params = { }; - - rcu_read_lock(); // protect sta - if (info->bssid && !info->ibss_joined) - sta = ieee80211_find_sta(wvif->vif, info->bssid); - if (sta) - bss_params.operational_rate_set = - wfx_rate_mask_to_hw(wvif->wdev, sta->supp_rates[wvif->channel->band]); - else - bss_params.operational_rate_set = -1; - rcu_read_unlock(); - // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use - // the same value. - bss_params.beacon_lost_count = 7; - bss_params.aid = info->aid; + struct hif_req_set_bss_params bss_params = { + // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. + // Let's use the same value. + .beacon_lost_count = 7, + .aid = info->aid, + }; hif_set_association_mode(wvif, info); hif_keep_alive_period(wvif, 0); |