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

staging: wfx: simplify wfx_config()

Now that wfx_config() only handles IEEE80211_CONF_CHANGE_PS, it can be
simplified.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-16-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f050f3da
......@@ -1230,22 +1230,13 @@ int wfx_config(struct ieee80211_hw *hw, u32 changed)
struct wfx_dev *wdev = hw->priv;
struct wfx_vif *wvif;
// FIXME: Interface id should not been hardcoded
wvif = wdev_to_wvif(wdev, 0);
if (!wvif) {
WARN(1, "interface 0 does not exist anymore");
return 0;
}
mutex_lock(&wdev->conf_mutex);
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);
wvif = wdev_to_wvif(wdev, 0);
mutex_unlock(&wdev->conf_mutex);
}
mutex_unlock(&wdev->conf_mutex);
return ret;
}
......
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