Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177394572
D12670.1794283457.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
9 KB
Referenced Files
None
Subscribers
None
D12670.1794283457.diff
View Options
Index: head/sys/dev/usb/template/usb_template_audio.c
===================================================================
--- head/sys/dev/usb/template/usb_template_audio.c
+++ head/sys/dev/usb/template/usb_template_audio.c
@@ -199,8 +199,8 @@
static const struct usb_temp_interface_desc audio_iface_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = audio_raw_iface_0_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 1,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL,
.bInterfaceProtocol = 0,
.iInterface = INDEX_AUDIO_MIXER,
};
@@ -257,8 +257,8 @@
static const struct usb_temp_interface_desc audio_iface_1_alt_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = NULL, /* no raw descriptors */
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_AUDIO_PLAYBACK,
};
@@ -266,8 +266,8 @@
static const struct usb_temp_interface_desc audio_iface_1_alt_1 = {
.ppEndpoints = audio_iface_1_ep,
.ppRawDesc = audio_raw_iface_1_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_AUDIO_PLAYBACK,
.isAltInterface = 1, /* this is an alternate setting */
@@ -315,8 +315,8 @@
static const struct usb_temp_interface_desc audio_iface_2_alt_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = NULL, /* no raw descriptors */
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_AUDIO_RECORD,
};
@@ -324,8 +324,8 @@
static const struct usb_temp_interface_desc audio_iface_2_alt_1 = {
.ppEndpoints = audio_iface_2_ep,
.ppRawDesc = audio_raw_iface_2_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_AUDIO_RECORD,
.isAltInterface = 1, /* this is an alternate setting */
Index: head/sys/dev/usb/template/usb_template_kbd.c
===================================================================
--- head/sys/dev/usb/template/usb_template_kbd.c
+++ head/sys/dev/usb/template/usb_template_kbd.c
@@ -130,9 +130,9 @@
static const struct usb_temp_interface_desc keyboard_iface_0 = {
.ppRawDesc = keyboard_iface_0_desc,
.ppEndpoints = keyboard_endpoints,
- .bInterfaceClass = 3,
- .bInterfaceSubClass = 1,
- .bInterfaceProtocol = 1,
+ .bInterfaceClass = UICLASS_HID,
+ .bInterfaceSubClass = UISUBCLASS_BOOT,
+ .bInterfaceProtocol = UIPROTO_BOOT_KEYBOARD,
.iInterface = INDEX_KEYBOARD,
};
Index: head/sys/dev/usb/template/usb_template_midi.c
===================================================================
--- head/sys/dev/usb/template/usb_template_midi.c
+++ head/sys/dev/usb/template/usb_template_midi.c
@@ -89,8 +89,8 @@
static const struct usb_temp_interface_desc midi_iface_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = midi_descs_0,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 1,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL,
.bInterfaceProtocol = 0,
.iInterface = INDEX_MIDI_IF,
};
@@ -171,8 +171,8 @@
static const struct usb_temp_interface_desc midi_iface_1 = {
.ppRawDesc = midi_descs_1,
.ppEndpoints = midi_iface_1_ep,
- .bInterfaceClass = 0x01, /* MIDI */
- .bInterfaceSubClass = 3, /* MIDI streaming */
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_MIDISTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_MIDI_IF,
};
Index: head/sys/dev/usb/template/usb_template_modem.c
===================================================================
--- head/sys/dev/usb/template/usb_template_modem.c
+++ head/sys/dev/usb/template/usb_template_modem.c
@@ -156,17 +156,17 @@
static const struct usb_temp_interface_desc modem_iface_0 = {
.ppRawDesc = modem_iface_0_desc,
.ppEndpoints = modem_iface_0_ep,
- .bInterfaceClass = 2,
- .bInterfaceSubClass = 2,
- .bInterfaceProtocol = 1,
+ .bInterfaceClass = UICLASS_CDC,
+ .bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL,
+ .bInterfaceProtocol = UIPROTO_CDC_AT,
.iInterface = INDEX_MODEM,
};
static const struct usb_temp_interface_desc modem_iface_1 = {
.ppEndpoints = modem_iface_1_ep,
- .bInterfaceClass = 10,
- .bInterfaceSubClass = 0,
- .bInterfaceProtocol = 0,
+ .bInterfaceClass = UICLASS_CDC_DATA,
+ .bInterfaceSubClass = UISUBCLASS_DATA,
+ .bInterfaceProtocol = UIPROTO_CDC_NONE,
.iInterface = INDEX_MODEM,
};
Index: head/sys/dev/usb/template/usb_template_mouse.c
===================================================================
--- head/sys/dev/usb/template/usb_template_mouse.c
+++ head/sys/dev/usb/template/usb_template_mouse.c
@@ -128,9 +128,9 @@
static const struct usb_temp_interface_desc mouse_iface_0 = {
.ppRawDesc = mouse_iface_0_desc,
.ppEndpoints = mouse_endpoints,
- .bInterfaceClass = 3,
- .bInterfaceSubClass = 1,
- .bInterfaceProtocol = 2,
+ .bInterfaceClass = UICLASS_HID,
+ .bInterfaceSubClass = UISUBCLASS_BOOT,
+ .bInterfaceProtocol = UIPROTO_MOUSE,
.iInterface = INDEX_MOUSE,
};
Index: head/sys/dev/usb/template/usb_template_phone.c
===================================================================
--- head/sys/dev/usb/template/usb_template_phone.c
+++ head/sys/dev/usb/template/usb_template_phone.c
@@ -156,8 +156,8 @@
static const struct usb_temp_interface_desc phone_iface_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = phone_raw_iface_0_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 1,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOCONTROL,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_MIXER,
};
@@ -213,8 +213,8 @@
static const struct usb_temp_interface_desc phone_iface_1_alt_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = NULL, /* no raw descriptors */
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_PLAYBACK,
};
@@ -222,8 +222,8 @@
static const struct usb_temp_interface_desc phone_iface_1_alt_1 = {
.ppEndpoints = phone_iface_1_ep,
.ppRawDesc = phone_raw_iface_1_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_PLAYBACK,
.isAltInterface = 1, /* this is an alternate setting */
@@ -270,8 +270,8 @@
static const struct usb_temp_interface_desc phone_iface_2_alt_0 = {
.ppEndpoints = NULL, /* no endpoints */
.ppRawDesc = NULL, /* no raw descriptors */
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_RECORD,
};
@@ -279,8 +279,8 @@
static const struct usb_temp_interface_desc phone_iface_2_alt_1 = {
.ppEndpoints = phone_iface_2_ep,
.ppRawDesc = phone_raw_iface_2_desc,
- .bInterfaceClass = 1,
- .bInterfaceSubClass = 2,
+ .bInterfaceClass = UICLASS_AUDIO,
+ .bInterfaceSubClass = UISUBCLASS_AUDIOSTREAM,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_RECORD,
.isAltInterface = 1, /* this is an alternate setting */
@@ -321,7 +321,7 @@
static const struct usb_temp_interface_desc phone_iface_3 = {
.ppEndpoints = phone_iface_3_ep,
.ppRawDesc = phone_hid_desc_0,
- .bInterfaceClass = 3,
+ .bInterfaceClass = UICLASS_HID,
.bInterfaceSubClass = 0,
.bInterfaceProtocol = 0,
.iInterface = INDEX_PHONE_HID,
Index: head/sys/dev/usb/template/usb_template_serialnet.c
===================================================================
--- head/sys/dev/usb/template/usb_template_serialnet.c
+++ head/sys/dev/usb/template/usb_template_serialnet.c
@@ -202,7 +202,7 @@
.ppRawDesc = eth_control_if_desc,
.bInterfaceClass = UICLASS_CDC,
.bInterfaceSubClass = UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL,
- .bInterfaceProtocol = 0,
+ .bInterfaceProtocol = UIPROTO_CDC_NONE,
.iInterface = STRING_ETH_CONTROL_INDEX,
};
@@ -215,7 +215,7 @@
static const struct usb_temp_interface_desc eth_data_null_interface = {
.ppEndpoints = NULL, /* no endpoints */
.bInterfaceClass = UICLASS_CDC_DATA,
- .bInterfaceSubClass = 0,
+ .bInterfaceSubClass = UISUBCLASS_DATA,
.bInterfaceProtocol = 0,
.iInterface = STRING_ETH_DATA_INDEX,
};
@@ -304,16 +304,16 @@
static const struct usb_temp_interface_desc modem_iface_0 = {
.ppRawDesc = modem_iface_0_desc,
.ppEndpoints = modem_iface_0_ep,
- .bInterfaceClass = 2,
- .bInterfaceSubClass = 2,
- .bInterfaceProtocol = 1,
+ .bInterfaceClass = UICLASS_CDC,
+ .bInterfaceSubClass = UISUBCLASS_ABSTRACT_CONTROL_MODEL,
+ .bInterfaceProtocol = UIPROTO_CDC_AT,
.iInterface = STRING_MODEM_INDEX,
};
static const struct usb_temp_interface_desc modem_iface_1 = {
.ppEndpoints = modem_iface_1_ep,
- .bInterfaceClass = 10,
- .bInterfaceSubClass = 0,
+ .bInterfaceClass = UICLASS_CDC_DATA,
+ .bInterfaceSubClass = UISUBCLASS_DATA,
.bInterfaceProtocol = 0,
.iInterface = STRING_MODEM_INDEX,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 10, 4:04 AM (10 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41626798
Default Alt Text
D12670.1794283457.diff (9 KB)
Attached To
Mode
D12670: Replace magic numbers with #defines.
Attached
Detach File
Event Timeline