31 #define to_usb_device_intf(d) \
33 struct usb_interface *intf = to_usb_interface(d); \
34 interface_to_usbdev(intf); \
43 #define REGISTER_TIMEOUT 500
44 #define REGISTER_TIMEOUT_FIRMWARE 1000
50 #define REGISTER_TIMEOUT16(__datalen) \
51 ( REGISTER_TIMEOUT * ((__datalen) / sizeof(u16)) )
57 #define REGISTER_TIMEOUT32(__datalen) \
58 ( REGISTER_TIMEOUT * ((__datalen) / sizeof(u32)) )
63 #define CSR_CACHE_SIZE 64
68 #define USB_VENDOR_REQUEST ( USB_TYPE_VENDOR | USB_RECIP_DEVICE )
69 #define USB_VENDOR_REQUEST_IN ( USB_DIR_IN | USB_VENDOR_REQUEST )
70 #define USB_VENDOR_REQUEST_OUT ( USB_DIR_OUT | USB_VENDOR_REQUEST )
175 static inline int rt2x00usb_vendor_request_sw(
struct rt2x00_dev *rt2x00dev,
183 value,
NULL, 0, timeout);
196 static inline int rt2x00usb_eeprom_read(
struct rt2x00_dev *rt2x00dev,
214 static inline void rt2x00usb_register_read(
struct rt2x00_dev *rt2x00dev,
215 const unsigned int offset,
234 static inline void rt2x00usb_register_read_lock(
struct rt2x00_dev *rt2x00dev,
235 const unsigned int offset,
255 static inline void rt2x00usb_register_multiread(
struct rt2x00_dev *rt2x00dev,
256 const unsigned int offset,
257 void *value,
const u32 length)
274 static inline void rt2x00usb_register_write(
struct rt2x00_dev *rt2x00dev,
275 const unsigned int offset,
293 static inline void rt2x00usb_register_write_lock(
struct rt2x00_dev *rt2x00dev,
294 const unsigned int offset,
313 static inline void rt2x00usb_register_multiwrite(
struct rt2x00_dev *rt2x00dev,
314 const unsigned int offset,
320 (
void *)value, length,
338 const unsigned int offset,
356 const unsigned int offset,
438 #define rt2x00usb_suspend NULL
439 #define rt2x00usb_resume NULL