1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 20:23:53 +02:00

mac80211: print an error if wifi teardown fails

drv_mac80211_teardown fails silently if the device to be torn down is
not defined.  This commit prints an error message.

branches affected: trunk, 21.02

Signed-off-by: Bob Cantor <coxede6557@w3boats.com>
(cherry-picked from commit 3933e29d1b)
This commit is contained in:
Bob Cantor 2021-06-25 04:14:47 +10:00 committed by Felix Fietkau
parent 9302e63d1a
commit 6f13a39035

View File

@ -1076,6 +1076,10 @@ drv_mac80211_teardown() {
json_select data
json_get_vars phy
json_select ..
[ -n "$phy" ] || {
echo "Bug: PHY is undefined for device '$1'"
return 1
}
mac80211_interface_cleanup "$phy"
uci -q -P /var/state revert wireless._${phy}