Network configuration reloaded to broken wifi state when wpad is installed
This happens only once after boot when wpad package is reinstalled. Subsequent updates do not have the same effect.
The problem is that something triggers reload of network once files are moved to location and synced. At the same time this reload fails to configure correctly wifi. We can fix it by just simply reloading network service.
To compare this is end of updater's trace output till the point wifi is disconnected.
INFO:transaction.lua:164 (fun):Running pre-install and pre-rm scripts and merging packages to root file system
DEBUG:backend.lua:817 (pkg_merge_control):Removing previous version control file wpad.prerm
DEBUG:backend.lua:817 (pkg_merge_control):Removing previous version control file wpad.control
DEBUG:backend.lua:817 (pkg_merge_control):Removing previous version control file wpad.postinst
DEBUG:backend.lua:817 (pkg_merge_control):Removing previous version control file wpad.list
DEBUG:backend.lua:817 (pkg_merge_control):Removing previous version control file wpad.files-sha256
DEBUG:backend.lua:840 (pkg_merge_control):Putting control file files-sha256 into place
DEBUG:src/lib/interpreter.c:326 (lua_run_generic):Util command: cp -Lpf /usr/share/updater/unpacked//updater-mlalPO/control/files-sha256 /usr/lib/opkg/info//wpad.files-sha256
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:840 (pkg_merge_control):Putting control file prerm into place
DEBUG:src/lib/interpreter.c:326 (lua_run_generic):Util command: cp -Lpf /usr/share/updater/unpacked//updater-mlalPO/control/prerm /usr/lib/opkg/info//wpad.prerm
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:840 (pkg_merge_control):Putting control file postinst into place
DEBUG:src/lib/interpreter.c:326 (lua_run_generic):Util command: cp -Lpf /usr/share/updater/unpacked//updater-mlalPO/control/postinst /usr/lib/opkg/info//wpad.postinst
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:840 (pkg_merge_control):Putting control file control into place
DEBUG:src/lib/interpreter.c:326 (lua_run_generic):Util command: cp -Lpf /usr/share/updater/unpacked//updater-mlalPO/control/control /usr/lib/opkg/info//wpad.control
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:766 (pkg_merge_files):Creating dir /
DEBUG:backend.lua:766 (pkg_merge_files):Creating dir /usr
DEBUG:backend.lua:766 (pkg_merge_files):Creating dir /usr/sbin
DEBUG:backend.lua:782 (pkg_merge_files):Installing file /usr/sbin/wpa_supplicant
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:782 (pkg_merge_files):Installing file /usr/sbin/hostapd
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
DEBUG:backend.lua:782 (pkg_merge_files):Installing file /usr/sbin/wpad
TRACE:src/lib/events.c:548 (run_command_a):Running command /tmp/updater-busybox-AhipiG/busybox
TRACE:src/lib/interpreter.c:791 (lua_sync):Sync
This is relevant output from syslog:
May 27 07:26:44 mox-home updater[7070]: transaction.lua:164 (fun): Running pre-install and pre-rm scripts and merging packages to root file system
May 27 07:26:44 mox-home netifd: Network device 'wlan0' link is down
May 27 07:26:44 mox-home hostapd: wlan0: INTERFACE-DISABLED
May 27 07:26:44 mox-home kernel: [ 429.647835] br-lan: port 7(wlan0) entered disabled state
May 27 07:26:44 mox-home kernel: [ 429.697850] device wlan0 left promiscuous mode
May 27 07:26:44 mox-home kernel: [ 429.702243] br-lan: port 7(wlan0) entered disabled state
May 27 07:26:45 mox-home kernel: [ 429.994043] mwifiex_sdio mmc0:0001:1: EVENT: BT coex wlan param update
May 27 07:26:45 mox-home kernel: [ 430.004065] br-lan: port 6(wlan1) entered disabled state
May 27 07:26:45 mox-home netifd: Network device 'wlan1' link is down
May 27 07:26:45 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:45 mox-home hostapd: wlan1: AP-STA-DISCONNECTED 88:ad:d2:26:0a:e8
May 27 07:26:45 mox-home hostapd: wlan1: INTERFACE-DISABLED
May 27 07:26:45 mox-home netifd: Network device 'wlang5' link is down
May 27 07:26:45 mox-home kernel: [ 430.142965] br-guest: port 2(wlang5) entered disabled state
May 27 07:26:45 mox-home kernel: [ 430.154374] device wlan1 left promiscuous mode
May 27 07:26:45 mox-home kernel: [ 430.158989] br-lan: port 6(wlan1) entered disabled state
May 27 07:26:45 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:45 mox-home kernel: [ 430.317906] device wlang5 left promiscuous mode
May 27 07:26:45 mox-home kernel: [ 430.322664] br-guest: port 2(wlang5) entered disabled state
May 27 07:26:45 mox-home updater[7070]: transaction.lua:235 (fun): Removing packages and leftover files
May 27 07:26:45 mox-home updater[7070]: transaction.lua:240 (fun): Running post-install and post-rm scripts
May 27 07:26:45 mox-home updater[7070]: src/lib/logging.c:204 (log_subproc_open): Running postinst of wpad
May 27 07:26:45 mox-home netifd: Network device 'wlang2' link is down
May 27 07:26:45 mox-home kernel: [ 430.382172] br-guest: port 3(wlang2) entered disabled state
May 27 07:26:45 mox-home kernel: [ 430.419513] device wlang2 left promiscuous mode
May 27 07:26:45 mox-home kernel: [ 430.424012] br-guest: port 3(wlang2) entered disabled state
May 27 07:26:46 mox-home kernel: [ 431.016736] mwifiex_sdio mmc0:0001:1: CMD_RESP: cmd 0x20 error, result=0x1
May 27 07:26:46 mox-home mac80211: Failed command: iw phy phy1 set antenna 0xffffffff 0xffffffff
May 27 07:26:46 mox-home netifd: radio1 (7286): command failed: Not supported (-95)
May 27 07:26:46 mox-home mac80211: Failed command: iw phy phy1 set antenna_gain 0
May 27 07:26:46 mox-home hostapd: Configuration file: /var/run/hostapd-phy0.conf
May 27 07:26:46 mox-home updater[7070]: transaction.lua:254 (fun): Cleaning up control files
May 27 07:26:47 mox-home updater[7070]: src/lib/logging.c:204 (log_subproc_open): Executing postupdate hook: 20_update_alternatives.sh
May 27 07:26:47 mox-home kernel: [ 432.339540] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16 peers: 127 tid: 256
May 27 07:26:47 mox-home updater[7070]: src/lib/logging.c:204 (log_subproc_open): Executing postupdate hook: 95_schnapps.sh
May 27 07:26:47 mox-home kernel: [ 432.356834] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
May 27 07:26:47 mox-home kernel: [ 432.363132] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424 sw-crypt: 0 ct-sta: 0'
May 27 07:26:47 mox-home kernel: [ 432.371808] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 20904 iram: 26056'
May 27 07:26:47 mox-home kernel: [ 432.438558] ath10k_pci 0000:00:00.0: pdev param 0 not supported by firmware
May 27 07:26:47 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:47 mox-home kernel: [ 432.453576] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
May 27 07:26:47 mox-home hostapd: wlan0: INTERFACE-ENABLED
May 27 07:26:47 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:47 mox-home hostapd: wlan0: INTERFACE-DISABLED
May 27 07:26:47 mox-home hostapd: nl80211: Could not configure driver mode
May 27 07:26:47 mox-home hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
May 27 07:26:47 mox-home hostapd: nl80211 driver initialization failed.
May 27 07:26:47 mox-home hostapd: wlan0: interface state UNINITIALIZED->DISABLED
May 27 07:26:47 mox-home hostapd: wlang5: AP-DISABLED
May 27 07:26:47 mox-home hostapd: wlang5: CTRL-EVENT-TERMINATING
May 27 07:26:47 mox-home hostapd: hostapd_free_hapd_data: Interface wlang5 wasn't started
May 27 07:26:47 mox-home hostapd: wlan0: AP-DISABLED
May 27 07:26:47 mox-home hostapd: wlan0: CTRL-EVENT-TERMINATING
May 27 07:26:47 mox-home hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
May 27 07:26:47 mox-home kernel: [ 432.629264] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
May 27 07:26:47 mox-home hostapd: wlan1: INTERFACE-ENABLED
May 27 07:26:47 mox-home netifd: radio0 (7260): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process 4048 path (/proc/4048/exe)
May 27 07:26:47 mox-home netifd: radio0 (7260): Device setup failed: HOSTAPD_START_FAILED
May 27 07:26:47 mox-home hostapd: Configuration file: /var/run/hostapd-phy1.conf
May 27 07:26:48 mox-home updater[7070]: src/lib/logging.c:204 (log_subproc_open): Executing postupdate hook: 99_approvals_cleanup
May 27 07:26:49 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:49 mox-home kernel: [ 434.140903] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
May 27 07:26:49 mox-home hostapd: wlan1: INTERFACE-DISABLED
May 27 07:26:49 mox-home kernel: [ 434.160286] mwifiex_sdio mmc0:0001:1: EVENT: BT coex wlan param update
May 27 07:26:49 mox-home hostapd: wlan1: INTERFACE-ENABLED
May 27 07:26:49 mox-home kernel: [ 434.182154] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
May 27 07:26:50 mox-home kernel: [ 435.685405] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
May 27 07:26:50 mox-home kernel: [ 435.704431] br-lan: port 6(wlan1) entered blocking state
May 27 07:26:50 mox-home kernel: [ 435.710095] br-lan: port 6(wlan1) entered disabled state
May 27 07:26:50 mox-home kernel: [ 435.717231] device wlan1 entered promiscuous mode
May 27 07:26:50 mox-home kernel: [ 435.722846] br-lan: port 6(wlan1) entered blocking state
May 27 07:26:50 mox-home kernel: [ 435.728518] br-lan: port 6(wlan1) entered forwarding state
May 27 07:26:50 mox-home hostapd: ctrl_iface exists and seems to be in use - cannot override it
May 27 07:26:50 mox-home hostapd: Delete '/var/run/hostapd/wlan1' manually if it is not used anymore
May 27 07:26:50 mox-home hostapd: Failed to setup control interface for wlan1
May 27 07:26:50 mox-home hostapd: wlan1: Unable to setup interface.
May 27 07:26:50 mox-home hostapd: wlan1: interface state UNINITIALIZED->DISABLED
May 27 07:26:50 mox-home hostapd: wlang2: AP-DISABLED
May 27 07:26:50 mox-home hostapd: wlang2: CTRL-EVENT-TERMINATING
May 27 07:26:50 mox-home hostapd: hostapd_free_hapd_data: Interface wlang2 wasn't started
May 27 07:26:50 mox-home hostapd: wlan1: AP-DISABLED
May 27 07:26:50 mox-home hostapd: wlan1: CTRL-EVENT-TERMINATING
May 27 07:26:50 mox-home hostapd: hostapd_free_hapd_data: Interface wlan1 wasn't started
May 27 07:26:50 mox-home hostapd: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
May 27 07:26:50 mox-home kernel: [ 435.767242] device wlan1 left promiscuous mode
May 27 07:26:50 mox-home kernel: [ 435.772114] br-lan: port 6(wlan1) entered disabled state
May 27 07:26:50 mox-home netifd: radio1 (7286): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process 4425 path (/proc/4425/exe)
May 27 07:26:50 mox-home netifd: radio1 (7286): Device setup failed: HOSTAPD_START_FAILED
May 27 07:26:51 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:51 mox-home hostapd: Failed to set beacon parameters
May 27 07:26:55 mox-home hostapd: Failed to set beacon parameters