diff options
author | Lior David <qca_liord@qca.qualcomm.com> | 2016-08-18 16:52:16 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-08-19 13:11:28 +0300 |
commit | 2690c4c0e83b1aa5aa8b8b258ae422b067720224 (patch) | |
tree | fb63395f876148ab0549e2b2d078d9e858d44a04 /drivers/net/wireless/ath/wil6210/main.c | |
parent | dc90506f145875b9d88160802cc5fe06a7c79dda (diff) | |
download | lwn-2690c4c0e83b1aa5aa8b8b258ae422b067720224.tar.gz lwn-2690c4c0e83b1aa5aa8b8b258ae422b067720224.zip |
wil6210: fix wiphy registration sequence
Currently wiphy structure is initialized and registered
in wil_if_alloc, before some information is available such
as MAC address and capabilities. As a result there is a
small chance user space will get incorrect information
from calls such as NL80211_CMD_GET_WIPHY.
Fix this by seperating the registration and moving it
to wil_if_add which is executed later, after all
relevant information is known.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/main.c')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c index dd0ee7fe39bd..d0b180cc3c60 100644 --- a/drivers/net/wireless/ath/wil6210/main.c +++ b/drivers/net/wireless/ath/wil6210/main.c @@ -232,6 +232,9 @@ static void _wil6210_disconnect(struct wil6210_priv *wil, const u8 *bssid, struct net_device *ndev = wil_to_ndev(wil); struct wireless_dev *wdev = wil->wdev; + if (unlikely(!ndev)) + return; + might_sleep(); wil_info(wil, "%s(bssid=%pM, reason=%d, ev%s)\n", __func__, bssid, reason_code, from_event ? "+" : "-"); |