Results 1 to 4 of 4

Thread: RT2870 install issues during make

  1. #1
    Join Date
    Oct 2011
    Beans
    2

    RT2870 install issues during make

    Hi,

    I have an ASUS N13 USB card. I have it working using the native kernel one, however this doesn't work completely. For some reason its only connecting via G (not N). So my max attainable is 54Mb/s.

    So I read this post http://ubuntuforums.org/showthread.p...99#post8346399 and it suggests I edit the .dat file. However, as I have native, I cannot edit the .dat file (unless I'm mistaken?). So I decided to install the drivers off Ralink's site - 2010_0709_RT2870_Linux_STA_v2.4.0.1

    Now, I edited the config.mk as per http://ubuntuforums.org/showthread.php?t=1743530 - http://pastebin.com/RYX2FfD4

    When I execute make:

    Code:
    /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:610:12: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
    /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘struct __TX_BUFFER **’
    /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:628:13: warning: passing argument 3 of ‘RTMPAllocUsbBulkBufStruct’ from incompatible pointer type
    /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.c:34:20: note: expected ‘VOID **’ but argument is of type ‘UCHAR **’
    make[2]: *** [/home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_mac_usb.o] Error 1
    make[1]: *** [_module_/home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-8-generic'
    make: *** [LINUX] Error 2
    When I execute sudo make install:
    Code:
    make -C /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux -f Makefile.6 install
    mkdir: cannot create directory `/etc/Wireless': File exists
    make[1]: Entering directory `/home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'
    rm -rf /etc/Wireless/RT2870STA
    mkdir /etc/Wireless/RT2870STA
    cp /home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/RT2870STA.dat /etc/Wireless/RT2870STA/.
    install -d /lib/modules/2.6.38-8-generic/kernel/drivers/staging/rt2870/
    install -m 644 -c rt2870sta.ko /lib/modules/2.6.38-8-generic/kernel/drivers/staging/rt2870/
    install: cannot stat `rt2870sta.ko': No such file or directory
    make[1]: *** [install] Error 1
    make[1]: Leaving directory `/home/kel/Desktop/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'
    make: *** [install] Error 2
    * Now, this would suggest rt2870sta.ko isn't there. Well, it is.

    Code:
    root@kel-desktop:/lib/modules/2.6.38-8-generic/kernel/drivers/staging/rt2870# ls -l
    total 492
    -rwxrwxrwx 1 root root 502912 2011-04-11 18:47 rt2870sta.ko
    * Ok, so it's there, maybe it cant read it? Well I have ran it as root (make && make install). Same error.

    * Maybe the packages for kernel headers aren't installed, or other packages?

    Well they are too...

    Code:
    root@kel-desktop:~# apt-get install linux-headers-2.6.38-8-generic linux-headers-2.6.38-8 build-essential 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    linux-headers-2.6.38-8 is already the newest version.
    linux-headers-2.6.38-8-generic is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 23 not upgraded.

    So, I'm a bit stumped. It should be working but it isn't, why?


    I've also tried this, with the same results http://www.cyberciti.biz/tips/linux-...s-adapter.html

    Thanks
    Last edited by kelwynsa8; October 6th, 2011 at 11:37 AM. Reason: nicer formatting

  2. #2
    Join Date
    Oct 2011
    Beans
    2

    Exclamation Re: RT2870 install issues during make

    Ok, solved after doing a bit of research.

    DO NOT change the contents of Makefile, make sure this bit is left at:

    Code:
    ifeq ($(PLATFORM),PC)
    # Linux 2.6
    LINUX_SRC = /lib/modules/$(shell uname -r)/build
    # Linux 2.4 Change to your local setting
    #LINUX_SRC = /usr/src/linux-2.4
    LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
    CROSS_COMPILE = 
    endif
    Now, the awesome code:
    Code:
    make clean
    find . -name \*.[ch] -exec grep usb_buffer_alloc "{}" ";" -exec sed -i 's/usb_buffer_alloc/usb_alloc_coherent/g' "{}" ";"
    find . -name \*.[ch] -exec grep usb_buffer_free "{}" ";" -exec sed -i 's/usb_buffer_free/usb_free_coherent/g' "{}" ";"
    make 
    sudo make install
    Give it a reboot. If it doesn't work you may need to install the mod, make sure you're in the driver make directory, then type:

    Code:
    cd os/linux/
    insmod rt2870sta.ko

  3. #3
    Join Date
    Dec 2004
    Location
    Nova Scotia, Canada
    Beans
    184

    Re: RT2870 install issues during make

    Quote Originally Posted by kelwynsa8 View Post
    Ok, solved after doing a bit of research.

    DO NOT change the contents of Makefile, make sure this bit is left at:

    Code:
    ifeq ($(PLATFORM),PC)
    # Linux 2.6
    LINUX_SRC = /lib/modules/$(shell uname -r)/build
    # Linux 2.4 Change to your local setting
    #LINUX_SRC = /usr/src/linux-2.4
    LINUX_SRC_MODULE = /lib/modules/$(shell uname -r)/kernel/drivers/net/wireless/
    CROSS_COMPILE = 
    endif
    Now, the awesome code:
    Code:
    make clean
    find . -name \*.[ch] -exec grep usb_buffer_alloc "{}" ";" -exec sed -i 's/usb_buffer_alloc/usb_alloc_coherent/g' "{}" ";"
    find . -name \*.[ch] -exec grep usb_buffer_free "{}" ";" -exec sed -i 's/usb_buffer_free/usb_free_coherent/g' "{}" ";"
    make 
    sudo make install
    Give it a reboot. If it doesn't work you may need to install the mod, make sure you're in the driver make directory, then type:

    Code:
    cd os/linux/
    insmod rt2870sta.ko
    I'm able to compile and make install the drivers without any error but when I reboot no wifi, I get the following error when I try your last step:

    sudo insmod rt2870sta.ko
    insmod: error inserting 'rt2870sta.ko': -1 Device or resource busy

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: RT2870 install issues during make

    Closed 18 month-old thread. From Code of Conduct:
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •