Merge "[rdkb][common][bsp][Refactor kernel part]"
diff --git a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
index 84cdc92..7411969 100644
--- a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
+++ b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.c
@@ -249,6 +249,13 @@
strncpy(intf_param->ifname, ifname, strlen(ifname) + 1);
}
+void set_wds(wifi_intf_param *intf_param, char *wds_enable)
+{
+ intf_param->wds_mode = FALSE;
+ if (strncmp(wds_enable, "1", 1) == 0)
+ intf_param->wds_mode = TRUE;
+}
+
int set_interface_bssid(int phy_index, int offset, mac_address_t *bssid)
{
FILE *f;
@@ -462,7 +469,10 @@
sta->psk[127] = '\0';
sta->psk_len = strlen(sta->psk);
- wifi_createSTAInterface(sta_param.sta_index, sta_mac_str);
+ if (sta_param.wds_mode == TRUE)
+ sta->flags |= WIFI_STA_NET_F_4ADDR_MULTI_AP;
+
+ wifi_createSTAInterface(sta_param.sta_index, sta_mac_str, sta_param.wds_mode);
if (wifi_setSTANetworks(sta_param.sta_index, &sta, 1, FALSE) == RETURN_ERR) {
fprintf(stderr, "Write to sta %d config file failed\n", sta_param.sta_index);
@@ -576,6 +586,8 @@
set_key(&intf_param, op->v.string);
}else if (strcmp(op->e.name, "ifname") == 0){
set_ifname(&intf_param, op->v.string);
+ }else if (strcmp(op->e.name, "wds") == 0){
+ set_wds(&intf_param, op->v.string);
}else{
fprintf(stderr, "[%s %s not set!]\n", op->e.name, op->v.string);
}
diff --git a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.h b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.h
index d311c92..100a544 100644
--- a/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.h
+++ b/recipes-wifi/wifi-test-tool/files/src/wifi-test-tool.h
@@ -47,6 +47,7 @@
typedef struct {
wifi_radio_param *radio_info; // for multiple vap
bool sta_mode;
+ bool wds_mode;
int radio_index;
int ap_index;
int sta_index;