diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-07-23 11:37:57 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-07-23 11:38:00 +0200 |
commit | 17e453bd68b41780b6564dafa8358efc29a00930 (patch) | |
tree | 8c1b2587cdcb56ed97bc83b5095a381c70730cd0 | |
parent | 85f01c44a950be8518ce5a7d251b5bba219348cf (diff) | |
download | netifd-17e453bd68b41780b6564dafa8358efc29a00930.tar.gz |
wireless: add back regular virtual interfaces on hotplug-add events as well
When hostapd does a DFS channel switch, it tears down all vifs except for the
primary one, which causes them got get dropped from the device configuration
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | wireless.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1506,13 +1506,16 @@ void wireless_device_hotplug_event(const char *name, bool add) int len; s = strstr(name, ".sta"); - if (!s) - return; + if (s) { + if (strchr(s + 4, '.')) + return; - if (strchr(s + 4, '.')) + len = s - name; + } else if (!device_find(name)) { + len = strlen(name); + } else { return; - - len = s - name; + } vlist_for_each_element(&wireless_devices, wdev, node) { vlist_for_each_element(&wdev->interfaces, vif, node) { |