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:
Chaithanya Garrepalli
2023-08-17 16:52:42 +05:30
committed by Rahul Choudhary
parent 0979038391
commit a0e560c475
8 changed files with 88 additions and 27 deletions

View File

@@ -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;
}