Can't use USB tethering

Phone is Xiaomi Mi 10 and it works perfectly on my personal computer so no USB cable problems. When I plug it in to TX2 and turn tethering ON 2 interfaces appear on ifconfig:

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b6:ae:6f:04:47:31  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b6:ae:6f:04:47:33  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Output of lshw -C network:

*-network:0               
       description: Ethernet interface
       physical id: 3
       logical name: rndis0
       serial: b6:ae:6f:04:47:31
       capabilities: ethernet physical
       configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=tegra-xudc link=no multicast=yes

    *-network:3
           description: Ethernet interface
           physical id: 6
           logical name: usb0
           serial: b6:ae:6f:04:47:33
           capabilities: ethernet physical
           configuration: broadcast=yes driver=g_ether driverversion=29-May-2008 firmware=tegra-xudc ip=192.168.42.111 link=no multicast=yes

As seen above it seems like the driver g_ether is being used but I think it should be using rndis_host since in my personal computer with Ubuntu Mate it works instantly by loading the rndis_host module. Besides that I can’t even find g_ether anywhere on the board.

I’ve tried to load rndis_host module with modprobe. It works but it is not used. Output of lsmod:

lsmod
Module                  Size  Used by
rndis_host             10756  0

Output of modinfo rndis_host is:

modinfo rndis_host
filename:       /lib/modules/4.9.140-tegra/kernel/drivers/net/usb/rndis_host.ko
license:        GPL
description:    USB Host side RNDIS driver
author:         David Brownell
alias:          usb:v*p*d*dc*dsc*dp*icE0isc01ip03in*
alias:          usb:v*p*d*dc*dsc*dp*icEFisc01ip01in*
alias:          usb:v*p*d*dc*dsc*dp*ic02isc02ipFFin*
alias:          usb:v1630p0042d*dc*dsc*dp*ic02isc02ipFFin*
depends:        
intree:         Y
vermagic:       4.9.140-tegra SMP preempt mod_unload modversions aarch64

Output of usb-devices shows that the phone is detected but no driver is loaded:

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2717 ProdID=ff88 Rev=04.19
S:  Manufacturer=Xiaomi
S:  Product=Mi 10
S:  SerialNumber=bb43e11
C:  #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=ef(misc ) Sub=04 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)

I have also run lsmod on my PC and found out this:

rndis_host             20480  0
cdc_ether              20480  1 rndis_host
usbnet                 45056  2 rndis_host,cdc_ether
mii                    20480  1 usbnet

So aparently there are this 3 other modules that I need but do not exist on my TX2. How can I make this work?

Thank you very much

Please apply this patch and see if it can work.

Hi, I’m sorry for my ignorance but how can I apply that patch? I cannot find cdc_ether.c nor rndis_host.c anywhere. Thanks.

They are kernel patch so you have to download the kernel source and rebuild the kernel.

Ok I understand. Is there anyway I can rebuild the kernel without having to reinstall everything? Maybe using dpkg could be possible?

Rebuilding the kernel does not require to erase the data. It is just replacing one binary on the device.

But if this kernel is not properly set, then it has chance to cause system die.