Bläddra i källkod

qcacmn: Extract MLO specific data for BTM logging

Extract MLO band data from roam stats event for
BTM query, BTM request and BTM response logging.

MLO Band refers to the band of the link involved
in MLO conenection.

Change-Id: Ia60821f7973fe1d39eb824a3eac7791672503084
CRs-Fixed: 3583688
Vijay Raj 1 år sedan
förälder
incheckning
e762867930

+ 3 - 1
wmi/inc/wmi_unified_api.h

@@ -910,13 +910,15 @@ wmi_unified_extract_roam_result_stats(wmi_unified_t wmi, void *evt_buf,
  * @dst:       Pointer to destination structure to fill data
  * @idx:       TLV id
  * @rpt_idx:   index of the current channel
+ * @band: Band of the link on which packet was transmitted/received.
  *
  * Return: QDF_STATUS
  */
 QDF_STATUS
 wmi_unified_extract_roam_11kv_stats(wmi_unified_t wmi, void *evt_buf,
 				    struct wmi_neighbor_report_data *dst,
-				    uint8_t idx, uint8_t rpt_idx);
+				    uint8_t idx, uint8_t rpt_idx,
+				    uint8_t band);
 
 /**
  * wmi_unified_vdev_create_send() - send VDEV create command to fw

+ 8 - 0
wmi/inc/wmi_unified_param.h

@@ -9151,6 +9151,8 @@ struct wmi_roam_trigger_background_data {
  * milli seconds
  * @token: BTM request dialog token
  * @btm_cand: BTM request candidate information
+ * @is_mlo: Flag to check whether the existing connection a MLO connection
+ * @band: indicates the link involved in MLO conenection.
  */
 struct wmi_roam_btm_trigger_data {
 	uint32_t timestamp;
@@ -9163,6 +9165,8 @@ struct wmi_roam_btm_trigger_data {
 	uint32_t btm_mbo_assoc_retry_timeout;
 	uint16_t token;
 	struct wmi_btm_req_candidate_info btm_cand[WLAN_MAX_BTM_CANDIDATE];
+	bool is_mlo;
+	uint8_t band;
 };
 
 /**
@@ -9364,6 +9368,8 @@ struct wmi_roam_result {
  *  @req_token: Request token
  *  @resp_token: Response Token
  *  @num_rpt: Number of report element
+ *  @is_mlo: Flag to check if the current connection is MLO connection
+ *  @band: indicates the link involved in MLO conenection.
  */
 struct wmi_neighbor_report_data {
 	bool present;
@@ -9378,6 +9384,8 @@ struct wmi_neighbor_report_data {
 	uint8_t req_token;
 	uint8_t resp_token;
 	uint8_t num_rpt;
+	bool is_mlo;
+	uint8_t band;
 };
 
 /**

+ 1 - 1
wmi/inc/wmi_unified_priv.h

@@ -2568,7 +2568,7 @@ QDF_STATUS
 (*extract_roam_11kv_stats)(wmi_unified_t wmi_handle,
 			   void *evt_buf,
 			   struct wmi_neighbor_report_data *dst,
-			   uint8_t idx, uint8_t rpt_idx);
+			   uint8_t idx, uint8_t rpt_idx, uint8_t band);
 
 void (*wmi_pdev_id_conversion_enable)(wmi_unified_t wmi_handle,
 				      uint32_t *pdev_map,

+ 2 - 2
wmi/src/wmi_unified_api.c

@@ -3712,11 +3712,11 @@ wmi_unified_extract_roam_result_stats(wmi_unified_t wmi, void *buf,
 QDF_STATUS
 wmi_unified_extract_roam_11kv_stats(wmi_unified_t wmi, void *evt_buf,
 				    struct wmi_neighbor_report_data *dst,
-				    uint8_t idx, uint8_t rpt_idx)
+				    uint8_t idx, uint8_t rpt_idx, uint8_t band)
 {
 	if (wmi->ops->extract_roam_11kv_stats)
 		return wmi->ops->extract_roam_11kv_stats(wmi, evt_buf, dst, idx,
-							 rpt_idx);
+							 rpt_idx, band);
 
 	return QDF_STATUS_E_FAILURE;
 }

+ 16 - 2
wmi/src/wmi_unified_tlv.c

@@ -19697,6 +19697,10 @@ extract_roam_trigger_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 				btm_data->btm_mbo_assoc_retry_timeout;
 			trig->btm_trig_data.token =
 				(uint16_t)btm_data->btm_req_dialog_token;
+			trig->btm_trig_data.band =
+				WMI_GET_MLO_BAND(scan_info->flags);
+			if (trig->btm_trig_data.band != WMI_MLO_BAND_NO_MLO)
+				trig->btm_trig_data.is_mlo = true;
 		} else if (src_data) {
 			trig->btm_trig_data.btm_request_mode =
 					src_data->btm_request_mode;
@@ -19714,6 +19718,10 @@ extract_roam_trigger_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 					src_data->btm_mbo_assoc_retry_timeout;
 			trig->btm_trig_data.token =
 				src_data->btm_req_dialog_token;
+			trig->btm_trig_data.band =
+				WMI_GET_MLO_BAND(scan_info->flags);
+			if (trig->btm_trig_data.band != WMI_MLO_BAND_NO_MLO)
+				trig->btm_trig_data.is_mlo = true;
 			if ((btm_idx +
 				trig->btm_trig_data.candidate_list_count) <=
 			    param_buf->num_roam_btm_request_candidate_info)
@@ -19998,11 +20006,12 @@ extract_roam_result_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
  * @dst:        Pointer to destination structure to fill data
  * @idx:        TLV id
  * @rpt_idx:    Neighbor report Channel index
+ * @band: Band of the link on which packet is transmitted or received
  */
 static QDF_STATUS
 extract_roam_11kv_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 			    struct wmi_neighbor_report_data *dst,
-			    uint8_t idx, uint8_t rpt_idx)
+			    uint8_t idx, uint8_t rpt_idx, uint8_t band)
 {
 	WMI_ROAM_STATS_EVENTID_param_tlvs *param_buf;
 	wmi_roam_neighbor_report_info *src_data = NULL;
@@ -20033,6 +20042,11 @@ extract_roam_11kv_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 	dst->num_rpt =
 		WMI_ROAM_NEIGHBOR_REPORT_INFO_NUM_OF_NRIE_GET(src_data->neighbor_report_detail);
 
+	dst->band = band;
+
+	if (dst->band != WMI_MLO_BAND_NO_MLO)
+		dst->is_mlo = true;
+
 	if (!dst->num_freq || !param_buf->num_roam_neighbor_report_chan_info ||
 	    rpt_idx >= param_buf->num_roam_neighbor_report_chan_info)
 		return QDF_STATUS_SUCCESS;
@@ -20127,7 +20141,7 @@ extract_roam_result_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 static QDF_STATUS
 extract_roam_11kv_stats_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 			    struct wmi_neighbor_report_data *dst,
-			    uint8_t idx, uint8_t rpt_idx)
+			    uint8_t idx, uint8_t rpt_idx, uint8_t band)
 {
 	return QDF_STATUS_E_NOSUPPORT;
 }