[rdkb][common][app][Add noscan]
[Description]
Add setNoscand for MSP setting.
[Release-log]
N/A
Change-Id: Ib89b29d7904b9f8db2d000ee5dca1d9239109189
diff --git a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
index eb24b98..6151ba6 100644
--- a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
+++ b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.c
@@ -81,6 +81,12 @@
strcpy(radio_param->band, band);
}
+void set_noscan(wifi_radio_param *radio_param, char *noscan)
+{
+ snprintf(radio_param->noscan, 2, "%s", noscan);
+ radio_param->noscan[1] = '\0';
+}
+
void set_hwmode(wifi_radio_param *radio_param, char *hwmode)
{
if (strncmp(hwmode, "11a", 3) == 0)
@@ -312,6 +318,13 @@
operationParam.variant = mode;
+ // noscan
+ fprintf(stderr, "Set noscan: %s\n", radio_parameter.noscan);
+ ret = wifi_setNoscan(radio_parameter.radio_index, radio_parameter.noscan);
+ if (ret != RETURN_OK)
+ fprintf(stderr, "[Set noscan failed!!!]\n");
+ ret = 0;
+
// apply setting
ret = wifi_setRadioOperatingParameters(radio_parameter.radio_index, &operationParam);
if (ret != RETURN_OK)
@@ -428,7 +441,7 @@
else if (strcmp(op->e.name, "country") == 0)
set_country(&radio_param, op->v.string);
else if (strcmp(op->e.name, "noscan") == 0)
- set_band(&radio_param, op->v.string);
+ set_noscan(&radio_param, op->v.string);
else
fprintf(stderr, "[%s %s not set!]\n", op->e.name, op->v.string);
} else {
diff --git a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.h b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.h
index fb6b5b1..19af44a 100644
--- a/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.h
+++ b/recipes-devtools/wifi-test-tool/files/src/wifi-test-tool.h
@@ -41,6 +41,7 @@
char supported_rates[64];
int log_level;
char hostapd_options[64];
+ char noscan[2];
} wifi_radio_param;
typedef struct {