Realtek r8168问题解决,有麻烦的看过来~

由于13.04内核的版本升高,造成r8168网卡无法正常安装驱动,会报如下错误:
Check old driver and unload it.
Build the module and install
/tmp/r8168-8.035.00/src/r8168_n.c:14545:1: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘rtl8168_init_board’
/tmp/r8168-8.035.00/src/r8168_n.c:14715:1: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘rtl8168_init_sequence’
/tmp/r8168-8.035.00/src/r8168_n.c:14968:1: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘rtl8168_init_one’
/tmp/r8168-8.035.00/src/r8168_n.c:15132:1: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘rtl8168_remove_one’
/tmp/r8168-8.035.00/src/r8168_n.c:17651:12: 错误: ‘rtl8168_init_one’未声明(不在函数内)
/tmp/r8168-8.035.00/src/r8168_n.c:17652:2: 错误: 隐式声明函数‘__devexit_p’ [-Werror=implicit-function-declaration]
/tmp/r8168-8.035.00/src/r8168_n.c:17652:25: 错误: ‘rtl8168_remove_one’未声明(不在函数内)
/tmp/r8168-8.035.00/src/r8168_n.c:17301:12: 警告: ‘rtl8168_poll’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:1368:1: 警告: ‘rtl8168_xmii_reset_pending’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:1383:1: 警告: ‘rtl8168_xmii_link_ok’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:1395:1: 警告: ‘rtl8168_xmii_reset_enable’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:1544:1: 警告: ‘rtl8168_link_option’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:1823:1: 警告: ‘rtl8168_set_speed_xmii’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:2151:13: 警告: ‘rtl8168_gset_xmii’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:2886:13: 警告: ‘rtl8168_get_mac_version’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:3002:1: 警告: ‘rtl8168_print_mac_version’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:3044:1: 警告: ‘rtl8168_hw_phy_config’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:13681:1: 警告: ‘rtl8168_release_board’定义后未使用 [-Wunused-function]
/tmp/r8168-8.035.00/src/r8168_n.c:14914:17: 警告: ‘rtl8168_try_msi’定义后未使用 [-Wunused-function]
cc1: some warnings being treated as errors
make[3]: *** [/tmp/r8168-8.035.00/src/r8168_n.o] 错误 1
make[2]: *** [module/tmp/r8168-8.035.00/src] 错误 2
make[1]: *** [modules] 错误 2
make: *** [modules] 错误 2

之前,Debian 好像也有这样的问题,但是解决了,找来了源码看~~修改了代码~于是就上网了~有需要的童鞋下载附件吧

:handshake