mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Set the WiFi regulatory domain properly on the Elipsa
No idea how restrictive the defaults are, but stuff is weird in the 5G band, so, do it right.
This commit is contained in:
@@ -33,11 +33,23 @@ fi
|
||||
usleep 250000
|
||||
# NOTE: Used to be exported in WIFI_MODULE_PATH before FW 4.23
|
||||
if ! grep -q "${WIFI_MODULE}" "/proc/modules"; then
|
||||
# Set the Wi-Fi regulatory domain properly if necessary...
|
||||
WIFI_COUNTRY_CODE_PARM=""
|
||||
if grep -q "^WifiRegulatoryDomain=" "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf"; then
|
||||
WIFI_COUNTRY_CODE="$(grep "^WifiRegulatoryDomain=" "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d '=' -f2)"
|
||||
|
||||
case "${WIFI_MODULE}" in
|
||||
"8821cs")
|
||||
WIFI_COUNTRY_CODE_PARM="rtw_country_code=${WIFI_COUNTRY_CODE}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -e "/drivers/${PLATFORM}/wifi/${WIFI_MODULE}.ko" ]; then
|
||||
insmod "/drivers/${PLATFORM}/wifi/${WIFI_MODULE}.ko"
|
||||
insmod "/drivers/${PLATFORM}/wifi/${WIFI_MODULE}.ko" "${WIFI_COUNTRY_CODE_PARM}"
|
||||
elif [ -e "/drivers/${PLATFORM}/${WIFI_MODULE}.ko" ]; then
|
||||
# NOTE: Modules are unsorted on Mk. 8
|
||||
insmod "/drivers/${PLATFORM}/${WIFI_MODULE}.ko"
|
||||
insmod "/drivers/${PLATFORM}/${WIFI_MODULE}.ko" "${WIFI_COUNTRY_CODE_PARM}"
|
||||
fi
|
||||
fi
|
||||
# Race-y as hell, don't try to optimize this!
|
||||
|
||||
Reference in New Issue
Block a user