浏览代码

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
Vijay Raj 1 年之前
父节点
当前提交
f1e696de2b

+ 6 - 1
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;
 	}

+ 5 - 0
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,

+ 7 - 0
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)