为Ralink RT5370 USB WiFi WLAN Dongle构建驱动程序

我有一个使用Ubuntu 11.04的Trim-Slice Value 。 它配备了Ralink RT5370 802.11n WiFi加密狗 。

当我插入加密狗时,它不会“正常工作”; ifconfigiwconfig不显示设备,但lsusb确实显示了列出的设备:

 phrogz@trimslice:~$ lsusb | grep Ralink Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. 

我从Ralink的Linux Drivers站点下载了RT5370的链接,生成了一个名为2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO.tar.bz2的文件。 解压后,文件中唯一的README提到“RT2870 Wireless Lan Linux Driver”; 但是,目录根目录下的Makefile确实包含以下行:

 ifeq ($(CHIPSET),) CHIPSET = 5370 endif 

我编辑了os/linux/config.mk来进行这些设置:

 # Support Wpa_Supplicant HAS_WPA_SUPPLICANT=y # Support Native WpaSupplicant for Network Maganger HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y 

当我返回解压缩目录的根目录并运行make时,它会失败:

 phrogz@trimslice:~/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO$ sudo make [sudo] password for phrogz: make -C tools make[1]: Entering directory `/home/phrogz/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory `/home/phrogz/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/tools' /home/phrogz/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/tools/bin2h cp -f os/linux/Makefile.6 /home/phrogz/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/os/linux/Makefile make -C /lib/modules/2.6.38.3-trimslice-1.03/build SUBDIRS=/home/phrogz/2011_0225_RT5370_RT5372_Linux_STA_V2.5.0.1_DPO/os/linux modules make: *** /lib/modules/2.6.38.3-trimslice-1.03/build: No such file or directory. Stop. make: *** [LINUX] Error 2 

如何为此设备构建驱动程序?

我使用的Tenda W311M使用相同的芯片。 感谢您提及驱动程序的下载URL。

这个主题http://ubuntuforums.org/showthread.php?t=1285828提到了解决方案。

我希望这个对你有用。

您必须安装与您的内核版本对应的Linux头文件,以获取提到的构建目录:

 apt-get install linux-headers-[version] 

您可以输入以下命令获取内核版本:

 uname -r