# rtl8180 & kernel 2.6.19

## aqu

Hi,

I just emerged gentoo-sources-2.6.19-r2. I have pcmcia card ona relatek chipset, when i'm emerging rtl8180 from portage i get error which said that i don't have linux/config.h (kernel configured and intalled, linux-headers too). I googled, but nothing foud  :Sad:  please help.

----------

## lagalopex

I experienced the same problem (fuse and pwc; Some netfilter-patches as well).

In the netfilter-patch I just commented the include of the config.h and it worked...

But I think something has changed in the kernel config...

----------

## aqu

unfortunatly it dosent helped at all.

When i commented those lines in source i simply get compile error... those errors are about module license, author and other stuff... ie

```
MODULE_LICENSE("GPL");
```

so i don't know to remove that stuff or not ;/

----------

## loki_val

AFAICT, the rtl8180-sa2400 project is gone. No activity on cvs for last half a year and only the maintainer has cvs write access. And he's AWOL. Somebody really ought to pick up the pieces.

That said, there's a patch here to get it to compile against 2.6.19.

HTH.

----------

## aqu

yeah, already been there, but, maybe i'm too stupid, but, i cant apply this patch (simple patch < file.patch dosent work)

:/ it keep asking about file where apply patch.

Anyone could write right patch for this packet  :Wink: 

----------

## loki_val

You might file a bug at bugs.gentoo.org to get this into portage.

----------

## steevdave

I use rtl818x myself, and was having similar issues - I forgot about the WE change, which is why I couldn't get it to compile - so I have it compiling now but haven't tested it (it also does not seem to have an active upstream any longer) so when I get home, if the card works, I will post my patch and allow more to test.

----------

## rumeny

Hi,

Using the above-mentioned patch compiles for me. 

Had to patch manually though.

Filed a Bug in Bugzilla (#160058).

HTH. Rumen

----------

## IvanMajhen

I have uploaded driver for 2.6.20. 

http://sourceforge.net/tracker/index.php?func=detail&aid=1656996&group_id=114161&atid=667396

They are latest from CVS, and patched for 2.6.20.

Only 2 modules are build:

r8180.ko and ieee80211-rtl.ko

ieee80211-rtl.ko has all algoritms in it. WPA doesn't work for me.

There is no conflict with kernel built-in ieee stack.

Doesn't work for pre 2.6.20 kernel.

Tested with wireless extensions 21.

Let me know if works for you.

Ebuild:

```
# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/net-wireless/rtl8180/rtl8180-0.22_pre20050528.ebuild,v 1.3 2006/06/25 17:19:44 genstef Exp $

inherit linux-mod eutils

DESCRIPTION="Driver for the rtl8180 wireless chipset"

HOMEPAGE="http://rtl8180-sa2400.sourceforge.net"

SRC_URI="mirror://gentoo/${P}.tar.bz2"

LICENSE="GPL-2"

KEYWORDS="~x86 ~ppc"

IUSE=""

DEPEND="net-wireless/wireless-tools"

MODULE_NAMES="ieee80211-rtl(net:) r8180(net:)"

CONFIG_CHECK="NET_RADIO CRYPTO CRYPTO_ARC4 CRC32"

BUILD_TARGETS="all"

pkg_setup() {

        if kernel_is lt 2 6 20; then

                eerror "${P} requires kernel 2.6.20 or above."

                die "Kernel version too old."

        fi

        linux-mod_pkg_setup

        BUILD_PARAMS="KSRC=${KV_DIR}"

}

src_unpack() {

        unpack ${A}

        cd ${S}

}

src_install() {

        linux-mod_src_install

        dodoc AUTHORS CHANGES INSTALL README README.adhoc

}

```

Please submit bug to gentoo devs if it works for you.

----------

## matttah

i keeep getting a compiling error with that ebuild the one for the 2.6.20.

```

Daum rtl8180-0.22_pre20050528 # emerge rtl8180

Calculating dependencies... done!

>>> Emerging (1 of 1) net-wireless/rtl8180-0.22_pre20050528 to /

 * rtl8180-0.22_pre20050528.tar.bz2 MD5 ;-) ...                           [ ok ]

 * rtl8180-0.22_pre20050528.tar.bz2 RMD160 ;-) ...                        [ ok ]

 * rtl8180-0.22_pre20050528.tar.bz2 SHA1 ;-) ...                          [ ok ]

 * rtl8180-0.22_pre20050528.tar.bz2 SHA256 ;-) ...                        [ ok ]

 * rtl8180-0.22_pre20050528.tar.bz2 size ;-) ...                          [ ok ]

 * checking ebuild checksums ;-) ...                                      [ ok ]

 * checking auxfile checksums ;-) ...                                     [ ok ]

 * checking miscfile checksums ;-) ...                                    [ ok ]

 * checking rtl8180-0.22_pre20050528.tar.bz2 ;-) ...                      [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found sources for kernel version:

 *     2.6.20-gentoo

 * Checking for suitable kernel configuration options...                  [ ok ]

>>> Unpacking source...

>>> Unpacking rtl8180-0.22_pre20050528.tar.bz2 to /var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528 ...

 * Preparing ieee80211-rtl module

make -C /usr/src/linux SUBDIRS=/var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528 MODVERDIR=/var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528 modules

make[1]: Entering directory `/usr/src/linux-2.6.20-gentoo'

scripts/Makefile.build:17: /var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528/Makefile: No such file or directory

make[2]: *** No rule to make target `/var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528/Makefile'.  Stop.

make[1]: *** [_module_/var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/work/rtl8180-0.22_pre20050528] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.20-gentoo'

make: *** [2.6] Error 2

!!! ERROR: net-wireless/rtl8180-0.22_pre20050528 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 4032:   Called src_compile

  ebuild.sh, line 1304:   Called linux-mod_src_compile

  linux-mod.eclass, line 510:   Called die

!!! Unable to make  KSRC=/usr/src/linux all.

!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! A complete build log is located at '/var/tmp/portage/net-wireless/rtl8180-0.22_pre20050528/temp/build.log'.

!!! This ebuild is from an overlay: '/usr/local/portage'

```

Ideas?

Dauum

----------

