2016-09-01 07:05:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Load wifi modules and enable wifi.
|
|
|
|
|
2017-04-09 08:42:16 +00:00
|
|
|
lsmod | grep -q sdio_wifi_pwr || insmod "/drivers/${PLATFORM}/wifi/sdio_wifi_pwr.ko"
|
2018-05-10 10:26:07 +00:00
|
|
|
# Moar sleep!
|
|
|
|
usleep 250000
|
2017-02-20 08:11:16 +00:00
|
|
|
# WIFI_MODULE_PATH = /drivers/$PLATFORM/wifi/$WIFI_MODULE.ko
|
2017-04-09 08:42:16 +00:00
|
|
|
lsmod | grep -q "${WIFI_MODULE}" || insmod "${WIFI_MODULE_PATH}"
|
2018-04-18 07:09:58 +00:00
|
|
|
# Race-y as hell, don't try to optimize this!
|
|
|
|
sleep 1
|
2016-09-01 07:05:40 +00:00
|
|
|
|
2018-05-01 12:49:37 +00:00
|
|
|
ifconfig "${INTERFACE}" up
|
|
|
|
[ "$WIFI_MODULE" != "8189fs" ] && wlarm_le -i "${INTERFACE}" up
|
2016-09-01 07:05:40 +00:00
|
|
|
|
2017-04-11 09:28:01 +00:00
|
|
|
pidof wpa_supplicant >/dev/null \
|
|
|
|
|| env -u LD_LIBRARY_PATH \
|
2018-05-01 12:49:37 +00:00
|
|
|
wpa_supplicant -D wext -s -i "${INTERFACE}" -O /var/run/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B
|