qcacld-3.0: Check tdls off-channel passed is not a DFS channel
qcacld-2.0 to qcacld-3.0 propagation
Add check to validate if non-DFS channel is passed as
TDLS off channel via driver command and INI config.
Change-Id: I6696c47d438bdcc1b8733241e60ca5c52fb1022f
CRs-Fixed: 915972
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index b08bd02..6fc55c5 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -5300,6 +5300,12 @@
if (ret != 1)
return -EINVAL;
+ if (CDS_IS_DFS_CH(set_value)) {
+ hdd_err("DFS channel %d is passed for hdd_set_tdls_offchannel",
+ set_value);
+ return -EINVAL;
+ }
+
hddLog(LOG1, FL("Tdls offchannel num: %d"), set_value);
ret = hdd_set_tdls_offchannel(hdd_ctx, set_value);