mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
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:
parent
746a571cf7
commit
a0e71066f3
3 changed files with 25 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue