diff options
author | John Crispin <john@phrozen.org> | 2020-03-27 12:40:23 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2020-03-27 16:18:57 +0100 |
commit | 22d896eb218765f362587df6008f67018435d6a5 (patch) | |
tree | d194314e98eb7735b171e2b16e896a09c86c372b /package | |
parent | 038318f766a7bd123c4fb413e9a2947445f441d4 (diff) | |
download | upstream-22d896eb218765f362587df6008f67018435d6a5.tar.gz upstream-22d896eb218765f362587df6008f67018435d6a5.tar.bz2 upstream-22d896eb218765f362587df6008f67018435d6a5.zip |
hostapd: fix no_reload logic
the code would unconditionally tear down all interfaces upon a reconf.
This should only be done when the reconf call fails.
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index f59c498215..7348db0354 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -954,8 +954,10 @@ drv_mac80211_setup() { [ "${NEW_MD5}" = "${OLD_MD5}" ] || { ubus call hostapd.$primary_ap reload no_reload=$? - mac80211_vap_cleanup hostapd "${OLDAPLIST}" - [ -n "${NEWAPLIST}" ] && mac80211_iw_interface_add "$phy" "${NEWAPLIST%% *}" __ap || return + if [ "$no_reload" != "0" ]; then + mac80211_vap_cleanup hostapd "${OLDAPLIST}" + [ -n "${NEWAPLIST}" ] && mac80211_iw_interface_add "$phy" "${NEWAPLIST%% *}" __ap || return + fi } fi if [ "$no_reload" != "0" ]; then |