From: John Crispin Date: Sat, 30 May 2020 10:01:08 +0000 (+0200) Subject: mac80211: fix wifi teardown X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Frmilecki.git;a=commitdiff_plain;h=02f08056bcbc5f014894b7edcea43f2ff822fd90 mac80211: fix wifi teardown reverts part of the recent wifi reconf patch. Signed-off-by: John Crispin --- diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index c184eef6410..be637379e30 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/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