Commit 4a0e45a7 authored by Lior David's avatar Lior David Committed by Kalle Valo

wil6210: do not start regular scan on stopped p2p device

The driver should not allow starting any type of scan on a stopped
P2P device. Current implementation only checked social scan.
Signed-off-by: default avatarLior David <qca_liord@qca.qualcomm.com>
Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent f2de576d
...@@ -390,14 +390,14 @@ static int wil_cfg80211_scan(struct wiphy *wiphy, ...@@ -390,14 +390,14 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
} }
mutex_unlock(&wil->p2p_wdev_mutex); mutex_unlock(&wil->p2p_wdev_mutex);
/* social scan on P2P_DEVICE is handled as p2p search */ if (wdev->iftype == NL80211_IFTYPE_P2P_DEVICE) {
if (wdev->iftype == NL80211_IFTYPE_P2P_DEVICE &&
wil_p2p_is_social_scan(request)) {
if (!wil->p2p.p2p_dev_started) { if (!wil->p2p.p2p_dev_started) {
wil_err(wil, "P2P search requested on stopped P2P device\n"); wil_err(wil, "P2P search requested on stopped P2P device\n");
rc = -EIO; rc = -EIO;
goto out; goto out;
} }
/* social scan on P2P_DEVICE is handled as p2p search */
if (wil_p2p_is_social_scan(request)) {
wil->scan_request = request; wil->scan_request = request;
wil->radio_wdev = wdev; wil->radio_wdev = wdev;
rc = wil_p2p_search(wil, request); rc = wil_p2p_search(wil, request);
...@@ -407,6 +407,7 @@ static int wil_cfg80211_scan(struct wiphy *wiphy, ...@@ -407,6 +407,7 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
} }
goto out; goto out;
} }
}
(void)wil_p2p_stop_discovery(wil); (void)wil_p2p_stop_discovery(wil);
......
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