mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
9302e63d1a
When wifi is turned off, drv_mac80211_teardown sometimes fails (silently)
because the device to be torn down is not defined.
This situation arises if drv_mac80211_setup was called twice when
wifi was turned on.
This commit ensures that the device to be torn down is always defined
in drv_mac80211_teardown.
Steps to reproduce:
1) Use /sbin/wifi to turn on wifi.
uci set wireless.@wifi-iface[0].disabled=0
uci set wireless.@wifi-device[0].disabled=0
uci commit
wifi
2) Use /sbin/wifi to turn off wifi.
uci set wireless.@wifi-device[0].disabled=1
uci commit
wifi
3) Observe that wifi is still up.
branches affected: trunk, 21.02
Signed-off-by: Bob Cantor <coxede6557@w3boats.com>
(cherry-picked from commit
|
||
---|---|---|
.. | ||
acx-mac80211 | ||
ath10k-ct | ||
bcm27xx-gpu-fw | ||
bcm63xx-cfe | ||
broadcom-wl | ||
button-hotplug | ||
cryptodev-linux | ||
dtc/patches | ||
exfat | ||
gpio-button-hotplug | ||
gpio-nct5104d | ||
gpio-nxp-74hc153 | ||
hwmon-gsc | ||
lantiq | ||
linux | ||
mac80211 | ||
mt76 | ||
mt7621-qtn-rgmii | ||
mwlwifi | ||
nat46 | ||
om-watchdog | ||
rtc-rv5c386a | ||
rtl8812au-ct | ||
trelay |