aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.h
diff options
context:
space:
mode:
authorIwo Mergler <iwo@call-direct.com.au>2008-07-19 10:16:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-29 16:55:04 -0400
commited0dbeeb92bdb1030bcec67e20b294bd2020cb31 (patch)
tree1665b41cd9b622b34ff3f737e0fdc143d9a22cb6 /drivers/net/wireless/rt2x00/rt2x00usb.h
parentf2fdbc4847e0d3991474949f21aa439c361391db (diff)
rt2x00: Support for large vendor requests
Adds an extra rt2x00 vendor request function to support register transfers beyond the CSR_CACHE_SIZE / USB packet size limit. This is useful for firmware uploads, beacon templates and keys, all of which are to large to do with a single USB request. Signed-off-by: Iwo Mergler <Iwo@call-direct.com.au> 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/rt2x00usb.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index aad794adf52c..8d5d4272e88f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -70,7 +70,7 @@
70/* 70/*
71 * Cache size 71 * Cache size
72 */ 72 */
73#define CSR_CACHE_SIZE 8 73#define CSR_CACHE_SIZE 64
74#define CSR_CACHE_SIZE_FIRMWARE 64 74#define CSR_CACHE_SIZE_FIRMWARE 64
75 75
76/* 76/*
@@ -172,6 +172,25 @@ int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev,
172 const u16 buffer_length, const int timeout); 172 const u16 buffer_length, const int timeout);
173 173
174/** 174/**
175 * rt2x00usb_vendor_request_large_buff - Send register command to device (buffered)
176 * @rt2x00dev: Pointer to &struct rt2x00_dev
177 * @request: USB vendor command (See &enum rt2x00usb_vendor_request)
178 * @requesttype: Request type &USB_VENDOR_REQUEST_*
179 * @offset: Register start offset to perform action on
180 * @buffer: Buffer where information will be read/written to by device
181 * @buffer_length: Size of &buffer
182 * @timeout: Operation timeout
183 *
184 * This function is used to transfer register data in blocks larger
185 * then CSR_CACHE_SIZE. Use for firmware upload, keys and beacons.
186 */
187int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev,
188 const u8 request, const u8 requesttype,
189 const u16 offset, void *buffer,
190 const u16 buffer_length,
191 const int timeout);
192
193/**
175 * rt2x00usb_vendor_request_sw - Send single register command to device 194 * rt2x00usb_vendor_request_sw - Send single register command to device
176 * @rt2x00dev: Pointer to &struct rt2x00_dev 195 * @rt2x00dev: Pointer to &struct rt2x00_dev
177 * @request: USB vendor command (See &enum rt2x00usb_vendor_request) 196 * @request: USB vendor command (See &enum rt2x00usb_vendor_request)