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

staging: wfx: drop useless attribute 'bss_params'

Since wfx_bss_params_work() does not exist anymore, there is no more
reason to keep a copy of bss_params in struct wfx_dev. A local instance
in wfx_join_finalize() is sufficient.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200420160311.57323-4-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a0af698
...@@ -354,7 +354,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif) ...@@ -354,7 +354,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif)
wfx_free_event_queue(wvif); wfx_free_event_queue(wvif);
cancel_work_sync(&wvif->event_handler_work); cancel_work_sync(&wvif->event_handler_work);
memset(&wvif->bss_params, 0, sizeof(wvif->bss_params));
wfx_tx_unlock(wvif->wdev); wfx_tx_unlock(wvif->wdev);
cancel_delayed_work_sync(&wvif->beacon_loss_work); cancel_delayed_work_sync(&wvif->beacon_loss_work);
} }
...@@ -534,15 +533,16 @@ static void wfx_join_finalize(struct wfx_vif *wvif, ...@@ -534,15 +533,16 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
struct ieee80211_bss_conf *info) struct ieee80211_bss_conf *info)
{ {
struct ieee80211_sta *sta = NULL; struct ieee80211_sta *sta = NULL;
struct hif_req_set_bss_params bss_params = { };
rcu_read_lock(); // protect sta rcu_read_lock(); // protect sta
if (info->bssid && !info->ibss_joined) if (info->bssid && !info->ibss_joined)
sta = ieee80211_find_sta(wvif->vif, info->bssid); sta = ieee80211_find_sta(wvif->vif, info->bssid);
if (sta) if (sta)
wvif->bss_params.operational_rate_set = bss_params.operational_rate_set =
wfx_rate_mask_to_hw(wvif->wdev, sta->supp_rates[wvif->channel->band]); wfx_rate_mask_to_hw(wvif->wdev, sta->supp_rates[wvif->channel->band]);
else else
wvif->bss_params.operational_rate_set = -1; bss_params.operational_rate_set = -1;
rcu_read_unlock(); rcu_read_unlock();
if (sta && if (sta &&
info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT) info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)
...@@ -552,15 +552,15 @@ static void wfx_join_finalize(struct wfx_vif *wvif, ...@@ -552,15 +552,15 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
// beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use
// the same value. // the same value.
wvif->bss_params.beacon_lost_count = 7; bss_params.beacon_lost_count = 7;
wvif->bss_params.aid = info->aid; bss_params.aid = info->aid;
hif_set_association_mode(wvif, info); hif_set_association_mode(wvif, info);
if (!info->ibss_joined) { if (!info->ibss_joined) {
wvif->state = WFX_STATE_STA; wvif->state = WFX_STATE_STA;
hif_keep_alive_period(wvif, 0); hif_keep_alive_period(wvif, 0);
hif_set_bss_params(wvif, &wvif->bss_params); hif_set_bss_params(wvif, &bss_params);
hif_set_beacon_wakeup_period(wvif, 1, 1); hif_set_beacon_wakeup_period(wvif, 1, 1);
wfx_update_pm(wvif); wfx_update_pm(wvif);
} }
...@@ -841,8 +841,6 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -841,8 +841,6 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
INIT_WORK(&wvif->update_tim_work, wfx_update_tim_work); INIT_WORK(&wvif->update_tim_work, wfx_update_tim_work);
INIT_DELAYED_WORK(&wvif->beacon_loss_work, wfx_beacon_loss_work); INIT_DELAYED_WORK(&wvif->beacon_loss_work, wfx_beacon_loss_work);
memset(&wvif->bss_params, 0, sizeof(wvif->bss_params));
wvif->wep_default_key_id = -1; wvif->wep_default_key_id = -1;
INIT_WORK(&wvif->wep_key_work, wfx_wep_key_work); INIT_WORK(&wvif->wep_key_work, wfx_wep_key_work);
......
...@@ -87,7 +87,6 @@ struct wfx_vif { ...@@ -87,7 +87,6 @@ struct wfx_vif {
u8 filter_mcast_addr[8][ETH_ALEN]; u8 filter_mcast_addr[8][ETH_ALEN];
unsigned long uapsd_mask; unsigned long uapsd_mask;
struct hif_req_set_bss_params bss_params;
int join_complete_status; int join_complete_status;
......
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