diff --git a/dp/wifi3.0/be/dp_be.c b/dp/wifi3.0/be/dp_be.c index 318c5d9a48..d5a1f29571 100644 --- a/dp/wifi3.0/be/dp_be.c +++ b/dp/wifi3.0/be/dp_be.c @@ -1670,6 +1670,40 @@ static QDF_STATUS dp_peer_map_attach_be(struct dp_soc *soc) return QDF_STATUS_SUCCESS; } +#ifdef WLAN_FEATURE_11BE_MLO +#ifdef WLAN_MCAST_MLO +static inline void +dp_initialize_arch_ops_be_mcast_mlo(struct dp_arch_ops *arch_ops) +{ + arch_ops->dp_tx_mcast_handler = dp_tx_mlo_mcast_handler_be; + arch_ops->dp_rx_mcast_handler = dp_rx_mlo_igmp_handler; +} +#else /* WLAN_MCAST_MLO */ +static inline void +dp_initialize_arch_ops_be_mcast_mlo(struct dp_arch_ops *arch_ops) +{ +} +#endif /* WLAN_MCAST_MLO */ + +static inline void +dp_initialize_arch_ops_be_mlo(struct dp_arch_ops *arch_ops) +{ + dp_initialize_arch_ops_be_mcast_mlo(arch_ops); + arch_ops->mlo_peer_find_hash_detach = + dp_mlo_peer_find_hash_detach_wrapper; + arch_ops->mlo_peer_find_hash_attach = + dp_mlo_peer_find_hash_attach_wrapper; + arch_ops->mlo_peer_find_hash_add = dp_mlo_peer_find_hash_add_be; + arch_ops->mlo_peer_find_hash_remove = dp_mlo_peer_find_hash_remove_be; + arch_ops->mlo_peer_find_hash_find = dp_mlo_peer_find_hash_find_be; +} +#else /* WLAN_FEATURE_11BE_MLO */ +static inline void +dp_initialize_arch_ops_be_mlo(struct dp_arch_ops *arch_ops) +{ +} +#endif /* WLAN_FEATURE_11BE_MLO */ + void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops) { #ifndef QCA_HOST_MODE_WIFI_DISABLED @@ -1714,20 +1748,7 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops) arch_ops->peer_get_reo_hash = dp_peer_get_reo_hash_be; arch_ops->reo_remap_config = dp_reo_remap_config_be; arch_ops->txrx_set_vdev_param = dp_txrx_set_vdev_param_be; - -#ifdef WLAN_FEATURE_11BE_MLO -#ifdef WLAN_MCAST_MLO - arch_ops->dp_tx_mcast_handler = dp_tx_mlo_mcast_handler_be; - arch_ops->dp_rx_mcast_handler = dp_rx_mlo_igmp_handler; -#endif - arch_ops->mlo_peer_find_hash_detach = - dp_mlo_peer_find_hash_detach_wrapper; - arch_ops->mlo_peer_find_hash_attach = - dp_mlo_peer_find_hash_attach_wrapper; - arch_ops->mlo_peer_find_hash_add = dp_mlo_peer_find_hash_add_be; - arch_ops->mlo_peer_find_hash_remove = dp_mlo_peer_find_hash_remove_be; - arch_ops->mlo_peer_find_hash_find = dp_mlo_peer_find_hash_find_be; -#endif + dp_initialize_arch_ops_be_mlo(arch_ops); arch_ops->dp_peer_rx_reorder_queue_setup = dp_peer_rx_reorder_queue_setup_be; arch_ops->txrx_print_peer_stats = dp_print_peer_txrx_stats_be; diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index a9c39f0860..3227277b2a 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -3582,6 +3582,45 @@ int dp_tx_proxy_arp(struct dp_vdev *vdev, qdf_nbuf_t nbuf) } #endif +#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) +#ifdef WLAN_MCAST_MLO +static bool +dp_tx_reinject_mlo_hdl(struct dp_soc *soc, struct dp_vdev *vdev, + struct dp_tx_desc_s *tx_desc, + qdf_nbuf_t nbuf, + uint8_t reinject_reason) +{ + if (reinject_reason == HTT_TX_FW2WBM_REINJECT_REASON_MLO_MCAST) { + if (soc->arch_ops.dp_tx_mcast_handler) + soc->arch_ops.dp_tx_mcast_handler(soc, vdev, nbuf); + + dp_tx_desc_release(tx_desc, tx_desc->pool_id); + return true; + } + + return false; +} +#else /* WLAN_MCAST_MLO */ +static inline bool +dp_tx_reinject_mlo_hdl(struct dp_soc *soc, struct dp_vdev *vdev, + struct dp_tx_desc_s *tx_desc, + qdf_nbuf_t nbuf, + uint8_t reinject_reason) +{ + return false; +} +#endif /* WLAN_MCAST_MLO */ +#else +static inline bool +dp_tx_reinject_mlo_hdl(struct dp_soc *soc, struct dp_vdev *vdev, + struct dp_tx_desc_s *tx_desc, + qdf_nbuf_t nbuf, + uint8_t reinject_reason) +{ + return false; +} +#endif + /** * dp_tx_reinject_handler() - Tx Reinject Handler * @soc: datapath soc handle @@ -3621,17 +3660,8 @@ void dp_tx_reinject_handler(struct dp_soc *soc, DP_STATS_INC_PKT(vdev, tx_i.reinject_pkts, 1, qdf_nbuf_len(tx_desc->nbuf)); -#if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP) -#ifdef WLAN_MCAST_MLO - if (reinject_reason == HTT_TX_FW2WBM_REINJECT_REASON_MLO_MCAST) { - if (soc->arch_ops.dp_tx_mcast_handler) - soc->arch_ops.dp_tx_mcast_handler(soc, vdev, nbuf); - - dp_tx_desc_release(tx_desc, tx_desc->pool_id); + if (dp_tx_reinject_mlo_hdl(soc, vdev, tx_desc, nbuf, reinject_reason)) return; - } -#endif -#endif #ifdef WDS_VENDOR_EXTENSION if (qdf_unlikely(vdev->tx_encap_type != htt_cmn_pkt_type_raw)) { diff --git a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c index 218c80b9ef..cc5aaf8631 100644 --- a/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c +++ b/umac/mlme/vdev_mgr/core/src/vdev_mgr_ops.c @@ -113,6 +113,21 @@ static void vdev_mgr_reset_vdev_stats_id(struct wlan_objmgr_vdev *vdev, {} #endif /* QCA_VDEV_STATS_HW_OFFLOAD_SUPPORT */ +#ifdef WLAN_FEATURE_11BE_MLO +static inline void +vdev_mgr_param_mld_mac_addr_copy(struct wlan_objmgr_vdev *vdev, + struct vdev_create_params *param) +{ + WLAN_ADDR_COPY(param->mlo_mac, wlan_vdev_mlme_get_mldaddr(vdev)); +} +#else /* WLAN_FEATURE_11BE_MLO */ +static inline void +vdev_mgr_param_mld_mac_addr_copy(struct wlan_objmgr_vdev *vdev, + struct vdev_create_params *param) +{ +} +#endif /* WLAN_FEATURE_11BE_MLO */ + static QDF_STATUS vdev_mgr_create_param_update( struct vdev_mlme_obj *mlme_obj, struct vdev_create_params *param) @@ -147,9 +162,7 @@ static QDF_STATUS vdev_mgr_create_param_update( vdev_mgr_alloc_vdev_stats_id(vdev, param); param->vdev_stats_id_valid = ((param->vdev_stats_id != CDP_INVALID_VDEV_STATS_ID) ? true : false); -#ifdef WLAN_FEATURE_11BE_MLO - WLAN_ADDR_COPY(param->mlo_mac, wlan_vdev_mlme_get_mldaddr(vdev)); -#endif + vdev_mgr_param_mld_mac_addr_copy(vdev, param); return QDF_STATUS_SUCCESS; } diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index d76990d55b..bafd66d72a 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -17869,6 +17869,24 @@ struct wmi_ops tlv_ops = { extract_pktlog_decode_info_event_tlv, }; +#ifdef WLAN_FEATURE_11BE_MLO +static void populate_tlv_events_id_mlo(uint32_t *event_ids) +{ + event_ids[wmi_mlo_setup_complete_event_id] = + WMI_MLO_SETUP_COMPLETE_EVENTID; + event_ids[wmi_mlo_teardown_complete_event_id] = + WMI_MLO_TEARDOWN_COMPLETE_EVENTID; + event_ids[wmi_mlo_link_set_active_resp_eventid] = + WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID; + event_ids[wmi_vdev_quiet_offload_eventid] = + WMI_QUIET_HANDLING_EVENTID; +} +#else /* WLAN_FEATURE_11BE_MLO */ +static inline void populate_tlv_events_id_mlo(uint32_t *event_ids) +{ +} +#endif /* WLAN_FEATURE_11BE_MLO */ + /** * populate_tlv_event_id() - populates wmi event ids * @@ -18261,7 +18279,7 @@ static void populate_tlv_events_id(uint32_t *event_ids) event_ids[wmi_wlan_time_sync_q_initiator_target_offset_eventid] = WMI_VDEV_AUDIO_SYNC_Q_MASTER_SLAVE_OFFSET_EVENTID; #endif -event_ids[wmi_roam_scan_chan_list_id] = + event_ids[wmi_roam_scan_chan_list_id] = WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID; event_ids[wmi_muedca_params_config_eventid] = WMI_MUEDCA_PARAMS_CONFIG_EVENTID; @@ -18295,24 +18313,13 @@ event_ids[wmi_roam_scan_chan_list_id] = event_ids[wmi_mgmt_rx_fw_consumed_eventid] = WMI_MGMT_RX_FW_CONSUMED_EVENTID; #endif -#ifdef WLAN_FEATURE_11BE_MLO - event_ids[wmi_mlo_setup_complete_event_id] = - WMI_MLO_SETUP_COMPLETE_EVENTID; - event_ids[wmi_mlo_teardown_complete_event_id] = - WMI_MLO_TEARDOWN_COMPLETE_EVENTID; - event_ids[wmi_mlo_link_set_active_resp_eventid] = - WMI_MLO_LINK_SET_ACTIVE_RESP_EVENTID; -#endif + populate_tlv_events_id_mlo(event_ids); event_ids[wmi_roam_frame_event_id] = WMI_ROAM_FRAME_EVENTID; #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE event_ids[wmi_vdev_update_mac_addr_conf_eventid] = WMI_VDEV_UPDATE_MAC_ADDR_CONF_EVENTID; #endif -#ifdef WLAN_FEATURE_11BE_MLO - event_ids[wmi_vdev_quiet_offload_eventid] = - WMI_QUIET_HANDLING_EVENTID; -#endif #ifdef WLAN_FEATURE_MCC_QUOTA event_ids[wmi_resmgr_chan_time_quota_changed_eventid] = WMI_RESMGR_CHAN_TIME_QUOTA_CHANGED_EVENTID; @@ -18345,6 +18352,18 @@ static void wmi_populate_service_get_sta_in_ll_stats_req(uint32_t *wmi_service) } #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ +#ifdef WLAN_FEATURE_11BE_MLO +static void populate_tlv_service_mlo(uint32_t *wmi_service) +{ + wmi_service[wmi_service_mlo_sta_nan_ndi_support] = + WMI_SERVICE_MLO_STA_NAN_NDI_SUPPORT; +} +#else /* WLAN_FEATURE_11BE_MLO */ +static inline void populate_tlv_service_mlo(uint32_t *wmi_service) +{ +} +#endif /* WLAN_FEATURE_11BE_MLO */ + /** * populate_tlv_service() - populates wmi services * @@ -18786,10 +18805,7 @@ static void populate_tlv_service(uint32_t *wmi_service) wmi_service[wmi_service_fp_phy_err_filter_support] = WMI_SERVICE_FP_PHY_ERR_FILTER_SUPPORT; #endif -#ifdef WLAN_FEATURE_11BE_MLO - wmi_service[wmi_service_mlo_sta_nan_ndi_support] = - WMI_SERVICE_MLO_STA_NAN_NDI_SUPPORT; -#endif + populate_tlv_service_mlo(wmi_service); wmi_service[wmi_service_pdev_rate_config_support] = WMI_SERVICE_PDEV_RATE_CONFIG_SUPPORT; wmi_service[wmi_service_multi_peer_group_cmd_support] =