Browse Source

qcacld-3.0: Fix hif_bus_prevent_linkdown compilation

hif_bus_prevent_linkdown() calls to cnss_wlan_pm_control(), which
is only defined when CONFIG_PCI_MSM is enabled, fix the conditional
compilation.

Also fix a typo of RUNTIME_PM to FEATURE_RUNTIME_PM.

Change-Id: I9d4cd65ee0020ca1b41d026c3124317ce854ea92
CRs-fixed: 966771
Ryan Hsu 9 years ago
parent
commit
e0e49278a8
1 changed files with 9 additions and 3 deletions
  1. 9 3
      core/hif/src/pcie/if_pci.c

+ 9 - 3
core/hif/src/pcie/if_pci.c

@@ -1675,9 +1675,7 @@ void hif_disable_bus(void *bdev)
 
 #define OL_ATH_PCI_PM_CONTROL 0x44
 
-#ifdef CONFIG_CNSS
-
-#ifdef RUNTIME_PM
+#ifdef FEATURE_RUNTIME_PM
 /**
  * hif_runtime_prevent_linkdown() - prevent or allow a runtime pm from occuring
  * @scn: hif context
@@ -1700,6 +1698,7 @@ static void hif_runtime_prevent_linkdown(struct ol_softc *scn, bool flag)
 }
 #endif
 
+#if defined(CONFIG_CNSS) && defined(CONFIG_PCI_MSM)
 /**
  * hif_bus_prevent_linkdown(): allow or permit linkdown
  * @flag: true prevents linkdown, false allows
@@ -1716,6 +1715,13 @@ void hif_bus_prevent_linkdown(struct ol_softc *scn, bool flag)
 	hif_runtime_prevent_linkdown(scn, flag);
 	cnss_wlan_pm_control(flag);
 }
+#else
+void hif_bus_prevent_linkdown(struct ol_softc *scn, bool flag)
+{
+	HIF_ERROR("wlan: %s pcie power collapse",
+			(flag ? "disable" : "enable"));
+	hif_runtime_prevent_linkdown(scn, flag);
+}
 #endif
 
 /**