rt3070sta: module license 'unspecified' taints kernel... SOLVED
There is a problem when compiling the Ralink RT3070USB(RT307x) driver version 2.3.0.1, released 02/08/2010. When you manually load the module, you get this error:
Code:
FATAL: Error inserting rt3070sta (/lib/modules/2.6.31.12-174.2.19.fc12.i686/kernel/drivers/net/wireless/rt3070sta.ko): Unknown symbol in module, or unknown parameter (see dmesg)
In the output of dmesg, you see these errors:
Code:
rt3070sta: module license 'unspecified' taints kernel.
rt3070sta: Unknown symbol usb_alloc_urb
rt3070sta: Unknown symbol usb_free_urb
rt3070sta: Unknown symbol usb_register_driver
rt3070sta: Unknown symbol usb_put_dev
rt3070sta: Unknown symbol usb_get_dev
rt3070sta: Unknown symbol usb_submit_urb
rt3070sta: Unknown symbol usb_control_msg
rt3070sta: Unknown symbol usb_deregister
rt3070sta: Unknown symbol usb_kill_urb
rt3070sta: Unknown symbol usb_buffer_free
rt3070sta: Unknown symbol usb_buffer_alloc
I found that this error is because of a missing reference to the driver 'license'. In this version of the driver, the device ID's have been moved from the usb_main_dev.c file to the rtusb_dev_id.c file. They also moved this line:
Code:
MODULE_LICENSE("GPL");
I found that simply adding this line back into the usb_main_dev. file, fixed this error.
Here is what you need to do:
Open this file in a text editor
/RT3070_LinuxSTA_V2.3.0.1_20100208/os/linux/usb_main_dev.c
Change this:
Code:
#include "rt_config.h"
// Following information will be show when you run 'modinfo'
// *** If you have a solution for the bug in current version of driver, please mail to me.
// Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. ***
MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>");
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
#ifdef CONFIG_STA_SUPPORT
#ifdef MODULE_VERSION
MODULE_VERSION(STA_DRIVER_VERSION);
#endif
#endif // CONFIG_STA_SUPPORT //
To this:
Code:
#include "rt_config.h"
// Following information will be show when you run 'modinfo'
// *** If you have a solution for the bug in current version of driver, please mail to me.
// Otherwise post to forum in ralinktech's web site(www.ralinktech.com) and let all users help you. ***
MODULE_AUTHOR("Paul Lin <paul_lin@ralinktech.com>");
MODULE_DESCRIPTION("RT2870 Wireless Lan Linux Driver");
MODULE_LICENSE("GPL");
#ifdef CONFIG_STA_SUPPORT
#ifdef MODULE_VERSION
MODULE_VERSION(STA_DRIVER_VERSION);
#endif
#endif // CONFIG_STA_SUPPORT //
You are adding the 'MODULE_LICENSE("GPL");' line, that is highlighted in red.
There is one other problem. The compile looks for a RT3070STA.dat file, but there is a RT2870STA.dat file instead. Fix that with this command:
Code:
cp RT2870STA.dat RT3070STA.dat
Recompile the driver and load it. Let me know if it now works for you.
This is a relatively untested fix. Feedback on how it is/isn't working is appreciated. Some will still need to add the USD ID's of their wireless devices before it will work. To do that, open this file for editing:
Code:
sudo gedit ~/RT3070_LinuxSTA_V2.3.0.1_20100208/common/rtusb_dev_id.c
Add your device ID to the list, just above this:
Code:
#endif // RT3070 //
{ }/* Terminating entry */
};
Use a tab for the space before your entry. Save, exit and build the driver.