From f1e696de2bb4fd5814f7fd058ef6c49f4c756c6c Mon Sep 17 00:00:00 2001 From: Vijay Raj Date: Mon, 29 May 2023 21:58:09 -0700 Subject: [PATCH] qcacld-3.0: Modify diag connectivity logging for P2P In p2p mode, the connectivity logs were logged. Modify diag connectivity logging in order to not log in p2p mode Change-Id: I540b29cb117e77aea4283e4fec51517827b15378 CRs-Fixed: 3515702 --- .../cmn_services/logging/src/wlan_connectivity_logging.c | 7 ++++++- .../mlme/connection_mgr/core/src/wlan_cm_roam_offload.c | 5 +++++ core/hdd/src/wlan_hdd_connectivity_logging.c | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/components/cmn_services/logging/src/wlan_connectivity_logging.c b/components/cmn_services/logging/src/wlan_connectivity_logging.c index aabfa840b4..91062ad6cb 100644 --- a/components/cmn_services/logging/src/wlan_connectivity_logging.c +++ b/components/cmn_services/logging/src/wlan_connectivity_logging.c @@ -130,6 +130,11 @@ QDF_STATUS wlan_print_cached_sae_auth_logs(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_FAILURE; } + if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE) { + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); + return QDF_STATUS_E_FAILURE; + } + mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev); if (!mlme_priv) { logging_err_rl("vdev legacy private object is NULL"); @@ -318,7 +323,7 @@ wlan_connectivity_mgmt_event(struct wlan_objmgr_psoc *psoc, } opmode = wlan_vdev_mlme_get_opmode(vdev); - if (opmode != QDF_STA_MODE && opmode != QDF_P2P_CLIENT_MODE) { + if (opmode != QDF_STA_MODE) { wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID); return; } diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index bb08c1ea5d..fa651e76c9 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -6841,6 +6841,11 @@ cm_roam_beacon_loss_disconnect_event(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_FAILURE; } + if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE) { + wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID); + return status; + } + qdf_mem_zero(&wlan_diag_event, sizeof(wlan_diag_event)); populate_diag_cmn(&wlan_diag_event.diag_cmn, vdev_id, diff --git a/core/hdd/src/wlan_hdd_connectivity_logging.c b/core/hdd/src/wlan_hdd_connectivity_logging.c index f404b5338d..49a7a4ccb0 100644 --- a/core/hdd/src/wlan_hdd_connectivity_logging.c +++ b/core/hdd/src/wlan_hdd_connectivity_logging.c @@ -1307,6 +1307,10 @@ void wlan_hdd_connectivity_event_connecting(struct hdd_context *hdd_ctx, qdf_mem_zero(&wlan_diag_event, sizeof(struct wlan_diag_connect)); + if (wlan_get_opmode_from_vdev_id(hdd_ctx->pdev, vdev_id) != + QDF_STA_MODE) + return; + wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us(); wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get()); wlan_diag_event.diag_cmn.vdev_id = vdev_id; @@ -1352,6 +1356,9 @@ wlan_hdd_connectivity_fail_event(struct wlan_objmgr_vdev *vdev, qdf_mem_zero(&wlan_diag_event, sizeof(struct wlan_diag_connect)); + if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE) + return; + wlan_diag_event.diag_cmn.vdev_id = wlan_vdev_get_id(vdev); op_mode = wlan_vdev_mlme_get_opmode(vdev); if (op_mode != QDF_STA_MODE)