Ver código fonte

qcacld-3.0: Add frequency to peer for Connectivity Logging

Introduce support to add frequency to peer in
order to enable Connectivity diag logging for
datapath related events

Change-Id: I634ddc0206530f1039a37fd60643877b2fdf7e87
CRs-Fixed: 3596250
Vijay Raj 1 ano atrás
pai
commit
94f55718b5

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

@@ -1198,6 +1198,19 @@ void
 wlan_populate_vsie(struct wlan_objmgr_vdev *vdev,
 		   struct wlan_diag_packet_info *data, bool is_tx);
 
+/**
+ * wlan_cdp_set_peer_freq() - API to set frequency to dp peer
+ * @psoc: psoc pointer
+ * @peer_mac: Bssid of peer
+ * @freq: frequency(in MHz)
+ * @vdev_id: vdev id
+ *
+ * Return: None
+ */
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id);
+
 #ifdef WLAN_FEATURE_11BE_MLO
 /**
  * wlan_connectivity_mlo_setup_event() - Fill and send MLO setup data
@@ -1406,6 +1419,20 @@ wlan_convert_freq_to_diag_band(uint16_t ch_freq);
 void
 wlan_populate_vsie(struct wlan_objmgr_vdev *vdev,
 		   struct wlan_diag_packet_info *data, bool is_tx);
+
+/**
+ * wlan_cdp_set_peer_freq() - API to set frequency to dp peer
+ * @psoc: psoc pointer
+ * @peer_mac: Bssid of peer
+ * @freq: frequency(in MHz)
+ * @vdev_id: vdev id
+ *
+ * Return: None
+ */
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id);
+
 #else
 static inline
 void wlan_connectivity_logging_start(struct wlan_objmgr_psoc *psoc,
@@ -1450,6 +1477,11 @@ wlan_convert_freq_to_diag_band(uint16_t ch_freq)
 	return WLAN_INVALID_BAND;
 }
 
+static inline void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id)
+{}
+
 static inline void
 wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id)

+ 15 - 0
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -25,6 +25,7 @@
 #include "wlan_mlme_main.h"
 #include "wlan_mlo_mgr_sta.h"
 #include "wlan_mlme_api.h"
+#include "cdp_txrx_ctrl.h"
 
 #ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
 static struct wlan_connectivity_log_buf_data global_cl;
@@ -525,6 +526,20 @@ wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
 }
 #endif
 
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id)
+{
+	ol_txrx_soc_handle soc_txrx_handle;
+	cdp_config_param_type val = {0};
+
+	soc_txrx_handle = wlan_psoc_get_dp_handle(psoc);
+
+	val.cdp_peer_param_freq = freq;
+	cdp_txrx_set_peer_param(soc_txrx_handle, vdev_id, peer_mac,
+				CDP_CONFIG_PEER_FREQ, val);
+}
+
 void
 wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 {

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

@@ -6924,6 +6924,8 @@ cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 		}
 	}
 
+	wlan_diag_event.supported_links = frame_data->band;
+
 	if (frame_data->type == ROAM_FRAME_INFO_FRAME_TYPE_EXT) {
 		wlan_diag_event.subtype =
 			(uint8_t)cm_roam_get_eapol_tag(frame_data->subtype);

+ 3 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -2222,6 +2222,8 @@ enum roam_rt_stats_type {
  * @retry_count: Frame retry count
  * @assoc_id: Association id received in the association response/
  * reassociation response frame
+ * @band: Band on which the packet is transmitted or received. Refer
+ * enum wlan_diag_wifi_band
  */
 struct roam_frame_info {
 	bool present;
@@ -2237,6 +2239,7 @@ struct roam_frame_info {
 	int32_t rssi;
 	uint16_t retry_count;
 	uint16_t assoc_id;
+	uint8_t band;
 };
 
 /**

+ 3 - 0
components/wmi/src/wmi_unified_roam_tlv.c

@@ -2078,6 +2078,9 @@ extract_roam_frame_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 		dst_buf->assoc_id =
 			WMI_GET_ASSOC_ID(src_data->frame_info_ext);
 
+		dst_buf->band =
+			WMI_GET_MLO_BITMAP_BAND_INFO(src_data->frame_info_ext);
+
 		dst_buf++;
 		src_data++;
 	}

+ 5 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -11058,6 +11058,11 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 	    !mlme_is_chan_switch_in_progress(mlme_obj->vdev))
 		lim_apply_puncture(mac, session, ch_params.mhz_freq_seg1);
 
+	if (LIM_IS_STA_ROLE(session))
+		wlan_cdp_set_peer_freq(mac->psoc, session->bssId,
+				       session->curr_op_freq,
+				       wlan_vdev_get_id(session->vdev));
+
 	if (IS_DOT11_MODE_EHT(session->dot11mode))
 		wlan_reg_set_create_punc_bitmap(&ch_params, true);
 

+ 6 - 0
core/wma/src/wma_scan_roam.c

@@ -754,6 +754,12 @@ wma_roam_update_vdev(tp_wma_handle wma,
 		return;
 	}
 
+	if (wlan_vdev_mlme_get_opmode(wma->interfaces[vdev_id].vdev) ==
+								QDF_STA_MODE)
+		wlan_cdp_set_peer_freq(wma->psoc, bssid,
+				       wma->interfaces[vdev_id].ch_freq,
+				       vdev_id);
+
 	is_assoc_peer = wlan_vdev_mlme_get_is_mlo_vdev(wma->psoc, vdev_id);
 	if (is_multi_link_roam(roam_synch_ind_ptr)) {
 		wma_create_peer(wma, mac_addr.bytes,