added rt2870usb for 2.6.35+ kernels and WUSB600v2 adaptor
[dottout.git] / net-wireless / rt2870usb / files / rt2870usb-2.4.0.1-usb_alloc_free.patch
blobecc4d781613deacd0b195be62cbe41a675bedd3d
1 --- RT2870_Linux_STA_v2.4.0.1.orig/include/os/rt_linux.h 2010-09-19 11:42:14.000000000 +0300
2 +++ RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h 2010-09-19 11:40:52.000000000 +0300
3 @@ -1074,9 +1074,14 @@
4 #define RT28XX_PUT_DEVICE usb_put_dev
5 #define RTUSB_ALLOC_URB(iso) usb_alloc_urb(iso, GFP_ATOMIC)
6 #define RTUSB_SUBMIT_URB(pUrb) usb_submit_urb(pUrb, GFP_ATOMIC)
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
8 #define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_buffer_alloc(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
9 #define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_buffer_free(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
10 #else
11 +#define RTUSB_URB_ALLOC_BUFFER(pUsb_Dev, BufSize, pDma_addr) usb_alloc_coherent(pUsb_Dev, BufSize, GFP_ATOMIC, pDma_addr)
12 +#define RTUSB_URB_FREE_BUFFER(pUsb_Dev, BufSize, pTransferBuf, Dma_addr) usb_free_coherent(pUsb_Dev, BufSize, pTransferBuf, Dma_addr)
13 +#endif
14 +#else
16 #define RT28XX_PUT_DEVICE rausb_put_dev
17 #define RTUSB_ALLOC_URB(iso) rausb_alloc_urb(iso)