diff options
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/filter.h | 4 | ||||
-rw-r--r-- | include/uapi/linux/hdlc/Kbuild | 1 | ||||
-rw-r--r-- | include/uapi/linux/hdlc/ioctl.h | 84 | ||||
-rw-r--r-- | include/uapi/linux/if_bridge.h | 18 | ||||
-rw-r--r-- | include/uapi/linux/if_ether.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/if_packet.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/if_tun.h | 5 | ||||
-rw-r--r-- | include/uapi/linux/if_tunnel.h | 14 | ||||
-rw-r--r-- | include/uapi/linux/inet_diag.h | 3 | ||||
-rw-r--r-- | include/uapi/linux/netconf.h | 23 | ||||
-rw-r--r-- | include/uapi/linux/ptp_clock.h | 14 | ||||
-rw-r--r-- | include/uapi/linux/rtnetlink.h | 9 | ||||
-rw-r--r-- | include/uapi/linux/unix_diag.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/usb/cdc.h | 23 |
14 files changed, 199 insertions, 2 deletions
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h index 3d7922433aba..9cfde6941099 100644 --- a/include/uapi/linux/filter.h +++ b/include/uapi/linux/filter.h | |||
@@ -127,7 +127,9 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
127 | #define SKF_AD_RXHASH 32 | 127 | #define SKF_AD_RXHASH 32 |
128 | #define SKF_AD_CPU 36 | 128 | #define SKF_AD_CPU 36 |
129 | #define SKF_AD_ALU_XOR_X 40 | 129 | #define SKF_AD_ALU_XOR_X 40 |
130 | #define SKF_AD_MAX 44 | 130 | #define SKF_AD_VLAN_TAG 44 |
131 | #define SKF_AD_VLAN_TAG_PRESENT 48 | ||
132 | #define SKF_AD_MAX 52 | ||
131 | #define SKF_NET_OFF (-0x100000) | 133 | #define SKF_NET_OFF (-0x100000) |
132 | #define SKF_LL_OFF (-0x200000) | 134 | #define SKF_LL_OFF (-0x200000) |
133 | 135 | ||
diff --git a/include/uapi/linux/hdlc/Kbuild b/include/uapi/linux/hdlc/Kbuild index aafaa5aa54d4..8c1d2cb75e33 100644 --- a/include/uapi/linux/hdlc/Kbuild +++ b/include/uapi/linux/hdlc/Kbuild | |||
@@ -1 +1,2 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += ioctl.h | ||
diff --git a/include/uapi/linux/hdlc/ioctl.h b/include/uapi/linux/hdlc/ioctl.h new file mode 100644 index 000000000000..04bc0274a189 --- /dev/null +++ b/include/uapi/linux/hdlc/ioctl.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef __HDLC_IOCTL_H__ | ||
2 | #define __HDLC_IOCTL_H__ | ||
3 | |||
4 | |||
5 | #define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */ | ||
6 | |||
7 | #define CLOCK_DEFAULT 0 /* Default setting */ | ||
8 | #define CLOCK_EXT 1 /* External TX and RX clock - DTE */ | ||
9 | #define CLOCK_INT 2 /* Internal TX and RX clock - DCE */ | ||
10 | #define CLOCK_TXINT 3 /* Internal TX and external RX clock */ | ||
11 | #define CLOCK_TXFROMRX 4 /* TX clock derived from external RX clock */ | ||
12 | |||
13 | |||
14 | #define ENCODING_DEFAULT 0 /* Default setting */ | ||
15 | #define ENCODING_NRZ 1 | ||
16 | #define ENCODING_NRZI 2 | ||
17 | #define ENCODING_FM_MARK 3 | ||
18 | #define ENCODING_FM_SPACE 4 | ||
19 | #define ENCODING_MANCHESTER 5 | ||
20 | |||
21 | |||
22 | #define PARITY_DEFAULT 0 /* Default setting */ | ||
23 | #define PARITY_NONE 1 /* No parity */ | ||
24 | #define PARITY_CRC16_PR0 2 /* CRC16, initial value 0x0000 */ | ||
25 | #define PARITY_CRC16_PR1 3 /* CRC16, initial value 0xFFFF */ | ||
26 | #define PARITY_CRC16_PR0_CCITT 4 /* CRC16, initial 0x0000, ITU-T version */ | ||
27 | #define PARITY_CRC16_PR1_CCITT 5 /* CRC16, initial 0xFFFF, ITU-T version */ | ||
28 | #define PARITY_CRC32_PR0_CCITT 6 /* CRC32, initial value 0x00000000 */ | ||
29 | #define PARITY_CRC32_PR1_CCITT 7 /* CRC32, initial value 0xFFFFFFFF */ | ||
30 | |||
31 | #define LMI_DEFAULT 0 /* Default setting */ | ||
32 | #define LMI_NONE 1 /* No LMI, all PVCs are static */ | ||
33 | #define LMI_ANSI 2 /* ANSI Annex D */ | ||
34 | #define LMI_CCITT 3 /* ITU-T Annex A */ | ||
35 | #define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */ | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | ||
38 | |||
39 | typedef struct { | ||
40 | unsigned int clock_rate; /* bits per second */ | ||
41 | unsigned int clock_type; /* internal, external, TX-internal etc. */ | ||
42 | unsigned short loopback; | ||
43 | } sync_serial_settings; /* V.35, V.24, X.21 */ | ||
44 | |||
45 | typedef struct { | ||
46 | unsigned int clock_rate; /* bits per second */ | ||
47 | unsigned int clock_type; /* internal, external, TX-internal etc. */ | ||
48 | unsigned short loopback; | ||
49 | unsigned int slot_map; | ||
50 | } te1_settings; /* T1, E1 */ | ||
51 | |||
52 | typedef struct { | ||
53 | unsigned short encoding; | ||
54 | unsigned short parity; | ||
55 | } raw_hdlc_proto; | ||
56 | |||
57 | typedef struct { | ||
58 | unsigned int t391; | ||
59 | unsigned int t392; | ||
60 | unsigned int n391; | ||
61 | unsigned int n392; | ||
62 | unsigned int n393; | ||
63 | unsigned short lmi; | ||
64 | unsigned short dce; /* 1 for DCE (network side) operation */ | ||
65 | } fr_proto; | ||
66 | |||
67 | typedef struct { | ||
68 | unsigned int dlci; | ||
69 | } fr_proto_pvc; /* for creating/deleting FR PVCs */ | ||
70 | |||
71 | typedef struct { | ||
72 | unsigned int dlci; | ||
73 | char master[IFNAMSIZ]; /* Name of master FRAD device */ | ||
74 | }fr_proto_pvc_info; /* for returning PVC information only */ | ||
75 | |||
76 | typedef struct { | ||
77 | unsigned int interval; | ||
78 | unsigned int timeout; | ||
79 | } cisco_proto; | ||
80 | |||
81 | /* PPP doesn't need any info now - supply length = 0 to ioctl */ | ||
82 | |||
83 | #endif /* __ASSEMBLY__ */ | ||
84 | #endif /* __HDLC_IOCTL_H__ */ | ||
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h index a8fe9549ddbc..b3885791e11e 100644 --- a/include/uapi/linux/if_bridge.h +++ b/include/uapi/linux/if_bridge.h | |||
@@ -97,5 +97,23 @@ struct __fdb_entry { | |||
97 | __u16 unused; | 97 | __u16 unused; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Bridge Flags */ | ||
101 | #define BRIDGE_FLAGS_MASTER 1 /* Bridge command to/from master */ | ||
102 | #define BRIDGE_FLAGS_SELF 2 /* Bridge command to/from lowerdev */ | ||
100 | 103 | ||
104 | #define BRIDGE_MODE_VEB 0 /* Default loopback mode */ | ||
105 | #define BRIDGE_MODE_VEPA 1 /* 802.1Qbg defined VEPA mode */ | ||
106 | |||
107 | /* Bridge management nested attributes | ||
108 | * [IFLA_AF_SPEC] = { | ||
109 | * [IFLA_BRIDGE_FLAGS] | ||
110 | * [IFLA_BRIDGE_MODE] | ||
111 | * } | ||
112 | */ | ||
113 | enum { | ||
114 | IFLA_BRIDGE_FLAGS, | ||
115 | IFLA_BRIDGE_MODE, | ||
116 | __IFLA_BRIDGE_MAX, | ||
117 | }; | ||
118 | #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1) | ||
101 | #endif /* _UAPI_LINUX_IF_BRIDGE_H */ | 119 | #endif /* _UAPI_LINUX_IF_BRIDGE_H */ |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 0343e1f0582c..67fb87ca1094 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
@@ -48,6 +48,7 @@ | |||
48 | #define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ | 48 | #define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ |
49 | #define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ | 49 | #define ETH_P_IEEEPUP 0x0a00 /* Xerox IEEE802.3 PUP packet */ |
50 | #define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ | 50 | #define ETH_P_IEEEPUPAT 0x0a01 /* Xerox IEEE802.3 PUP Addr Trans packet */ |
51 | #define ETH_P_BATMAN 0x4305 /* B.A.T.M.A.N.-Advanced packet [ NOT AN OFFICIALLY REGISTERED ID ] */ | ||
51 | #define ETH_P_DEC 0x6000 /* DEC Assigned proto */ | 52 | #define ETH_P_DEC 0x6000 /* DEC Assigned proto */ |
52 | #define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ | 53 | #define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ |
53 | #define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ | 54 | #define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ |
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h index f3799295d231..f9a60375f0d0 100644 --- a/include/uapi/linux/if_packet.h +++ b/include/uapi/linux/if_packet.h | |||
@@ -50,6 +50,7 @@ struct sockaddr_ll { | |||
50 | #define PACKET_TX_TIMESTAMP 16 | 50 | #define PACKET_TX_TIMESTAMP 16 |
51 | #define PACKET_TIMESTAMP 17 | 51 | #define PACKET_TIMESTAMP 17 |
52 | #define PACKET_FANOUT 18 | 52 | #define PACKET_FANOUT 18 |
53 | #define PACKET_TX_HAS_OFF 19 | ||
53 | 54 | ||
54 | #define PACKET_FANOUT_HASH 0 | 55 | #define PACKET_FANOUT_HASH 0 |
55 | #define PACKET_FANOUT_LB 1 | 56 | #define PACKET_FANOUT_LB 1 |
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h index 25a585ce23e6..958497ad5bb5 100644 --- a/include/uapi/linux/if_tun.h +++ b/include/uapi/linux/if_tun.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define TUN_ONE_QUEUE 0x0080 | 34 | #define TUN_ONE_QUEUE 0x0080 |
35 | #define TUN_PERSIST 0x0100 | 35 | #define TUN_PERSIST 0x0100 |
36 | #define TUN_VNET_HDR 0x0200 | 36 | #define TUN_VNET_HDR 0x0200 |
37 | #define TUN_TAP_MQ 0x0400 | ||
37 | 38 | ||
38 | /* Ioctl defines */ | 39 | /* Ioctl defines */ |
39 | #define TUNSETNOCSUM _IOW('T', 200, int) | 40 | #define TUNSETNOCSUM _IOW('T', 200, int) |
@@ -53,6 +54,7 @@ | |||
53 | #define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog) | 54 | #define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog) |
54 | #define TUNGETVNETHDRSZ _IOR('T', 215, int) | 55 | #define TUNGETVNETHDRSZ _IOR('T', 215, int) |
55 | #define TUNSETVNETHDRSZ _IOW('T', 216, int) | 56 | #define TUNSETVNETHDRSZ _IOW('T', 216, int) |
57 | #define TUNSETQUEUE _IOW('T', 217, int) | ||
56 | 58 | ||
57 | /* TUNSETIFF ifr flags */ | 59 | /* TUNSETIFF ifr flags */ |
58 | #define IFF_TUN 0x0001 | 60 | #define IFF_TUN 0x0001 |
@@ -61,6 +63,9 @@ | |||
61 | #define IFF_ONE_QUEUE 0x2000 | 63 | #define IFF_ONE_QUEUE 0x2000 |
62 | #define IFF_VNET_HDR 0x4000 | 64 | #define IFF_VNET_HDR 0x4000 |
63 | #define IFF_TUN_EXCL 0x8000 | 65 | #define IFF_TUN_EXCL 0x8000 |
66 | #define IFF_MULTI_QUEUE 0x0100 | ||
67 | #define IFF_ATTACH_QUEUE 0x0200 | ||
68 | #define IFF_DETACH_QUEUE 0x0400 | ||
64 | 69 | ||
65 | /* Features for GSO (TUNSETOFFLOAD). */ | 70 | /* Features for GSO (TUNSETOFFLOAD). */ |
66 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ | 71 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ |
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h index 5db5942575fe..c1bf0b5a8da1 100644 --- a/include/uapi/linux/if_tunnel.h +++ b/include/uapi/linux/if_tunnel.h | |||
@@ -37,6 +37,20 @@ struct ip_tunnel_parm { | |||
37 | struct iphdr iph; | 37 | struct iphdr iph; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | enum { | ||
41 | IFLA_IPTUN_UNSPEC, | ||
42 | IFLA_IPTUN_LINK, | ||
43 | IFLA_IPTUN_LOCAL, | ||
44 | IFLA_IPTUN_REMOTE, | ||
45 | IFLA_IPTUN_TTL, | ||
46 | IFLA_IPTUN_TOS, | ||
47 | IFLA_IPTUN_ENCAP_LIMIT, | ||
48 | IFLA_IPTUN_FLOWINFO, | ||
49 | IFLA_IPTUN_FLAGS, | ||
50 | __IFLA_IPTUN_MAX, | ||
51 | }; | ||
52 | #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) | ||
53 | |||
40 | /* SIT-mode i_flags */ | 54 | /* SIT-mode i_flags */ |
41 | #define SIT_ISATAP 0x0001 | 55 | #define SIT_ISATAP 0x0001 |
42 | 56 | ||
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h index 8c469af939aa..bbde90fa5838 100644 --- a/include/uapi/linux/inet_diag.h +++ b/include/uapi/linux/inet_diag.h | |||
@@ -109,9 +109,10 @@ enum { | |||
109 | INET_DIAG_TOS, | 109 | INET_DIAG_TOS, |
110 | INET_DIAG_TCLASS, | 110 | INET_DIAG_TCLASS, |
111 | INET_DIAG_SKMEMINFO, | 111 | INET_DIAG_SKMEMINFO, |
112 | INET_DIAG_SHUTDOWN, | ||
112 | }; | 113 | }; |
113 | 114 | ||
114 | #define INET_DIAG_MAX INET_DIAG_SKMEMINFO | 115 | #define INET_DIAG_MAX INET_DIAG_SHUTDOWN |
115 | 116 | ||
116 | 117 | ||
117 | /* INET_DIAG_MEM */ | 118 | /* INET_DIAG_MEM */ |
diff --git a/include/uapi/linux/netconf.h b/include/uapi/linux/netconf.h new file mode 100644 index 000000000000..75dcbc587fb5 --- /dev/null +++ b/include/uapi/linux/netconf.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef _UAPI_LINUX_NETCONF_H_ | ||
2 | #define _UAPI_LINUX_NETCONF_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/netlink.h> | ||
6 | |||
7 | struct netconfmsg { | ||
8 | __u8 ncm_family; | ||
9 | }; | ||
10 | |||
11 | enum { | ||
12 | NETCONFA_UNSPEC, | ||
13 | NETCONFA_IFINDEX, | ||
14 | NETCONFA_FORWARDING, | ||
15 | NETCONFA_RP_FILTER, | ||
16 | __NETCONFA_MAX | ||
17 | }; | ||
18 | #define NETCONFA_MAX (__NETCONFA_MAX - 1) | ||
19 | |||
20 | #define NETCONFA_IFINDEX_ALL -1 | ||
21 | #define NETCONFA_IFINDEX_DEFAULT -2 | ||
22 | |||
23 | #endif /* _UAPI_LINUX_NETCONF_H_ */ | ||
diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h index 94e981f810a2..b65c834f83e9 100644 --- a/include/uapi/linux/ptp_clock.h +++ b/include/uapi/linux/ptp_clock.h | |||
@@ -67,12 +67,26 @@ struct ptp_perout_request { | |||
67 | unsigned int rsv[4]; /* Reserved for future use. */ | 67 | unsigned int rsv[4]; /* Reserved for future use. */ |
68 | }; | 68 | }; |
69 | 69 | ||
70 | #define PTP_MAX_SAMPLES 25 /* Maximum allowed offset measurement samples. */ | ||
71 | |||
72 | struct ptp_sys_offset { | ||
73 | unsigned int n_samples; /* Desired number of measurements. */ | ||
74 | unsigned int rsv[3]; /* Reserved for future use. */ | ||
75 | /* | ||
76 | * Array of interleaved system/phc time stamps. The kernel | ||
77 | * will provide 2*n_samples + 1 time stamps, with the last | ||
78 | * one as a system time stamp. | ||
79 | */ | ||
80 | struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; | ||
81 | }; | ||
82 | |||
70 | #define PTP_CLK_MAGIC '=' | 83 | #define PTP_CLK_MAGIC '=' |
71 | 84 | ||
72 | #define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps) | 85 | #define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps) |
73 | #define PTP_EXTTS_REQUEST _IOW(PTP_CLK_MAGIC, 2, struct ptp_extts_request) | 86 | #define PTP_EXTTS_REQUEST _IOW(PTP_CLK_MAGIC, 2, struct ptp_extts_request) |
74 | #define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request) | 87 | #define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request) |
75 | #define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int) | 88 | #define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int) |
89 | #define PTP_SYS_OFFSET _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset) | ||
76 | 90 | ||
77 | struct ptp_extts_event { | 91 | struct ptp_extts_event { |
78 | struct ptp_clock_time t; /* Time event occured. */ | 92 | struct ptp_clock_time t; /* Time event occured. */ |
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h index fcd768b09f6e..3dee071770d5 100644 --- a/include/uapi/linux/rtnetlink.h +++ b/include/uapi/linux/rtnetlink.h | |||
@@ -120,6 +120,11 @@ enum { | |||
120 | RTM_SETDCB, | 120 | RTM_SETDCB, |
121 | #define RTM_SETDCB RTM_SETDCB | 121 | #define RTM_SETDCB RTM_SETDCB |
122 | 122 | ||
123 | RTM_NEWNETCONF = 80, | ||
124 | #define RTM_NEWNETCONF RTM_NEWNETCONF | ||
125 | RTM_GETNETCONF = 82, | ||
126 | #define RTM_GETNETCONF RTM_GETNETCONF | ||
127 | |||
123 | __RTM_MAX, | 128 | __RTM_MAX, |
124 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) | 129 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
125 | }; | 130 | }; |
@@ -587,6 +592,10 @@ enum rtnetlink_groups { | |||
587 | #define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE | 592 | #define RTNLGRP_PHONET_ROUTE RTNLGRP_PHONET_ROUTE |
588 | RTNLGRP_DCB, | 593 | RTNLGRP_DCB, |
589 | #define RTNLGRP_DCB RTNLGRP_DCB | 594 | #define RTNLGRP_DCB RTNLGRP_DCB |
595 | RTNLGRP_IPV4_NETCONF, | ||
596 | #define RTNLGRP_IPV4_NETCONF RTNLGRP_IPV4_NETCONF | ||
597 | RTNLGRP_IPV6_NETCONF, | ||
598 | #define RTNLGRP_IPV6_NETCONF RTNLGRP_IPV6_NETCONF | ||
590 | __RTNLGRP_MAX | 599 | __RTNLGRP_MAX |
591 | }; | 600 | }; |
592 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) | 601 | #define RTNLGRP_MAX (__RTNLGRP_MAX - 1) |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b1d2bf16b33c..b8a24941db21 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
@@ -37,6 +37,7 @@ enum { | |||
37 | UNIX_DIAG_ICONS, | 37 | UNIX_DIAG_ICONS, |
38 | UNIX_DIAG_RQLEN, | 38 | UNIX_DIAG_RQLEN, |
39 | UNIX_DIAG_MEMINFO, | 39 | UNIX_DIAG_MEMINFO, |
40 | UNIX_DIAG_SHUTDOWN, | ||
40 | 41 | ||
41 | UNIX_DIAG_MAX, | 42 | UNIX_DIAG_MAX, |
42 | }; | 43 | }; |
diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h index 81a927930bfd..f35aa0a338c7 100644 --- a/include/uapi/linux/usb/cdc.h +++ b/include/uapi/linux/usb/cdc.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define USB_CDC_SUBCLASS_OBEX 0x0b | 19 | #define USB_CDC_SUBCLASS_OBEX 0x0b |
20 | #define USB_CDC_SUBCLASS_EEM 0x0c | 20 | #define USB_CDC_SUBCLASS_EEM 0x0c |
21 | #define USB_CDC_SUBCLASS_NCM 0x0d | 21 | #define USB_CDC_SUBCLASS_NCM 0x0d |
22 | #define USB_CDC_SUBCLASS_MBIM 0x0e | ||
22 | 23 | ||
23 | #define USB_CDC_PROTO_NONE 0 | 24 | #define USB_CDC_PROTO_NONE 0 |
24 | 25 | ||
@@ -33,6 +34,7 @@ | |||
33 | #define USB_CDC_PROTO_EEM 7 | 34 | #define USB_CDC_PROTO_EEM 7 |
34 | 35 | ||
35 | #define USB_CDC_NCM_PROTO_NTB 1 | 36 | #define USB_CDC_NCM_PROTO_NTB 1 |
37 | #define USB_CDC_MBIM_PROTO_NTB 2 | ||
36 | 38 | ||
37 | /*-------------------------------------------------------------------------*/ | 39 | /*-------------------------------------------------------------------------*/ |
38 | 40 | ||
@@ -53,6 +55,7 @@ | |||
53 | #define USB_CDC_DMM_TYPE 0x14 | 55 | #define USB_CDC_DMM_TYPE 0x14 |
54 | #define USB_CDC_OBEX_TYPE 0x15 | 56 | #define USB_CDC_OBEX_TYPE 0x15 |
55 | #define USB_CDC_NCM_TYPE 0x1a | 57 | #define USB_CDC_NCM_TYPE 0x1a |
58 | #define USB_CDC_MBIM_TYPE 0x1b | ||
56 | 59 | ||
57 | /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ | 60 | /* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ |
58 | struct usb_cdc_header_desc { | 61 | struct usb_cdc_header_desc { |
@@ -187,6 +190,21 @@ struct usb_cdc_ncm_desc { | |||
187 | __le16 bcdNcmVersion; | 190 | __le16 bcdNcmVersion; |
188 | __u8 bmNetworkCapabilities; | 191 | __u8 bmNetworkCapabilities; |
189 | } __attribute__ ((packed)); | 192 | } __attribute__ ((packed)); |
193 | |||
194 | /* "MBIM Control Model Functional Descriptor" */ | ||
195 | struct usb_cdc_mbim_desc { | ||
196 | __u8 bLength; | ||
197 | __u8 bDescriptorType; | ||
198 | __u8 bDescriptorSubType; | ||
199 | |||
200 | __le16 bcdMBIMVersion; | ||
201 | __le16 wMaxControlMessage; | ||
202 | __u8 bNumberFilters; | ||
203 | __u8 bMaxFilterSize; | ||
204 | __le16 wMaxSegmentSize; | ||
205 | __u8 bmNetworkCapabilities; | ||
206 | } __attribute__ ((packed)); | ||
207 | |||
190 | /*-------------------------------------------------------------------------*/ | 208 | /*-------------------------------------------------------------------------*/ |
191 | 209 | ||
192 | /* | 210 | /* |
@@ -332,6 +350,11 @@ struct usb_cdc_ncm_nth32 { | |||
332 | #define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */ | 350 | #define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E /* ncm1 */ |
333 | #define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */ | 351 | #define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E /* ncm0 */ |
334 | 352 | ||
353 | #define USB_CDC_MBIM_NDP16_IPS_SIGN 0x00535049 /* IPS<sessionID> : IPS0 for now */ | ||
354 | #define USB_CDC_MBIM_NDP32_IPS_SIGN 0x00737069 /* ips<sessionID> : ips0 for now */ | ||
355 | #define USB_CDC_MBIM_NDP16_DSS_SIGN 0x00535344 /* DSS<sessionID> */ | ||
356 | #define USB_CDC_MBIM_NDP32_DSS_SIGN 0x00737364 /* dss<sessionID> */ | ||
357 | |||
335 | /* 16-bit NCM Datagram Pointer Entry */ | 358 | /* 16-bit NCM Datagram Pointer Entry */ |
336 | struct usb_cdc_ncm_dpe16 { | 359 | struct usb_cdc_ncm_dpe16 { |
337 | __le16 wDatagramIndex; | 360 | __le16 wDatagramIndex; |