Linux USB网卡驱动安装

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

USB网卡需要相关的驱动才能使用

1. 下载相关的驱动程序,以 绿联(UGREEN)USB转RJ45网线接口USB2.0外置网口 为例,对应的Linux的驱动为:AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source.tar.bz2,

2. 解压 编译 安装

tar xjvf AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source.tar.bz2  #解压
cd AX88772C_772B_772A_760_772_178_Linux_Driver_v4.23.0_Source
make 
sudo make install # 安装到 /lib/modules/4.4.0-112-generic/kernel/drivers/net/usb/asix.ko

3. 动态加载模块 insmod  

sudo insmod  /lib/modules/4.4.0-112-generic/kernel/drivers/net/usb/asix.ko

报错:

Unknown symbol in module

查看错误信息:

dmesg |tail 

[1494771.981543] asix: Unknown symbol generic_mii_ioctl (err 0)
[1494771.981562] asix: Unknown symbol mii_ethtool_gset (err 0)
[1494944.261810] asix: Unknown symbol mii_ethtool_sset (err 0)
[1494944.261829] asix: Unknown symbol mii_link_ok (err 0)
[1494944.261881] asix: Unknown symbol mii_nway_restart (err 0)
[1494944.261906] asix: Unknown symbol generic_mii_ioctl (err 0)
[1494944.261926] asix: Unknown symbol mii_ethtool_gset (err 0)

查看模块asix.ko的依赖信息:

modinfo asix|grep depends

depends:        mii # 依赖模块mii

4.加载内核模块mii 

modprob  mii

然后 在insmod axis 模块

lsmod  列出已经加载的模块,

lsmod | grep asix

asix                   61440  0
mii                    16384  2 asix

最后 ifconfig 查看已有的显卡:

enx000ec6b493bf Link encap:Ethernet  HWaddr 00:0e:c6:b4:93:bf
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1525:8b8b:d3b4:a1c3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:572 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:53267 (53.2 KB)  TX bytes:9396 (9.3 KB) 

转载于:https://my.oschina.net/zhangwenwen/blog/3017119

你可能感兴趣的:(Linux USB网卡驱动安装)