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,28 +394,32 @@ 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
insmod $KMOD_PATH/kernel/drivers/net/usb/rndis_host.ko insmod $KMOD_PATH/kernel/drivers/net/usb/rndis_host.ko
sleep 1 sleep 1
swap_enable swap_enable
#loop begin #loop begin
while true while true
do do
wpa_check usb0 wpa_check usb0
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