diff options
author | Sourav Mohapatra <mohapatr@codeaurora.org> | 2019-11-28 09:21:57 +0530 |
---|---|---|
committer | Isaac Chiou <isaacchiou@google.com> | 2019-12-13 12:45:34 +0000 |
commit | c6266d0a88f2da2a3a35cca4621c427d37128f9b (patch) | |
tree | 242a367462fd852060f6d479a19db113dca67f7a | |
parent | dbee01d90764fd2d9c9cabb1d700ae1cf286eca6 (diff) | |
download | qcacld-c6266d0a88f2da2a3a35cca4621c427d37128f9b.tar.gz |
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.
bug: 142158571
Change-Id: Ic5778d03226a880981a4b6affbeeee357e007f65
CRs-Fixed: 2576722
Signed-off-by: Isaac Chiou <isaacchiou@google.com>
-rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 12 | ||||
-rw-r--r-- | core/wma/src/wma_dev_if.c | 7 |
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 f40622db36..7dd59f10ed 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4713,6 +4713,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: hdd_ipa_flush(hdd_ctx); diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index d3c0d430c2..c094a04b25 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -693,9 +693,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) { |