Interface change to expose PCIe DRV connection status to WLAN
driver so that it is able to suspend/resume based on the status.
Change-Id: If8f706b0eb38f209a5e322b112beb9a95babdcad
Signed-off-by: Yue Ma <yuem@codeaurora.org>
return ret;
}
+int cnss_pci_is_drv_connected(struct device *dev)
+{
+ struct cnss_pci_data *pci_priv = cnss_get_pci_priv(to_pci_dev(dev));
+
+ if (!pci_priv)
+ return -ENODEV;
+
+ return pci_priv->drv_connected_last;
+}
+EXPORT_SYMBOL(cnss_pci_is_drv_connected);
+
int cnss_wlan_register_driver(struct cnss_wlan_driver *driver_ops)
{
int ret = 0;
-/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
struct pci_saved_state *default_state;
struct msm_pcie_register_event msm_pci_event;
atomic_t auto_suspended;
+ u8 drv_connected_last;
bool monitor_wake_intr;
struct dma_iommu_mapping *smmu_mapping;
dma_addr_t smmu_iova_start;
extern void cnss_release_pm_sem(struct device *dev);
extern int cnss_auto_suspend(struct device *dev);
extern int cnss_auto_resume(struct device *dev);
+extern int cnss_pci_is_drv_connected(struct device *dev);
extern int cnss_pci_force_wake_request(struct device *dev);
extern int cnss_pci_is_device_awake(struct device *dev);
extern int cnss_pci_force_wake_release(struct device *dev);