LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Realtek r8168 kernel module errors on kernel 3.9.4 (https://www.linuxquestions.org/questions/linux-hardware-18/realtek-r8168-kernel-module-errors-on-kernel-3-9-4-a-4175465154/)

misson20000 06-07-2013 03:38 PM

Realtek r8168 kernel module errors on kernel 3.9.4
 
I have never had a good time with my Realtek r8168 network card, but I am stuck with it. I got it working... decently on my Ubuntu system by downloading and compiling the official realtek kernel module, but I cannot do the same on my new LFS system (Both Ubuntu and LFS run on the same machine, here). I tried enabling the r8169 kernel module in menuconfig, but nothing recognizes my network card, and when booting I get the messages "face wlan0 does not exist" and "face eth0 does not exist". My /etc/udev/rules.d/70-persistent-net-rules looks like:
Code:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# net device rtl8192ce
ACTION=="add", SUBSYSTEM=="net", SYSFS{address}=="7c:e9:d3:f2:86:06", NAME="wlan0"

What I would like to do is compile the official kernel module, but I get the following errors when I try to compile it:
Code:

/sources/r8168-8.035.00/src/r8168_n.c:14545:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_board’
/sources/r8168-8.035.00/src/r8168_n.c:14715:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_sequence’
/sources/r8168-8.035.00/src/r8168_n.c:14968:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_init_one’
/sources/r8168-8.035.00/src/r8168_n.c:15132:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtl8168_remove_one’
/sources/r8168-8.035.00/src/r8168_n.c:17651:12: error: ‘rtl8168_init_one’ undeclared here (not in a function)
/sources/r8168-8.035.00/src/r8168_n.c:17652:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/sources/r8168-8.035.00/src/r8168_n.c:17652:25: error: ‘rtl8168_remove_one’ undeclared here (not in a function)

I looked in the source code, and discovered that the compiler could not find "__devinit" and similar macros. After a bit of research, I discovered that these macros were removed from linux/init.h in version 3.8
How can I get this driver working, or how can I get my network working at all? Why doesn't the r8169 kernel module recognize my network card? Or does it? How can I tell?

business_kid 06-09-2013 11:48 AM

IIRC, that driver is in the 'Staging drivers' in recent kernels. These are drivers out there not regarded as of kernel quality. Any of them I have used compile flawlessly.


All times are GMT -5. The time now is 04:56 PM.