diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 4edd627bb399..5f7cf848a616 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -827,7 +827,7 @@ struct ol_if_ops { void (*peer_del_wds_cp_ctx)(void *cp_ctx); #endif QDF_STATUS - (*lro_hash_config)(struct wlan_objmgr_psoc *ctrl_psoc, + (*lro_hash_config)(struct cdp_ctrl_objmgr_pdev *ctrl_pdev, struct cdp_lro_hash_config *rx_offld_hash); void (*update_dp_stats)(void *soc, void *stats, uint16_t id, uint8_t type); diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 174e2cea9470..269d84b83873 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2522,7 +2522,7 @@ fail1: static void dp_pdev_detach_wifi3(struct cdp_pdev *txrx_pdev, int force); -static void dp_lro_hash_setup(struct dp_soc *soc) +static void dp_lro_hash_setup(struct dp_soc *soc, struct dp_pdev *pdev) { struct cdp_lro_hash_config lro_hash; @@ -2572,7 +2572,7 @@ static void dp_lro_hash_setup(struct dp_soc *soc) if (soc->cdp_soc.ol_ops->lro_hash_config) (void)soc->cdp_soc.ol_ops->lro_hash_config - (soc->ctrl_psoc, &lro_hash); + (pdev->ctrl_pdev, &lro_hash); } /* @@ -3698,7 +3698,8 @@ static struct cdp_vdev *dp_vdev_attach_wifi3(struct cdp_pdev *txrx_pdev, qdf_timer_mod(&soc->int_timer, DP_INTR_POLL_TIMER_MS); } - dp_lro_hash_setup(soc); + if (pdev->vdev_count == 1) + dp_lro_hash_setup(soc, pdev); /* LRO */ if (wlan_cfg_is_lro_enabled(soc->wlan_cfg_ctx) && diff --git a/target_if/dp/inc/target_if_dp.h b/target_if/dp/inc/target_if_dp.h index 32ef453e16a2..6c3212a7161f 100644 --- a/target_if/dp/inc/target_if_dp.h +++ b/target_if/dp/inc/target_if_dp.h @@ -89,7 +89,7 @@ target_if_peer_rx_reorder_queue_remove(struct cdp_ctrl_objmgr_pdev *pdev, * return: QDF_STATUS_SUCCESS for success or error code */ QDF_STATUS -target_if_lro_hash_config(struct wlan_objmgr_psoc *psoc_handle, +target_if_lro_hash_config(struct cdp_ctrl_objmgr_pdev *pdev, struct cdp_lro_hash_config *lro_hash_cfg); #endif diff --git a/target_if/dp/src/target_if_dp.c b/target_if/dp/src/target_if_dp.c index 1b9122d34008..484d17abf898 100644 --- a/target_if/dp/src/target_if_dp.c +++ b/target_if/dp/src/target_if_dp.c @@ -110,22 +110,25 @@ target_if_peer_rx_reorder_queue_remove(struct cdp_ctrl_objmgr_pdev *pdev, } QDF_STATUS -target_if_lro_hash_config(struct wlan_objmgr_psoc *psoc_handle, +target_if_lro_hash_config(struct cdp_ctrl_objmgr_pdev *pdev, struct cdp_lro_hash_config *lro_hash_cfg) { struct wmi_lro_config_cmd_t wmi_lro_cmd = {0}; - struct common_wmi_handle *wmi_handle; + struct common_wmi_handle *pdev_wmi_handle; - wmi_handle = lmac_get_wmi_hdl(psoc_handle); - if (!lro_hash_cfg || !wmi_handle) { + pdev_wmi_handle = + lmac_get_pdev_wmi_handle((struct wlan_objmgr_pdev *)pdev); + if (!lro_hash_cfg || !pdev_wmi_handle) { target_if_err("wmi_handle: 0x%pK, lro_hash_cfg: 0x%pK", - wmi_handle, lro_hash_cfg); + pdev_wmi_handle, lro_hash_cfg); return QDF_STATUS_E_FAILURE; } wmi_lro_cmd.lro_enable = lro_hash_cfg->lro_enable; wmi_lro_cmd.tcp_flag = lro_hash_cfg->tcp_flag; wmi_lro_cmd.tcp_flag_mask = lro_hash_cfg->tcp_flag_mask; + wmi_lro_cmd.pdev_id = + lmac_get_pdev_idx((struct wlan_objmgr_pdev *)pdev); qdf_mem_copy(wmi_lro_cmd.toeplitz_hash_ipv4, lro_hash_cfg->toeplitz_hash_ipv4, @@ -135,6 +138,6 @@ target_if_lro_hash_config(struct wlan_objmgr_psoc *psoc_handle, lro_hash_cfg->toeplitz_hash_ipv6, LRO_IPV6_SEED_ARR_SZ * sizeof(uint32_t)); - return wmi_unified_lro_config_cmd(wmi_handle, + return wmi_unified_lro_config_cmd(pdev_wmi_handle, &wmi_lro_cmd); } diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 886be316e39d..5e9446c485c4 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1723,6 +1723,7 @@ struct thermal_cmd_params { * 5-tuple toeplitz hash for ipv4 packets * @toeplitz_hash_ipv6: contains seed needed to compute the flow id * 5-tuple toeplitz hash for ipv6 packets + * @pdev_id: radio on which lro hash is configured */ struct wmi_lro_config_cmd_t { uint32_t lro_enable; @@ -1730,6 +1731,7 @@ struct wmi_lro_config_cmd_t { tcp_flag_mask:9; uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ]; uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ]; + uint32_t pdev_id; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 0a57f329d1d7..9bd2f85d3946 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -4798,7 +4798,7 @@ static QDF_STATUS send_lro_config_cmd_tlv(wmi_unified_t wmi_handle, wmi_lro_info_cmd_fixed_param *cmd; wmi_buf_t buf; QDF_STATUS status; - + uint8_t pdev_id = wmi_lro_cmd->pdev_id; buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd)); if (!buf) { @@ -4851,8 +4851,9 @@ static QDF_STATUS send_lro_config_cmd_tlv(wmi_unified_t wmi_handle, cmd->toeplitz_hash_ipv6_40 = wmi_lro_cmd->toeplitz_hash_ipv6[10]; - WMI_LOGD("WMI_LRO_CONFIG: lro_enable %d, tcp_flag 0x%x", - cmd->lro_enable, cmd->tcp_flag_u32); + cmd->pdev_id = wmi_handle->ops->convert_pdev_id_host_to_target(pdev_id); + WMI_LOGD("WMI_LRO_CONFIG: lro_enable %d, tcp_flag 0x%x, pdev_id: %d", + cmd->lro_enable, cmd->tcp_flag_u32, cmd->pdev_id); wmi_mtrace(WMI_LRO_CONFIG_CMDID, NO_SESSION, 0); status = wmi_unified_cmd_send(wmi_handle, buf,