wlan: include wesmode support again
Customer has requested to include wesmode support
again.
Remove WESMODE check for REASSOC command
Change-Id: I8f4d9b1c755db2ec510bc9574330cebe57b0cbf6
CRs-Fixed: 565048
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index a49e156..1128daa 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2686,7 +2686,60 @@
sme_HandoffRequest(pHddCtx->hHal, &handoffInfo);
#endif
}
-#endif
+ else if (strncmp(command, "SETWESMODE", 10) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_BOOLEAN wesMode = CFG_ENABLE_WES_MODE_NAME_DEFAULT;
+
+ /* Move pointer to ahead of SETWESMODE<delimiter> */
+ value = value + 11;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &wesMode);
+ if (ret < 0)
+ {
+ /* If the input value is greater than max value of datatype, then also
+ kstrtou8 fails */
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: kstrtou8 failed range [%d - %d]", __func__,
+ CFG_ENABLE_WES_MODE_NAME_MIN,
+ CFG_ENABLE_WES_MODE_NAME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((wesMode < CFG_ENABLE_WES_MODE_NAME_MIN) ||
+ (wesMode > CFG_ENABLE_WES_MODE_NAME_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "WES Mode value %d is out of range"
+ " (Min: %d Max: %d)", wesMode,
+ CFG_ENABLE_WES_MODE_NAME_MIN,
+ CFG_ENABLE_WES_MODE_NAME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to Set WES Mode rssi diff = %d", __func__, wesMode);
+
+ pHddCtx->cfg_ini->isWESModeEnabled = wesMode;
+ sme_UpdateWESMode((tHalHandle)(pHddCtx->hHal), wesMode);
+ }
+ else if (strncmp(priv_data.buf, "GETWESMODE", 10) == 0)
+ {
+ tANI_BOOLEAN wesMode = sme_GetWESMode((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", command, wesMode);
+ if (copy_to_user(priv_data.buf, &extra, len + 1))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: failed to copy data to user buffer", __func__);
+ ret = -EFAULT;
+ goto exit;
+ }
+ }
+#endif /* WLAN_FEATURE_VOWIFI_11R || FEATURE_WLAN_CCX || FEATURE_WLAN_LFR */
#ifdef FEATURE_WLAN_LFR
else if (strncmp(command, "SETFASTROAM", 11) == 0)
{
@@ -2949,6 +3002,7 @@
pHddCtx->cfg_ini->isOkcIniFeatureEnabled = okcMode;
}
+#endif /* FEATURE_WLAN_OKC */
else if (strncmp(priv_data.buf, "GETROAMSCANCONTROL", 18) == 0)
{
tANI_BOOLEAN roamScanControl = sme_GetRoamScanControl((tHalHandle)(pHddCtx->hHal));
@@ -2965,7 +3019,6 @@
goto exit;
}
}
-#endif
#ifdef WLAN_FEATURE_PACKET_FILTERING
else if (strncmp(command, "ENABLE_PKTFILTER_IPV6", 21) == 0)
{