disable rndis if usb ethernet is also enabled

Disable USB RNDIS mode if USB Ethernet support is also enabled.  They are not compatible
This commit is contained in:
Alfonso Gamboa 2022-06-27 22:07:18 -07:00
parent d330294c1d
commit f42a38794e

View File

@ -350,7 +350,7 @@ if [[ "$ENABLE_USB_ETH" == "true" ]]; then
netloop eth0 netloop eth0
else else
echo "usb ethernet disabled" echo "USB Ethernet disabled"
fi fi
if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
@ -394,10 +394,13 @@ if [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
sleep 1 sleep 1
done done
else else
echo "usb direct disabled" echo "USB Direct disabled"
fi fi
if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
if [[ "$ENABLE_USB_ETH" == "true" ]] || [[ "$ENABLE_USB_DIRECT" == "true" ]]; then
echo "RNDIS is not compatible with ENABLE_USB_ETH or ENABLE_USB_DIRECT. Please enable only ENABLE_USB_RNDIS"
else
insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko insmod $KMOD_PATH/kernel/drivers/net/usb/usbnet.ko
insmod $KMOD_PATH/kernel/drivers/net/usb/cdc_ether.ko insmod $KMOD_PATH/kernel/drivers/net/usb/cdc_ether.ko
@ -414,8 +417,9 @@ if [[ "$ENABLE_USB_RNDIS" == "true" ]]; then
echo "wlan0 not ready yet..." echo "wlan0 not ready yet..."
sleep 1 sleep 1
done done
else fi
echo "usb direct disabled" else
echo "usb rndis disabled"
fi fi
if [[ "$ENABLE_WIREGUARD" == "true" ]]; then if [[ "$ENABLE_WIREGUARD" == "true" ]]; then