MX & MEPIS Community Forum

Linux operating systems based on Debian Stable
View unanswered posts | View unsolved topics | View active topics |

Reply to topic  [ 1 post ] 
Ralink RT2870 wireless USB adapter - Mepis 11 2.6.36 kernel 
Author Message
Forum Guide
Forum Guide
User avatar

Joined: Wed Jul 12, 2006 4:43 am
Posts: 2485
Location: Nederweert-Eind, The Netherlands
Has thanked: 55 times
Have thanks: 238 times
Post # 295890
Post Ralink RT2870 wireless USB adapter - Mepis 11 2.6.36 kernel
At long last I found a link that has enabled me to succesfully compile and install my .deb for my DWA140 Wireless-N USB adapter in M11 using its 2.6.36 kernel.
Previously I used a Debian 2.6.32 kernel, since it became apparent that compiling under kernels >= 2.6.35 was impossible.
The following link explains why there is a problem and provides a fix [See under EDIT there].
And it works on the M11 Mepis kernel 2.6.36....:-) And I belief that it will work for all RT2870 based wireless usb-adapters (many brands)

Newer kernels >= 2.6.35 will fail to compile (make) the driver because the driver makes use of the functions usb_buffer_alloc() and usb_buffer_free() which were renamed in kernel 2.6.35 ..
so if during the next (make && make install) step it fails with this error:

make[2]: *** [/home/mark/Desktop/RT2870/os/linux/../../common/cmm_mac_usb.o] Error 1
make[1]: *** [_module_/home/mark/Desktop/RT2870/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-27-generic'
make: *** [LINUX] Error 2

or similar.

The fix is to cd to the driver source directory (eg. 2010_0709_RT28 70_Linux_STA_v, and run the following 3 commands which will clean the build directory and replace the old calls with the new ones:

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' "{}" ";"

(hitting enter after each line)


Ko Bros Linux User #312596.  MX14.4, MX14.3, Mepis 12, Debian 7, antiX 15, Peppermint 5...and sometimes Win7

Fri Feb 17, 2012 12:23 pm

ko thanked by: Jerry3904, lucky9, Stevo, topcat
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.