qcacld-3.0: Use PLD API to query MAC Address from Platform Driver
Move CNSS API to PLD API to query WLAN MAC Address from Platform Driver Change-Id: I97724711cdf08824e0a46398284e40b798b4553d CRs-Fixed: 1063837
This commit is contained in:
@@ -379,4 +379,5 @@ void *pld_smmu_get_mapping(struct device *dev);
|
||||
int pld_smmu_map(struct device *dev, phys_addr_t paddr,
|
||||
uint32_t *iova_addr, size_t size);
|
||||
unsigned int pld_socinfo_get_serial_number(struct device *dev);
|
||||
uint8_t *pld_common_get_wlan_mac_address(struct device *dev, uint32_t *num);
|
||||
#endif
|
||||
|
@@ -1544,3 +1544,33 @@ unsigned int pld_socinfo_get_serial_number(struct device *dev)
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* pld_common_get_wlan_mac_address() - API to query MAC address from Platform
|
||||
* Driver
|
||||
* @dev: Device Structure
|
||||
* @num: Pointer to number of MAC address supported
|
||||
*
|
||||
* Platform Driver can have MAC address stored. This API needs to be used
|
||||
* to get those MAC address
|
||||
*
|
||||
* Return: Pointer to the list of MAC address
|
||||
*/
|
||||
uint8_t *pld_common_get_wlan_mac_address(struct device *dev, uint32_t *num)
|
||||
{
|
||||
switch (pld_get_bus_type(dev)) {
|
||||
case PLD_BUS_TYPE_PCIE:
|
||||
return pld_pcie_get_wlan_mac_address(dev, num);
|
||||
case PLD_BUS_TYPE_SDIO:
|
||||
return pld_sdio_get_wlan_mac_address(dev, num);
|
||||
case PLD_BUS_TYPE_USB:
|
||||
case PLD_BUS_TYPE_SNOC:
|
||||
break;
|
||||
default:
|
||||
pr_err("Invalid device type\n");
|
||||
break;
|
||||
}
|
||||
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -530,5 +530,4 @@ void pld_pcie_set_driver_status(enum pld_driver_status status)
|
||||
cnss_set_driver_status(cnss_status);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -220,12 +220,20 @@ static inline int pld_pcie_power_off(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint8_t *pld_pcie_get_wlan_mac_address(struct device *dev,
|
||||
uint32_t *num)
|
||||
{
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
u32 target_type, u32 target_version);
|
||||
int pld_pcie_get_codeswap_struct(struct pld_codeswap_codeseg_info *swap_seg);
|
||||
int pld_pcie_get_platform_cap(struct pld_platform_cap *cap);
|
||||
void pld_pcie_set_driver_status(enum pld_driver_status status);
|
||||
|
||||
static inline void pld_pcie_link_down(void)
|
||||
{
|
||||
cnss_wlan_pci_link_down();
|
||||
@@ -304,6 +312,11 @@ static inline int pld_pcie_power_off(struct device *dev)
|
||||
{
|
||||
return cnss_power_down(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline uint8_t *pld_pcie_get_wlan_mac_address(struct device *dev,
|
||||
uint32_t *num)
|
||||
{
|
||||
return cnss_common_get_wlan_mac_address(dev, num);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -380,6 +380,5 @@ int pld_sdio_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -65,11 +65,22 @@ int pld_sdio_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline uint8_t *pld_sdio_get_wlan_mac_address(struct device *dev,
|
||||
uint32_t *num)
|
||||
{
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
int pld_sdio_register_driver(void);
|
||||
void pld_sdio_unregister_driver(void);
|
||||
int pld_sdio_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
u32 target_type, u32 target_version);
|
||||
static inline uint8_t *pld_sdio_get_wlan_mac_address(struct device *dev,
|
||||
uint32_t *num)
|
||||
{
|
||||
return cnss_common_get_wlan_mac_address(dev, num);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user