aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-17 11:35:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:24 -0500
commit47b10cd1375855dbc6675a176c71a512ac4b7317 (patch)
treea86ed1c88ea00371935f1ac3cd684d49b561bba2 /drivers/net/wireless/rt2x00/rt2500usb.c
parent31562e802a72caf0757f351fff563d558d48d087 (diff)
rt2x00: Remove async vendor request calls from rt2x00usb
The async vendor requests are a ugly hack which is not working correctly. The proper fix for the scheduling while atomic issue is finding out why we can't use led classes for USB drivers and fix that. Just replace all async calls with the regular ones and print an error for the disallowed LED configuration attempts. That will help in determining which led class is causing the problem. 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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 826ed692878c..9f59db91cfc2 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -292,6 +292,12 @@ static void rt2500usb_led_brightness(struct led_classdev *led_cdev,
292 unsigned int activity = 292 unsigned int activity =
293 led->rt2x00dev->led_flags & LED_SUPPORT_ACTIVITY; 293 led->rt2x00dev->led_flags & LED_SUPPORT_ACTIVITY;
294 294
295 if (in_atomic()) {
296 NOTICE(led->rt2x00dev,
297 "Ignoring LED brightness command for led %d", led->type);
298 return;
299 }
300
295 if (led->type == LED_TYPE_RADIO || led->type == LED_TYPE_ASSOC) { 301 if (led->type == LED_TYPE_RADIO || led->type == LED_TYPE_ASSOC) {
296 rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, 302 rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg,
297 MAC_CSR20_LINK, enabled); 303 MAC_CSR20_LINK, enabled);
@@ -299,8 +305,8 @@ static void rt2500usb_led_brightness(struct led_classdev *led_cdev,
299 MAC_CSR20_ACTIVITY, enabled && activity); 305 MAC_CSR20_ACTIVITY, enabled && activity);
300 } 306 }
301 307
302 rt2x00usb_vendor_request_async(led->rt2x00dev, USB_SINGLE_WRITE, 308 rt2500usb_register_write(led->rt2x00dev, MAC_CSR20,
303 MAC_CSR20, led->rt2x00dev->led_mcu_reg); 309 led->rt2x00dev->led_mcu_reg);
304} 310}
305#else 311#else
306#define rt2500usb_led_brightness NULL 312#define rt2500usb_led_brightness NULL