2 china cj china_cj 于 2015.06.04 11:27 提问

linux n内核驱动编译出错

我正在进行wifi驱动的移植,android SDK的版本是4.2.2 内核是3.2.0的,但是当我将驱动代码
加入到kernel里后,编译module时出现了如下错误:
CC [M] drivers/net/wireless/bcmdhd/wl_cfg80211.o
drivers/net/wireless/bcmdhd/wl_iw.c:3062:2: error: unknown field 'num_private' specified in initializer
drivers/net/wireless/bcmdhd/wl_iw.c:3062:17: warning: initialization makes pointer from integer without a cast [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3062:17: warning: (near initialization for 'wl_iw_handler_def.get_wireless_stats') [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3063:2: error: unknown field 'num_private_args' specified in initializer
drivers/net/wireless/bcmdhd/wl_iw.c:3063:22: warning: excess elements in struct initializer [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3063:22: warning: (near initialization for 'wl_iw_handler_def') [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3065:2: error: unknown field 'private' specified in initializer
drivers/net/wireless/bcmdhd/wl_iw.c:3065:2: warning: initialization makes integer from pointer without a cast [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3065:2: warning: (near initialization for 'wl_iw_handler_def.num_standard') [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3065:2: error: initializer element is not computable at load time
drivers/net/wireless/bcmdhd/wl_iw.c:3065:2: error: (near initialization for 'wl_iw_handler_def.num_standard')
drivers/net/wireless/bcmdhd/wl_iw.c:3066:2: error: unknown field 'private_args' specified in initializer
drivers/net/wireless/bcmdhd/wl_iw.c:3066:2: warning: initialization from incompatible pointer type [enabled by default]
drivers/net/wireless/bcmdhd/wl_iw.c:3066:2: warning: (near initialization for 'wl_iw_handler_def.get_wireless_stats') [enabled by default]
make[4]: *** [drivers/net/wireless/bcmdhd/wl_iw.o] 错误 1
make[4]: *** 正在等待未完成的任务....
make[3]: *** [drivers/net/wireless/bcmdhd] 错误 2
make[2]: *** [drivers/net/wireless] 错误 2
make[1]: *** [drivers/net] 错误 2
make: *** [drivers] 错误 2

我找到了上面说的结构体如下:
struct iw_handler_def {
const iw_handler *standard;
__u16 num_standard;

#ifdef CONFIG_WEXT_PRIV
__u16 num_private;
__u16 num_private_args;
const iw_handler *private;
#endif

};

是不是因为kernel里面CONFIG_WEXT_PRIV没配置上啊,如果是的话要怎么配置啊,为什么我在内核里没找到这个选项啊, 而且我在.config文件中增加了CONFIG_WEXT_PRIV=y 再编译也还是出错,为什么啊?

哪位大神帮帮我啊,万分感谢

1个回答

nswcfd
nswcfd   2015.06.04 12:03

修改需要反映到include/config/auto.conf

wuqingyidongren
wuqingyidongren 具体要怎么修改呢 谢谢了
5 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!