Merge branch 'master' into DetectAndAutoLoadEthernetDrivers

This commit is contained in:
Scott Kilau
2022-06-24 09:22:26 -05:00
50 changed files with 214 additions and 75 deletions

View File

@@ -42,20 +42,20 @@ fi
## REPLACE STOCK MODULES
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]]; then
if [[ "$ENABLE_RTL8189FS_DRIVER" == "true" ]] || [[ "$ENABLE_RTL8189FS_DRIVER" == "" ]]; then
#V2/V3 ONLY [DB3 untested]
echo "Enable RTL8189FS"
echo "Enable 8189fs"
if [ -f /opt/wz_mini/tmp/.WYZEC1-JZ ]; then
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
sed -i 's/\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=3/g' /opt/wz_mini/tmp/.storage/app_init.sh
elif [ -f /opt/wz_mini/tmp/.WYZE_CAKP2JFUS ]; then
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0/g' /opt/wz_mini/tmp/.storage/app_init.sh
sed -i 's/\/system\/driver\/rtl8189ftv.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/8189fs.ko rtw_power_mgnt=0 rtw_enusbss=0 rtw_drv_log_level=3/g' /opt/wz_mini/tmp/.storage/app_init.sh
fi
fi
if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]]; then
echo "Enable atbm603x_wifi_sdio_24M"
if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]] || [[ "$ENABLE_ATBM603X_DRIVER" == "" ]]; then
echo "Enable atbm603x_wifi_sdio"
if [ -f /opt/wz_mini/tmp/.T31 ]; then
sed -i 's/\/system\/driver\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio_24M.ko/g' /opt/wz_mini/tmp/.storage/app_init.sh
sed -i 's/\/system\/driver\/atbm603x_wifi_sdio.ko/\/opt\/wz_mini\/lib\/modules\/3.10.14\_\_isvp_swan_1.0\_\_\/extra\/atbm603x_wifi_sdio.ko/g' /opt/wz_mini/tmp/.storage/app_init.sh
fi
fi

View File

@@ -125,7 +125,7 @@ eth_wlan_up() {
# If running with Interface Bonding enabled, kill any existing
# wpa_supplicant that might be running and spawn our own instead
if [[ "$BONDING_ENABLED" == "true" ]] && [[ "$ENABLE_USB_ETH" == "true" ]]; then
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
/opt/wz_mini/bin/busybox killall wpa_supplicant
wpa_supplicant -D nl80211 -i wlanold -c /tmp/wpa_supplicant.conf -B -s
fi
@@ -163,7 +163,7 @@ wlanold_check() {
eth_wlan_up
else
echo "wlanold doesn't exist"
if [[ "$BONDING_ENABLED" == "true" ]] && [[ "$ENABLE_USB_ETH" == "true" ]]; then
if [[ "$BONDING_ENABLED" == "true" ]] && ([[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]); then
rename_interface_and_setup_bonding bond0 "$BONDING_PRIMARY_INTERFACE" "$BONDING_SECONDARY_INTERFACE"
else
rename_interface $1
@@ -369,6 +369,27 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
sleep 1
if [[ "$BONDING_ENABLED" == "true" ]]; then
if [[ "$BONDING_LINK_MONITORING_FREQ_MS" == "" ]]; then
"$BONDING_LINK_MONITORING_FREQ_MS" = "100"
fi
if [[ "$BONDING_DOWN_DELAY_MS" == "" ]]; then
"$BONDING_DOWN_DELAY_MS" = "5000"
fi
if [[ "$BONDING_UP_DELAY_MS" == "" ]]; then
"$BONDING_UP_DELAY_MS" = "5000"
fi
if [[ "$BONDING_PRIMARY_INTERFACE" == "" ]]; then
"$BONDING_PRIMARY_INTERFACE" = "usb0"
fi
if [[ "$BONDING_SECONDARY_INTERFACE" == "" ]]; then
"$BONDING_SECONDARY_INTERFACE" = "wlan0"
fi
# Insert the bonding driver into the kernel
insmod $KMOD_PATH/kernel/drivers/net/bonding/bonding.ko mode=active-backup miimon="$BONDING_LINK_MONITORING_FREQ_MS" downdelay="$BONDING_DOWN_DELAY_MS" updelay="$BONDING_UP_DELAY_MS" primary="$BONDING_PRIMARY_INTERFACE"
fi
swap_enable
#loop begin
@@ -662,6 +683,11 @@ if [[ "$NIGHT_DROP_DISABLE" == "true" ]]; then
touch /opt/wz_mini/tmp/.nd
fi
if [[ "$ENABLE_ATBM603X_DRIVER" == "true" ]]; then
#Reduce dmesg log spam by driver
echo "LOG_ERR=OFF LOG_WARN=ON LOG_LMAC=ON LOG_SCAN=OFF" > /sys/module/atbm603x_wifi_sdio/atbmfs/atbm_printk_mask
fi
hostname_set
touch /opt/wz_mini/tmp/.wz_user_firstrun
pkill -f dumpload #Kill dumpload so it won't waste cpu or ram gathering cores and uploading them when something crashes