staging: wfx: update power-save per interface
mac80211 and the device are both able to control power-save per vif. But, the current code retrieve power-save from wfx_config(). So, it does not allow to setup power-save independently for each vif. Driver just has to rely on wfx_bss_info_changed() instead of wfx_config(). wfx_config() has nothing to do anymore, but we keep it since it is mandatory for mac80211. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200115135338.14374-41-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7f091d319e
commit
8d97a12fa4
|
@ -826,6 +826,10 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
|
||||||
|
|
||||||
if (changed & BSS_CHANGED_TXPOWER)
|
if (changed & BSS_CHANGED_TXPOWER)
|
||||||
hif_set_output_power(wvif, info->txpower);
|
hif_set_output_power(wvif, info->txpower);
|
||||||
|
|
||||||
|
if (changed & BSS_CHANGED_PS)
|
||||||
|
wfx_update_pm(wvif);
|
||||||
|
|
||||||
mutex_unlock(&wdev->conf_mutex);
|
mutex_unlock(&wdev->conf_mutex);
|
||||||
|
|
||||||
if (do_join)
|
if (do_join)
|
||||||
|
@ -1058,18 +1062,7 @@ void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw,
|
||||||
|
|
||||||
int wfx_config(struct ieee80211_hw *hw, u32 changed)
|
int wfx_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
return 0;
|
||||||
struct wfx_dev *wdev = hw->priv;
|
|
||||||
struct wfx_vif *wvif;
|
|
||||||
|
|
||||||
if (changed & IEEE80211_CONF_CHANGE_PS) {
|
|
||||||
mutex_lock(&wdev->conf_mutex);
|
|
||||||
wvif = NULL;
|
|
||||||
while ((wvif = wvif_iterate(wdev, wvif)) != NULL)
|
|
||||||
ret = wfx_update_pm(wvif);
|
|
||||||
mutex_unlock(&wdev->conf_mutex);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||||
|
|
Loading…
Reference in New Issue