diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 87d6cd958a..ca034b38ea 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -1880,6 +1880,33 @@ cdp_soc_set_dp_txrx_handle(ol_txrx_soc_handle soc, void *dp_handle) dp_handle); } +/** + * cdp_soc_map_pdev_to_lmac() - Save pdev_id to lmac_id mapping + * @soc: opaque soc handle + * @pdev_handle: data path pdev handle + * @lmac_id: lmac id + * + * Return: void + */ +static inline void +cdp_soc_map_pdev_to_lmac(ol_txrx_soc_handle soc, void *pdev_handle, + uint32_t lmac_id) +{ + if (!soc || !soc->ops) { + QDF_TRACE(QDF_MODULE_ID_CDP, QDF_TRACE_LEVEL_DEBUG, + "%s: Invalid Instance:", __func__); + QDF_BUG(0); + return; + } + + if (!soc->ops->cmn_drv_ops || + !soc->ops->cmn_drv_ops->map_pdev_to_lmac) + return; + + soc->ops->cmn_drv_ops->map_pdev_to_lmac((struct cdp_pdev *)pdev_handle, + lmac_id); +} + /** * cdp_tx_send() - enqueue frame for transmission * @soc: soc opaque handle diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index a7de329f6e..9f59b40d29 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -405,6 +405,9 @@ struct cdp_cmn_ops { void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle, void *dp_txrx_handle); + void (*map_pdev_to_lmac)(struct cdp_pdev *pdev_hdl, + uint32_t lmac_id); + void (*txrx_peer_reset_ast) (ol_txrx_soc_handle soc, uint8_t *ast_macaddr, uint8_t *peer_macaddr, void *vdev_hdl); diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 020aca0421..e9582b93bc 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -9368,6 +9368,25 @@ dp_soc_set_dp_txrx_handle(struct cdp_soc *soc_handle, void *txrx_handle) soc->external_txrx_handle = txrx_handle; } +/** + * dp_soc_map_pdev_to_lmac() - Save pdev_id to lmac_id mapping + * @pdev_hdl: datapath pdev handle + * @lmac_id: lmac id + * + * Return: void + */ +static void +dp_soc_map_pdev_to_lmac(struct cdp_pdev *pdev_hdl, uint32_t lmac_id) +{ + struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl; + struct dp_soc *soc = pdev->soc; + + pdev->lmac_id = lmac_id; + wlan_cfg_set_hw_macid(soc->wlan_cfg_ctx, + pdev->pdev_id, + (lmac_id + 1)); +} + /** * dp_get_cfg_capabilities() - get dp capabilities * @soc_handle: datapath soc handle @@ -9895,6 +9914,7 @@ static struct cdp_cmn_ops dp_ops_cmn = { .set_dp_txrx_handle = dp_pdev_set_dp_txrx_handle, .get_soc_dp_txrx_handle = dp_soc_get_dp_txrx_handle, .set_soc_dp_txrx_handle = dp_soc_set_dp_txrx_handle, + .map_pdev_to_lmac = dp_soc_map_pdev_to_lmac, .txrx_set_ba_aging_timeout = dp_set_ba_aging_timeout, .txrx_get_ba_aging_timeout = dp_get_ba_aging_timeout, .tx_send = dp_tx_send, diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h index e3914a3e61..1108d0147e 100644 --- a/target_if/init_deinit/inc/service_ready_param.h +++ b/target_if/init_deinit/inc/service_ready_param.h @@ -156,6 +156,7 @@ struct wlan_psoc_host_ppe_threshold { * @he_ppet2G: 2G HE PPET info * @he_ppet5G: 5G HE PPET info * @chainmask_table_id: chain mask table id + * @lmac_id: hw mac id */ struct wlan_psoc_host_mac_phy_caps { uint32_t hw_mode_id; @@ -192,6 +193,7 @@ struct wlan_psoc_host_mac_phy_caps { struct wlan_psoc_host_ppe_threshold he_ppet2G; struct wlan_psoc_host_ppe_threshold he_ppet5G; uint32_t chainmask_table_id; + uint32_t lmac_id; }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 1fda17d249..6bb1adb103 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -9374,6 +9374,7 @@ static QDF_STATUS extract_mac_phy_cap_service_ready_ext_tlv( qdf_mem_copy(¶m->he_ppet5G, &mac_phy_caps->he_ppet5G, sizeof(param->he_ppet5G)); param->chainmask_table_id = mac_phy_caps->chainmask_table_id; + param->lmac_id = mac_phy_caps->lmac_id; return QDF_STATUS_SUCCESS; }