mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Safely reject sched scan requests in ftm mode
Sched scan start and stop requests are coming in FTM mode and hence do not access dev->name and reject the request if driver is in FTM mode. Change-Id: Ia6a3b4dc2f7c491ecc3d2456238c6583d863c10d CRs-Fixed: 2345908
This commit is contained in:
parent
d5665aa03e
commit
a906529e9a
1 changed files with 8 additions and 4 deletions
|
|
@ -1282,7 +1282,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
struct hdd_context *hdd_ctx;
|
||||
int ret;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
hdd_enter();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
|
|
@ -1346,8 +1346,6 @@ int wlan_hdd_sched_scan_stop(struct net_device *dev)
|
|||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
struct hdd_context *hdd_ctx;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
return -EINVAL;
|
||||
|
|
@ -1385,7 +1383,13 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
|
|||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
int errno;
|
||||
|
||||
hdd_enter_dev(dev);
|
||||
hdd_enter();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err_rl("Command not allowed in FTM mode");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
/* The return 0 is intentional when Recovery and Load/Unload in
|
||||
* progress. We did observe a crash due to a return of
|
||||
|
|
|
|||
Loading…
Reference in a new issue