# \[PATCH\] Input: xpad - correctly set LED for wireless controller

- From: Yang Zhao \<hidden\>
- Date: 2015-04-22 06:03:39 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2015/04/8925945
- Thread: https://ratatoskr.run/linux-input/2015/04/8925945/t.md

```text
The payload sent to wireless controllers to set its LED state via
interrupt is correct but using the wrong control parameters, causing the
packet to apparently be ignored.  Sending this correctly fixes the
"always blinking LED" problem on Xbox 360 wireless controllers.

Signed-off-by: Yang Zhao <redacted>
---
 drivers/input/joystick/xpad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 61c7611..7a0ae65 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1208,8 +1208,8 @@ static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id
 			usb_fill_int_urb(xpad->bulk_out, udev,
 					 usb_sndintpipe(udev,
 							ep_irq_in->bEndpointAddress),
-					 xpad->bdata, XPAD_PKT_LEN,
-					 xpad_bulk_out, xpad, 0);
+					 xpad->bdata, 12,
+					 xpad_irq_out, xpad, ep_irq_in->bInterval);
 		}
 
 		/*
-- 
2.0.5

```
