mac80211: fix wifi teardown
authorJohn Crispin <john@phrozen.org>
Sat, 30 May 2020 10:01:08 +0000 (12:01 +0200)
committerJohn Crispin <john@phrozen.org>
Sat, 30 May 2020 10:01:08 +0000 (12:01 +0200)
reverts part of the recent wifi reconf patch.

Signed-off-by: John Crispin <john@phrozen.org>
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

index c184eef64103227f1194e3d82e91d670d45c77b8..be637379e30ce8503dade96f56d9cb7cb4672b19 100644 (file)
@@ -1041,10 +1041,12 @@ list_phy_interfaces() {
 drv_mac80211_teardown() {
        wireless_process_kill_all
 
-       for phy in $(ls /sys/class/ieee80211/); do
-               mac80211_interface_cleanup "$phy"
-               uci -q -P /var/state revert wireless._${phy}
-       done
+       json_select data
+       json_get_vars phy
+       json_select ..
+
+       mac80211_interface_cleanup "$phy"
+       uci -q -P /var/state revert wireless._${phy}
 }
 
 add_driver mac80211