diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 83862e7f7aec..8d76bb2e0312 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -122,6 +122,38 @@ int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev, | |||
122 | } | 122 | } |
123 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff); | 123 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff); |
124 | 124 | ||
125 | int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev, | ||
126 | const u8 request, const u8 requesttype, | ||
127 | const u16 offset, const void *buffer, | ||
128 | const u16 buffer_length, | ||
129 | const int timeout) | ||
130 | { | ||
131 | int status = 0; | ||
132 | unsigned char *tb; | ||
133 | u16 off, len, bsize; | ||
134 | |||
135 | mutex_lock(&rt2x00dev->usb_cache_mutex); | ||
136 | |||
137 | tb = (char *)buffer; | ||
138 | off = offset; | ||
139 | len = buffer_length; | ||
140 | while (len && !status) { | ||
141 | bsize = min_t(u16, CSR_CACHE_SIZE, len); | ||
142 | status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request, | ||
143 | requesttype, off, tb, | ||
144 | bsize, timeout); | ||
145 | |||
146 | tb += bsize; | ||
147 | len -= bsize; | ||
148 | off += bsize; | ||
149 | } | ||
150 | |||
151 | mutex_unlock(&rt2x00dev->usb_cache_mutex); | ||
152 | |||
153 | return status; | ||
154 | } | ||
155 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_large_buff); | ||
156 | |||
125 | /* | 157 | /* |
126 | * TX data handlers. | 158 | * TX data handlers. |
127 | */ | 159 | */ |