Browse Source

mac80211: fix wifi teardown

reverts part of the recent wifi reconf patch.

Signed-off-by: John Crispin <[email protected]>
John Crispin 5 years ago
parent
commit
02f08056bc
1 changed files with 6 additions and 4 deletions
  1. 6 4
      package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

+ 6 - 4
package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

@@ -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