diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-03 09:54:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:00 -0500 |
commit | 3b640f21af4b6b36b546fecbd3fe5109981360da (patch) | |
tree | 5fce049b149283f8864d60b5b265a12b08827b3f /drivers/net/wireless/rt2x00/rt73usb.c | |
parent | a9450b70a755abf093600035ef5361c53343fe9a (diff) |
rt2x00: Enable LED class support for rt2500usb/rt73usb
Add kerneldoc for vendor request functions in rt2x00usb.
Add asynchroneous vendor request function in rt2x00usb.
With the availability of the asynchroneuous vendor request
we can now enable LED class support for rt2500usb and rt73usb.
Since LED handling is not important, it doesn't really matter
if a register call fails (This solution is better then no
LED class support at all).
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/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index ca5a9855adbd..92c8f601296f 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -294,28 +294,25 @@ static void rt73usb_led_brightness(struct led_classdev *led_cdev, | |||
294 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, | 294 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, |
295 | MCU_LEDCS_RADIO_STATUS, enabled); | 295 | MCU_LEDCS_RADIO_STATUS, enabled); |
296 | 296 | ||
297 | rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, 0, | 297 | rt2x00usb_vendor_request_async(led->rt2x00dev, USB_LED_CONTROL, |
298 | led->rt2x00dev->led_mcu_reg, | 298 | 0, led->rt2x00dev->led_mcu_reg); |
299 | REGISTER_TIMEOUT); | ||
300 | } else if (led->type == LED_TYPE_ASSOC) { | 299 | } else if (led->type == LED_TYPE_ASSOC) { |
301 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, | 300 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, |
302 | MCU_LEDCS_LINK_BG_STATUS, bg_mode); | 301 | MCU_LEDCS_LINK_BG_STATUS, bg_mode); |
303 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, | 302 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, |
304 | MCU_LEDCS_LINK_A_STATUS, a_mode); | 303 | MCU_LEDCS_LINK_A_STATUS, a_mode); |
305 | 304 | ||
306 | rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, 0, | 305 | rt2x00usb_vendor_request_async(led->rt2x00dev, USB_LED_CONTROL, |
307 | led->rt2x00dev->led_mcu_reg, | 306 | 0, led->rt2x00dev->led_mcu_reg); |
308 | REGISTER_TIMEOUT); | ||
309 | } else if (led->type == LED_TYPE_QUALITY) { | 307 | } else if (led->type == LED_TYPE_QUALITY) { |
310 | /* | 308 | /* |
311 | * The brightness is divided into 6 levels (0 - 5), | 309 | * The brightness is divided into 6 levels (0 - 5), |
312 | * this means we need to convert the brightness | 310 | * this means we need to convert the brightness |
313 | * argument into the matching level within that range. | 311 | * argument into the matching level within that range. |
314 | */ | 312 | */ |
315 | rt2x00usb_vendor_request_sw(led->rt2x00dev, USB_LED_CONTROL, | 313 | rt2x00usb_vendor_request_async(led->rt2x00dev, USB_LED_CONTROL, |
316 | brightness / (LED_FULL / 6), | 314 | brightness / (LED_FULL / 6), |
317 | led->rt2x00dev->led_mcu_reg, | 315 | led->rt2x00dev->led_mcu_reg); |
318 | REGISTER_TIMEOUT); | ||
319 | } | 316 | } |
320 | } | 317 | } |
321 | #else | 318 | #else |
@@ -871,7 +868,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, | |||
871 | 868 | ||
872 | rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE, | 869 | rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE, |
873 | USB_VENDOR_REQUEST_OUT, | 870 | USB_VENDOR_REQUEST_OUT, |
874 | FIRMWARE_IMAGE_BASE + i, 0x0000, | 871 | FIRMWARE_IMAGE_BASE + i, 0, |
875 | cache, buflen, timeout); | 872 | cache, buflen, timeout); |
876 | 873 | ||
877 | ptr += buflen; | 874 | ptr += buflen; |
@@ -884,7 +881,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, | |||
884 | * we need to specify a long timeout time. | 881 | * we need to specify a long timeout time. |
885 | */ | 882 | */ |
886 | status = rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, | 883 | status = rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, |
887 | 0x0000, USB_MODE_FIRMWARE, | 884 | 0, USB_MODE_FIRMWARE, |
888 | REGISTER_TIMEOUT_FIRMWARE); | 885 | REGISTER_TIMEOUT_FIRMWARE); |
889 | if (status < 0) { | 886 | if (status < 0) { |
890 | ERROR(rt2x00dev, "Failed to write Firmware to device.\n"); | 887 | ERROR(rt2x00dev, "Failed to write Firmware to device.\n"); |