[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200115121041.10863-16-Jerome.Pouiller@silabs.com>
Date: Wed, 15 Jan 2020 12:12:29 +0000
From: Jérôme Pouiller <Jerome.Pouiller@...abs.com>
To: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kalle Valo <kvalo@...eaurora.org>,
"David S . Miller" <davem@...emloft.net>,
Jérôme Pouiller <Jerome.Pouiller@...abs.com>
Subject: [PATCH 15/65] staging: wfx: simplify wfx_config()
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
Now that wfx_config() only handles IEEE80211_CONF_CHANGE_PS, it can be
simplified.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
drivers/staging/wfx/sta.c | 13 ++-----------
1 file 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;
}
--
2.25.0
Powered by blists - more mailing lists