From e68ec2e7987696236a086611dcae8af1d4b71252 Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Mon, 17 May 2021 14:45:30 +0530 Subject: [PATCH] qcacld-3.0: Add fature flag to get usable channels Add feature flag for the feature to get usable channels. Change-Id: I6dd2360284c395747b55f806caab2a5a44089866 CRs-Fixed: 2947180 --- Kbuild | 1 + configs/default_defconfig | 1 + core/hdd/src/wlan_hdd_cfg80211.c | 13 +++++++++++++ 3 files changed, 15 insertions(+) diff --git a/Kbuild b/Kbuild index f047f315c09b..846189051fa6 100644 --- a/Kbuild +++ b/Kbuild @@ -2962,6 +2962,7 @@ cppflags-$(CONFIG_LL_DP_SUPPORT) += -DCONFIG_LL_DP_SUPPORT cppflags-$(CONFIG_LL_DP_SUPPORT) += -DWLAN_FULL_REORDER_OFFLOAD cppflags-$(CONFIG_WLAN_FEATURE_BIG_DATA_STATS) += -DWLAN_FEATURE_BIG_DATA_STATS cppflags-$(CONFIG_WLAN_FEATURE_IGMP_OFFLOAD) += -DWLAN_FEATURE_IGMP_OFFLOAD +cppflags-$(CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST) += -DWLAN_FEATURE_GET_USABLE_CHAN_LIST # For PCIe GEN switch cppflags-$(CONFIG_PCIE_GEN_SWITCH) += -DPCIE_GEN_SWITCH diff --git a/configs/default_defconfig b/configs/default_defconfig index 6f985745be60..ec7f60d42d32 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -1002,6 +1002,7 @@ CONFIG_WLAN_FEATURE_TWT := y CONFIG_FW_THERMAL_THROTTLE := y CONFIG_WLAN_FEATURE_BIG_DATA_STATS := y CONFIG_WLAN_FEATURE_IGMP_OFFLOAD := y +CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST := y ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM))) CONFIG_WLAN_FEATURE_BMI := n diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 0038f8dff05f..b0866bc4edd4 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14981,6 +14981,7 @@ get_usable_channel_policy[QCA_WLAN_VENDOR_ATTR_USABLE_CHANNELS_MAX + 1] = { }, }; +#ifdef WLAN_FEATURE_GET_USABLE_CHAN_LIST /** * hdd_fill_usable_channels_data() - Fill the data requested by userspace * @skb: SK buffer @@ -15168,6 +15169,7 @@ static int __wlan_hdd_cfg80211_get_usable_channel(struct wiphy *wiphy, return qdf_status_to_os_return(status); } +#endif /** * __wlan_hdd_cfg80211_get_chain_rssi() - get chain rssi @@ -15257,6 +15259,7 @@ static int __wlan_hdd_cfg80211_get_chain_rssi(struct wiphy *wiphy, return retval; } +#ifdef WLAN_FEATURE_GET_USABLE_CHAN_LIST /** * wlan_hdd_cfg80211_get_usable_channel() - get chain rssi * @wiphy: wiphy pointer @@ -15285,6 +15288,16 @@ static int wlan_hdd_cfg80211_get_usable_channel(struct wiphy *wiphy, return errno; } +#else +static int wlan_hdd_cfg80211_get_usable_channel(struct wiphy *wiphy, + struct wireless_dev *wdev, + const void *data, + int data_len) +{ + hdd_debug("get usable channel feature not supported"); + return -EPERM; +} +#endif /** * wlan_hdd_cfg80211_get_chain_rssi() - get chain rssi