wlan: Fix invalid reset of DEVICE_IFACE_OPENED in STA + Mon SCC
In STA + Monior SCC, when STA interface is disabled, DEVICE_IFACE_OPENED
flag of monitor adapter is also reset which is invalid and resulting in
failure of sniffer capture for sub-sequent STA enable.
To fix, stop capture on monitor interface when STA is disabled but
don't reset DEVICE_IFACE_OPENED for monitor adapter.
Change-Id: I9dcba91696a73bef808dc7cb6a1eb345ea3133af
CRs-Fixed: 2168505
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index de3ccde..6c4a1b7 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -7443,23 +7443,11 @@
}
if (pHddCtx->concurrency_mode == VOS_STA_MON) {
- hdd_adapter_t *mon_adapter = hdd_get_adapter(pHddCtx, WLAN_HDD_MONITOR);
- if (!mon_adapter) {
- hddLog(LOGE,
- FL("No valid monitor interface in STA + MON concurrency"));
- return -EINVAL;
- }
-
/*
- * In STA + Monitor mode concurrency, no point in enabling
- * monitor interface, when STA interface is stopped
+ * In STA + Monitor mode concurrency, no point in running
+ * capture on monitor interface, when STA interface is stopped
*/
- ret = hdd_mon_stop(mon_adapter->dev);
- if (ret) {
- hddLog(LOGE,
- FL("Failed to stop Monitor interface in STA + MON concurrency"));
- return ret;
- }
+ wlan_hdd_stop_mon(pHddCtx, true);
}
/* Make sure the interface is marked as closed */