Add support for auto detecting the USB Ethernet adapter, and loading its respective driver

This commit is contained in:
Scott Kilau 2022-06-18 01:15:37 -05:00
parent e5fc16696d
commit 6ecc33efa3
2 changed files with 10 additions and 4 deletions

View File

@ -218,9 +218,16 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
for i in $(echo "$ENABLE_USB_ETH_MODULES" | tr "," "\n")
do
insmod $KMOD_PATH/kernel/drivers/net/usb/$i.ko
for DEVICE in `lsusb | awk '{print $6}'| tr '[:lower:]' '[:upper:]'`; do
case $DEVICE in
'0B95:1780' | '0B95:7720' | '0B95:772B')
echo "Loading ASIX Ethernet driver..."
modprobe asix
;;
'0B95:1790')
echo "Loading AX88179 Gigabit Ethernet driver..."
modprobe ax88179_178a
esac
done
swap_enable

View File

@ -12,7 +12,6 @@ WEB_CAM_FPS_RATE="25"
CUSTOM_HOSTNAME="WCV3"
ENABLE_USB_ETH="false"
ENABLE_USB_ETH_MODULES="asix"
ENABLE_USB_DIRECT="false"
USB_DIRECT_MAC_ADDR="02:01:02:03:04:08"