Browse Source

qcacld-3.0: Modify MGMT logs to add MLO Parameter after Roaming

MLO parameter is not observed in association/reassociation
request/response logs when connected to MLO AP.

Call api wlan_populate_mlo_mgmt_event_param() in the
api cm_roam_mgmt_frame_event() in order to populate
MLO parameter in MGMT frame logs after roaming.

Change-Id: I9dbd1a224ec861964a78883088440d79ae80cdd6
CRs-Fixed: 3620741
Vijay Raj 1 year ago
parent
commit
0dc1988bb3

+ 31 - 0
components/cmn_services/logging/inc/wlan_connectivity_logging.h

@@ -1260,6 +1260,21 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
  */
 void wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
 					 struct wlan_objmgr_vdev *vdev);
+
+/**
+ * wlan_populate_mlo_mgmt_event_param() - API to populate MLO management frame
+ * parameter
+ * @vdev: vdev pointer
+ * @data: Buffer to be filled with MLO parameter
+ * @tag: WLAN event tag. Refer enum wlan_main_tag
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag);
+
 #else
 static inline void
 wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev)
@@ -1285,6 +1300,14 @@ wlan_connectivity_t2lm_status_event(struct wlan_objmgr_psoc *psoc,
 				    struct wlan_objmgr_vdev *vdev)
 {
 }
+
+static inline QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag)
+{
+	return QDF_STATUS_SUCCESS;
+}
 #endif
 
 /**
@@ -1507,6 +1530,14 @@ wlan_convert_freq_to_diag_band(uint16_t ch_freq)
 	return WLAN_INVALID_BAND;
 }
 
+static inline QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
 static inline void
 wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
 		       uint32_t freq, uint8_t vdev_id)

+ 1 - 9
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -424,7 +424,7 @@ wlan_populate_band_bitmap(struct mlo_link_switch_context *link_ctx)
 	return band_bitmap;
 }
 
-static QDF_STATUS
+QDF_STATUS
 wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
 				   struct wlan_diag_packet_info *data,
 				   enum wlan_main_tag tag)
@@ -677,14 +677,6 @@ wlan_populate_link_addr(struct wlan_objmgr_vdev *vdev,
 {
 	return QDF_STATUS_SUCCESS;
 }
-
-static QDF_STATUS
-wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
-				   struct wlan_diag_packet_info *data,
-				   enum wlan_main_tag tag)
-{
-	return QDF_STATUS_SUCCESS;
-}
 #endif
 
 void

+ 10 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -6948,6 +6948,16 @@ cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 		(uint8_t)cm_roam_get_tag(frame_data->subtype,
 					 !frame_data->is_rsp);
 		diag_event = EVENT_WLAN_MGMT;
+
+		status =
+			wlan_populate_mlo_mgmt_event_param(vdev,
+							   &wlan_diag_event,
+							   wlan_diag_event.subtype);
+		if (QDF_IS_STATUS_ERROR(status)) {
+			mlme_err("vdev: %d Unable to populate MLO parameter",
+				 wlan_vdev_get_id(vdev));
+			return status;
+		}
 	}
 
 	if (wlan_diag_event.subtype > WLAN_CONN_DIAG_REASSOC_RESP_EVENT &&

+ 5 - 5
components/wmi/src/wmi_unified_roam_tlv.c

@@ -3018,6 +3018,11 @@ extract_roam_stats_with_single_tlv(wmi_unified_t wmi_handle, uint8_t *evt_buf,
 	uint8_t vdev_id = stats_info->vdev_id;
 	uint8_t band;
 
+	status = wmi_unified_extract_roam_scan_stats(
+			wmi_handle, evt_buf, &stats_info->scan[0], 0, 0, 0);
+	if (QDF_IS_STATUS_ERROR(status))
+		wmi_debug("Roam scan stats extract failed vdev %d", vdev_id);
+
 	band = stats_info->scan[0].band;
 
 	status = wmi_unified_extract_roam_11kv_stats(
@@ -3032,11 +3037,6 @@ extract_roam_stats_with_single_tlv(wmi_unified_t wmi_handle, uint8_t *evt_buf,
 		wmi_debug("Extract roamtrigger stats failed vdev %d",
 			  vdev_id);
 
-	status = wmi_unified_extract_roam_scan_stats(
-			wmi_handle, evt_buf, &stats_info->scan[0], 0, 0, 0);
-	if (QDF_IS_STATUS_ERROR(status))
-		wmi_debug("Roam scan stats extract failed vdev %d", vdev_id);
-
 	status = wmi_unified_extract_roam_btm_response(
 			wmi_handle, evt_buf, &stats_info->btm_rsp[0], 0);
 	if (QDF_IS_STATUS_ERROR(status))