mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Do not allow sched scan command in monitor mode
Currently there is no check for the monitor mode interface in sched scan start/stop commands. Add a check for monitor mode in sched scan start/stop commands and do not allow sched scan stop in case of monitor mode. Change-Id: I316c3156c25a9b6e9c3d35aaca174a4f1f03f8f9 CRs-fixed: 2530755
This commit is contained in:
parent
3500d896d7
commit
96b4c94294
1 changed files with 12 additions and 4 deletions
|
|
@ -1289,11 +1289,15 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
|
|||
bool pno_offload_enabled;
|
||||
uint8_t scan_backoff_multiplier;
|
||||
bool enable_connected_scan;
|
||||
enum QDF_GLOBAL_MODE curr_mode;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err("Command not allowed in FTM mode");
|
||||
curr_mode = hdd_get_conparam();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == curr_mode ||
|
||||
QDF_GLOBAL_MONITOR_MODE == curr_mode) {
|
||||
hdd_err_rl("Command not allowed in FTM/Monitor mode");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -1418,11 +1422,15 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct net_device *dev)
|
|||
{
|
||||
struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
|
||||
int errno;
|
||||
enum QDF_GLOBAL_MODE curr_mode;
|
||||
|
||||
hdd_enter();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
|
||||
hdd_err_rl("Command not allowed in FTM mode");
|
||||
curr_mode = hdd_get_conparam();
|
||||
|
||||
if (QDF_GLOBAL_FTM_MODE == curr_mode ||
|
||||
QDF_GLOBAL_MONITOR_MODE == curr_mode) {
|
||||
hdd_err_rl("Command not allowed in FTM/Monitor mode");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue