summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSourav Mohapatra <mohapatr@codeaurora.org>2019-11-28 09:21:57 +0530
committernshrivas <nshrivas@codeaurora.org>2019-12-03 06:04:41 -0800
commit940b9244107eff28d5b884843a687a941fa3d79d (patch)
treedb8b426a272c3b98dcfcfbb754a10996313ea285
parent4423492a78bd6a39c8cafa5032f7dd88f6e7b868 (diff)
qcacld-3.0: Destroy monitor mode vdev during stop adapter
In monitor mode during driver unload VDEV, PDEV and PSOC objects are leaking because stop adapter is not cleaning up monitor mode vdev. Destroy monitor mode vdev object during stop adapter such that VDEV object and its parent PDEV, PSOC objects can be cleaned up properly. Change-Id: Ic5778d03226a880981a4b6affbeeee357e007f65 CRs-Fixed: 2576722
-rw-r--r--core/hdd/src/wlan_hdd_main.c12
-rw-r--r--core/wma/src/wma_dev_if.c7
2 files changed, 16 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index b322a0b128fd..6747d89d69e5 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -5086,6 +5086,18 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
hdd_wait_for_sme_close_sesion(hdd_ctx, adapter, false);
break;
+ case QDF_MONITOR_MODE:
+ wlan_hdd_scan_abort(adapter);
+ hdd_deregister_tx_flow_control(adapter);
+
+ /*
+ * It is possible that the caller of this function does not
+ * wish to close the session
+ */
+ if (bCloseSession)
+ hdd_wait_for_sme_close_sesion(hdd_ctx, adapter, true);
+ break;
+
case QDF_SAP_MODE:
if (test_bit(ACS_PENDING, &adapter->event_flags)) {
cds_flush_delayed_work(&adapter->acs_pending_work);
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 2c6d0e91c380..5d06b0141c2d 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -690,9 +690,10 @@ QDF_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
if (iface->type == WMI_VDEV_TYPE_STA)
wma_pno_stop(wma_handle, vdev_id);
- /* P2P Device */
- if ((iface->type == WMI_VDEV_TYPE_AP) &&
- (iface->sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE)) {
+ if (((iface->type == WMI_VDEV_TYPE_AP) &&
+ (iface->sub_type == WMI_UNIFIED_VDEV_SUBTYPE_P2P_DEVICE)) ||
+ (iface->type == WMI_VDEV_TYPE_OCB) ||
+ (iface->type == WMI_VDEV_TYPE_MONITOR)) {
status = wma_self_peer_remove(wma_handle,
pdel_sta_self_req_param, generateRsp);
if ((status != QDF_STATUS_SUCCESS) && generateRsp) {