Step1: Download driver DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.gz
//un-compress
Step2: $tar -xzvf DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.gz
//change folder
Step3: $cd DPO_RT3070_LinuxSTA_V2.3.0.4_20100604
//get root permission
Step4: $su
//compile your driver
Step5: #make
//Create new folder
Step6: #mkdir /etc/Wireless/RT2870STA
//Copy file to the new folder
Step7: #cp RT2870STA.dat /etc/Wireless/RT2870STA/.
Step8: #cd os/linux
//install driver
Step9: #insmod rt3070sta.ko
Step10: re-insert your usb & good luck
Notice!!
Build Fail, If kernel version is 2.6.35,
You can check kernel version
=====================================================
make[2]: *** [/home/pierre/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux/../../common/cmm_mac_usb.o] Error 1
make[1]: *** [_module_/home/pierre/DPO_RT3070_LinuxSTA_V2.3.0.4_20100604/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-28-generic'
make: *** [LINUX] Error 2
=====================================================
You can check kernel version
$uname -a
Root Cause:
After 2.6.35 version,
Function
usb_buffer_alloc => usb_alloc_coherent
usb_buffer_free => usb_free_coherent
usb_buffer_alloc => usb_alloc_coherent
usb_buffer_free => usb_free_coherent
Solution:
Two files need to modify.
1. include/os/rt_linux.h
i.
#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_buffer_alloc(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
=>
#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_alloc_coherent(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
ii.
#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_buffer_free(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
=>
#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_free_coherent(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
2. /os/linux/rt_usb_util.c
i.
return usb_buffer_alloc(dev, size, mem_flags, dma);
=>
return usb_alloc_coherent(dev, size, mem_flags, dma);
ii.
usb_buffer_free(dev, size, addr, dma);
=>
usb_free_coherent(dev, size, addr, dma);
Finally, Re-compile
沒有留言:
張貼留言
Welcome to leave your message here.