History

usb: ch9: Add size macro for SSP dev cap descriptor

The SuperspeedPlus Device Capability Descriptor has a variable size depending on the number of sublink speed attributes. This patch adds a macro to calculate that size. The macro takes one argument, the Sublink Speed Attribute Count (SSAC) as reported by the descriptor in bmAttributes[4:0]. See USB 3.1 9.6.2.5, Table 9-19.

John Youn committed 10 years ago

Commit 446fa3a1 parent 7b05d3b1 file · +6 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/usb/ch9.h+6−0
@@ -923,6 +923,12 @@ struct usb_ptm_cap_descriptor { · 922 unmodified lines
923 __u8 bDevCapabilityType;923 __u8 bDevCapabilityType;
924} __attribute__((packed));924} __attribute__((packed));
925 925
926/*
927 * The size of the descriptor for the Sublink Speed Attribute Count
928 * (SSAC) specified in bmAttributes[4:0].
929 */
930#define USB_DT_USB_SSP_CAP_SIZE(ssac) (16 + ssac * 4)
931
926/*-------------------------------------------------------------------------*/932/*-------------------------------------------------------------------------*/
927 933
928/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with934/* USB_DT_WIRELESS_ENDPOINT_COMP: companion descriptor associated with

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t