qcacld-2.0: Add support for private ioctls for TDLS Offchannel
Add support for private ioctls in the TDLS Offchannel to
set channel num and enable disable offchannel as needed
by sigma-dut to pass the certification.
Change-Id: I94aebedcf6d3f8b4deb9b2e77ff9f5822aab0728
CRs-Fixed: 2175359
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h
index 7f094ab..7a678a2 100644
--- a/CORE/HDD/inc/wlan_hdd_tdls.h
+++ b/CORE/HDD/inc/wlan_hdd_tdls.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -549,6 +549,18 @@
{
}
+static inline int hdd_set_tdls_offchannel(hdd_context_t *pHddCtx, int offchannel)
+{
+ return 0;
+}
+static inline int hdd_set_tdls_offchannelmode(hdd_adapter_t *pAdapter, int offchanmode)
+{
+ return 0;
+}
+static inline int hdd_set_tdls_secoffchanneloffset(hdd_context_t *pHddCtx, int offchanoffset)
+{
+ return 0;
+}
#endif
#endif // __HDD_TDSL_H
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 4205040..eeeeab6 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -253,6 +253,10 @@
MON_ALL_PKT,
} tMonFilterType;
+#define WE_SET_TDLS_OFFCHANNEL_MODE 90
+#define WE_SET_TDLS_OFFCHANNEL 91
+#define WE_SET_TDLS_OFFCHANNEL_SEC_OFFSET 92
+
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
#define WE_GET_11D_STATE 1
@@ -7403,6 +7407,32 @@
wlan_hdd_mnt_filter_type_cmd(pAdapter, &filter_type,sizeof(v_U8_t));
break;
}
+ case WE_SET_TDLS_OFFCHANNEL_MODE:
+ {
+ hddLog(LOG1, "SET tdls_offchannel_mode val %d", set_value);
+ ret = hdd_set_tdls_offchannelmode(pAdapter, set_value);
+ break;
+ }
+ case WE_SET_TDLS_OFFCHANNEL:
+ {
+ hddLog(LOG1, "SET tdls_offchannel val %d", set_value);
+
+ if (VOS_IS_DFS_CH(set_value)) {
+ hddLog(LOGE,
+ FL("DFS channel %d is passed for hdd_set_tdls_offchannel"),
+ set_value);
+ ret = -EINVAL;
+ break;
+ }
+ ret = hdd_set_tdls_offchannel(pHddCtx, set_value);
+ break;
+ }
+ case WE_SET_TDLS_OFFCHANNEL_SEC_OFFSET:
+ {
+ hddLog(LOG1, "SET tdls_offchannel_mode val %d", set_value);
+ ret = hdd_set_tdls_secoffchanneloffset(pHddCtx, set_value);
+ break;
+ }
default:
{
hddLog(LOGE, "%s: Invalid sub command %d", __func__, sub_cmd);
@@ -12112,6 +12142,23 @@
WE_SET_MON_FILTER,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
0, "setMonFilter" },
+#ifdef FEATURE_WLAN_TDLS
+ {
+ WE_SET_TDLS_OFFCHANNEL_MODE,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "tdlsoffchnmode" },
+ {
+ WE_SET_TDLS_OFFCHANNEL,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "tdlsoffchan" },
+ {
+ WE_SET_TDLS_OFFCHANNEL_SEC_OFFSET,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "tdlsecchnoffst" },
+#endif
/* handlers for sub-ioctl */
{ WE_GET_11D_STATE,