Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Problem with rt2x00

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
andering
n00b
n00b
User avatar
Posts: 7
Joined: Thu Aug 02, 2007 9:52 pm
Location: Czech Republic, Prague

Problem with rt2x00

  • Quote

Post by andering » Thu Aug 02, 2007 10:25 pm

Hi , I have problem with emerge net-wireless/rt2x00-9999

kernel : linux-2.6.22-gentoo-r2/
wifi card: ASUS WL-107g

problem :

Code: Select all


>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999 ...
 * Preparing 80211 module
  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/eeprom_93cx6/eeprom_93cx6.o
  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00dev.o
  CC [M]  /var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.o
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c: In function ‘rt2x00mac_tx_rts_cts’:
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:61: warning: passing argument 2 of ‘ieee80211_ctstoself_get’ makes pointer from integer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:61: warning: passing argument 3 of ‘ieee80211_ctstoself_get’ makes integer from pointer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:61: warning: passing argument 4 of ‘ieee80211_ctstoself_get’ makes pointer from integer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:61: warning: passing argument 5 of ‘ieee80211_ctstoself_get’ from incompatible pointer type
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:61: error: too many arguments to function ‘ieee80211_ctstoself_get’
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:65: warning: passing argument 2 of ‘ieee80211_rts_get’ makes pointer from integer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:65: warning: passing argument 3 of ‘ieee80211_rts_get’ makes integer from pointer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:65: warning: passing argument 4 of ‘ieee80211_rts_get’ makes pointer from integer without a cast
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:65: warning: passing argument 5 of ‘ieee80211_rts_get’ from incompatible pointer type
/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.c:65: error: too many arguments to function ‘ieee80211_rts_get’
make[3]: *** [/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999/rt2x00mac.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [_module_/var/tmp/portage/net-wireless/rt2x00-9999/work/rt2x00-9999] Error 2
make[1]: *** [modules] Error 2
make: *** [default] Error 2
thanks for help
Top
didymos
Advocate
Advocate
User avatar
Posts: 4798
Joined: Mon Oct 10, 2005 2:09 am
Location: California

  • Quote

Post by didymos » Fri Aug 03, 2007 7:00 am

Have you considered the legacy version: net-wireless/rt2500? It either that or wait for upstream to fix the bug, then try the cvs ebuild again.
Thomas S. Howard
Top
andering
n00b
n00b
User avatar
Posts: 7
Joined: Thu Aug 02, 2007 9:52 pm
Location: Czech Republic, Prague

  • Quote

Post by andering » Fri Aug 03, 2007 9:15 am

yeah i considered it, but i had some problem with it...
Today morning I found this : http://rt2x00.serialmonkey.com/phpBB2/v ... php?t=4109 and it solved my problem.
But I don't know whether is right that modul loading for 10 - 15 second
thanks
Top
gerardo
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 05, 2004 8:30 pm
Location: Belgium

  • Quote

Post by gerardo » Tue Aug 14, 2007 10:37 pm

I found the same link.

For your information: here's my ebuild
# cat /usr/local/portage/net-wireless/rt2x00/rt2x00-9999.ebuild

Code: Select all

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils linux-mod cvs

DESCRIPTION="Driver for the RaLink RT2x00 wireless chipsets"
HOMEPAGE="http://rt2x00.serialmonkey.com"
LICENSE="GPL-2"
SLOT="0"

ECVS_SERVER="rt2400.cvs.sourceforge.net:/cvsroot/rt2400"
ECVS_MODULE="source/rt2x00"
ECVS_LOCALNAME="${P}"

KEYWORDS="-* ~amd64 ~x86"
RDEPEND="net-wireless/wireless-tools"

IUSE_RT2X00_DEVICES="rt2400pci rt2500pci rt2500usb rt61pci rt73usb"
IUSE_RT2X00_EXTRA="rfkill"
IUSE="asm debug"

for x in ${IUSE_RT2X00_DEVICES} ${IUSE_RT2X00_EXTRA} ; do
        IUSE="${IUSE} ${x}"
done

full="y"
for m in ${IUSE_RT2X00_DEVICES} ; do
        if use "${m}" ; then
                full="n"
                break
        fi
done

pkg_setup() {
        CONFIG_CHECK="WIRELESS_EXT MAC80211 WLAN_80211"
        ERROR_WIRELESS_EXT="${P} requires support for Wireless LAN drivers (non-hamradio) & Wireless Extensions (WIRELESS_EXT)."

        if use rfkill ; then
                CONFIG_CHECK="${CONFIG_CHECK} RFKILL_INPUT"
        fi

        if use rt2400pci \
                || use rt2500pci \
                || use rt61pci ; then
                CONFIG_CHECK="${CONFIG_CHECK} PCI"
        fi

        if use rt2500usb || use rt73usb ; then
                CONFIG_CHECK="${CONFIG_CHECK} USB"
        fi

        if use rt61pci || use rt73usb ; then
                CONFIG_CHECK="${CONFIG_CHECK} HOTPLUG FW_LOADER CRC_ITU_T"
                ERROR_FW_LOADER="${P} requires support for Firmware module loading (CONFIG_FW_LOADER and CONFIG_HOTPLUG)."
        fi

        if use debug ; then
                CONFIG_CHECK="${CONFIG_CHECK} DEBUG_FS"
                ERROR_DEBUG_FS="${P} requires Kernel Debug FS support (CONFIG_DEBUG_FS)"
        fi

        kernel_is lt 2 6 22 && die "${P} requires at least kernel 2.6.22"
        linux-mod_pkg_setup
        BUILD_PARAMS="KERNDIR=${KV_DIR} KERNOUT=${KV_OUT_DIR}"
        BUILD_TARGETS=" " # Target "module" is not supported, so we blank it
}

# see http://rt2x00.serialmonkey.com/phpBB2/viewtopic.php?t=4109
src_unpack() {
        cvs_src_unpack
        cd "${S}"
        epatch "${FILESDIR}"/rt2x00mac-parameter-overload.patch
}

src_compile() {
        local m= asm="n" button="n" debug="n" yn= M=

        use asm && asm="y"
        use debug && debug="y"
        use rfkill && button="y"

        if [[ ${full} == "y" ]] ; then
                ewarn "No module specified in USE flags - building everything."
        fi

        # Generate the config file now
        echo "# Config file generated by portage" > config

        # Enable the rt2x00lib module
        echo "CONFIG_RT2X00=y" >> config
        echo "CONFIG_RT2X00_ASM=${asm}" >> config
        MODULE_NAMES="${MODULE_NAMES} rt2x00lib(rt2x00:)"

        # Enable the new DEBUGFS module
        if use debug ; then
                echo "CONFIG_RT2X00_DEBUG=y" >> config
                echo "CONFIG_RT2X00_DEBUGFS=y" >> config
                MODULE_NAMES="${MODULE_NAMES} rt2x00debug(rt2x00:)"
        fi

        # rt2400pci, rt2500pci and rt61pci require eeprom_93cx6 and rt2x00pci
        if use rt2400pci || use rt2500pci || use rt61pci || [[ ${full} == "y" ]] ; then
                echo "CONFIG_EEPROM_93CX6=y" >> config
                echo "CONFIG_EEPROM_93CX6_ASM=${asm}" >> config
                MODULE_NAMES="${MODULE_NAMES} eeprom_93cx6(rt2x00:) rt2x00pci(rt2x00:)"
        fi

        # rt2500usb and rt73usb require rt2x00usb
        if use rt2500usb || use rt73usb || [[ ${full} == "y" ]] ; then
                MODULE_NAMES="${MODULE_NAMES} rt2x00usb(rt2x00:)"
        fi

        for m in ${IUSE_RT2X00_DEVICES} ; do
                local yn="n" M=$(echo "${m}" | tr '[:lower:]' '[:upper:]')

                if [[ ${full} == "y" ]] || use "${m}" ; then
                        yn="y"
                fi
                echo "CONFIG_${M}=${yn}" >> config
                echo "CONFIG_${M}_BUTTON=${button}" >> config

                if [[ ${yn} == "y" ]] ; then
                        MODULE_NAMES="${MODULE_NAMES} ${m}(rt2x00:)"
                fi
        done

        linux-mod_src_compile
}

src_install() {
        linux-mod_src_install
        dodoc COPYING README THANKS
}

pkg_postinst() {
        linux-mod_pkg_postinst

        ewarn
        ewarn "This is a CVS ebuild - please report any bugs to the rt2x00 forums"
        ewarn "http://rt2x00.serialmonkey.com/phpBB2/viewforum.php?f=5"
        ewarn
        ewarn "Any bugs reported to Gentoo will be marked INVALID"

        if use rt61pci || [[ ${full} == "y" ]] ; then
                ewarn
                ewarn "This driver requires third party firmware to be manually installed."
                ewarn "Download from http://www.ralinktech.com/ralink/Home/Support/Linux.html"
                ewarn "and install contents of Firmware RT2501(RT2561/RT2661) archive into"
                ewarn "/lib/firmware or /usr/local/lib/firmware before loading driver module."
        fi

        if use rt73usb || [[ ${full} == "y" ]] ; then
                ewarn
                ewarn "This driver requires third party firmware to be manually installed."
                ewarn "Download from http://www.ralinktech.com/ralink/Home/Support/Linux.html"
                ewarn "and install contents of Firmware RT2501USB(RT2571W/RT2671) archive into"
                ewarn "/lib/firmware or /usr/local/lib/firmware before loading driver module."
        fi

        ewarn
}
and this is the patch (to be put in the files-dir)
# cat /usr/local/portage/net-wireless/rt2x00/files/rt2x00mac-parameter-overload.patch

Code: Select all

--- rt2x00-9999/rt2x00mac.c     2007-08-11 21:00:22.243321485 +0200
+++ rt2x00-9999/rt2x00mac.c_new 2007-08-11 21:10:02.545792705 +0200
@@ -56,11 +56,11 @@
        skb_put(skb, size);
 
        if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
-               ieee80211_ctstoself_get(rt2x00dev->hw, rt2x00dev->interface.id,
+               ieee80211_ctstoself_get(rt2x00dev->hw,
                                        frag_skb->data, frag_skb->len, control,
                                        (struct ieee80211_cts *)(skb->data));
        else
-               ieee80211_rts_get(rt2x00dev->hw, rt2x00dev->interface.id,
+               ieee80211_rts_get(rt2x00dev->hw,
                                  frag_skb->data, frag_skb->len, control,
                                  (struct ieee80211_rts *)(skb->data));
 
Windoze : Plug and Pay...
Top
msubzwari
n00b
n00b
User avatar
Posts: 9
Joined: Tue Sep 14, 2004 11:16 am
Location: Karachi, Pakistan

  • Quote

Post by msubzwari » Fri Aug 17, 2007 9:24 pm

gerardo wrote:I found the same link.

For your information: here's my ebuild
# cat /usr/local/portage/net-wireless/rt2x00/rt2x00-9999.ebuild

...snipped code....

and this is the patch (to be put in the files-dir)
# cat /usr/local/portage/net-wireless/rt2x00/files/rt2x00mac-parameter-overload.patch
...snipped code....
Tried it but emerge fails at patching with following error in the worklog

Code: Select all

can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
--- rt2x00-9999/rt2x00mac.c     2007-08-11 21:00:22.243321485 +0200
+++ rt2x00-9999/rt2x00mac.c_new 2007-08-11 21:10:02.545792705 +0200 
What am i doing wrong here?
Top
gerardo
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 05, 2004 8:30 pm
Location: Belgium

  • Quote

Post by gerardo » Sat Aug 18, 2007 11:43 am

I'm using the mac80211 from the kernel, so that's probably the problem.
Windoze : Plug and Pay...
Top
VinnieNZ
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 126
Joined: Thu Mar 11, 2004 1:56 am
Location: New Zealand

  • Quote

Post by VinnieNZ » Mon Aug 20, 2007 2:49 am

I also get this error, and I'm using the mac80211 in kernel as well...
Top
gerardo
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 05, 2004 8:30 pm
Location: Belgium

  • Quote

Post by gerardo » Tue Aug 21, 2007 10:50 am

Just to be sure, have you done:
- portage overlay dir = /usr/local/portage
- put files in specified location
- emerge cvs
- cd /usr/local/portage/net-wireless/rt2x00/
- ebuild rt2x00-9999.ebuild digest
- I have rt61pci and rfkill in use-flags

I'll check again this evening as I'm not at my Gentoo box for the moment.
Windoze : Plug and Pay...
Top
msubzwari
n00b
n00b
User avatar
Posts: 9
Joined: Tue Sep 14, 2004 11:16 am
Location: Karachi, Pakistan

  • Quote

Post by msubzwari » Wed Aug 22, 2007 3:21 pm

I had to go manual on this following the hint given here:

http://forums.gentoo.org/viewtopic-p-41 ... ml#4158112

My wireless LAN connection is now up and working using WPA2. :D
Top
gerardo
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 05, 2004 8:30 pm
Location: Belgium

  • Quote

Post by gerardo » Wed Aug 22, 2007 7:10 pm

msubzwari wrote:I had to go manual on this following the hint given here:

http://forums.gentoo.org/viewtopic-p-41 ... ml#4158112

My wireless LAN connection is now up and working using WPA2. :D
Could you post your config files ? (Not that I'm interested in your secret keys :) )
Have you tried NetworkManager yet?
I have WEP working but not WPA. Probably some stupid config-error...

tnx
Windoze : Plug and Pay...
Top
msubzwari
n00b
n00b
User avatar
Posts: 9
Joined: Tue Sep 14, 2004 11:16 am
Location: Karachi, Pakistan

  • Quote

Post by msubzwari » Thu Aug 23, 2007 5:42 pm

gerardo wrote:
msubzwari wrote:I had to go manual on this following the hint given here:

http://forums.gentoo.org/viewtopic-p-41 ... ml#4158112

My wireless LAN connection is now up and working using WPA2. :D
Could you post your config files ? (Not that I'm interested in your secret keys :) )
Have you tried NetworkManager yet?
I have WEP working but not WPA. Probably some stupid config-error...

tnx
I'm on KDE so no NetworkManager. Here are the relevant configs:

/etc/Wireless/RT61STA/rt61sta.dat

Code: Select all

[Default]
CountryRegion=0
CountryRegionABand=7
WirelessMode=0
SSID=MySSID
NetworkType=Infra
Channel=0
AuthMode=WPA2PSK
EncrypType=AES
DefaultKeyID=1
Key1Type=0
Key1Str=
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
WPAPSK=MySecretKey
TxBurst=0
PktAggregate=0
WmmCapable=0
APSDCapable=0
APSDAC=0;0;0;0
BGProtection=0
IEEE80211H=0
TxRate=0
RTSThreshold=2347
FragThreshold=2346
RoamThreshold=75
PSMode=CAM
TxPreamble=0
FastRoaming=0

Relevant part of /etc/conf.d/net

Code: Select all

# Wireless config - Dlink G510 rev c1
config_ra0=( "dhcp" )

postup() {
        if [ ra0 == ${IFACE} ]; then
                ifconfig ra0 mtu 1300
        fi
}
modules=( "!iwconfig" "!wpa_supplicant" )
..and my kernel info

Code: Select all

$ uname -a
Linux chronos 2.6.22-gentoo-r4 #2 SMP PREEMPT Fri Aug 17 23:16:22 PKT 2007 i686 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz GenuineIntel GNU/Linux
Top
gerardo
Apprentice
Apprentice
User avatar
Posts: 228
Joined: Thu Feb 05, 2004 8:30 pm
Location: Belgium

  • Quote

Post by gerardo » Sun Aug 26, 2007 10:05 am

Thanks, but the ralink-rt61 drivers don't work for me. They install correctly, but iwconfig does nothing (no error, but no changes).
I use the ebuild from this bug with the three lines my topic 9
I gave up WPA (I thrust my neighbours)
Networkmanager isn't working,but I don't really need it.
I also tried rtutilt from the ebuild in this bug. Config shows ok, but creating profiles doesn't work.
Windoze : Plug and Pay...
Top
Post Reply

12 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic