Kaynağa Gözat

qcacld-3.0: Remove unused legacy logging for BTM event

Diag logging is used for connectivity logging of
BTM event.

Remove unused legacy connectivity logging mechanism for
BTM events.

Change-Id: I65dc5fe5f071fd74eeed2433894a238318ce76ab
CRs-Fixed: 3470401
Vijay Raj 1 yıl önce
ebeveyn
işleme
fb8e6d4f3e

+ 2 - 3
components/cmn_services/logging/inc/wlan_connectivity_logging.h

@@ -852,9 +852,8 @@ struct wlan_connectivity_log_buf_data {
 #define logging_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_QDF, ## params)
 #define logging_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_QDF, ## params)
 
-#if (defined(WLAN_FEATURE_CONNECTIVITY_LOGGING) || \
-	defined(CONNECTIVITY_DIAG_EVENT)) && \
-	defined(WLAN_FEATURE_ROAM_OFFLOAD)
+#if (defined(CONNECTIVITY_DIAG_EVENT) && \
+	defined(WLAN_FEATURE_ROAM_OFFLOAD))
 /**
  * wlan_print_cached_sae_auth_logs() - Enqueue SAE authentication frame logs
  * @psoc: Global psoc pointer

+ 1 - 287
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -6768,293 +6768,7 @@ cm_roam_beacon_loss_disconnect_event(struct wlan_objmgr_psoc *psoc,
 
 	return status;
 }
-
-#elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING)
-QDF_STATUS
-cm_roam_btm_query_event(struct wmi_neighbor_report_data *btm_data,
-			uint8_t vdev_id)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record)
-		return QDF_STATUS_E_NOMEM;
-
-	log_record->log_subtype = WLAN_BTM_QUERY;
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->vdev_id = vdev_id;
-	log_record->btm_info.token = btm_data->btm_query_token;
-	log_record->btm_info.reason = btm_data->btm_query_reason;
-
-	status = wlan_connectivity_log_enqueue(log_record);
-	qdf_mem_free(log_record);
-
-	return status;
-}
-
-#define WTC_BTM_RESPONSE_SUBCODE 0xFF
-static void
-cm_roam_wtc_btm_event(struct wmi_roam_trigger_info *trigger_info,
-		      struct roam_btm_response_data *btm_data,
-		      uint8_t vdev_id, bool is_wtc)
-{
-	struct wlan_log_record *log_record = NULL;
-	struct wmi_roam_wtc_btm_trigger_data *wtc_data =
-			&trigger_info->wtc_btm_trig_data;
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record)
-		return;
-
-	log_record->log_subtype = WLAN_ROAM_WTC;
-
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->fw_timestamp_us = (uint64_t)trigger_info->timestamp * 1000;
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->vdev_id = vdev_id;
-	if (is_wtc) {
-		log_record->btm_info.reason = wtc_data->vsie_trigger_reason;
-		log_record->btm_info.sub_reason = wtc_data->sub_code;
-		log_record->btm_info.wtc_duration = wtc_data->duration;
-	} else {
-		if (!btm_data) {
-			qdf_mem_free(log_record);
-			return;
-		}
-
-		log_record->btm_info.reason = btm_data->vsie_reason;
-		log_record->btm_info.sub_reason = WTC_BTM_RESPONSE_SUBCODE;
-	}
-
-	wlan_connectivity_log_enqueue(log_record);
-	qdf_mem_free(log_record);
-}
-
-QDF_STATUS
-cm_roam_btm_resp_event(struct wmi_roam_trigger_info *trigger_info,
-		       struct roam_btm_response_data *btm_data,
-		       uint8_t vdev_id, bool is_wtc)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-
-	if (is_wtc) {
-		cm_roam_wtc_btm_event(trigger_info, btm_data, vdev_id, is_wtc);
-	} else {
-		if (!btm_data) {
-			mlme_err("vdev_id:%d btm data is NULL", vdev_id);
-			return QDF_STATUS_E_FAILURE;
-		}
-
-		if (btm_data->vsie_reason)
-			cm_roam_wtc_btm_event(trigger_info, btm_data,
-					      vdev_id, is_wtc);
-
-		log_record = qdf_mem_malloc(sizeof(*log_record));
-		if (!log_record)
-			return QDF_STATUS_E_NOMEM;
-
-		log_record->log_subtype = WLAN_BTM_RESP;
-		log_record->timestamp_us = qdf_get_time_of_the_day_us();
-		log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-		log_record->fw_timestamp_us =
-			(uint64_t)trigger_info->timestamp * 1000;
-		log_record->vdev_id = vdev_id;
-
-		log_record->btm_info.token =
-				btm_data->btm_resp_dialog_token;
-		log_record->btm_info.btm_status_code =
-				btm_data->btm_status;
-		log_record->btm_info.btm_delay = btm_data->btm_delay;
-		log_record->btm_info.target_bssid =
-				btm_data->target_bssid;
-		status = wlan_connectivity_log_enqueue(log_record);
-		qdf_mem_free(log_record);
-
-	}
-
-	return status;
-}
-
-/**
- * cm_roam_btm_candidate_event()  - Send BTM roam candidate logging event
- * @btm_data: BTM data
- * @vdev_id: Vdev id
- * @idx: Candidate instance
- *
- * Return: QDF_STATUS
- */
-static QDF_STATUS
-cm_roam_btm_candidate_event(struct wmi_btm_req_candidate_info *btm_data,
-			    uint8_t vdev_id, uint8_t idx)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record)
-		return QDF_STATUS_E_NOMEM;
-
-	log_record->log_subtype = WLAN_BTM_REQ_CANDI;
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
-	log_record->vdev_id = vdev_id;
-	log_record->btm_cand.preference = btm_data->preference;
-	log_record->btm_cand.bssid = btm_data->candidate_bssid;
-	log_record->btm_cand.idx = idx;
-
-	status = wlan_connectivity_log_enqueue(log_record);
-	qdf_mem_free(log_record);
-
-	return status;
-}
-
-QDF_STATUS
-cm_roam_btm_req_event(struct wmi_roam_btm_trigger_data *btm_data,
-		      struct wmi_roam_trigger_info *trigger_info,
-		      uint8_t vdev_id, bool is_wtc)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	uint8_t i;
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record)
-		return QDF_STATUS_E_NOMEM;
-
-	log_record->log_subtype = WLAN_BTM_REQ;
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
-	log_record->vdev_id = vdev_id;
-
-	log_record->btm_info.token = btm_data->token;
-	log_record->btm_info.mode = btm_data->btm_request_mode;
-	/*
-	 * Diassoc Timer and Validity interval are in secs in the frame
-	 * firmware sends it in millisecs to the host.
-	 * Send it in secs to the userspace.
-	 */
-	log_record->btm_info.disassoc_timer =
-			btm_data->disassoc_timer / 1000;
-	log_record->btm_info.validity_timer =
-			btm_data->validity_interval / 1000;
-	log_record->btm_info.candidate_list_count =
-				btm_data->candidate_list_count;
-
-	status = wlan_connectivity_log_enqueue(log_record);
-
-	if (is_wtc)
-		cm_roam_wtc_btm_event(trigger_info, NULL, vdev_id, true);
-
-	for (i = 0; i < log_record->btm_info.candidate_list_count; i++)
-		cm_roam_btm_candidate_event(&btm_data->btm_cand[i], vdev_id, i);
-
-	qdf_mem_free(log_record);
-
-	return status;
-}
-
-QDF_STATUS
-cm_roam_mgmt_frame_event(struct roam_frame_info *frame_data,
-			 struct wmi_roam_scan_data *scan_data, uint8_t vdev_id)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	uint8_t i;
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record)
-		return QDF_STATUS_E_NOMEM;
-
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->fw_timestamp_us = (uint64_t)frame_data->timestamp * 1000;
-	log_record->bssid = frame_data->bssid;
-	log_record->vdev_id = vdev_id;
-
-	log_record->pkt_info.seq_num = frame_data->seq_num;
-	log_record->pkt_info.auth_algo = frame_data->auth_algo;
-	log_record->pkt_info.rssi = frame_data->rssi;
-	log_record->pkt_info.tx_status = frame_data->tx_status;
-	log_record->pkt_info.frame_status_code = frame_data->status_code;
-	log_record->pkt_info.assoc_id = frame_data->assoc_id;
-
-	if (scan_data->present) {
-		for (i = 0; i < scan_data->num_ap; i++) {
-			if (i >= MAX_ROAM_CANDIDATE_AP)
-				break;
-
-			if (scan_data->ap[i].type == WLAN_ROAM_SCAN_ROAMED_AP) {
-				log_record->pkt_info.rssi =
-					(-1) * scan_data->ap[i].rssi;
-				log_record->bssid = scan_data->ap[i].bssid;
-				break;
-			} else if (qdf_is_macaddr_equal(&log_record->bssid,
-							&scan_data->ap[i].bssid)) {
-				log_record->pkt_info.rssi =
-					(-1) * scan_data->ap[i].rssi;
-				break;
-			}
-		}
-	}
-
-	if (frame_data->type == ROAM_FRAME_INFO_FRAME_TYPE_EXT)
-		log_record->log_subtype =
-			cm_roam_get_eapol_tag(frame_data->subtype);
-	else
-		log_record->log_subtype = cm_roam_get_tag(frame_data->subtype,
-							  !frame_data->is_rsp);
-
-	status = wlan_connectivity_log_enqueue(log_record);
-	qdf_mem_free(log_record);
-
-	return status;
-}
-
-QDF_STATUS
-cm_roam_beacon_loss_disconnect_event(struct wlan_objmgr_psoc *psoc,
-				     struct qdf_mac_addr bssid, uint8_t vdev_id)
-{
-	struct wlan_log_record *log_record = NULL;
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	struct wlan_objmgr_vdev *vdev = NULL;
-	uint32_t rssi;
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
-						    WLAN_MLME_CM_ID);
-	if (!vdev) {
-		mlme_err("Vdev[%d] is null", vdev_id);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	log_record = qdf_mem_malloc(sizeof(*log_record));
-	if (!log_record) {
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	log_record->timestamp_us = qdf_get_time_of_the_day_us();
-	log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
-	log_record->vdev_id = vdev_id;
-	log_record->bssid = bssid;
-	log_record->log_subtype = WLAN_DISCONN_BMISS;
-
-	rssi = mlme_get_hb_ap_rssi(vdev);
-	log_record->pkt_info.rssi = rssi;
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
-
-	status = wlan_connectivity_log_enqueue(log_record);
-	qdf_mem_free(log_record);
-
-	return status;
-}
-#endif /* WLAN_FEATURE_CONNECTIVITY_LOGGING */
+#endif
 
 QDF_STATUS
 cm_send_rso_stop(struct wlan_objmgr_vdev *vdev)

+ 2 - 3
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h

@@ -557,9 +557,8 @@ cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev,
 
 #endif
 
-#if (defined(WLAN_FEATURE_CONNECTIVITY_LOGGING) || \
-	defined(CONNECTIVITY_DIAG_EVENT)) && \
-	defined(WLAN_FEATURE_ROAM_OFFLOAD)
+#if (defined(CONNECTIVITY_DIAG_EVENT) && \
+	defined(WLAN_FEATURE_ROAM_OFFLOAD))
 /**
  * cm_roam_mgmt_frame_event() - Roam management frame event
  * @frame_data: frame_data