From 167588da6f642c987158045306f30e48e596ca4c Mon Sep 17 00:00:00 2001 From: gtxaspec Date: Tue, 19 Sep 2023 17:31:38 -0700 Subject: [PATCH] overlay-files: Refactor wlan0 ifup Networking Configuration - Eliminated deprecated `wext` option from the wpa_supplicant invocation to align with contemporary wireless driver standards, preventing wireless network association delays. - Incorporated a 15-second timeout within udhcpc_opts, ensuring adequate time for the device to aquire a dhcp lease from the network. - Transitioned all wpa_supplicant parameters to the `pre-up` directive, ensuring wpa_supplicant initialization precedes DHCP client execution. Collectively, these modifications optimize the DHCP lease acquisition process, enhancing the device's network initialization speed. --- general/overlay/etc/network/interfaces.d/wlan0 | 8 +++++--- general/overlay/etc/wireless/interfaces/wlan0 | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/general/overlay/etc/network/interfaces.d/wlan0 b/general/overlay/etc/network/interfaces.d/wlan0 index 1351471f..4b07b950 100644 --- a/general/overlay/etc/network/interfaces.d/wlan0 +++ b/general/overlay/etc/network/interfaces.d/wlan0 @@ -1,5 +1,7 @@ +auto wlan0 iface wlan0 inet dhcp - post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf - post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf - post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf + udhcpc_opts -t 15 + pre-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf + pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf + pre-up wpa_supplicant -D nl80211 -i wlan0 -c /tmp/wpa_supplicant.conf -B post-down killall -q wpa_supplicant diff --git a/general/overlay/etc/wireless/interfaces/wlan0 b/general/overlay/etc/wireless/interfaces/wlan0 index a5b8014f..4b07b950 100644 --- a/general/overlay/etc/wireless/interfaces/wlan0 +++ b/general/overlay/etc/wireless/interfaces/wlan0 @@ -1,6 +1,7 @@ auto wlan0 iface wlan0 inet dhcp - post-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf - post-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf - post-up wpa_supplicant -B -i wlan0 -D nl80211,wext -c /tmp/wpa_supplicant.conf + udhcpc_opts -t 15 + pre-up wpa_passphrase "$(fw_printenv -n wlanssid || echo OpenIPC)" "$(fw_printenv -n wlanpass || echo OpenIPC12345)" > /tmp/wpa_supplicant.conf + pre-up sed -i '2i \\tscan_ssid=1' /tmp/wpa_supplicant.conf + pre-up wpa_supplicant -D nl80211 -i wlan0 -c /tmp/wpa_supplicant.conf -B post-down killall -q wpa_supplicant