Skip to content

Commit

Permalink
mac80211: print an error if wifi teardown fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Cantor authored and nbd168 committed Jun 28, 2021
1 parent d515f6b commit 3933e29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
Expand Up @@ -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}
Expand Down

0 comments on commit 3933e29

Please sign in to comment.