qcacmn: Add an api to get pdev from pdev_id
Add an API to fetch pdev using pdev_id from soc. Change-Id: Id9f480d8e3546cde3930c9f1179d60d470e17051
This commit is contained in:

committed by
nshrivas

parent
5d3171d70e
commit
2e435f1452
@@ -1520,4 +1520,21 @@ dp_get_vdev_from_soc_vdev_id_wifi3(struct dp_soc *soc,
|
|||||||
return soc->vdev_id_map[vdev_id];
|
return soc->vdev_id_map[vdev_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dp_get_pdev_from_soc_pdev_id_wifi3() - Returns pdev object given the pdev id
|
||||||
|
* @soc: core DP soc context
|
||||||
|
* @pdev_id: pdev id from pdev object can be retrieved
|
||||||
|
*
|
||||||
|
* Return: struct dp_pdev*: Pointer to DP pdev object
|
||||||
|
*/
|
||||||
|
static inline struct dp_pdev *
|
||||||
|
dp_get_pdev_from_soc_pdev_id_wifi3(struct dp_soc *soc,
|
||||||
|
uint8_t pdev_id)
|
||||||
|
{
|
||||||
|
if (qdf_unlikely(pdev_id >= MAX_PDEV_CNT))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return soc->pdev_list[pdev_id];
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* #ifndef _DP_INTERNAL_H_ */
|
#endif /* #ifndef _DP_INTERNAL_H_ */
|
||||||
|
Reference in New Issue
Block a user