aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index ffb3662d04..0b7a84d7c9 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -1190,6 +1190,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}