Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/linux/usb
File: cdc.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* USB Communications Device Class (CDC) definitions
[2] Fix | Delete
*
[3] Fix | Delete
* CDC says how to talk to lots of different types of network adapters,
[4] Fix | Delete
* notably ethernet adapters and various modems. It's used mostly with
[5] Fix | Delete
* firmware based USB peripherals.
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
#ifndef __UAPI_LINUX_USB_CDC_H
[9] Fix | Delete
#define __UAPI_LINUX_USB_CDC_H
[10] Fix | Delete
[11] Fix | Delete
#include <linux/types.h>
[12] Fix | Delete
[13] Fix | Delete
#define USB_CDC_SUBCLASS_ACM 0x02
[14] Fix | Delete
#define USB_CDC_SUBCLASS_ETHERNET 0x06
[15] Fix | Delete
#define USB_CDC_SUBCLASS_WHCM 0x08
[16] Fix | Delete
#define USB_CDC_SUBCLASS_DMM 0x09
[17] Fix | Delete
#define USB_CDC_SUBCLASS_MDLM 0x0a
[18] Fix | Delete
#define USB_CDC_SUBCLASS_OBEX 0x0b
[19] Fix | Delete
#define USB_CDC_SUBCLASS_EEM 0x0c
[20] Fix | Delete
#define USB_CDC_SUBCLASS_NCM 0x0d
[21] Fix | Delete
#define USB_CDC_SUBCLASS_MBIM 0x0e
[22] Fix | Delete
[23] Fix | Delete
#define USB_CDC_PROTO_NONE 0
[24] Fix | Delete
[25] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_V25TER 1
[26] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_PCCA101 2
[27] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_PCCA101_WAKE 3
[28] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_GSM 4
[29] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_3G 5
[30] Fix | Delete
#define USB_CDC_ACM_PROTO_AT_CDMA 6
[31] Fix | Delete
#define USB_CDC_ACM_PROTO_VENDOR 0xff
[32] Fix | Delete
[33] Fix | Delete
#define USB_CDC_PROTO_EEM 7
[34] Fix | Delete
[35] Fix | Delete
#define USB_CDC_NCM_PROTO_NTB 1
[36] Fix | Delete
#define USB_CDC_MBIM_PROTO_NTB 2
[37] Fix | Delete
[38] Fix | Delete
/*-------------------------------------------------------------------------*/
[39] Fix | Delete
[40] Fix | Delete
/*
[41] Fix | Delete
* Class-Specific descriptors ... there are a couple dozen of them
[42] Fix | Delete
*/
[43] Fix | Delete
[44] Fix | Delete
#define USB_CDC_HEADER_TYPE 0x00 /* header_desc */
[45] Fix | Delete
#define USB_CDC_CALL_MANAGEMENT_TYPE 0x01 /* call_mgmt_descriptor */
[46] Fix | Delete
#define USB_CDC_ACM_TYPE 0x02 /* acm_descriptor */
[47] Fix | Delete
#define USB_CDC_UNION_TYPE 0x06 /* union_desc */
[48] Fix | Delete
#define USB_CDC_COUNTRY_TYPE 0x07
[49] Fix | Delete
#define USB_CDC_NETWORK_TERMINAL_TYPE 0x0a /* network_terminal_desc */
[50] Fix | Delete
#define USB_CDC_ETHERNET_TYPE 0x0f /* ether_desc */
[51] Fix | Delete
#define USB_CDC_WHCM_TYPE 0x11
[52] Fix | Delete
#define USB_CDC_MDLM_TYPE 0x12 /* mdlm_desc */
[53] Fix | Delete
#define USB_CDC_MDLM_DETAIL_TYPE 0x13 /* mdlm_detail_desc */
[54] Fix | Delete
#define USB_CDC_DMM_TYPE 0x14
[55] Fix | Delete
#define USB_CDC_OBEX_TYPE 0x15
[56] Fix | Delete
#define USB_CDC_NCM_TYPE 0x1a
[57] Fix | Delete
#define USB_CDC_MBIM_TYPE 0x1b
[58] Fix | Delete
#define USB_CDC_MBIM_EXTENDED_TYPE 0x1c
[59] Fix | Delete
[60] Fix | Delete
/* "Header Functional Descriptor" from CDC spec 5.2.3.1 */
[61] Fix | Delete
struct usb_cdc_header_desc {
[62] Fix | Delete
__u8 bLength;
[63] Fix | Delete
__u8 bDescriptorType;
[64] Fix | Delete
__u8 bDescriptorSubType;
[65] Fix | Delete
[66] Fix | Delete
__le16 bcdCDC;
[67] Fix | Delete
} __attribute__ ((packed));
[68] Fix | Delete
[69] Fix | Delete
/* "Call Management Descriptor" from CDC spec 5.2.3.2 */
[70] Fix | Delete
struct usb_cdc_call_mgmt_descriptor {
[71] Fix | Delete
__u8 bLength;
[72] Fix | Delete
__u8 bDescriptorType;
[73] Fix | Delete
__u8 bDescriptorSubType;
[74] Fix | Delete
[75] Fix | Delete
__u8 bmCapabilities;
[76] Fix | Delete
#define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01
[77] Fix | Delete
#define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02
[78] Fix | Delete
[79] Fix | Delete
__u8 bDataInterface;
[80] Fix | Delete
} __attribute__ ((packed));
[81] Fix | Delete
[82] Fix | Delete
/* "Abstract Control Management Descriptor" from CDC spec 5.2.3.3 */
[83] Fix | Delete
struct usb_cdc_acm_descriptor {
[84] Fix | Delete
__u8 bLength;
[85] Fix | Delete
__u8 bDescriptorType;
[86] Fix | Delete
__u8 bDescriptorSubType;
[87] Fix | Delete
[88] Fix | Delete
__u8 bmCapabilities;
[89] Fix | Delete
} __attribute__ ((packed));
[90] Fix | Delete
[91] Fix | Delete
/* capabilities from 5.2.3.3 */
[92] Fix | Delete
[93] Fix | Delete
#define USB_CDC_COMM_FEATURE 0x01
[94] Fix | Delete
#define USB_CDC_CAP_LINE 0x02
[95] Fix | Delete
#define USB_CDC_CAP_BRK 0x04
[96] Fix | Delete
#define USB_CDC_CAP_NOTIFY 0x08
[97] Fix | Delete
[98] Fix | Delete
/* "Union Functional Descriptor" from CDC spec 5.2.3.8 */
[99] Fix | Delete
struct usb_cdc_union_desc {
[100] Fix | Delete
__u8 bLength;
[101] Fix | Delete
__u8 bDescriptorType;
[102] Fix | Delete
__u8 bDescriptorSubType;
[103] Fix | Delete
[104] Fix | Delete
__u8 bMasterInterface0;
[105] Fix | Delete
__u8 bSlaveInterface0;
[106] Fix | Delete
/* ... and there could be other slave interfaces */
[107] Fix | Delete
} __attribute__ ((packed));
[108] Fix | Delete
[109] Fix | Delete
/* "Country Selection Functional Descriptor" from CDC spec 5.2.3.9 */
[110] Fix | Delete
struct usb_cdc_country_functional_desc {
[111] Fix | Delete
__u8 bLength;
[112] Fix | Delete
__u8 bDescriptorType;
[113] Fix | Delete
__u8 bDescriptorSubType;
[114] Fix | Delete
[115] Fix | Delete
__u8 iCountryCodeRelDate;
[116] Fix | Delete
__le16 wCountyCode0;
[117] Fix | Delete
/* ... and there can be a lot of country codes */
[118] Fix | Delete
} __attribute__ ((packed));
[119] Fix | Delete
[120] Fix | Delete
/* "Network Channel Terminal Functional Descriptor" from CDC spec 5.2.3.11 */
[121] Fix | Delete
struct usb_cdc_network_terminal_desc {
[122] Fix | Delete
__u8 bLength;
[123] Fix | Delete
__u8 bDescriptorType;
[124] Fix | Delete
__u8 bDescriptorSubType;
[125] Fix | Delete
[126] Fix | Delete
__u8 bEntityId;
[127] Fix | Delete
__u8 iName;
[128] Fix | Delete
__u8 bChannelIndex;
[129] Fix | Delete
__u8 bPhysicalInterface;
[130] Fix | Delete
} __attribute__ ((packed));
[131] Fix | Delete
[132] Fix | Delete
/* "Ethernet Networking Functional Descriptor" from CDC spec 5.2.3.16 */
[133] Fix | Delete
struct usb_cdc_ether_desc {
[134] Fix | Delete
__u8 bLength;
[135] Fix | Delete
__u8 bDescriptorType;
[136] Fix | Delete
__u8 bDescriptorSubType;
[137] Fix | Delete
[138] Fix | Delete
__u8 iMACAddress;
[139] Fix | Delete
__le32 bmEthernetStatistics;
[140] Fix | Delete
__le16 wMaxSegmentSize;
[141] Fix | Delete
__le16 wNumberMCFilters;
[142] Fix | Delete
__u8 bNumberPowerFilters;
[143] Fix | Delete
} __attribute__ ((packed));
[144] Fix | Delete
[145] Fix | Delete
/* "Telephone Control Model Functional Descriptor" from CDC WMC spec 6.3..3 */
[146] Fix | Delete
struct usb_cdc_dmm_desc {
[147] Fix | Delete
__u8 bFunctionLength;
[148] Fix | Delete
__u8 bDescriptorType;
[149] Fix | Delete
__u8 bDescriptorSubtype;
[150] Fix | Delete
__u16 bcdVersion;
[151] Fix | Delete
__le16 wMaxCommand;
[152] Fix | Delete
} __attribute__ ((packed));
[153] Fix | Delete
[154] Fix | Delete
/* "MDLM Functional Descriptor" from CDC WMC spec 6.7.2.3 */
[155] Fix | Delete
struct usb_cdc_mdlm_desc {
[156] Fix | Delete
__u8 bLength;
[157] Fix | Delete
__u8 bDescriptorType;
[158] Fix | Delete
__u8 bDescriptorSubType;
[159] Fix | Delete
[160] Fix | Delete
__le16 bcdVersion;
[161] Fix | Delete
__u8 bGUID[16];
[162] Fix | Delete
} __attribute__ ((packed));
[163] Fix | Delete
[164] Fix | Delete
/* "MDLM Detail Functional Descriptor" from CDC WMC spec 6.7.2.4 */
[165] Fix | Delete
struct usb_cdc_mdlm_detail_desc {
[166] Fix | Delete
__u8 bLength;
[167] Fix | Delete
__u8 bDescriptorType;
[168] Fix | Delete
__u8 bDescriptorSubType;
[169] Fix | Delete
[170] Fix | Delete
/* type is associated with mdlm_desc.bGUID */
[171] Fix | Delete
__u8 bGuidDescriptorType;
[172] Fix | Delete
__u8 bDetailData[0];
[173] Fix | Delete
} __attribute__ ((packed));
[174] Fix | Delete
[175] Fix | Delete
/* "OBEX Control Model Functional Descriptor" */
[176] Fix | Delete
struct usb_cdc_obex_desc {
[177] Fix | Delete
__u8 bLength;
[178] Fix | Delete
__u8 bDescriptorType;
[179] Fix | Delete
__u8 bDescriptorSubType;
[180] Fix | Delete
[181] Fix | Delete
__le16 bcdVersion;
[182] Fix | Delete
} __attribute__ ((packed));
[183] Fix | Delete
[184] Fix | Delete
/* "NCM Control Model Functional Descriptor" */
[185] Fix | Delete
struct usb_cdc_ncm_desc {
[186] Fix | Delete
__u8 bLength;
[187] Fix | Delete
__u8 bDescriptorType;
[188] Fix | Delete
__u8 bDescriptorSubType;
[189] Fix | Delete
[190] Fix | Delete
__le16 bcdNcmVersion;
[191] Fix | Delete
__u8 bmNetworkCapabilities;
[192] Fix | Delete
} __attribute__ ((packed));
[193] Fix | Delete
[194] Fix | Delete
/* "MBIM Control Model Functional Descriptor" */
[195] Fix | Delete
struct usb_cdc_mbim_desc {
[196] Fix | Delete
__u8 bLength;
[197] Fix | Delete
__u8 bDescriptorType;
[198] Fix | Delete
__u8 bDescriptorSubType;
[199] Fix | Delete
[200] Fix | Delete
__le16 bcdMBIMVersion;
[201] Fix | Delete
__le16 wMaxControlMessage;
[202] Fix | Delete
__u8 bNumberFilters;
[203] Fix | Delete
__u8 bMaxFilterSize;
[204] Fix | Delete
__le16 wMaxSegmentSize;
[205] Fix | Delete
__u8 bmNetworkCapabilities;
[206] Fix | Delete
} __attribute__ ((packed));
[207] Fix | Delete
[208] Fix | Delete
/* "MBIM Extended Functional Descriptor" from CDC MBIM spec 1.0 errata-1 */
[209] Fix | Delete
struct usb_cdc_mbim_extended_desc {
[210] Fix | Delete
__u8 bLength;
[211] Fix | Delete
__u8 bDescriptorType;
[212] Fix | Delete
__u8 bDescriptorSubType;
[213] Fix | Delete
[214] Fix | Delete
__le16 bcdMBIMExtendedVersion;
[215] Fix | Delete
__u8 bMaxOutstandingCommandMessages;
[216] Fix | Delete
__le16 wMTU;
[217] Fix | Delete
} __attribute__ ((packed));
[218] Fix | Delete
[219] Fix | Delete
/*-------------------------------------------------------------------------*/
[220] Fix | Delete
[221] Fix | Delete
/*
[222] Fix | Delete
* Class-Specific Control Requests (6.2)
[223] Fix | Delete
*
[224] Fix | Delete
* section 3.6.2.1 table 4 has the ACM profile, for modems.
[225] Fix | Delete
* section 3.8.2 table 10 has the ethernet profile.
[226] Fix | Delete
*
[227] Fix | Delete
* Microsoft's RNDIS stack for Ethernet is a vendor-specific CDC ACM variant,
[228] Fix | Delete
* heavily dependent on the encapsulated (proprietary) command mechanism.
[229] Fix | Delete
*/
[230] Fix | Delete
[231] Fix | Delete
#define USB_CDC_SEND_ENCAPSULATED_COMMAND 0x00
[232] Fix | Delete
#define USB_CDC_GET_ENCAPSULATED_RESPONSE 0x01
[233] Fix | Delete
#define USB_CDC_REQ_SET_LINE_CODING 0x20
[234] Fix | Delete
#define USB_CDC_REQ_GET_LINE_CODING 0x21
[235] Fix | Delete
#define USB_CDC_REQ_SET_CONTROL_LINE_STATE 0x22
[236] Fix | Delete
#define USB_CDC_REQ_SEND_BREAK 0x23
[237] Fix | Delete
#define USB_CDC_SET_ETHERNET_MULTICAST_FILTERS 0x40
[238] Fix | Delete
#define USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER 0x41
[239] Fix | Delete
#define USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER 0x42
[240] Fix | Delete
#define USB_CDC_SET_ETHERNET_PACKET_FILTER 0x43
[241] Fix | Delete
#define USB_CDC_GET_ETHERNET_STATISTIC 0x44
[242] Fix | Delete
#define USB_CDC_GET_NTB_PARAMETERS 0x80
[243] Fix | Delete
#define USB_CDC_GET_NET_ADDRESS 0x81
[244] Fix | Delete
#define USB_CDC_SET_NET_ADDRESS 0x82
[245] Fix | Delete
#define USB_CDC_GET_NTB_FORMAT 0x83
[246] Fix | Delete
#define USB_CDC_SET_NTB_FORMAT 0x84
[247] Fix | Delete
#define USB_CDC_GET_NTB_INPUT_SIZE 0x85
[248] Fix | Delete
#define USB_CDC_SET_NTB_INPUT_SIZE 0x86
[249] Fix | Delete
#define USB_CDC_GET_MAX_DATAGRAM_SIZE 0x87
[250] Fix | Delete
#define USB_CDC_SET_MAX_DATAGRAM_SIZE 0x88
[251] Fix | Delete
#define USB_CDC_GET_CRC_MODE 0x89
[252] Fix | Delete
#define USB_CDC_SET_CRC_MODE 0x8a
[253] Fix | Delete
[254] Fix | Delete
/* Line Coding Structure from CDC spec 6.2.13 */
[255] Fix | Delete
struct usb_cdc_line_coding {
[256] Fix | Delete
__le32 dwDTERate;
[257] Fix | Delete
__u8 bCharFormat;
[258] Fix | Delete
#define USB_CDC_1_STOP_BITS 0
[259] Fix | Delete
#define USB_CDC_1_5_STOP_BITS 1
[260] Fix | Delete
#define USB_CDC_2_STOP_BITS 2
[261] Fix | Delete
[262] Fix | Delete
__u8 bParityType;
[263] Fix | Delete
#define USB_CDC_NO_PARITY 0
[264] Fix | Delete
#define USB_CDC_ODD_PARITY 1
[265] Fix | Delete
#define USB_CDC_EVEN_PARITY 2
[266] Fix | Delete
#define USB_CDC_MARK_PARITY 3
[267] Fix | Delete
#define USB_CDC_SPACE_PARITY 4
[268] Fix | Delete
[269] Fix | Delete
__u8 bDataBits;
[270] Fix | Delete
} __attribute__ ((packed));
[271] Fix | Delete
[272] Fix | Delete
/* Control Signal Bitmap Values from 6.2.14 SetControlLineState */
[273] Fix | Delete
#define USB_CDC_CTRL_DTR (1 << 0)
[274] Fix | Delete
#define USB_CDC_CTRL_RTS (1 << 1)
[275] Fix | Delete
[276] Fix | Delete
/* table 62; bits in multicast filter */
[277] Fix | Delete
#define USB_CDC_PACKET_TYPE_PROMISCUOUS (1 << 0)
[278] Fix | Delete
#define USB_CDC_PACKET_TYPE_ALL_MULTICAST (1 << 1) /* no filter */
[279] Fix | Delete
#define USB_CDC_PACKET_TYPE_DIRECTED (1 << 2)
[280] Fix | Delete
#define USB_CDC_PACKET_TYPE_BROADCAST (1 << 3)
[281] Fix | Delete
#define USB_CDC_PACKET_TYPE_MULTICAST (1 << 4) /* filtered */
[282] Fix | Delete
[283] Fix | Delete
[284] Fix | Delete
/*-------------------------------------------------------------------------*/
[285] Fix | Delete
[286] Fix | Delete
/*
[287] Fix | Delete
* Class-Specific Notifications (6.3) sent by interrupt transfers
[288] Fix | Delete
*
[289] Fix | Delete
* section 3.8.2 table 11 of the CDC spec lists Ethernet notifications
[290] Fix | Delete
* section 3.6.2.1 table 5 specifies ACM notifications, accepted by RNDIS
[291] Fix | Delete
* RNDIS also defines its own bit-incompatible notifications
[292] Fix | Delete
*/
[293] Fix | Delete
[294] Fix | Delete
#define USB_CDC_NOTIFY_NETWORK_CONNECTION 0x00
[295] Fix | Delete
#define USB_CDC_NOTIFY_RESPONSE_AVAILABLE 0x01
[296] Fix | Delete
#define USB_CDC_NOTIFY_SERIAL_STATE 0x20
[297] Fix | Delete
#define USB_CDC_NOTIFY_SPEED_CHANGE 0x2a
[298] Fix | Delete
[299] Fix | Delete
struct usb_cdc_notification {
[300] Fix | Delete
__u8 bmRequestType;
[301] Fix | Delete
__u8 bNotificationType;
[302] Fix | Delete
__le16 wValue;
[303] Fix | Delete
__le16 wIndex;
[304] Fix | Delete
__le16 wLength;
[305] Fix | Delete
} __attribute__ ((packed));
[306] Fix | Delete
[307] Fix | Delete
/* UART State Bitmap Values from 6.3.5 SerialState */
[308] Fix | Delete
#define USB_CDC_SERIAL_STATE_DCD (1 << 0)
[309] Fix | Delete
#define USB_CDC_SERIAL_STATE_DSR (1 << 1)
[310] Fix | Delete
#define USB_CDC_SERIAL_STATE_BREAK (1 << 2)
[311] Fix | Delete
#define USB_CDC_SERIAL_STATE_RING_SIGNAL (1 << 3)
[312] Fix | Delete
#define USB_CDC_SERIAL_STATE_FRAMING (1 << 4)
[313] Fix | Delete
#define USB_CDC_SERIAL_STATE_PARITY (1 << 5)
[314] Fix | Delete
#define USB_CDC_SERIAL_STATE_OVERRUN (1 << 6)
[315] Fix | Delete
[316] Fix | Delete
struct usb_cdc_speed_change {
[317] Fix | Delete
__le32 DLBitRRate; /* contains the downlink bit rate (IN pipe) */
[318] Fix | Delete
__le32 ULBitRate; /* contains the uplink bit rate (OUT pipe) */
[319] Fix | Delete
} __attribute__ ((packed));
[320] Fix | Delete
[321] Fix | Delete
/*-------------------------------------------------------------------------*/
[322] Fix | Delete
[323] Fix | Delete
/*
[324] Fix | Delete
* Class Specific structures and constants
[325] Fix | Delete
*
[326] Fix | Delete
* CDC NCM NTB parameters structure, CDC NCM subclass 6.2.1
[327] Fix | Delete
*
[328] Fix | Delete
*/
[329] Fix | Delete
[330] Fix | Delete
struct usb_cdc_ncm_ntb_parameters {
[331] Fix | Delete
__le16 wLength;
[332] Fix | Delete
__le16 bmNtbFormatsSupported;
[333] Fix | Delete
__le32 dwNtbInMaxSize;
[334] Fix | Delete
__le16 wNdpInDivisor;
[335] Fix | Delete
__le16 wNdpInPayloadRemainder;
[336] Fix | Delete
__le16 wNdpInAlignment;
[337] Fix | Delete
__le16 wPadding1;
[338] Fix | Delete
__le32 dwNtbOutMaxSize;
[339] Fix | Delete
__le16 wNdpOutDivisor;
[340] Fix | Delete
__le16 wNdpOutPayloadRemainder;
[341] Fix | Delete
__le16 wNdpOutAlignment;
[342] Fix | Delete
__le16 wNtbOutMaxDatagrams;
[343] Fix | Delete
} __attribute__ ((packed));
[344] Fix | Delete
[345] Fix | Delete
/*
[346] Fix | Delete
* CDC NCM transfer headers, CDC NCM subclass 3.2
[347] Fix | Delete
*/
[348] Fix | Delete
[349] Fix | Delete
#define USB_CDC_NCM_NTH16_SIGN 0x484D434E /* NCMH */
[350] Fix | Delete
#define USB_CDC_NCM_NTH32_SIGN 0x686D636E /* ncmh */
[351] Fix | Delete
[352] Fix | Delete
struct usb_cdc_ncm_nth16 {
[353] Fix | Delete
__le32 dwSignature;
[354] Fix | Delete
__le16 wHeaderLength;
[355] Fix | Delete
__le16 wSequence;
[356] Fix | Delete
__le16 wBlockLength;
[357] Fix | Delete
__le16 wNdpIndex;
[358] Fix | Delete
} __attribute__ ((packed));
[359] Fix | Delete
[360] Fix | Delete
struct usb_cdc_ncm_nth32 {
[361] Fix | Delete
__le32 dwSignature;
[362] Fix | Delete
__le16 wHeaderLength;
[363] Fix | Delete
__le16 wSequence;
[364] Fix | Delete
__le32 dwBlockLength;
[365] Fix | Delete
__le32 dwNdpIndex;
[366] Fix | Delete
} __attribute__ ((packed));
[367] Fix | Delete
[368] Fix | Delete
/*
[369] Fix | Delete
* CDC NCM datagram pointers, CDC NCM subclass 3.3
[370] Fix | Delete
*/
[371] Fix | Delete
[372] Fix | Delete
#define USB_CDC_NCM_NDP16_CRC_SIGN 0x314D434E /* NCM1 */
[373] Fix | Delete
#define USB_CDC_NCM_NDP16_NOCRC_SIGN 0x304D434E /* NCM0 */
[374] Fix | Delete
#define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */
[375] Fix | Delete
#define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */
[376] Fix | Delete
[377] Fix | Delete
#define USB_CDC_MBIM_NDP16_IPS_SIGN 0x00535049 /* IPS<sessionID> : IPS0 for now */
[378] Fix | Delete
#define USB_CDC_MBIM_NDP32_IPS_SIGN 0x00737069 /* ips<sessionID> : ips0 for now */
[379] Fix | Delete
#define USB_CDC_MBIM_NDP16_DSS_SIGN 0x00535344 /* DSS<sessionID> */
[380] Fix | Delete
#define USB_CDC_MBIM_NDP32_DSS_SIGN 0x00737364 /* dss<sessionID> */
[381] Fix | Delete
[382] Fix | Delete
/* 16-bit NCM Datagram Pointer Entry */
[383] Fix | Delete
struct usb_cdc_ncm_dpe16 {
[384] Fix | Delete
__le16 wDatagramIndex;
[385] Fix | Delete
__le16 wDatagramLength;
[386] Fix | Delete
} __attribute__((__packed__));
[387] Fix | Delete
[388] Fix | Delete
/* 16-bit NCM Datagram Pointer Table */
[389] Fix | Delete
struct usb_cdc_ncm_ndp16 {
[390] Fix | Delete
__le32 dwSignature;
[391] Fix | Delete
__le16 wLength;
[392] Fix | Delete
__le16 wNextNdpIndex;
[393] Fix | Delete
struct usb_cdc_ncm_dpe16 dpe16[0];
[394] Fix | Delete
} __attribute__ ((packed));
[395] Fix | Delete
[396] Fix | Delete
/* 32-bit NCM Datagram Pointer Entry */
[397] Fix | Delete
struct usb_cdc_ncm_dpe32 {
[398] Fix | Delete
__le32 dwDatagramIndex;
[399] Fix | Delete
__le32 dwDatagramLength;
[400] Fix | Delete
} __attribute__((__packed__));
[401] Fix | Delete
[402] Fix | Delete
/* 32-bit NCM Datagram Pointer Table */
[403] Fix | Delete
struct usb_cdc_ncm_ndp32 {
[404] Fix | Delete
__le32 dwSignature;
[405] Fix | Delete
__le16 wLength;
[406] Fix | Delete
__le16 wReserved6;
[407] Fix | Delete
__le32 dwNextNdpIndex;
[408] Fix | Delete
__le32 dwReserved12;
[409] Fix | Delete
struct usb_cdc_ncm_dpe32 dpe32[0];
[410] Fix | Delete
} __attribute__ ((packed));
[411] Fix | Delete
[412] Fix | Delete
/* CDC NCM subclass 3.2.1 and 3.2.2 */
[413] Fix | Delete
#define USB_CDC_NCM_NDP16_INDEX_MIN 0x000C
[414] Fix | Delete
#define USB_CDC_NCM_NDP32_INDEX_MIN 0x0010
[415] Fix | Delete
[416] Fix | Delete
/* CDC NCM subclass 3.3.3 Datagram Formatting */
[417] Fix | Delete
#define USB_CDC_NCM_DATAGRAM_FORMAT_CRC 0x30
[418] Fix | Delete
#define USB_CDC_NCM_DATAGRAM_FORMAT_NOCRC 0X31
[419] Fix | Delete
[420] Fix | Delete
/* CDC NCM subclass 4.2 NCM Communications Interface Protocol Code */
[421] Fix | Delete
#define USB_CDC_NCM_PROTO_CODE_NO_ENCAP_COMMANDS 0x00
[422] Fix | Delete
#define USB_CDC_NCM_PROTO_CODE_EXTERN_PROTO 0xFE
[423] Fix | Delete
[424] Fix | Delete
/* CDC NCM subclass 5.2.1 NCM Functional Descriptor, bmNetworkCapabilities */
[425] Fix | Delete
#define USB_CDC_NCM_NCAP_ETH_FILTER (1 << 0)
[426] Fix | Delete
#define USB_CDC_NCM_NCAP_NET_ADDRESS (1 << 1)
[427] Fix | Delete
#define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2)
[428] Fix | Delete
#define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3)
[429] Fix | Delete
#define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4)
[430] Fix | Delete
#define USB_CDC_NCM_NCAP_NTB_INPUT_SIZE (1 << 5)
[431] Fix | Delete
[432] Fix | Delete
/* CDC NCM subclass Table 6-3: NTB Parameter Structure */
[433] Fix | Delete
#define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0)
[434] Fix | Delete
#define USB_CDC_NCM_NTB32_SUPPORTED (1 << 1)
[435] Fix | Delete
[436] Fix | Delete
/* CDC NCM subclass Table 6-3: NTB Parameter Structure */
[437] Fix | Delete
#define USB_CDC_NCM_NDP_ALIGN_MIN_SIZE 0x04
[438] Fix | Delete
#define USB_CDC_NCM_NTB_MAX_LENGTH 0x1C
[439] Fix | Delete
[440] Fix | Delete
/* CDC NCM subclass 6.2.5 SetNtbFormat */
[441] Fix | Delete
#define USB_CDC_NCM_NTB16_FORMAT 0x00
[442] Fix | Delete
#define USB_CDC_NCM_NTB32_FORMAT 0x01
[443] Fix | Delete
[444] Fix | Delete
/* CDC NCM subclass 6.2.7 SetNtbInputSize */
[445] Fix | Delete
#define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048
[446] Fix | Delete
#define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048
[447] Fix | Delete
[448] Fix | Delete
/* NTB Input Size Structure */
[449] Fix | Delete
struct usb_cdc_ncm_ndp_input_size {
[450] Fix | Delete
__le32 dwNtbInMaxSize;
[451] Fix | Delete
__le16 wNtbInMaxDatagrams;
[452] Fix | Delete
__le16 wReserved;
[453] Fix | Delete
} __attribute__ ((packed));
[454] Fix | Delete
[455] Fix | Delete
/* CDC NCM subclass 6.2.11 SetCrcMode */
[456] Fix | Delete
#define USB_CDC_NCM_CRC_NOT_APPENDED 0x00
[457] Fix | Delete
#define USB_CDC_NCM_CRC_APPENDED 0x01
[458] Fix | Delete
[459] Fix | Delete
#endif /* __UAPI_LINUX_USB_CDC_H */
[460] Fix | Delete
[461] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function