Skip to content
Snippets Groups Projects
Commit df9a5f71 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

ts: clean stale VIDs

parent c5504e63
Branches
No related tags found
1 merge request!398ts: clean stale VIDs
Pipeline #103660 passed
......@@ -299,18 +299,26 @@ static void ts_set_iface_vlan(struct ts_context *ts, struct ts_iface *tsif)
static void ts_set_system(struct ts_context *ts)
{
char buf[16] = {0};
char cmd[128] = {0};
uint16_t vid;
int i;
if (ts->primary_vid == 0)
return;
strncpy(cmd, "/lib/wifi/multiap ts keep", sizeof(cmd));
for (i = 0; i < ts->num_vids; i++) {
vid = ts->all_vids[i];
warn("/lib/wifi/multiap ts create %u\n",vid);
Cmd(buf, sizeof(buf), "/lib/wifi/multiap ts create %u", vid);
snprintf(cmd + strlen(cmd), sizeof(cmd) - strlen(cmd), " %hu", vid);
}
/* remove any stale vids from network config */
if (ts->num_vids)
Cmd(buf, sizeof(buf), cmd);
warn("/lib/wifi/multiap ts reload\n");
Cmd(buf, sizeof(buf), "/lib/wifi/multiap ts reload");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment