Add wifi support to Cervantes Touch Light devices (#12148)

This commit is contained in:
Jose San Pedro authored and GitHub committed 2024-10-06 17:39:58 +02:00
1 parent 80975ea4b0
commit 93935f34ef
2 files changed
+21 -4

No files matched your search

+6 -1
View File
@@ -1,6 +1,11 @@
#!/bin/sh
PCB_ID=$(/usr/bin/ntxinfo /dev/mmcblk0 | grep pcb | cut -d ":" -f2)
# disable wifi and remove all modules
killall udhcpc wpa_supplicant 2>/dev/null
ifconfig eth0 down 2>/dev/null
modprobe -r 8189fs 2>/dev/null
if [ "${PCB_ID}" -ne 22 ] && [ "${PCB_ID}" -ne 23 ]; then #For pcb_id==22 or 23 we avoid removing the module as it's known to freeze the wifi subsystem
MODULE="8189fs"
modprobe -r ${MODULE} 2>/dev/null
fi
+15 -3
View File
@@ -6,14 +6,26 @@
# Do not run this script twice (ie: when no wireless is available or wireless
# association to ap failed.
# select wifi driver based on pcb.
PCB_ID=$(/usr/bin/ntxinfo /dev/mmcblk0 | grep pcb | cut -d ":" -f2)
if [ "${PCB_ID}" -eq 22 ] || [ "${PCB_ID}" -eq 23 ]; then
MODULE="dhd"
WPA_DRIVER="nl80211"
else
MODULE="8189fs"
WPA_DRIVER="wext"
fi
./disable-wifi.sh
if ! lsmod | grep -q 8189fs; then
modprobe 8189fs
if ! lsmod | grep -q ${MODULE}; then
modprobe ${MODULE}
sleep 1
fi
ifconfig eth0 up
sleep 1
wpa_supplicant -i eth0 -C /var/run/wpa_supplicant -B -D wext 2>/dev/null
wpa_supplicant -i eth0 -C /var/run/wpa_supplicant -B -D ${WPA_DRIVER} 2>/dev/null
sleep 1