From 02f08056bcbc5f014894b7edcea43f2ff822fd90 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 30 May 2020 12:01:08 +0200 Subject: mac80211: fix wifi teardown reverts part of the recent wifi reconf patch. Signed-off-by: John Crispin --- package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'package') diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index c184eef641..be637379e3 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 -- cgit v1.2.3