LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How to install Realtek RTL8180 Drivers (https://www.linuxquestions.org/questions/linux-hardware-18/how-to-install-realtek-rtl8180-drivers-447424/)

darkalien_fc5 05-22-2006 02:07 PM

How to install Realtek RTL8180 Drivers
 
Hey everyone,

not too long ago, I posted a thread regarding ndiswrapper for the RTL8180 chipset. By heading over the the Realtek website, I saw they have a kernel 2.6.x drivers.

So I downloaded it, and extracted it.

I did the make command, and it gave me this:

Code:

[root@localhost rtl8180]# make
make -C /lib/modules/2.6.16-1.2111_FC5/build SUBDIRS=/root/Desktop/rtl8180 MODVERDIR=/root/Desktop/rtl8180 modules
make[1]: Entering directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'
  CC [M]  /root/Desktop/rtl8180/r8180_pci_init.o
/root/Desktop/rtl8180/r8180_pci_init.c: In function ‘rtl8180_pci_probe’:
/root/Desktop/rtl8180/r8180_pci_init.c:146: error: ‘struct pci_dev’ has no member n amed ‘slot_name’
/root/Desktop/rtl8180/r8180_pci_init.c:150: error: ‘struct pci_dev’ has no member n amed ‘slot_name’
make[2]: *** [/root/Desktop/rtl8180/r8180_pci_init.o] Error 1
make[1]: *** [_module_/root/Desktop/rtl8180] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'
make: *** [modules] Error 2

By doing some searching, I found that this error was due to the "if" script in the r8180_pci_init.c file.
Here's what I did to fix it:

Original code:
Code:

        //-----------------------------------------------------------------------------
        // PCI resources: including PCI configuration space and IRQ number.
        //-----------------------------------------------------------------------------
#ifdef RTL_IO_MAP

        pio_start = (unsigned long)pci_resource_start (pdev, 0);
        pio_len = (unsigned long)pci_resource_len (pdev, 0);
        pio_flags = (unsigned long)pci_resource_flags (pdev, 0);

        if (!(pio_flags & IORESOURCE_IO)) {
                DPRINTK_OUTINFO("%s: region #0 not a PIO resource, aborting\n", pdev->slot_name);
                goto fail;
        }
        else{
                DPRINTK_OUTINFO("%s: region #0 IS a PIO resource!\n", pdev->slot_name);
        }

        DPRINTK_OUTINFO("request_region(0x%08lx,0x%08lx) !\n", pio_start,pio_len );
        if( ! request_region( pio_start, pio_len, rtl8180_driver_name ) ){
                DPRINTK_OUTINFO("request_region failed!\n");
                goto fail;
        }

        ioaddr = pio_start;
        dev->base_addr = ioaddr; // device I/O address

#else
        pmem_start = pci_resource_start(pdev, 1);
        pmem_len = pci_resource_len(pdev, 1);
        pmem_flags = pci_resource_flags (pdev, 1);

        if (!(pmem_flags & IORESOURCE_MEM)) {
                DPRINTK_OUTINFO("%s: region #1 not a MMIO resource, aborting\n", pdev->slot_name);
                goto fail;
        }
        else{
                DPRINTK_OUTINFO("%s: region #0 IS a MMIO resource!\n", pdev->slot_name);
        }

        DPRINTK_OUTINFO("request_mem_region(0x%08lx,0x%08lx) !\n", pmem_start,pmem_len );
        if( ! request_mem_region( pmem_start, pmem_len, rtl8180_driver_name ) ) {
                DPRINTK_OUTINFO("request_mem_region failed!\n");
                goto fail;
        }

Mine:

Code:

//-----------------------------------------------------------------------------
        // PCI resources: including PCI configuration space and IRQ number.
        //-----------------------------------------------------------------------------
#ifdef RTL_IO_MAP

        pio_start = (unsigned long)pci_resource_start (pdev, 0);
        pio_len = (unsigned long)pci_resource_len (pdev, 0);
        pio_flags = (unsigned long)pci_resource_flags (pdev, 0);

        //if (!(pio_flags & IORESOURCE_IO)) {
                //DPRINTK_OUTINFO("%s: region #0 not a PIO resource, aborting\n", pdev->slot_name);
                //goto fail;
        //}
        //else{
                //DPRINTK_OUTINFO("%s: region #0 IS a PIO resource!\n", pdev->slot_name);
        //}

        DPRINTK_OUTINFO("request_region(0x%08lx,0x%08lx) !\n", pio_start,pio_len );
        if( ! request_region( pio_start, pio_len, rtl8180_driver_name ) ){
                DPRINTK_OUTINFO("request_region failed!\n");
                goto fail;
        }

        ioaddr = pio_start;
        dev->base_addr = ioaddr; // device I/O address

#else
        pmem_start = pci_resource_start(pdev, 1);
        pmem_len = pci_resource_len(pdev, 1);
        pmem_flags = pci_resource_flags (pdev, 1);

        //if (!(pmem_flags & IORESOURCE_MEM)) {
                //DPRINTK_OUTINFO("%s: region #1 not a MMIO resource, aborting\n", pdev->slot_name);
                //goto fail;
        //}
        //else{
                //DPRINTK_OUTINFO("%s: region #0 IS a MMIO resource!\n", pdev->slot_name);
        //}

        DPRINTK_OUTINFO("request_mem_region(0x%08lx,0x%08lx) !\n", pmem_start,pmem_len );
        if( ! request_mem_region( pmem_start, pmem_len, rtl8180_driver_name ) ) {
                DPRINTK_OUTINFO("request_mem_region failed!\n");
                goto fail;
        }

What I did is disable the if scripts.
Now when I do "make", here's what I get:

Code:

[root@localhost rtl8180]# make
make -C /lib/modules/2.6.16-1.2111_FC5/build SUBDIRS=/root/Desktop/rtl8180 MODVERDIR=/root/Desktop/rtl8180 modules
make[1]: Entering directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'
  CC [M]  /root/Desktop/rtl8180/r8180_pci_init.o
  LD [M]  /root/Desktop/rtl8180/open8180.o
  Building modules, stage 2.
  MODPOST
*** Warning: "rtl8180_remove" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_init" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_open" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_register_netdev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_get_stats" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_xmit" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_alloc_wlandev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_unregister_netdev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_close" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_ioctl" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_set_multicast_list" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "wlan_debug" [/root/Desktop/rtl8180/open8180.ko] undefined!
  LD [M]  /root/Desktop/rtl8180/open8180.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.16-1.2111_FC5-x86_64'

My question is this :
What do all these warnings mean?

Code:

*** Warning: "rtl8180_remove" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_init" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_open" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_register_netdev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_get_stats" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_xmit" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_alloc_wlandev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl_unregister_netdev" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_close" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_ioctl" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "rtl8180_set_multicast_list" [/root/Desktop/rtl8180/open8180.ko] undefined!
*** Warning: "wlan_debug" [/root/Desktop/rtl8180/open8180.ko] undefined!

Please help me, I'm fairly new at linux, and worst of all at the 64-bit architecture. Any help will be grealtly appreciated, the only reason I use Wshits XP is because my wireless card works there.

kaz2100 05-24-2006 09:36 AM

These say several symbols are missing.

Try

http://rtl8180-sa2400.sourceforge.net/
or
http://www.fsf.org/resources/hw/net/wireless/cards.html

I had some trouble with RealTek dirver, but serialmonkey one works fine.

darkalien_fc5 05-24-2006 11:54 PM

Ok, I have installed the opensource drivers from the first link you gave me.

Now, how do I set them to be used with my card?

Nylex 05-24-2006 11:58 PM

You probably need to load the module. Try running "modprobe rtl8180-sa2400" as root.

kaz2100 05-25-2006 07:47 AM

If you are still in trouble, check following
dmesg, lspci, and syslog (/var/log/message or something like this)


All times are GMT -5. The time now is 07:43 AM.