qcacld-3.0: Fix rmmod for runtime pm
Runtime PM should be turned off before the driver is unloaded. Change-Id: I8746e92931375893708556e77a3d93bfd6266668 CRs-Fixed: 935300
This commit is contained in:

committed by
Akash Patel

parent
226a3b1bfe
commit
53b34c4714
@@ -314,6 +314,7 @@ static void wlan_hdd_remove(void)
|
||||
|
||||
hif_ctx = cds_get_context(CDF_MODULE_ID_HIF);
|
||||
|
||||
hif_disable_power_management(hif_ctx);
|
||||
hif_pktlogmod_exit(hif_ctx);
|
||||
|
||||
if (WLAN_IS_EPPING_ENABLED(cds_get_conparam())) {
|
||||
|
@@ -684,6 +684,7 @@ void hif_runtime_pm_set_state_inprogress(void);
|
||||
void hif_runtime_pm_set_state_on(void);
|
||||
|
||||
void hif_enable_power_management(void *hif_ctx);
|
||||
void hif_disable_power_management(void *hif_ctx);
|
||||
int hif_runtime_suspend(void);
|
||||
int hif_runtime_resume(void);
|
||||
int hif_bus_resume(void);
|
||||
|
@@ -1094,6 +1094,7 @@ static void hif_pm_runtime_close(struct hif_pci_softc *sc)
|
||||
static void hif_pm_runtime_close(struct hif_pci_softc *sc) {}
|
||||
static void hif_pm_runtime_open(struct hif_pci_softc *sc) {}
|
||||
static void hif_pm_runtime_start(struct hif_pci_softc *sc) {}
|
||||
static void hif_pm_runtime_stop(struct hif_pci_softc *sc) {}
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1119,6 +1120,28 @@ void hif_enable_power_management(void *hif_ctx)
|
||||
hif_pm_runtime_start(pci_ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_disable_power_management(): disable power management
|
||||
* @hif_ctx: hif context
|
||||
*
|
||||
* Currently disables runtime pm. Should be updated to behave
|
||||
* if runtime pm is not started. Should be updated to take care
|
||||
* of aspm and soc sleep for driver load.
|
||||
*/
|
||||
void hif_disable_power_management(void *hif_ctx)
|
||||
{
|
||||
struct hif_pci_softc *pci_ctx;
|
||||
|
||||
if (hif_ctx == NULL) {
|
||||
HIF_ERROR("%s, hif_ctx null", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
pci_ctx = ((struct ol_softc *)hif_ctx)->hif_sc;
|
||||
|
||||
hif_pm_runtime_stop(pci_ctx);
|
||||
}
|
||||
|
||||
#define ATH_PCI_PROBE_RETRY_MAX 3
|
||||
/**
|
||||
* hif_bus_open(): hif_bus_open
|
||||
|
Reference in New Issue
Block a user