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熱點了。