diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-01-15 13:54:23 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-16 20:59:47 +0100 |
commit | 9bf7ad8c93cede3f58d0bfd4b869790401ca6d73 (patch) | |
tree | 60c646c3d85a26066373c2a105de2ef1728e7b76 /drivers/staging/wfx/sta.c | |
parent | f050f3dac6686903f001862cc7b67bd2dcaeaea1 (diff) |
staging: wfx: simplify wfx_config()
Now that wfx_config() only handles IEEE80211_CONF_CHANGE_PS, it can be
simplified.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-16-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 | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a0f19d33e972..451d0108a1b0 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -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; } |