使用的是腾达usb上网卡驱动 W541U-RT73_Linux_STA_Drv1.0.4.0.tar.gz
ubuntu8.04
============================================
make -C /lib/modules/2.6.24-27-generic/build SUBDIRS=/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.24-27-generic'
CC [M] /home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.o
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.c: 在函数‘usb_rtusb_probe’中:
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.c:1030: 错误: 隐式声明函数‘SET_MODULE_OWNER’
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.c:1070: 警告: 传递参数 1 (属于‘dev_get_by_name’)时在不兼容的指针类型间转换
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.c:1070: 错误: 提供给函数‘dev_get_by_name’的实参太少
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.c:1060: 警告: 未使用的变量‘device’
make[2]: *** [/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rtmp_main.o] 错误 1
make[1]: *** [_module_/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.24-27-generic'
make: *** [all] 错误 2
============================================
注释掉 net_device的weigth成员
注释掉SET_module_owener
1070 if(dev_get_by_name(slot_name)==NULL)
改为 if(dev_get_by_name(pAd->net_dev,slot_name)==NULL)
===========================================
LD [M] /home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rt73.o
Building modules, stage 2.
MODPOST 1 modules
/home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rt73: struct usb_device_id is 20 bytes. The last of 31 is:
0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
FATAL: /home/eagle/share/myproj/wifi/RT73_Linux_STA_.1.0.4.0/Module/rt73: struct usb_device_id is not terminated with a NULL entry!
make[2]: *** [__modpost] 错误 1
make[1]: *** [modules] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.24-27-generic'
make: *** [all] 错误 2
==============================================
#define RT73_USB_DEVICES { \
{USB_DEVICE(0x148f,0x2573)}, /* Ralink */ \
{USB_DEVICE(0x148f,0x2671)}, /* Ralink */ \
{USB_DEVICE(0x18e8,0x6196)}, /* Qcom */ \
{USB_DEVICE(0x18e8,0x6229)}, /* Qcom */ \
{USB_DEVICE(0x18e8,0x6238)}, /* Qcom */ \
{USB_DEVICE(0x1044,0x8008)}, /* Gigabyte */ \
{USB_DEVICE(0x14b2,0x3c22)}, /* Conceptronic */ \
{USB_DEVICE(0x0db0,0x6877)}, /* MSI */ \
{USB_DEVICE(0x0db0,0xa874)}, /* MSI */ \
{USB_DEVICE(0x0db0,0xa861)}, /* MSI */ \
{USB_DEVICE(0x07b8,0xb21d)}, /* AboCom */ \
{USB_DEVICE(0x0769,0x31f3)}, /* Surecom */ \
{USB_DEVICE(0x1472,0x0009)}, /* Huawei-3Com */ \
{USB_DEVICE(0x1371,0x9022)}, /* CNet */ \
{USB_DEVICE(0x1371,0x9032)}, /* CNet */ \
{USB_DEVICE(0x1631,0xc019)}, /* Billionton */ \
{USB_DEVICE(0x1044,0x800a)}, /* Gigabyte */ \
{USB_DEVICE(0x1690,0x0722)}, /* Askey */ \
{USB_DEVICE(0x0df6,0x9712)}, /* Sitecom WL-113 v1 002 */ \
{USB_DEVICE(0x0df6,0x90ac)}, /* Sitecom */ \
{USB_DEVICE(0x148f,0x9021)}, /* Amigo */ \
{USB_DEVICE(0x0eb0,0x9021)}, /* Amigo */ \
{USB_DEVICE(0x0411,0x00D8)}, /* BUFFALO WLI-U2-SG54HP */ \
{USB_DEVICE(0x0586,0x3415)}, /* ZyXEL */ \
{USB_DEVICE(0x0b05,0x1723)}, /* ASUS */ \
{USB_DEVICE(0x0b05,0x1724)}, /* ASUS */ \
{USB_DEVICE(0x050d,0x705a)}, /* Belkin */ \
{USB_DEVICE(0x07d1,0x3c03)}, /* D-Link */ \
{USB_DEVICE(0x13b1,0x0023)}, /* Linksys */ \
{USB_DEVICE(0x13b1,0x0020)}, /* Linksys WUS54GC */ \
{USB_DEVICE(0,0)}} /* end marker */
改为
#define RT73_USB_DEVICES { \
{USB_DEVICE(0x148f,0x2573)}, /* Ralink */ \
{USB_DEVICE(0x148f,0x2671)}, /* Ralink */ \
{USB_DEVICE(0x18e8,0x6196)}, /* Qcom */ \
{USB_DEVICE(0x18e8,0x6229)}, /* Qcom */ \
{USB_DEVICE(0x18e8,0x6238)}, /* Qcom */ \
{USB_DEVICE(0x1044,0x8008)}, /* Gigabyte */ \
{USB_DEVICE(0x14b2,0x3c22)}, /* Conceptronic */ \
{USB_DEVICE(0x0db0,0x6877)}, /* MSI */ \
{USB_DEVICE(0x0db0,0xa874)}, /* MSI */ \
{USB_DEVICE(0x0db0,0xa861)}, /* MSI */ \
{USB_DEVICE(0x07b8,0xb21d)}, /* AboCom */ \
{USB_DEVICE(0x0769,0x31f3)}, /* Surecom */ \
{USB_DEVICE(0x1472,0x0009)}, /* Huawei-3Com */ \
{USB_DEVICE(0x1371,0x9022)}, /* CNet */ \
{USB_DEVICE(0x1371,0x9032)}, /* CNet */ \
{USB_DEVICE(0x1631,0xc019)}, /* Billionton */ \
{USB_DEVICE(0x1044,0x800a)}, /* Gigabyte */ \
{USB_DEVICE(0x1690,0x0722)}, /* Askey */ \
{USB_DEVICE(0x0df6,0x9712)}, /* Sitecom WL-113 v1 002 */ \
{USB_DEVICE(0x0df6,0x90ac)}, /* Sitecom */ \
{USB_DEVICE(0x148f,0x9021)}, /* Amigo */ \
{USB_DEVICE(0x0eb0,0x9021)}, /* Amigo */ \
{USB_DEVICE(0x0411,0x00D8)}, /* BUFFALO WLI-U2-SG54HP */ \
{USB_DEVICE(0x0586,0x3415)}, /* ZyXEL */ \
{USB_DEVICE(0x0b05,0x1723)}, /* ASUS */ \
{USB_DEVICE(0x0b05,0x1724)}, /* ASUS */ \
{USB_DEVICE(0x050d,0x705a)}, /* Belkin */ \
{USB_DEVICE(0x07d1,0x3c03)}, /* D-Link */ \
{USB_DEVICE(0x13b1,0x0023)}, /* Linksys */ \
{USB_DEVICE(0x13b1,0x0020)}, /* Linksys WUS54GC */ \
{USB_DEVICE(0,0)},\
{0}} /* end marker */
就是增加了最后一行{0}
=========================================================================
编译成功 (其实是一堆警告外加一个.ko文件 哈哈)
阅读(3327) | 评论(0) | 转发(0) |