diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-04-21 13:01:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:21 -0400 |
commit | bd394a74a0e81efb15feaa8d7d10a0eaa8f4bf07 (patch) | |
tree | ee2a9b666c87fc9a1a1cbbcbe49a3a33cdec0e8f /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | e58c6aca99357d7f85f18e0b661d8c5a87f926a9 (diff) |
rt2x00: Add helper macros
Add some helper macro's to help determining the
the timeout for USB register access.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 0dac1f5b5c4a..80b34d47114a 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -76,10 +76,10 @@ static inline void rt2500usb_register_multiread(struct rt2x00_dev *rt2x00dev, | |||
76 | const unsigned int offset, | 76 | const unsigned int offset, |
77 | void *value, const u16 length) | 77 | void *value, const u16 length) |
78 | { | 78 | { |
79 | int timeout = REGISTER_TIMEOUT * (length / sizeof(u16)); | ||
80 | rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ, | 79 | rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ, |
81 | USB_VENDOR_REQUEST_IN, offset, | 80 | USB_VENDOR_REQUEST_IN, offset, |
82 | value, length, timeout); | 81 | value, length, |
82 | REGISTER_TIMEOUT16(length)); | ||
83 | } | 83 | } |
84 | 84 | ||
85 | static inline void rt2500usb_register_write(struct rt2x00_dev *rt2x00dev, | 85 | static inline void rt2500usb_register_write(struct rt2x00_dev *rt2x00dev, |
@@ -106,10 +106,10 @@ static inline void rt2500usb_register_multiwrite(struct rt2x00_dev *rt2x00dev, | |||
106 | const unsigned int offset, | 106 | const unsigned int offset, |
107 | void *value, const u16 length) | 107 | void *value, const u16 length) |
108 | { | 108 | { |
109 | int timeout = REGISTER_TIMEOUT * (length / sizeof(u16)); | ||
110 | rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE, | 109 | rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE, |
111 | USB_VENDOR_REQUEST_OUT, offset, | 110 | USB_VENDOR_REQUEST_OUT, offset, |
112 | value, length, timeout); | 111 | value, length, |
112 | REGISTER_TIMEOUT16(length)); | ||
113 | } | 113 | } |
114 | 114 | ||
115 | static u16 rt2500usb_bbp_check(struct rt2x00_dev *rt2x00dev) | 115 | static u16 rt2500usb_bbp_check(struct rt2x00_dev *rt2x00dev) |