您的位置:首页 > 其它

DM8168-ARM平台移植USB WIFI RTL8192CU驱动

2013-05-23 15:30 459 查看
DM8168-ARM平台移植USB WIFI RTL8192CU驱动

/******************************************************************

* author: 卢浩

* time: 2013.05.23

* environment: ubuntu10.04LTS +TI DM8168

* kernel version: linux-2.6.37

* QQ Group For Technology Exchange:122879839

******************************************************************/

驱动可以到realtek网站去下载,
http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8192CU
下载完解压到内核下的drivers/net/wireless目录,

在此目录下的Kconfig文件添加如下

source "drivers/net/wireless/rtl8192cu/Kconfig"

在此目录下的Makefile文件添加如下

obj-$(CONFIG_RTL8192CU) += rtl8192cu/

然后make menuconfig

──────────────────────────────────────── Linux/arm 2.6.37 Kernel Configuration ─────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌───────────────────────^(-)──────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ Kernel Features ---> │ │

│ │ Boot options ---> │ │

│ │ CPU Power Management ---> │ │

│ │ Floating point emulation ---> │ │

│ │ Userspace binary formats ---> │ │

│ │ Power management options ---> │ │

│ │ [*] Networking support ---> │ │

│ │ Device Drivers ---> │ │

│ │ File systems --->

选中进入 [*] Networking support --->

┌────────────────────────────────────────────────── Networking support ───────────────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌───────────────────────^(-)──────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ < > CAN bus subsystem support ---> │ │

│ │ < > IrDA (infrared) subsystem support ---> │ │

│ │ < > Bluetooth subsystem support ---> │ │

│ │ < > RxRPC session sockets │ │

│ │ -*- Wireless ---> │ │

│ │ < > WiMAX Wireless Broadband support ---> │ │

│ │ < > RF switch subsystem support ---> │ │

│ │ < > Plan 9 Resource Sharing Support (9P2000) (Experimental) ---> │ │

│ │ < > CAIF support --->

选中进入 -*- Wireless --->

───────────────────────────────────────────────────── Wireless ────────────────────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ --- Wireless │ │

│ │ <*> cfg80211 - wireless configuration API │ │

│ │ [ ] nl80211 testmode command (NEW) │ │

│ │ [ ] enable developer warnings (NEW) │ │

│ │ [ ] cfg80211 regulatory debugging (NEW) │ │

│ │ [*] enable powersave by default (NEW) │ │

│ │ [ ] cfg80211 DebugFS entries (NEW) │ │

│ │ [*] cfg80211 wireless extensions compatibility (NEW) │ │

│ │ [*] Wireless extensions sysfs files (NEW)

选中 <*> cfg80211 - wireless configuration API

再进入drivers下面配置

─────────────────────────────────────────────────── Device Drivers ─────────────────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌───────────────────────^(-)──────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ IEEE 1394 (FireWire) support ---> │ │

│ │ < > I2O device support ---> │ │

│ │ [*] Network device support ---> │ │

│ │ [ ] ISDN support ---> │ │

│ │ < > Telephony support ---> │ │

│ │ Input device support ---> │ │

│ │ Character devices ---> │ │

│ │ -*- I2C support ---> │ │

│ │ [*] SPI support --->

选中进入*] Network device support --->

───────────────────────────────────────── Network device support ─────────────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌───────────────────────^(-)──────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ [*] Ethernet (10 or 100Mbit) ---> │ │

│ │ [*] Ethernet (1000 Mbit) ---> │ │

│ │ [ ] Ethernet (10000 Mbit) ---> │ │

│ │ < > Token Ring driver support ---> │ │

│ │ [*] Wireless LAN ---> │ │

│ │ *** Enable WiMAX (Networking options) to see the WiMAX drivers *** │ │

│ │ USB Network Adapters ---> │ │

│ │ [ ] Wan interfaces support ---> │ │

│ │ *** CAIF transport drivers ***

选中进入 [*] Wireless LAN --->

──────────────────────────────────────────── Wireless LAN ──────────────────────────────────────────────────────┐

│ Arrow keys navigate the menu. <Enter> selects submenus --->. Highlighted letters are hotkeys. Pressing <Y> │

│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> for Search. Legend: │

│ [*] built-in [ ] excluded <M> module < > module capable │

│ │

│ ┌───────────────────────^(-)──────────────────────────────────────────────────────────────────────────────────────────┐ │

│ │ < > Wireless RNDIS USB support (NEW) │ │

│ │ < > Atheros Wireless Cards (NEW) ---> │ │

│ │ < > IEEE 802.11 for Host AP (Prism2/2.5/3 and WEP/TKIP/CCMP) │ │

│ │ < > Intel PRO/Wireless 2100 Network Connection (NEW) │ │

│ │ < > Intel PRO/Wireless 2200BG and 2915ABG Network Connection (NEW) │ │

│ │ < > Intel Wireless Multicomm 3200 WiFi driver (NEW) │ │

│ │ < > Marvell 8xxx Libertas WLAN driver support (NEW) │ │

│ │ < > Hermes chipset 802.11b support (Orinoco/Prism2/Symbol) (NEW) │ │

│ │ <*> Realtek 8192C USB WiFi

选中 <*> Realtek 8192C USB WiFi

保存配置编译内核

但是编译出错了,如下

CC drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_led.o

CC drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_xmit.o

CC drivers/net/wireless/rtl8192cu/hal/rtl8192c/usb/rtl8192cu_recv.o

CC drivers/net/wireless/rtl8192cu/hal/rtl8192c/rtl8192c_sreset.o

CC drivers/net/wireless/rtl8192cu/os_dep/osdep_service.o

CC drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.o

drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c: In function 'rtw_init_netdev':

drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.c:779: error: 'struct net_device' has no member named 'wireless_handlers'

make[4]: *** [drivers/net/wireless/rtl8192cu/os_dep/linux/os_intfs.o] Error 1

make[3]: *** [drivers/net/wireless/rtl8192cu] Error 2

make[2]: *** [drivers/net/wireless] Error 2

make[1]: *** [drivers/net] Error 2

make: *** [drivers] Error 2

其实此时是缺少了配置CONFIG_WIRELESS_EXT=y

但是CONFIG_WIRELESS_EXT又依赖如下的配置

CONFIG_IPW2200=y

所以配置完

CONFIG_IPW2200=y

就基本完成了。

然后再编译,通过了。

当你linux启动完成之后,你会发现一个wlan0设备,这里就不做具体介绍了,如果你想通过无线连接到arm板,就设置网卡为ad-hoc模式

打个比方

ifconfig wlan0 18.18.18.18 //设置wlan0的ip地址

iwconfig wlan0 essid luhao //设置名称luhao

iwconfig wlan0 mode ad-hoc //设置工作模式 ad-hoc

这个时候你应该就能搜索到luhao这个wifi热点了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: