diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h index 1a2b158ea6..e1cd5c138b 100644 --- a/dp/inc/cdp_txrx_cmn.h +++ b/dp/inc/cdp_txrx_cmn.h @@ -253,8 +253,7 @@ cdp_pdev_attach_target(ol_txrx_soc_handle soc, uint8_t pdev_id) } static inline QDF_STATUS cdp_pdev_attach - (ol_txrx_soc_handle soc, HTC_HANDLE htc_pdev, qdf_device_t osdev, - uint8_t pdev_id) + (ol_txrx_soc_handle soc, struct cdp_pdev_attach_params *params) { if (!soc || !soc->ops) { dp_cdp_debug("Invalid Instance:"); @@ -266,8 +265,7 @@ static inline QDF_STATUS cdp_pdev_attach !soc->ops->cmn_drv_ops->txrx_pdev_attach) return QDF_STATUS_E_FAILURE; - return soc->ops->cmn_drv_ops->txrx_pdev_attach(soc, htc_pdev, osdev, - pdev_id); + return soc->ops->cmn_drv_ops->txrx_pdev_attach(soc, params); } /** diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index a245ccec29..20a5a5c4a2 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -2666,4 +2666,19 @@ struct cdp_soc_attach_params { uint8_t mlo_chip_id; uint8_t mlo_enabled; }; + +/* + * cdp_pdev_attach_params + * + * @htc_handle: HTC handle for host-target interface + * @qdf_osdev: QDF OS device + * @pdev_id: PDEV ID + * @mlo_link_id: ML link id + */ +struct cdp_pdev_attach_params { + HTC_HANDLE htc_handle; + qdf_device_t qdf_osdev; + uint8_t pdev_id; + uint32_t mlo_link_id; +}; #endif diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index 5e20522313..23d6c87340 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -127,8 +127,8 @@ struct cdp_cmn_ops { void *cb_context); QDF_STATUS (*txrx_pdev_attach) - (ol_txrx_soc_handle soc, HTC_HANDLE htc_pdev, - qdf_device_t osdev, uint8_t pdev_id); + (ol_txrx_soc_handle soc, + struct cdp_pdev_attach_params *params); int (*txrx_pdev_post_attach)(struct cdp_soc_t *soc, uint8_t pdev_id); diff --git a/dp/wifi3.0/be/dp_be.c b/dp/wifi3.0/be/dp_be.c index c7bc18b618..4ec14c3a38 100644 --- a/dp/wifi3.0/be/dp_be.c +++ b/dp/wifi3.0/be/dp_be.c @@ -481,8 +481,10 @@ fail: return qdf_status; } -static QDF_STATUS dp_pdev_attach_be(struct dp_pdev *pdev) +static QDF_STATUS dp_pdev_attach_be(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params) { + dp_pdev_mlo_fill_params(pdev, params); return QDF_STATUS_SUCCESS; } diff --git a/dp/wifi3.0/be/dp_be.h b/dp/wifi3.0/be/dp_be.h index 0ca597b58a..51cf1703cd 100644 --- a/dp/wifi3.0/be/dp_be.h +++ b/dp/wifi3.0/be/dp_be.h @@ -210,12 +210,16 @@ struct dp_soc_be { * struct dp_pdev_be - Extended DP pdev for BE targets * @pdev: dp pdev structure * @monitor_pdev_be: BE specific monitor object + * @mlo_link_id: MLO link id for PDEV */ struct dp_pdev_be { struct dp_pdev pdev; #if !defined(DISABLE_MON_CONFIG) struct dp_mon_pdev_be *monitor_pdev_be; #endif +#ifdef WLAN_MLO_MULTI_CHIP + uint8_t mlo_link_id; +#endif }; /** @@ -541,5 +545,11 @@ void dp_soc_mlo_fill_params(struct dp_soc *soc, struct cdp_soc_attach_params *params) { } + +static inline +void dp_pdev_mlo_fill_params(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params) +{ +} #endif #endif diff --git a/dp/wifi3.0/be/mlo/dp_mlo.c b/dp/wifi3.0/be/mlo/dp_mlo.c index 1044c55ba7..b21c448a75 100644 --- a/dp/wifi3.0/be/mlo/dp_mlo.c +++ b/dp/wifi3.0/be/mlo/dp_mlo.c @@ -113,3 +113,17 @@ void dp_soc_mlo_fill_params(struct dp_soc *soc, be_soc->ml_ctxt = cdp_mlo_ctx_to_dp(params->ml_context); be_soc->mlo_enabled = 1; } + +void dp_pdev_mlo_fill_params(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params) +{ + struct dp_soc_be *be_soc = dp_get_be_soc_from_dp_soc(pdev->soc); + struct dp_pdev_be *be_pdev = dp_get_be_pdev_from_dp_pdev(pdev); + + if (!be_soc->mlo_enabled) { + dp_info("MLO not enabled on SOC"); + return; + } + + be_pdev->mlo_link_id = params->mlo_link_id; +} diff --git a/dp/wifi3.0/be/mlo/dp_mlo.h b/dp/wifi3.0/be/mlo/dp_mlo.h index 33fa015ce0..4f3d62f254 100644 --- a/dp/wifi3.0/be/mlo/dp_mlo.h +++ b/dp/wifi3.0/be/mlo/dp_mlo.h @@ -80,4 +80,14 @@ struct dp_mlo_ctxt *cdp_mlo_ctx_to_dp(struct cdp_mlo_ctxt *mlo_ctxt) */ void dp_soc_mlo_fill_params(struct dp_soc *soc, struct cdp_soc_attach_params *params); + +/** + * dp_pdev_mlo_fill_params() - update PDEV mlo params + * @pdev: DP PDEV + * @params: PDEV attach params + * + * Return: struct dp_soc pointer + */ +void dp_pdev_mlo_fill_params(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params); #endif /* __DP_MLO_H */ diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index f85778b12d..2cc9ed6f1b 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -183,9 +183,7 @@ static void dp_soc_cfg_attach(struct dp_soc *soc); static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, - HTC_HANDLE htc_handle, - qdf_device_t qdf_osdev, - uint8_t pdev_id); + struct cdp_pdev_attach_params *params); static int dp_pdev_post_attach_wifi3(struct cdp_soc_t *psoc, uint8_t pdev_id); @@ -4972,20 +4970,18 @@ static inline void dp_soc_tx_history_detach(struct dp_soc *soc) /* * dp_pdev_attach_wifi3() - attach txrx pdev * @txrx_soc: Datapath SOC handle -* @htc_handle: HTC handle for host-target interface -* @qdf_osdev: QDF OS device -* @pdev_id: PDEV ID +* @params: Params for PDEV attach * * Return: QDF_STATUS */ -static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, - HTC_HANDLE htc_handle, - qdf_device_t qdf_osdev, - uint8_t pdev_id) +static inline +QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, + struct cdp_pdev_attach_params *params) { qdf_size_t pdev_context_size; struct dp_soc *soc = (struct dp_soc *)txrx_soc; struct dp_pdev *pdev = NULL; + uint8_t pdev_id = params->pdev_id; struct wlan_cfg_dp_soc_ctxt *soc_cfg_ctx; int nss_cfg; @@ -5045,6 +5041,8 @@ static inline QDF_STATUS dp_pdev_attach_wifi3(struct cdp_soc_t *txrx_soc, goto fail4; } + soc->arch_ops.txrx_pdev_attach(pdev, params); + return QDF_STATUS_SUCCESS; fail4: dp_rx_pdev_desc_pool_free(pdev); diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index a8d77b6db0..ed65790e98 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -1608,7 +1608,8 @@ struct dp_arch_ops { QDF_STATUS (*txrx_soc_srng_init)(struct dp_soc *soc); void (*txrx_soc_srng_deinit)(struct dp_soc *soc); void (*txrx_soc_srng_free)(struct dp_soc *soc); - QDF_STATUS (*txrx_pdev_attach)(struct dp_pdev *pdev); + QDF_STATUS (*txrx_pdev_attach)(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params); QDF_STATUS (*txrx_pdev_detach)(struct dp_pdev *pdev); QDF_STATUS (*txrx_vdev_attach)(struct dp_soc *soc, struct dp_vdev *vdev); diff --git a/dp/wifi3.0/li/dp_li.c b/dp/wifi3.0/li/dp_li.c index de98ef0aee..7a3e2d38f7 100644 --- a/dp/wifi3.0/li/dp_li.c +++ b/dp/wifi3.0/li/dp_li.c @@ -86,7 +86,8 @@ static QDF_STATUS dp_soc_deinit_li(struct dp_soc *soc) return QDF_STATUS_SUCCESS; } -static QDF_STATUS dp_pdev_attach_li(struct dp_pdev *pdev) +static QDF_STATUS dp_pdev_attach_li(struct dp_pdev *pdev, + struct cdp_pdev_attach_params *params) { return QDF_STATUS_SUCCESS; }