From e33d286340873e642011555945676b992d477a9a Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Tue, 11 Aug 2020 09:50:38 +0800 Subject: [PATCH] qcacld-3.0: Fix channel avoid failure for CONFIG_CNSS_UTILS disabled Many platforms doesn't enabled CONFIG_CNSS_UTILS, while pld_set_wlan_unsafe_channel depends on it, pld_set_wlan_unsafe_channel and pld_get_wlan_unsafe_channel need return 0 instead of -EINVAL, or have side effect on channel avoid feature. Change-Id: I0967d754314d6fb7f8a289ada3bbcbae2c8b3b5e CRs-Fixed: 2752409 --- core/pld/inc/pld_common.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h index a75b6322d1f3..cf55cd5bb239 100644 --- a/core/pld/inc/pld_common.h +++ b/core/pld/inc/pld_common.h @@ -581,13 +581,15 @@ static inline int pld_set_wlan_unsafe_channel(struct device *dev, u16 *unsafe_ch_list, u16 ch_count) { - return -EINVAL; + return 0; } static inline int pld_get_wlan_unsafe_channel(struct device *dev, u16 *unsafe_ch_list, u16 *ch_count, u16 buf_len) { - return -EINVAL; + *ch_count = 0; + + return 0; } static inline int pld_wlan_set_dfs_nol(struct device *dev, void *info, u16 info_len)