qcacld-3.0: Fix compiler issue about cnss_set_pcie_gen_speed

Since some platform driver does not support for PCIE gen switch,
Using macro PCIE_GEN_SWITCH to control whether function
cnss_set_pcie_gen_speed is invoke or not.

Change-Id: I478cd6426b005014e85c0b3c1c31963045d7322b
CRs-Fixed: 2767110
This commit is contained in:
Paul Zhang 2020-09-09 19:51:53 +08:00 • committed by snandini
commit 67c55db07a
3 changed files with 11 additions and 0 deletions

3
Kbuild
View file

@ -2894,6 +2894,9 @@ cppflags-$(CONFIG_HL_DP_SUPPORT) += -DQCA_COMPUTE_TX_DELAY_PER_TID
cppflags-$(CONFIG_LL_DP_SUPPORT) += -DCONFIG_LL_DP_SUPPORT
cppflags-$(CONFIG_LL_DP_SUPPORT) += -DWLAN_FULL_REORDER_OFFLOAD
# For PCIe GEN switch
cppflags-$(CONFIG_PCIE_GEN_SWITCH) += -DPCIE_GEN_SWITCH
# For OOB testing
cppflags-$(CONFIG_WLAN_FEATURE_WOW_PULSE) += -DWLAN_FEATURE_WOW_PULSE

View file

@ -44,6 +44,7 @@ ifeq ($(CONFIG_CNSS_QCA6490), y)
CONFIG_SCALE_INCLUDES := y
CONFIG_HASTINGS_BT_WAR := y
CONFIG_WDI3_IPA_OVER_GSI :=y
CONFIG_PCIE_GEN_SWITCH := y
endif
ifeq ($(CONFIG_CNSS_QCA6750), y)

View file

@ -474,6 +474,7 @@ static inline void pld_pcie_allow_l1(struct device *dev)
cnss_pci_allow_l1(dev);
}
#ifdef PCIE_GEN_SWITCH
/**
* pld_pcie_set_gen_speed() - Wrapper for platform API to set PCIE gen speed
* @dev: device
@ -487,6 +488,12 @@ static inline int pld_pcie_set_gen_speed(struct device *dev, u8 pcie_gen_speed)
{
return cnss_set_pcie_gen_speed(dev, pcie_gen_speed);
}
#else
static inline int pld_pcie_set_gen_speed(struct device *dev, u8 pcie_gen_speed)
{
return 0;
}
#endif
static inline void pld_pcie_link_down(struct device *dev)
{