mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacmn: pass pdev wmi_handle to lro hash config
pass pdev wmi_handle instead of soc wmi_handle for lro hash config to avoid target assert. CRs-Fixed: 2319084 Change-Id: Ic570b07367cd34b39d50324ff709f827d550b6c8
This commit is contained in:
parent
e61f64cc4c
commit
16395277c9
6 changed files with 21 additions and 14 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) &&
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue