qcacld-3.0: Clean up PLD source files and remove unused function
Clean up PLD source file by moving one-line function calls to header file and make it static inline. Also, remove unused function. Change-Id: Ibaa7357db4ac305f0bab9d8ad2f7dfe9351fda7d CRs-Fixed: 1070075
This commit is contained in:
@@ -96,23 +96,6 @@ struct pld_fw_files {
|
||||
char setup_file[PLD_MAX_FILE_NAME];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pld_image_desc_info - FW image description
|
||||
* @fw_addr: FW image address
|
||||
* @fw_size: FW image size
|
||||
* @bdata_addr: FW board data address
|
||||
* @bdata_size: FW board data size
|
||||
*
|
||||
* pld_image_desc_info is used to store FW image description
|
||||
* information.
|
||||
*/
|
||||
struct pld_image_desc_info {
|
||||
dma_addr_t fw_addr;
|
||||
u32 fw_size;
|
||||
dma_addr_t bdata_addr;
|
||||
u32 bdata_size;
|
||||
};
|
||||
|
||||
#define PLD_CODESWAP_MAX_CODESEGS 16
|
||||
|
||||
/**
|
||||
@@ -348,8 +331,6 @@ void pld_get_default_fw_files(struct pld_fw_files *pfw_files);
|
||||
int pld_get_fw_files_for_target(struct device *dev,
|
||||
struct pld_fw_files *pfw_files,
|
||||
u32 target_type, u32 target_version);
|
||||
int pld_get_fw_image(struct device *dev,
|
||||
struct pld_image_desc_info *image_desc_info);
|
||||
void pld_is_pci_link_down(struct device *dev);
|
||||
int pld_shadow_control(struct device *dev, bool enable);
|
||||
int pld_get_codeswap_struct(struct device *dev,
|
||||
|
@@ -486,37 +486,6 @@ int pld_get_fw_files_for_target(struct device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_get_fw_image() - Get FW image descriptor
|
||||
* @dev: device
|
||||
* @image_desc_info: buffer for image descriptor
|
||||
*
|
||||
* Return FW image descriptor to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_get_fw_image(struct device *dev,
|
||||
struct pld_image_desc_info *image_desc_info)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
switch (pld_get_bus_type(dev)) {
|
||||
case PLD_BUS_TYPE_PCIE:
|
||||
ret = pld_pcie_get_fw_image(image_desc_info);
|
||||
break;
|
||||
case PLD_BUS_TYPE_SNOC:
|
||||
break;
|
||||
case PLD_BUS_TYPE_SDIO:
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_is_pci_link_down() - Notification for pci link down event
|
||||
* @dev: device
|
||||
|
@@ -409,80 +409,6 @@ int pld_pcie_wlan_disable(enum pld_driver_mode mode)
|
||||
{
|
||||
return cnss_wlan_disable(CNSS_OFF);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_set_fw_debug_mode() - Set FW debug mode
|
||||
* @mode: 0 for QXDM, 1 for WMI
|
||||
*
|
||||
* Switch Fw debug mode between DIAG logging and WMI logging.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_set_fw_debug_mode(bool mode)
|
||||
{
|
||||
return cnss_set_fw_debug_mode(mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_intr_notify_q6() - Notify Q6 FW interrupts
|
||||
*
|
||||
* Notify Q6 that a FW interrupt is triggered.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_intr_notify_q6(void)
|
||||
{
|
||||
cnss_intr_notify_q6();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CNSS_SECURE_FW
|
||||
/**
|
||||
* pld_pcie_get_sha_hash() - Get sha hash number
|
||||
* @data: input data
|
||||
* @data_len: data length
|
||||
* @hash_idx: hash index
|
||||
* @out: output buffer
|
||||
*
|
||||
* Return computed hash to the out buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_get_sha_hash(const u8 *data,
|
||||
u32 data_len, u8 *hash_idx, u8 *out)
|
||||
{
|
||||
return cnss_get_sha_hash(data, data_len, hash_idx, out);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_get_fw_ptr() - Get secure FW memory address
|
||||
*
|
||||
* Return: secure memory address
|
||||
*/
|
||||
void *pld_pcie_get_fw_ptr(void)
|
||||
{
|
||||
return cnss_get_fw_ptr();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_MSM
|
||||
/**
|
||||
* pld_wlan_pm_control() - WLAN PM control on PCIE
|
||||
* @vote: 0 for enable PCIE PC, 1 for disable PCIE PC
|
||||
*
|
||||
* This is for PCIE power collaps control during suspend/resume.
|
||||
* When PCIE power collaps is disabled, WLAN FW can access memory
|
||||
* through PCIE when system is suspended.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_wlan_pm_control(bool vote)
|
||||
{
|
||||
return cnss_wlan_pm_control(vote);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -530,32 +456,6 @@ int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_get_fw_image() - Get FW image descriptor
|
||||
* @image_desc_info: buffer for image descriptor
|
||||
*
|
||||
* Return FW image descriptor to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_get_fw_image(struct pld_image_desc_info *image_desc_info)
|
||||
{
|
||||
int ret = 0;
|
||||
struct image_desc_info cnss_image_desc_info;
|
||||
|
||||
if (image_desc_info == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
ret = cnss_get_fw_image(&cnss_image_desc_info);
|
||||
if (0 != ret)
|
||||
return ret;
|
||||
|
||||
memcpy(image_desc_info, &cnss_image_desc_info,
|
||||
sizeof(*image_desc_info));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_get_codeswap_struct() - Get codeswap structure
|
||||
* @swap_seg: buffer to codeswap information
|
||||
@@ -629,247 +529,6 @@ void pld_pcie_set_driver_status(enum pld_driver_status status)
|
||||
}
|
||||
cnss_set_driver_status(cnss_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_link_down() - Notification for pci link down event
|
||||
*
|
||||
* Notify platform that pci link is down.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_link_down(void)
|
||||
{
|
||||
cnss_wlan_pci_link_down();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_shadow_control() - Control pci shadow registers
|
||||
* @enable: 0 for disable, 1 for enable
|
||||
*
|
||||
* This function is for suspend/resume. It can control if we
|
||||
* use pci shadow registers (for saving config space) or not.
|
||||
* During suspend we disable it to avoid config space corruption.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_shadow_control(bool enable)
|
||||
{
|
||||
/* cnss_shadow_control is not supported on LA.BF64.0.3
|
||||
* Disable it for now
|
||||
*/
|
||||
|
||||
/* return cnss_shadow_control(enable); */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_set_wlan_unsafe_channel() - Set unsafe channel
|
||||
* @unsafe_ch_list: unsafe channel list
|
||||
* @ch_count: number of channel
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count)
|
||||
{
|
||||
return cnss_set_wlan_unsafe_channel(unsafe_ch_list, ch_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_get_wlan_unsafe_channel() - Get unsafe channel
|
||||
* @unsafe_ch_list: buffer to unsafe channel list
|
||||
* @ch_count: number of channel
|
||||
* @buf_len: buffer length
|
||||
*
|
||||
* Return WLAN unsafe channel to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 *ch_count, u16 buf_len)
|
||||
{
|
||||
return cnss_get_wlan_unsafe_channel(unsafe_ch_list, ch_count, buf_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_wlan_set_dfs_nol() - Set DFS info
|
||||
* @info: DFS info
|
||||
* @info_len: info length
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_wlan_set_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return cnss_wlan_set_dfs_nol(info, info_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_wlan_get_dfs_nol() - Get DFS info
|
||||
* @info: buffer to DFS info
|
||||
* @info_len: info length
|
||||
*
|
||||
* Return DFS info to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_wlan_get_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return cnss_wlan_get_dfs_nol(info, info_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_schedule_recovery_work() - Schedule recovery work
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_schedule_recovery_work(void)
|
||||
{
|
||||
cnss_schedule_recovery_work();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_get_virt_ramdump_mem() - Get virtual ramdump memory
|
||||
* @size: buffer to virtual memory size
|
||||
*
|
||||
* Return: virtual ramdump memory address
|
||||
*/
|
||||
void *pld_pcie_get_virt_ramdump_mem(unsigned long *size)
|
||||
{
|
||||
return cnss_get_virt_ramdump_mem(size);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_device_crashed() - Notification for device crash event
|
||||
*
|
||||
* Notify subsystem a device crashed event. A subsystem restart
|
||||
* is expected to happen after calling this function.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_device_crashed(void)
|
||||
{
|
||||
cnss_device_crashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_device_self_recovery() - Device self recovery
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_device_self_recovery(void)
|
||||
{
|
||||
cnss_device_self_recovery();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_request_pm_qos() - Request system PM
|
||||
* @qos_val: request value
|
||||
*
|
||||
* It votes for the value of aggregate QoS expectations.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_request_pm_qos(u32 qos_val)
|
||||
{
|
||||
cnss_request_pm_qos(qos_val);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_remove_pm_qos() - Remove system PM
|
||||
*
|
||||
* Remove the vote request for Qos expectations.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_remove_pm_qos(void)
|
||||
{
|
||||
cnss_remove_pm_qos();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_request_bus_bandwidth() - Request bus bandwidth
|
||||
* @bandwidth: bus bandwidth
|
||||
*
|
||||
* Votes for HIGH/MEDIUM/LOW bus bandwidth.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_request_bus_bandwidth(int bandwidth)
|
||||
{
|
||||
return cnss_request_bus_bandwidth(bandwidth);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_auto_suspend() - Auto suspend
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_auto_suspend(void)
|
||||
{
|
||||
return cnss_auto_suspend();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_auto_resume() - Auto resume
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_auto_resume(void)
|
||||
{
|
||||
return cnss_auto_resume();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_lock_pm_sem() - Lock PM semaphore
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_lock_pm_sem(void)
|
||||
{
|
||||
cnss_lock_pm_sem();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_release_pm_sem() - Release PM semaphore
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_pcie_release_pm_sem(void)
|
||||
{
|
||||
cnss_release_pm_sem();
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_power_on() - Power on WLAN hardware
|
||||
* @dev: device
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_power_on(struct device *dev)
|
||||
{
|
||||
return cnss_power_up(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_pcie_power_off() - Power off WLAN hardware
|
||||
* @dev: device
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_pcie_power_off(struct device *dev)
|
||||
{
|
||||
return cnss_power_down(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -28,6 +28,9 @@
|
||||
#ifndef __PLD_PCIE_H__
|
||||
#define __PLD_PCIE_H__
|
||||
|
||||
#ifdef CONFIG_PLD_PCIE_CNSS
|
||||
#include <net/cnss.h>
|
||||
#endif
|
||||
#include "pld_internal.h"
|
||||
|
||||
#ifndef CONFIG_PCI
|
||||
@@ -73,8 +76,14 @@ static inline void pld_pcie_intr_notify_q6(void)
|
||||
int pld_pcie_wlan_enable(struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode, const char *host_version);
|
||||
int pld_pcie_wlan_disable(enum pld_driver_mode mode);
|
||||
int pld_pcie_set_fw_debug_mode(bool enablefwlog);
|
||||
void pld_pcie_intr_notify_q6(void);
|
||||
static inline int pld_pcie_set_fw_debug_mode(bool enablefwlog)
|
||||
{
|
||||
return cnss_set_fw_debug_mode(mode);
|
||||
}
|
||||
static inline void pld_pcie_intr_notify_q6(void)
|
||||
{
|
||||
cnss_intr_notify_q6();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(CONFIG_CNSS_SECURE_FW))
|
||||
@@ -88,9 +97,15 @@ static inline void *pld_pcie_get_fw_ptr(void)
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
int pld_pcie_get_sha_hash(const u8 *data,
|
||||
u32 data_len, u8 *hash_idx, u8 *out);
|
||||
void *pld_pcie_get_fw_ptr(void);
|
||||
static inline int pld_pcie_get_sha_hash(const u8 *data,
|
||||
u32 data_len, u8 *hash_idx, u8 *out)
|
||||
{
|
||||
return cnss_get_sha_hash(data, data_len, hash_idx, out);
|
||||
}
|
||||
static inline void *pld_pcie_get_fw_ptr(void)
|
||||
{
|
||||
return cnss_get_fw_ptr();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(CONFIG_PCI_MSM))
|
||||
@@ -99,7 +114,10 @@ static inline int pld_pcie_wlan_pm_control(bool vote)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int pld_pcie_wlan_pm_control(bool vote);
|
||||
static inline int pld_pcie_wlan_pm_control(bool vote)
|
||||
{
|
||||
return cnss_wlan_pm_control(vote);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_PLD_PCIE_CNSS
|
||||
@@ -110,11 +128,6 @@ pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
|
||||
pld_get_default_fw_files(pfw_files);
|
||||
return 0;
|
||||
}
|
||||
static inline int
|
||||
pld_pcie_get_fw_image(struct pld_image_desc_info *image_desc_info)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void pld_pcie_link_down(void)
|
||||
{
|
||||
return;
|
||||
@@ -210,30 +223,87 @@ static inline int pld_pcie_power_off(struct device *dev)
|
||||
#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_fw_image(struct pld_image_desc_info *image_desc_info);
|
||||
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);
|
||||
void pld_pcie_link_down(void);
|
||||
int pld_pcie_shadow_control(bool enable);
|
||||
int pld_pcie_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count);
|
||||
int pld_pcie_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 *ch_count, u16 buf_len);
|
||||
int pld_pcie_wlan_set_dfs_nol(void *info, u16 info_len);
|
||||
int pld_pcie_wlan_get_dfs_nol(void *info, u16 info_len);
|
||||
void pld_pcie_schedule_recovery_work(void);
|
||||
void *pld_pcie_get_virt_ramdump_mem(unsigned long *size);
|
||||
void pld_pcie_device_crashed(void);
|
||||
void pld_pcie_device_self_recovery(void);
|
||||
void pld_pcie_request_pm_qos(u32 qos_val);
|
||||
void pld_pcie_remove_pm_qos(void);
|
||||
int pld_pcie_request_bus_bandwidth(int bandwidth);
|
||||
int pld_pcie_auto_suspend(void);
|
||||
int pld_pcie_auto_resume(void);
|
||||
void pld_pcie_lock_pm_sem(void);
|
||||
void pld_pcie_release_pm_sem(void);
|
||||
int pld_pcie_power_on(struct device *dev);
|
||||
int pld_pcie_power_off(struct device *dev);
|
||||
static inline void pld_pcie_link_down(void)
|
||||
{
|
||||
cnss_wlan_pci_link_down();
|
||||
}
|
||||
static inline int pld_pcie_shadow_control(bool enable)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int pld_pcie_set_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 ch_count)
|
||||
{
|
||||
return cnss_set_wlan_unsafe_channel(unsafe_ch_list, ch_count);
|
||||
}
|
||||
static inline int pld_pcie_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 *ch_count, u16 buf_len)
|
||||
{
|
||||
return cnss_get_wlan_unsafe_channel(unsafe_ch_list, ch_count, buf_len);
|
||||
}
|
||||
static inline int pld_pcie_wlan_set_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return cnss_wlan_set_dfs_nol(info, info_len);
|
||||
}
|
||||
static inline int pld_pcie_wlan_get_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return cnss_wlan_get_dfs_nol(info, info_len);
|
||||
}
|
||||
static inline void pld_pcie_schedule_recovery_work(void)
|
||||
{
|
||||
cnss_schedule_recovery_work();
|
||||
}
|
||||
static inline void *pld_pcie_get_virt_ramdump_mem(unsigned long *size)
|
||||
{
|
||||
return cnss_get_virt_ramdump_mem(size);
|
||||
}
|
||||
static inline void pld_pcie_device_crashed(void)
|
||||
{
|
||||
cnss_device_crashed();
|
||||
}
|
||||
static inline void pld_pcie_device_self_recovery(void)
|
||||
{
|
||||
cnss_device_self_recovery();
|
||||
}
|
||||
static inline void pld_pcie_request_pm_qos(u32 qos_val)
|
||||
{
|
||||
cnss_request_pm_qos(qos_val);
|
||||
}
|
||||
static inline void pld_pcie_remove_pm_qos(void)
|
||||
{
|
||||
cnss_remove_pm_qos();
|
||||
}
|
||||
static inline int pld_pcie_request_bus_bandwidth(int bandwidth)
|
||||
{
|
||||
return cnss_request_bus_bandwidth(bandwidth);
|
||||
}
|
||||
static inline int pld_pcie_auto_suspend(void)
|
||||
{
|
||||
return cnss_auto_suspend();
|
||||
}
|
||||
static inline int pld_pcie_auto_resume(void)
|
||||
{
|
||||
return cnss_auto_resume();
|
||||
}
|
||||
static inline void pld_pcie_lock_pm_sem(void)
|
||||
{
|
||||
cnss_lock_pm_sem();
|
||||
}
|
||||
static inline void pld_pcie_release_pm_sem(void)
|
||||
{
|
||||
cnss_release_pm_sem();
|
||||
}
|
||||
static inline int pld_pcie_power_on(struct device *dev)
|
||||
{
|
||||
return cnss_power_up(dev);
|
||||
}
|
||||
static inline int pld_pcie_power_off(struct device *dev)
|
||||
{
|
||||
return cnss_power_down(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -348,163 +348,4 @@ int pld_snoc_get_soc_info(struct pld_soc_info *info)
|
||||
memcpy(info, &icnss_info, sizeof(*info));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_ce_request_irq() - Register IRQ for CE
|
||||
* @ce_id: CE number
|
||||
* @handler: IRQ callback function
|
||||
* @flags: IRQ flags
|
||||
* @name: IRQ name
|
||||
* @ctx: IRQ context
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_ce_request_irq(unsigned int ce_id,
|
||||
irqreturn_t (*handler)(int, void *),
|
||||
unsigned long flags, const char *name, void *ctx)
|
||||
{
|
||||
return icnss_ce_request_irq(ce_id, handler, flags, name, ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_ce_free_irq() - Free IRQ for CE
|
||||
* @ce_id: CE number
|
||||
* @ctx: IRQ context
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_ce_free_irq(unsigned int ce_id, void *ctx)
|
||||
{
|
||||
return icnss_ce_free_irq(ce_id, ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_enable_irq() - Enable IRQ for CE
|
||||
* @ce_id: CE number
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_snoc_enable_irq(unsigned int ce_id)
|
||||
{
|
||||
icnss_enable_irq(ce_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_disable_irq() - Disable IRQ for CE
|
||||
* @ce_id: CE number
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void pld_snoc_disable_irq(unsigned int ce_id)
|
||||
{
|
||||
icnss_disable_irq(ce_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_get_ce_id() - Get CE number for the provided IRQ
|
||||
* @irq: IRQ number
|
||||
*
|
||||
* Return: CE number
|
||||
*/
|
||||
int pld_snoc_get_ce_id(int irq)
|
||||
{
|
||||
return icnss_get_ce_id(irq);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_power_on() - Power on WLAN hardware
|
||||
* @dev: device
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_power_on(struct device *dev)
|
||||
{
|
||||
return icnss_power_on(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_power_off() - Power off WLAN hardware
|
||||
* @dev: device
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_power_off(struct device *dev)
|
||||
{
|
||||
return icnss_power_off(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_get_irq() - Get IRQ number for given CE ID
|
||||
* @ce_id: CE ID
|
||||
*
|
||||
* Return: IRQ number
|
||||
*/
|
||||
int pld_snoc_get_irq(int ce_id)
|
||||
{
|
||||
return icnss_get_irq(ce_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_snoc_set_wlan_unsafe_channel() - Set unsafe channel
|
||||
* @unsafe_ch_list: unsafe channel list
|
||||
* @ch_count: number of channel
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count)
|
||||
{
|
||||
return icnss_set_wlan_unsafe_channel(unsafe_ch_list, ch_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_get_wlan_unsafe_channel() - Get unsafe channel
|
||||
* @unsafe_ch_list: buffer to unsafe channel list
|
||||
* @ch_count: number of channel
|
||||
* @buf_len: buffer length
|
||||
*
|
||||
* Return WLAN unsafe channel to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_get_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 *ch_count,
|
||||
u16 buf_len)
|
||||
{
|
||||
return icnss_get_wlan_unsafe_channel(unsafe_ch_list, ch_count,
|
||||
buf_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_wlan_set_dfs_nol() - Set DFS info
|
||||
* @info: DFS info
|
||||
* @info_len: info length
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_wlan_set_dfs_nol(const void *info, u16 info_len)
|
||||
{
|
||||
return icnss_wlan_set_dfs_nol(info, info_len);
|
||||
}
|
||||
|
||||
/**
|
||||
* pld_wlan_get_dfs_nol() - Get DFS info
|
||||
* @info: buffer to DFS info
|
||||
* @info_len: info length
|
||||
*
|
||||
* Return DFS info to the buffer.
|
||||
*
|
||||
* Return: 0 for success
|
||||
* Non zero failure code for errors
|
||||
*/
|
||||
int pld_snoc_wlan_get_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return icnss_wlan_get_dfs_nol(info, info_len);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -137,21 +137,61 @@ int pld_snoc_wlan_enable(struct pld_wlan_enable_cfg *config,
|
||||
enum pld_driver_mode mode, const char *host_version);
|
||||
int pld_snoc_wlan_disable(enum pld_driver_mode mode);
|
||||
int pld_snoc_get_soc_info(struct pld_soc_info *info);
|
||||
int pld_snoc_ce_request_irq(unsigned int ce_id,
|
||||
irqreturn_t (*handler)(int, void *),
|
||||
unsigned long flags, const char *name, void *ctx);
|
||||
int pld_snoc_ce_free_irq(unsigned int ce_id, void *ctx);
|
||||
void pld_snoc_enable_irq(unsigned int ce_id);
|
||||
void pld_snoc_disable_irq(unsigned int ce_id);
|
||||
int pld_snoc_get_ce_id(int irq);
|
||||
int pld_snoc_power_on(struct device *dev);
|
||||
int pld_snoc_power_off(struct device *dev);
|
||||
int pld_snoc_get_irq(int ce_id);
|
||||
int pld_snoc_set_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 ch_count);
|
||||
int pld_snoc_get_wlan_unsafe_channel(u16 *unsafe_ch_list, u16 *ch_count,
|
||||
u16 buf_len);
|
||||
int pld_snoc_wlan_set_dfs_nol(const void *info, u16 info_len);
|
||||
int pld_snoc_wlan_get_dfs_nol(void *info, u16 info_len);
|
||||
static inline int pld_snoc_ce_request_irq(unsigned int ce_id,
|
||||
irqreturn_t (*handler)(int, void *),
|
||||
unsigned long flags,
|
||||
const char *name, void *ctx)
|
||||
{
|
||||
return icnss_ce_request_irq(ce_id, handler, flags, name, ctx);
|
||||
}
|
||||
static inline int pld_snoc_ce_free_irq(unsigned int ce_id, void *ctx)
|
||||
{
|
||||
return icnss_ce_free_irq(ce_id, ctx);
|
||||
}
|
||||
static inline void pld_snoc_enable_irq(unsigned int ce_id)
|
||||
{
|
||||
icnss_enable_irq(ce_id);
|
||||
}
|
||||
static inline void pld_snoc_disable_irq(unsigned int ce_id)
|
||||
{
|
||||
icnss_disable_irq(ce_id);
|
||||
}
|
||||
static inline int pld_snoc_get_ce_id(int irq)
|
||||
{
|
||||
return icnss_get_ce_id(irq);
|
||||
}
|
||||
static inline int pld_snoc_power_on(struct device *dev)
|
||||
{
|
||||
return icnss_power_on(dev);
|
||||
}
|
||||
static inline int pld_snoc_power_off(struct device *dev)
|
||||
{
|
||||
return icnss_power_off(dev);
|
||||
}
|
||||
static inline int pld_snoc_get_irq(int ce_id)
|
||||
{
|
||||
return icnss_get_irq(ce_id);
|
||||
}
|
||||
static inline int pld_snoc_set_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 ch_count)
|
||||
{
|
||||
return icnss_set_wlan_unsafe_channel(unsafe_ch_list, ch_count);
|
||||
}
|
||||
static inline int pld_snoc_get_wlan_unsafe_channel(u16 *unsafe_ch_list,
|
||||
u16 *ch_count,
|
||||
u16 buf_len)
|
||||
{
|
||||
return icnss_get_wlan_unsafe_channel(unsafe_ch_list, ch_count,
|
||||
buf_len);
|
||||
}
|
||||
static inline int pld_snoc_wlan_set_dfs_nol(const void *info, u16 info_len)
|
||||
{
|
||||
return icnss_wlan_set_dfs_nol(info, info_len);
|
||||
}
|
||||
static inline int pld_snoc_wlan_get_dfs_nol(void *info, u16 info_len)
|
||||
{
|
||||
return icnss_wlan_get_dfs_nol(info, info_len);
|
||||
}
|
||||
static inline int pld_snoc_athdiag_read(struct device *dev, uint32_t offset,
|
||||
uint32_t memtype, uint32_t datalen,
|
||||
uint8_t *output)
|
||||
|
Reference in New Issue
Block a user