diff --git a/components/cmn_services/logging/inc/wlan_connectivity_logging.h b/components/cmn_services/logging/inc/wlan_connectivity_logging.h index a468962e75..156cf99542 100644 --- a/components/cmn_services/logging/inc/wlan_connectivity_logging.h +++ b/components/cmn_services/logging/inc/wlan_connectivity_logging.h @@ -1212,6 +1212,16 @@ 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_reconfig_event() -API to log MLO reconfig event + * @vdev: vdev pointer + * + * Return: None + */ +void +wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev); + /** * wlan_connectivity_mlo_setup_event() - Fill and send MLO setup data * @vdev: vdev pointer @@ -1255,6 +1265,11 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev, qdf_freq_t freq, bool is_rx, uint8_t subtype) {} + +static inline void +wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev) +{ +} #endif /** @@ -1482,6 +1497,11 @@ 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_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev) +{ +} + static inline void wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id) diff --git a/components/cmn_services/logging/src/wlan_connectivity_logging.c b/components/cmn_services/logging/src/wlan_connectivity_logging.c index 3e719f711d..f4c44205ed 100644 --- a/components/cmn_services/logging/src/wlan_connectivity_logging.c +++ b/components/cmn_services/logging/src/wlan_connectivity_logging.c @@ -334,6 +334,43 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev, EVENT_WLAN_MLO_T2LM_REQ_RESP); } +void +wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev) +{ + struct mlo_link_info *link_info = NULL; + struct wlan_channel *chan_info = NULL; + uint8_t link_id; + + WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, + struct wlan_diag_mlo_reconfig); + + wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get()); + wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us(); + wlan_diag_event.version = DIAG_MLO_RECONFIG_VERSION; + + link_id = wlan_vdev_get_link_id(vdev); + wlan_diag_event.mlo_cmn_info.link_id = link_id; + + if (!vdev->mlo_dev_ctx) + return; + + link_info = mlo_mgr_get_ap_link_by_link_id(vdev->mlo_dev_ctx, link_id); + if (!link_info) { + mlme_err("linl: %d Link info not found", link_id); + return; + } + chan_info = link_info->link_chan_info; + if (!chan_info) { + mlme_err("link: %d Chan info not found", link_id); + return; + } + + wlan_diag_event.mlo_cmn_info.band = + wlan_convert_freq_to_diag_band(chan_info->ch_freq); + + WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_MLO_RECONFIG); +} + static QDF_STATUS wlan_populate_link_addr(struct wlan_objmgr_vdev *vdev, struct wlan_diag_sta_info *wlan_diag_event) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index c6ad991674..493534cd18 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -46,6 +46,7 @@ #include "wlan_mlme_ucfg_api.h" #include "wlan_p2p_ucfg_api.h" #include "wlan_mlo_link_force.h" +#include "wlan_connectivity_logging.h" /* invalid channel id. */ #define INVALID_CHANNEL_ID 0 @@ -8067,6 +8068,9 @@ void policy_mgr_handle_link_removal_on_vdev(struct wlan_objmgr_vdev *vdev) vdev_id); return; } + + wlan_connectivity_mlo_reconfig_event(vdev); + /* mark link removed for vdev */ wlan_set_vdev_link_removed_flag_by_vdev_id(psoc, vdev_id, true);