qcacmn: Add arch ops for get chip id API
Add arch ops for dp_mlo_chip_id to avoid access of dp_soc_be struct for LI platforms Change-Id: Idc7612ef3c517aa62668fe15e51b5e5ec74bb253 CRs-Fixed: 3582795
This commit is contained in:

committed by
Rahul Choudhary

parent
0979038391
commit
a0e560c475
@@ -3167,6 +3167,12 @@ dp_initialize_arch_ops_be_mlo_multi_chip(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->dp_partner_chips_map = dp_mlo_partner_chips_map;
|
||||
arch_ops->dp_partner_chips_unmap = dp_mlo_partner_chips_unmap;
|
||||
arch_ops->dp_soc_get_by_idle_bm_id = dp_soc_get_by_idle_bm_id;
|
||||
arch_ops->dp_get_soc_by_chip_id = dp_get_soc_by_chip_id_be;
|
||||
arch_ops->dp_mlo_print_ptnr_info = dp_mlo_debug_print_ptnr_info;
|
||||
arch_ops->dp_get_interface_stats = dp_get_interface_stats_be;
|
||||
arch_ops->mlo_get_chip_id = dp_mlo_get_chip_id;
|
||||
arch_ops->mlo_link_peer_find_hash_find_by_chip_id =
|
||||
dp_mlo_link_peer_hash_find_by_chip_id;
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
@@ -3392,10 +3398,6 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->tx_implicit_rbm_set = dp_tx_implicit_rbm_set_be;
|
||||
arch_ops->txrx_set_vdev_param = dp_txrx_set_vdev_param_be;
|
||||
dp_initialize_arch_ops_be_mlo(arch_ops);
|
||||
#ifdef WLAN_MLO_MULTI_CHIP
|
||||
arch_ops->dp_get_soc_by_chip_id = dp_get_soc_by_chip_id_be;
|
||||
arch_ops->dp_mlo_print_ptnr_info = dp_mlo_debug_print_ptnr_info;
|
||||
#endif
|
||||
arch_ops->dp_soc_get_num_soc = dp_soc_get_num_soc_be;
|
||||
arch_ops->dp_peer_rx_reorder_queue_setup =
|
||||
dp_peer_rx_reorder_queue_setup_be;
|
||||
@@ -3445,9 +3447,6 @@ void dp_initialize_arch_ops_be(struct dp_arch_ops *arch_ops)
|
||||
arch_ops->txrx_srng_init = dp_srng_init_be;
|
||||
arch_ops->dp_get_vdev_stats_for_unmap_peer =
|
||||
dp_get_vdev_stats_for_unmap_peer_be;
|
||||
#ifdef WLAN_MLO_MULTI_CHIP
|
||||
arch_ops->dp_get_interface_stats = dp_get_interface_stats_be;
|
||||
#endif
|
||||
#if defined(DP_POWER_SAVE) || defined(FEATURE_RUNTIME_PM)
|
||||
arch_ops->dp_update_ring_hptp = dp_update_ring_hptp;
|
||||
#endif
|
||||
|
@@ -984,6 +984,11 @@ static inline
|
||||
void dp_mlo_update_link_to_pdev_unmap(struct dp_soc *soc, struct dp_pdev *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline uint8_t dp_mlo_get_chip_id(struct dp_soc *soc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -1138,7 +1138,7 @@ uint8_t dp_mlo_get_chip_id(struct dp_soc *soc)
|
||||
qdf_export_symbol(dp_mlo_get_chip_id);
|
||||
|
||||
struct dp_peer *
|
||||
dp_link_peer_hash_find_by_chip_id(struct dp_soc *soc,
|
||||
dp_mlo_link_peer_hash_find_by_chip_id(struct dp_soc *soc,
|
||||
uint8_t *peer_mac_addr,
|
||||
int mac_addr_is_aligned,
|
||||
uint8_t vdev_id,
|
||||
@@ -1165,7 +1165,7 @@ dp_link_peer_hash_find_by_chip_id(struct dp_soc *soc,
|
||||
return peer;
|
||||
}
|
||||
|
||||
qdf_export_symbol(dp_link_peer_hash_find_by_chip_id);
|
||||
qdf_export_symbol(dp_mlo_link_peer_hash_find_by_chip_id);
|
||||
|
||||
void dp_mlo_get_rx_hash_key(struct dp_soc *soc,
|
||||
struct cdp_lro_hash_config *lro_hash)
|
||||
|
@@ -230,4 +230,33 @@ dp_get_interface_stats_be(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
* Return: none
|
||||
*/
|
||||
void dp_mlo_debug_print_ptnr_info(struct dp_vdev *vdev);
|
||||
|
||||
/*
|
||||
* dp_mlo_get_chip_id() - return MLO chip id
|
||||
* @soc: DP soc
|
||||
*
|
||||
* Return: chip_id
|
||||
*/
|
||||
uint8_t dp_mlo_get_chip_id(struct dp_soc *soc);
|
||||
|
||||
/*
|
||||
* dp_mlo_link_peer_hash_find_by_chip_id() - returns mlo link peer on chip_id
|
||||
* peer_hash_table matching vdev_id and mac_address
|
||||
* @soc: partner soc handle in MLO
|
||||
* @peer_mac_addr: peer mac address
|
||||
* @mac_addr_is_aligned: is mac addr aligned
|
||||
* @vdev_id: vdev_id
|
||||
* @chip_id: mlo_chip_id
|
||||
* @mod_id: id of module requesting reference
|
||||
*
|
||||
* return: peer in success
|
||||
* NULL in failure
|
||||
*/
|
||||
struct dp_peer *
|
||||
dp_mlo_link_peer_hash_find_by_chip_id(struct dp_soc *soc,
|
||||
uint8_t *peer_mac_addr,
|
||||
int mac_addr_is_aligned,
|
||||
uint8_t vdev_id,
|
||||
uint8_t chip_id,
|
||||
enum dp_mod_id mod_id);
|
||||
#endif /* __DP_MLO_H */
|
||||
|
@@ -3749,7 +3749,7 @@ dp_vdev_update_bridge_vdev_param(struct dp_vdev *vdev,
|
||||
|
||||
dp_info("is_bridge_link = %d vdev id = %d chip id = %d",
|
||||
vdev->is_bridge_vdev, vdev->vdev_id,
|
||||
dp_mlo_get_chip_id(vdev->pdev->soc));
|
||||
dp_get_chip_id(vdev->pdev->soc));
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
@@ -4692,7 +4692,7 @@ static QDF_STATUS dp_txrx_peer_attach(struct dp_soc *soc, struct dp_peer *peer)
|
||||
|
||||
params.peer_mac = peer->mac_addr.raw;
|
||||
params.vdev_id = peer->vdev->vdev_id;
|
||||
params.chip_id = dp_mlo_get_chip_id(soc);
|
||||
params.chip_id = dp_get_chip_id(soc);
|
||||
params.pdev_id = peer->vdev->pdev->pdev_id;
|
||||
|
||||
dp_wdi_event_handler(WDI_EVENT_TXRX_PEER_CREATE, soc,
|
||||
@@ -5018,7 +5018,7 @@ QDF_STATUS dp_peer_mlo_setup(
|
||||
if (peer->vdev->opmode == wlan_op_mode_sta) {
|
||||
struct cdp_txrx_peer_params_update params = {0};
|
||||
|
||||
params.chip_id = dp_mlo_get_chip_id(soc);
|
||||
params.chip_id = dp_get_chip_id(soc);
|
||||
params.pdev_id = peer->vdev->pdev->pdev_id;
|
||||
params.vdev_id = peer->vdev->vdev_id;
|
||||
|
||||
@@ -5052,7 +5052,7 @@ QDF_STATUS dp_peer_mlo_setup(
|
||||
setup_info->is_primary_link) {
|
||||
struct cdp_txrx_peer_params_update params = {0};
|
||||
|
||||
params.chip_id = dp_mlo_get_chip_id(soc);
|
||||
params.chip_id = dp_get_chip_id(soc);
|
||||
params.pdev_id = peer->vdev->pdev->pdev_id;
|
||||
params.vdev_id = peer->vdev->vdev_id;
|
||||
|
||||
@@ -5100,7 +5100,7 @@ QDF_STATUS dp_peer_mlo_setup(
|
||||
|
||||
params.vdev_id = peer->vdev->vdev_id;
|
||||
params.peer_mac = mld_peer->mac_addr.raw;
|
||||
params.chip_id = dp_mlo_get_chip_id(soc);
|
||||
params.chip_id = dp_get_chip_id(soc);
|
||||
params.pdev_id = peer->vdev->pdev->pdev_id;
|
||||
|
||||
dp_wdi_event_handler(
|
||||
|
@@ -2671,7 +2671,7 @@ dp_rx_mlo_peer_map_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
* on chip ID obtained from mlo peer_map event
|
||||
*/
|
||||
for (i = 0; i < DP_MAX_MLO_LINKS; i++) {
|
||||
if (mlo_link_info[i].peer_chip_id == dp_mlo_get_chip_id(soc)) {
|
||||
if (mlo_link_info[i].peer_chip_id == dp_get_chip_id(soc)) {
|
||||
vdev_id = mlo_link_info[i].vdev_id;
|
||||
break;
|
||||
}
|
||||
@@ -2965,7 +2965,7 @@ dp_rx_peer_unmap_handler(struct dp_soc *soc, uint16_t peer_id,
|
||||
|
||||
params.vdev_id = vdev->vdev_id;
|
||||
params.peer_mac = peer->mac_addr.raw;
|
||||
params.chip_id = dp_mlo_get_chip_id(soc);
|
||||
params.chip_id = dp_get_chip_id(soc);
|
||||
params.pdev_id = vdev->pdev->pdev_id;
|
||||
|
||||
dp_wdi_event_handler(WDI_EVENT_PEER_UNMAP, soc,
|
||||
|
@@ -1528,17 +1528,33 @@ void dp_mlo_peer_delete(struct dp_soc *soc, struct dp_peer *peer, void *arg);
|
||||
((link_peer)->mld_peer)
|
||||
|
||||
#ifdef WLAN_MLO_MULTI_CHIP
|
||||
uint8_t dp_mlo_get_chip_id(struct dp_soc *soc);
|
||||
static inline uint8_t dp_get_chip_id(struct dp_soc *soc)
|
||||
{
|
||||
if (soc->arch_ops.mlo_get_chip_id)
|
||||
return soc->arch_ops.mlo_get_chip_id(soc);
|
||||
|
||||
struct dp_peer *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct dp_peer *
|
||||
dp_link_peer_hash_find_by_chip_id(struct dp_soc *soc,
|
||||
uint8_t *peer_mac_addr,
|
||||
int mac_addr_is_aligned,
|
||||
uint8_t vdev_id,
|
||||
uint8_t chip_id,
|
||||
enum dp_mod_id mod_id);
|
||||
enum dp_mod_id mod_id)
|
||||
{
|
||||
if (soc->arch_ops.mlo_link_peer_find_hash_find_by_chip_id)
|
||||
return soc->arch_ops.mlo_link_peer_find_hash_find_by_chip_id
|
||||
(soc, peer_mac_addr,
|
||||
mac_addr_is_aligned,
|
||||
vdev_id, chip_id,
|
||||
mod_id);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
static inline uint8_t dp_mlo_get_chip_id(struct dp_soc *soc)
|
||||
static inline uint8_t dp_get_chip_id(struct dp_soc *soc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1704,7 +1720,7 @@ void dp_mld_peer_add_link_peer(struct dp_peer *mld_peer,
|
||||
link_peer_info->is_valid = true;
|
||||
link_peer_info->vdev_id = link_peer->vdev->vdev_id;
|
||||
link_peer_info->chip_id =
|
||||
dp_mlo_get_chip_id(link_peer->vdev->pdev->soc);
|
||||
dp_get_chip_id(link_peer->vdev->pdev->soc);
|
||||
mld_peer->num_links++;
|
||||
break;
|
||||
}
|
||||
@@ -2234,7 +2250,7 @@ void dp_mlo_peer_authorize(struct dp_soc *soc,
|
||||
{
|
||||
}
|
||||
|
||||
static inline uint8_t dp_mlo_get_chip_id(struct dp_soc *soc)
|
||||
static inline uint8_t dp_get_chip_id(struct dp_soc *soc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -2211,6 +2211,8 @@ enum dp_context_type {
|
||||
* @mlo_peer_find_hash_add:
|
||||
* @mlo_peer_find_hash_remove:
|
||||
* @mlo_peer_find_hash_find:
|
||||
* @mlo_get_chip_id: get the MLO chip id
|
||||
* @mlo_link_peer_find_hash_find_by_chip_id: return the link peer on the chip
|
||||
* @get_hw_link_id:
|
||||
* @dp_rx_peer_set_link_id: set link id in nbuf cb
|
||||
* @get_reo_qdesc_addr:
|
||||
@@ -2412,6 +2414,16 @@ struct dp_arch_ops {
|
||||
int mac_addr_is_aligned,
|
||||
enum dp_mod_id mod_id,
|
||||
uint8_t vdev_id);
|
||||
#ifdef WLAN_MLO_MULTI_CHIP
|
||||
uint8_t (*mlo_get_chip_id)(struct dp_soc *soc);
|
||||
struct dp_peer *(*mlo_link_peer_find_hash_find_by_chip_id)
|
||||
(struct dp_soc *soc,
|
||||
uint8_t *peer_mac_addr,
|
||||
int mac_addr_is_aligned,
|
||||
uint8_t vdev_id,
|
||||
uint8_t chip_id,
|
||||
enum dp_mod_id mod_id);
|
||||
#endif
|
||||
#endif
|
||||
uint8_t (*get_hw_link_id)(struct dp_pdev *pdev);
|
||||
void (*dp_rx_peer_set_link_id)(qdf_nbuf_t nbuf, uint32_t peer_mdata);
|
||||
|
Reference in New Issue
Block a user