usb: host: use uint16_t for Language ID
usbh_req_desc() truncates the descriptor id. This problem is most visible with string descriptor requests, as only then can wIndex be greater than 0xFF. In particular, this affects commonly used language IDs such as English (United States), which is 0x0409. Signed-off-by: Alexander Kaiser <akaiser@urbansky.com>
This commit is contained in:
parent
fcb8fa7b02
commit
476a224dfa
@ -85,7 +85,7 @@ buf_alloc_err:
|
||||
|
||||
int usbh_req_desc(struct usb_device *const udev,
|
||||
const uint8_t type, const uint8_t index,
|
||||
const uint8_t id,
|
||||
const uint16_t id,
|
||||
const uint16_t len,
|
||||
struct net_buf *const buf)
|
||||
{
|
||||
|
||||
@ -22,7 +22,7 @@ int usbh_req_setup(struct usb_device *const udev,
|
||||
|
||||
int usbh_req_desc(struct usb_device *const udev,
|
||||
const uint8_t type, const uint8_t index,
|
||||
const uint8_t id,
|
||||
const uint16_t id,
|
||||
const uint16_t len,
|
||||
struct net_buf *const data);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user