diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-17 11:35:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:24 -0500 |
commit | 47b10cd1375855dbc6675a176c71a512ac4b7317 (patch) | |
tree | a86ed1c88ea00371935f1ac3cd684d49b561bba2 /drivers/net/wireless/rt2x00/rt2x00usb.c | |
parent | 31562e802a72caf0757f351fff563d558d48d087 (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/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 89471b24a443..063b167da31e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -122,58 +122,6 @@ 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 | static void rt2x00usb_vendor_request_async_complete(struct urb *urb) | ||
126 | { | ||
127 | /* | ||
128 | * We're done with it, descrease usage count and let the | ||
129 | * usb layer delete it as soon as it is done with it. | ||
130 | */ | ||
131 | usb_put_urb(urb); | ||
132 | } | ||
133 | |||
134 | int rt2x00usb_vendor_request_async(struct rt2x00_dev *rt2x00dev, | ||
135 | const u8 request, const u16 offset, | ||
136 | const u16 value) | ||
137 | { | ||
138 | struct usb_device *usb_dev = rt2x00dev_usb_dev(rt2x00dev); | ||
139 | struct usb_ctrlrequest *ctrl; | ||
140 | struct urb *urb; | ||
141 | int status; | ||
142 | |||
143 | urb = usb_alloc_urb(0, GFP_NOIO); | ||
144 | if (!urb) | ||
145 | return -ENOMEM; | ||
146 | |||
147 | ctrl = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO); | ||
148 | if (!ctrl) { | ||
149 | status = -ENOMEM; | ||
150 | goto exit; | ||
151 | } | ||
152 | |||
153 | ctrl->bRequestType= USB_VENDOR_REQUEST_OUT; | ||
154 | ctrl->bRequest = request; | ||
155 | ctrl->wValue = cpu_to_le16p(&value); | ||
156 | ctrl->wIndex = cpu_to_le16p(&offset); | ||
157 | ctrl->wLength = 0; | ||
158 | |||
159 | usb_fill_control_urb(urb, usb_dev, usb_sndctrlpipe(usb_dev, 0), | ||
160 | (unsigned char *)ctrl, NULL, 0, | ||
161 | rt2x00usb_vendor_request_async_complete, NULL); | ||
162 | |||
163 | status = usb_submit_urb(urb, GFP_ATOMIC); | ||
164 | if (!status) | ||
165 | goto exit; | ||
166 | |||
167 | return 0; | ||
168 | |||
169 | exit: | ||
170 | usb_put_urb(urb); | ||
171 | kfree(ctrl); | ||
172 | |||
173 | return status; | ||
174 | } | ||
175 | EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_async); | ||
176 | |||
177 | /* | 125 | /* |
178 | * TX data handlers. | 126 | * TX data handlers. |
179 | */ | 127 | */ |