qcacld-3.0: Add PLD API to get wifi kobject

Add PLD API to get wifi kobject.

Change-Id: I136d3f4abec831ab05058678beb23fe2e1b05d49
CRs-Fixed: 3264204
这个提交包含在:
Sandeep Singh
2022-07-18 16:59:17 +05:30
提交者 Madan Koyyalamudi
父节点 b50ea97a85
当前提交 ca38ac5038
修改 3 个文件,包含 50 行新增0 行删除

查看文件

@@ -872,6 +872,14 @@ void *pld_smmu_get_mapping(struct device *dev);
#endif
int pld_smmu_map(struct device *dev, phys_addr_t paddr,
uint32_t *iova_addr, size_t size);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
struct kobject *pld_get_wifi_kobj(struct device *dev);
#else
static inline struct kobject *pld_get_wifi_kobj(struct device *dev)
{
return NULL;
}
#endif
#ifdef CONFIG_SMMU_S1_UNMAP
int pld_smmu_unmap(struct device *dev,
uint32_t iova_addr, size_t size);

查看文件

@@ -2103,6 +2103,31 @@ void *pld_smmu_get_mapping(struct device *dev)
}
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
struct kobject *pld_get_wifi_kobj(struct device *dev)
{
enum pld_bus_type type = pld_get_bus_type(dev);
struct kobject *wifi_kobj = NULL;
switch (type) {
case PLD_BUS_TYPE_SNOC:
case PLD_BUS_TYPE_PCIE_FW_SIM:
case PLD_BUS_TYPE_IPCI_FW_SIM:
case PLD_BUS_TYPE_SNOC_FW_SIM:
case PLD_BUS_TYPE_IPCI:
break;
case PLD_BUS_TYPE_PCIE:
wifi_kobj = pld_pcie_get_wifi_kobj(dev);
break;
default:
pr_err("Invalid device type %d\n", type);
break;
}
return wifi_kobj;
}
#endif
/**
* pld_smmu_map() - Map SMMU
* @dev: device

查看文件

@@ -353,6 +353,11 @@ static inline int pld_pcie_get_pci_slot(struct device *dev)
return 0;
}
static inline struct kobject *pld_pcie_get_wifi_kobj(struct device *dev)
{
return NULL;
}
static inline int pld_pcie_power_on(struct device *dev)
{
return 0;
@@ -663,6 +668,18 @@ static inline int pld_pcie_get_pci_slot(struct device *dev)
}
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
static inline struct kobject *pld_pcie_get_wifi_kobj(struct device *dev)
{
return cnss_get_wifi_kobj(dev);
}
#else
static inline struct kobject *pld_pcie_get_wifi_kobj(struct device *dev)
{
return NULL;
}
#endif
static inline int pld_pcie_power_on(struct device *dev)
{
return cnss_power_up(dev);