wlan: 3rd set of Runtime Config items
Support for runtime configuration of
1. GET/SET CCXMODE
2. GET/SET FASTROAM
3. GET/SET OKCMODE
4. GET/SET FASTTRANSITION
5. GET/SET ROAMSCANCHANNELMINTIME
6. GET/SET SCANCHANNELTIME (MAX DWELL TIME)
7. GET/SET SCANHOMETIME
8. GET/SET ROAMINTRABAND
Change-Id: I363bac16486dd9b37d26c06ebf368269f206273b
CRs-Fixed: 466216
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index d001fa6..0bdbcf3 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -626,12 +626,12 @@
else if (strncmp(command, "SETROAMSCANPERIOD", 17) == 0)
{
tANI_U8 *value = command;
- tANI_U16 emptyScanRefreshPeriod = CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT;
+ tANI_U16 neighborEmptyScanRefreshPeriod = CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT;
/* input refresh period is in terms of seconds */
/* Move pointer to ahead of SETROAMSCANPERIOD<delimiter> */
value = value + 18;
/* Convert the value from ascii to integer */
- ret = kstrtou16(value, 10, &emptyScanRefreshPeriod);
+ ret = kstrtou16(value, 10, &neighborEmptyScanRefreshPeriod);
if (ret < 0)
{
/* If the input value is greater than max value of datatype, then also
@@ -646,13 +646,13 @@
goto exit;
}
- emptyScanRefreshPeriod = emptyScanRefreshPeriod * 1000;
- if ((emptyScanRefreshPeriod < CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN) ||
- (emptyScanRefreshPeriod > CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX))
+ neighborEmptyScanRefreshPeriod = neighborEmptyScanRefreshPeriod * 1000;
+ if ((neighborEmptyScanRefreshPeriod < CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN) ||
+ (neighborEmptyScanRefreshPeriod > CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "Empty scan refresh period value %d is out of range"
- " (Min: %d Max: %d)", emptyScanRefreshPeriod/1000,
+ "Neighbor empty scan results refresh period value %d is out of range"
+ " (Min: %d Max: %d)", neighborEmptyScanRefreshPeriod/1000,
(CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN/1000),
(CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX/1000));
ret = -EINVAL;
@@ -661,10 +661,10 @@
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Received Command to Set roam scan period"
- " (Empty Scan refresh period) = %d", __func__, emptyScanRefreshPeriod/1000);
+ " (Empty Scan refresh period) = %d", __func__, neighborEmptyScanRefreshPeriod/1000);
- pHddCtx->cfg_ini->nEmptyScanRefreshPeriod = emptyScanRefreshPeriod;
- sme_UpdateEmptyScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), emptyScanRefreshPeriod);
+ pHddCtx->cfg_ini->nEmptyScanRefreshPeriod = neighborEmptyScanRefreshPeriod;
+ sme_UpdateEmptyScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), neighborEmptyScanRefreshPeriod);
}
else if (strncmp(command, "GETROAMSCANPERIOD", 17) == 0)
{
@@ -682,6 +682,65 @@
goto exit;
}
}
+ else if (strncmp(command, "SETROAMSCANREFRESHPERIOD", 24) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U16 neighborScanRefreshPeriod = CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_DEFAULT;
+ /* input refresh period is in terms of seconds */
+ /* Move pointer to ahead of SETROAMSCANREFRESHPERIOD<delimiter> */
+ value = value + 25;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou16(value, 10, &neighborScanRefreshPeriod);
+ if (ret < 0)
+ {
+ /* If the input value is greater than max value of datatype, then also
+ kstrtou16 fails */
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: kstrtou16 failed ",
+ "Input value may be out of range[%d - %d]",
+ __func__,
+ (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN/1000),
+ (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX/1000));
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ neighborScanRefreshPeriod = neighborScanRefreshPeriod * 1000;
+ if ((neighborScanRefreshPeriod < CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN) ||
+ (neighborScanRefreshPeriod > CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Neighbor scan results refresh period value %d is out of range"
+ " (Min: %d Max: %d)", neighborScanRefreshPeriod/1000,
+ (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN/1000),
+ (CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX/1000));
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to Set roam scan refresh period"
+ " (Scan refresh period) = %d", __func__, neighborScanRefreshPeriod/1000);
+
+ pHddCtx->cfg_ini->nNeighborResultsRefreshPeriod = neighborScanRefreshPeriod;
+ sme_setNeighborScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), neighborScanRefreshPeriod);
+ }
+ else if (strncmp(command, "GETROAMSCANREFRESHPERIOD", 24) == 0)
+ {
+ tANI_U16 value = sme_getNeighborScanRefreshPeriod((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETROAMSCANREFRESHPERIOD", (value/1000));
+ /* Returned value is in units of seconds */
+ 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
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
else if (strncmp(command, "SETROAMDELTA", 12) == 0)
@@ -855,6 +914,450 @@
goto exit;
}
}
+ else if (strncmp(command, "GETCCXMODE", 10) == 0)
+ {
+ tANI_BOOLEAN ccxMode = sme_getIsCcxFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETCCXMODE", ccxMode);
+ 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;
+ }
+ }
+ else if (strncmp(command, "GETOKCMODE", 10) == 0)
+ {
+ tANI_BOOLEAN okcMode = hdd_is_okc_mode_enabled(pHddCtx);
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETOKCMODE", okcMode);
+ 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;
+ }
+ }
+ else if (strncmp(command, "GETFASTROAM", 10) == 0)
+ {
+ tANI_BOOLEAN lfrMode = sme_getIsLfrFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETFASTROAM", lfrMode);
+ 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;
+ }
+ }
+ else if (strncmp(command, "GETFASTTRANSITION", 17) == 0)
+ {
+ tANI_BOOLEAN ft = sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETFASTTRANSITION", ft);
+ 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;
+ }
+ }
+ else if (strncmp(command, "SETROAMSCANCHANNELMINTIME", 25) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 minTime = CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_DEFAULT;
+
+ /* Move pointer to ahead of SETROAMSCANCHANNELMINTIME<delimiter> */
+ value = value + 26;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &minTime);
+ 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_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN,
+ CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((minTime < CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN) ||
+ (minTime > CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "scan min channel time value %d is out of range"
+ " (Min: %d Max: %d)", minTime,
+ CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN,
+ CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change channel min time = %d", __func__, minTime);
+
+ pHddCtx->cfg_ini->nNeighborScanMinChanTime = minTime;
+ sme_setNeighborScanMinChanTime((tHalHandle)(pHddCtx->hHal), minTime);
+ }
+ else if (strncmp(command, "GETROAMSCANCHANNELMINTIME", 25) == 0)
+ {
+ tANI_U16 val = sme_getNeighborScanMinChanTime((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ /* value is interms of msec */
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETROAMSCANCHANNELMINTIME", val);
+ 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;
+ }
+ }
+ else if (strncmp(command, "SETSCANCHANNELTIME", 18) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 maxTime = CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_DEFAULT;
+
+ /* Move pointer to ahead of SETSCANCHANNELTIME<delimiter> */
+ value = value + 19;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &maxTime);
+ 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_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN,
+ CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((maxTime < CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN) ||
+ (maxTime > CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "lfr mode value %d is out of range"
+ " (Min: %d Max: %d)", maxTime,
+ CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN,
+ CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change channel max time = %d", __func__, maxTime);
+
+ pHddCtx->cfg_ini->nNeighborScanMaxChanTime = maxTime;
+ sme_setNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal), maxTime);
+ }
+ else if (strncmp(command, "GETSCANCHANNELTIME", 18) == 0)
+ {
+ tANI_U16 val = sme_getNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ /* value is interms of msec */
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETSCANCHANNELTIME", val);
+ 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;
+ }
+ }
+ else if (strncmp(command, "SETSCANHOMETIME", 15) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U16 val = CFG_NEIGHBOR_SCAN_TIMER_PERIOD_DEFAULT;
+
+ /* Move pointer to ahead of SETSCANHOMETIME<delimiter> */
+ value = value + 16;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou16(value, 10, &val);
+ if (ret < 0)
+ {
+ /* If the input value is greater than max value of datatype, then also
+ kstrtou16 fails */
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: kstrtou16 failed range [%d - %d]", __func__,
+ CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN,
+ CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((val < CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN) ||
+ (val > CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "scan home time value %d is out of range"
+ " (Min: %d Max: %d)", val,
+ CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN,
+ CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change scan home time = %d", __func__, val);
+
+ pHddCtx->cfg_ini->nNeighborScanPeriod = val;
+ sme_setNeighborScanPeriod((tHalHandle)(pHddCtx->hHal), val);
+ }
+ else if (strncmp(command, "GETSCANHOMETIME", 15) == 0)
+ {
+ tANI_U16 val = sme_getNeighborScanPeriod((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ /* value is interms of msec */
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETSCANHOMETIME", val);
+ 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;
+ }
+ }
+ else if (strncmp(command, "SETROAMINTRABAND", 16) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 val = CFG_ROAM_INTRA_BAND_DEFAULT;
+
+ /* Move pointer to ahead of SETROAMINTRABAND<delimiter> */
+ value = value + 17;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &val);
+ 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_ROAM_INTRA_BAND_MIN,
+ CFG_ROAM_INTRA_BAND_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((val < CFG_ROAM_INTRA_BAND_MIN) ||
+ (val > CFG_ROAM_INTRA_BAND_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "intra band mode value %d is out of range"
+ " (Min: %d Max: %d)", val,
+ CFG_ROAM_INTRA_BAND_MIN,
+ CFG_ROAM_INTRA_BAND_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change intra band = %d", __func__, val);
+
+ pHddCtx->cfg_ini->nRoamIntraBand = val;
+ sme_setRoamIntraBand((tHalHandle)(pHddCtx->hHal), val);
+ }
+ else if (strncmp(command, "GETROAMINTRABAND", 16) == 0)
+ {
+ tANI_U16 val = sme_getRoamIntraBand((tHalHandle)(pHddCtx->hHal));
+ char extra[32];
+ tANI_U8 len = 0;
+
+ /* value is interms of msec */
+ len = snprintf(extra, sizeof(extra), "%s %d", "GETROAMINTRABAND", val);
+ 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
+#ifdef FEATURE_WLAN_LFR
+ else if (strncmp(command, "SETFASTROAM", 11) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 lfrMode = CFG_LFR_FEATURE_ENABLED_DEFAULT;
+
+ /* Move pointer to ahead of SETFASTROAM<delimiter> */
+ value = value + 12;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &lfrMode);
+ 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_LFR_FEATURE_ENABLED_MIN,
+ CFG_LFR_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((lfrMode < CFG_LFR_FEATURE_ENABLED_MIN) ||
+ (lfrMode > CFG_LFR_FEATURE_ENABLED_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "lfr mode value %d is out of range"
+ " (Min: %d Max: %d)", lfrMode,
+ CFG_LFR_FEATURE_ENABLED_MIN,
+ CFG_LFR_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change lfr mode = %d", __func__, lfrMode);
+
+ pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled = lfrMode;
+ sme_UpdateIsFastRoamIniFeatureEnabled((tHalHandle)(pHddCtx->hHal), lfrMode);
+ }
+#endif
+#ifdef WLAN_FEATURE_VOWIFI_11R
+ else if (strncmp(command, "SETFASTTRANSITION", 17) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 ft = CFG_FAST_TRANSITION_ENABLED_NAME_DEFAULT;
+
+ /* Move pointer to ahead of SETFASTROAM<delimiter> */
+ value = value + 18;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &ft);
+ 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_FAST_TRANSITION_ENABLED_NAME_MIN,
+ CFG_FAST_TRANSITION_ENABLED_NAME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((ft < CFG_FAST_TRANSITION_ENABLED_NAME_MIN) ||
+ (ft > CFG_FAST_TRANSITION_ENABLED_NAME_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "ft mode value %d is out of range"
+ " (Min: %d Max: %d)", ft,
+ CFG_FAST_TRANSITION_ENABLED_NAME_MIN,
+ CFG_FAST_TRANSITION_ENABLED_NAME_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change ft mode = %d", __func__, ft);
+
+ pHddCtx->cfg_ini->isFastTransitionEnabled = ft;
+ sme_UpdateFastTransitionEnabled((tHalHandle)(pHddCtx->hHal), ft);
+ }
+#endif
+#ifdef FEATURE_WLAN_CCX
+ else if (strncmp(command, "SETCCXMODE", 10) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 ccxMode = CFG_CCX_FEATURE_ENABLED_DEFAULT;
+
+ /* Move pointer to ahead of SETCCXMODE<delimiter> */
+ value = value + 11;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &ccxMode);
+ 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_CCX_FEATURE_ENABLED_MIN,
+ CFG_CCX_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((ccxMode < CFG_CCX_FEATURE_ENABLED_MIN) ||
+ (ccxMode > CFG_CCX_FEATURE_ENABLED_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Ccx mode value %d is out of range"
+ " (Min: %d Max: %d)", ccxMode,
+ CFG_CCX_FEATURE_ENABLED_MIN,
+ CFG_CCX_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change ccx mode = %d", __func__, ccxMode);
+
+ pHddCtx->cfg_ini->isCcxIniFeatureEnabled = ccxMode;
+ sme_UpdateIsCcxFeatureEnabled((tHalHandle)(pHddCtx->hHal), ccxMode);
+ }
+#endif
+#ifdef FEATURE_WLAN_OKC
+ else if (strncmp(command, "SETOKCMODE", 10) == 0)
+ {
+ tANI_U8 *value = command;
+ tANI_U8 okcMode = CFG_OKC_FEATURE_ENABLED_DEFAULT;
+
+ /* Move pointer to ahead of SETOKCMODE<delimiter> */
+ value = value + 11;
+ /* Convert the value from ascii to integer */
+ ret = kstrtou8(value, 10, &okcMode);
+ 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_OKC_FEATURE_ENABLED_MIN,
+ CFG_OKC_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if ((okcMode < CFG_OKC_FEATURE_ENABLED_MIN) ||
+ (okcMode > CFG_OKC_FEATURE_ENABLED_MAX))
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Okc mode value %d is out of range"
+ " (Min: %d Max: %d)", okcMode,
+ CFG_OKC_FEATURE_ENABLED_MIN,
+ CFG_OKC_FEATURE_ENABLED_MAX);
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Command to change okc mode = %d", __func__, okcMode);
+
+ pHddCtx->cfg_ini->isOkcIniFeatureEnabled = okcMode;
+ }
#endif
else {
hddLog( VOS_TRACE_LEVEL_WARN, "%s: Unsupported GUI command %s",