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