aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/can.h32
-rw-r--r--include/uapi/linux/can/netlink.h3
-rw-r--r--include/uapi/linux/ethtool.h439
-rw-r--r--include/uapi/linux/if.h134
-rw-r--r--include/uapi/linux/if_ether.h6
-rw-r--r--include/uapi/linux/if_link.h1
-rw-r--r--include/uapi/linux/in.h4
-rw-r--r--include/uapi/linux/in6.h4
-rw-r--r--include/uapi/linux/mpls.h34
-rw-r--r--include/uapi/linux/netdevice.h6
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h12
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h6
-rw-r--r--include/uapi/linux/nfc.h9
-rw-r--r--include/uapi/linux/nl80211.h92
-rw-r--r--include/uapi/linux/pfkeyv2.h15
-rw-r--r--include/uapi/linux/ptp_clock.h39
-rw-r--r--include/uapi/linux/snmp.h6
-rw-r--r--include/uapi/linux/tcp.h3
-rw-r--r--include/uapi/linux/tcp_metrics.h7
-rw-r--r--include/uapi/linux/usb/cdc.h12
-rw-r--r--include/uapi/linux/xfrm.h10
21 files changed, 686 insertions, 188 deletions
diff --git a/include/uapi/linux/can.h b/include/uapi/linux/can.h
index e52958d7c2d1..5d9d1d140718 100644
--- a/include/uapi/linux/can.h
+++ b/include/uapi/linux/can.h
@@ -8,6 +8,38 @@
8 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research 8 * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of Volkswagen nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 * Alternatively, provided that this notice is retained in full, this
24 * software may be distributed under the terms of the GNU General
25 * Public License ("GPL") version 2, in which case the provisions of the
26 * GPL apply INSTEAD OF those given above.
27 *
28 * The provided data structures and external interfaces from this code
29 * are not restricted to be used by modules with a GPL compatible license.
30 *
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
42 * DAMAGE.
11 */ 43 */
12 44
13#ifndef CAN_H 45#ifndef CAN_H
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h
index df944ed206a8..7e2e1863db16 100644
--- a/include/uapi/linux/can/netlink.h
+++ b/include/uapi/linux/can/netlink.h
@@ -96,6 +96,7 @@ struct can_ctrlmode {
96#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */ 96#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
97#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */ 97#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
98#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ 98#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
99#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
99 100
100/* 101/*
101 * CAN device statistics 102 * CAN device statistics
@@ -122,6 +123,8 @@ enum {
122 IFLA_CAN_RESTART_MS, 123 IFLA_CAN_RESTART_MS,
123 IFLA_CAN_RESTART, 124 IFLA_CAN_RESTART,
124 IFLA_CAN_BERR_COUNTER, 125 IFLA_CAN_BERR_COUNTER,
126 IFLA_CAN_DATA_BITTIMING,
127 IFLA_CAN_DATA_BITTIMING_CONST,
125 __IFLA_CAN_MAX 128 __IFLA_CAN_MAX
126}; 129};
127 130
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 38dbafaa5341..fd161e91b6d7 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -16,37 +16,97 @@
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/if_ether.h> 17#include <linux/if_ether.h>
18 18
19/* This should work for both 32 and 64 bit userland. */ 19/* All structures exposed to userland should be defined such that they
20 * have the same layout for 32-bit and 64-bit userland.
21 */
22
23/**
24 * struct ethtool_cmd - link control and status
25 * @cmd: Command number = %ETHTOOL_GSET or %ETHTOOL_SSET
26 * @supported: Bitmask of %SUPPORTED_* flags for the link modes,
27 * physical connectors and other link features for which the
28 * interface supports autonegotiation or auto-detection.
29 * Read-only.
30 * @advertising: Bitmask of %ADVERTISED_* flags for the link modes,
31 * physical connectors and other link features that are
32 * advertised through autonegotiation or enabled for
33 * auto-detection.
34 * @speed: Low bits of the speed
35 * @duplex: Duplex mode; one of %DUPLEX_*
36 * @port: Physical connector type; one of %PORT_*
37 * @phy_address: MDIO address of PHY (transceiver); 0 or 255 if not
38 * applicable. For clause 45 PHYs this is the PRTAD.
39 * @transceiver: Historically used to distinguish different possible
40 * PHY types, but not in a consistent way. Deprecated.
41 * @autoneg: Enable/disable autonegotiation and auto-detection;
42 * either %AUTONEG_DISABLE or %AUTONEG_ENABLE
43 * @mdio_support: Bitmask of %ETH_MDIO_SUPPORTS_* flags for the MDIO
44 * protocols supported by the interface; 0 if unknown.
45 * Read-only.
46 * @maxtxpkt: Historically used to report TX IRQ coalescing; now
47 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
48 * @maxrxpkt: Historically used to report RX IRQ coalescing; now
49 * obsoleted by &struct ethtool_coalesce. Read-only; deprecated.
50 * @speed_hi: High bits of the speed
51 * @eth_tp_mdix: Ethernet twisted-pair MDI(-X) status; one of
52 * %ETH_TP_MDI_*. If the status is unknown or not applicable, the
53 * value will be %ETH_TP_MDI_INVALID. Read-only.
54 * @eth_tp_mdix_ctrl: Ethernet twisted pair MDI(-X) control; one of
55 * %ETH_TP_MDI_*. If MDI(-X) control is not implemented, reads
56 * yield %ETH_TP_MDI_INVALID and writes may be ignored or rejected.
57 * When written successfully, the link should be renegotiated if
58 * necessary.
59 * @lp_advertising: Bitmask of %ADVERTISED_* flags for the link modes
60 * and other link features that the link partner advertised
61 * through autonegotiation; 0 if unknown or not applicable.
62 * Read-only.
63 *
64 * The link speed in Mbps is split between @speed and @speed_hi. Use
65 * the ethtool_cmd_speed() and ethtool_cmd_speed_set() functions to
66 * access it.
67 *
68 * If autonegotiation is disabled, the speed and @duplex represent the
69 * fixed link mode and are writable if the driver supports multiple
70 * link modes. If it is enabled then they are read-only; if the link
71 * is up they represent the negotiated link mode; if the link is down,
72 * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and
73 * @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.
74 *
75 * Some hardware interfaces may have multiple PHYs and/or physical
76 * connectors fitted or do not allow the driver to detect which are
77 * fitted. For these interfaces @port and/or @phy_address may be
78 * writable, possibly dependent on @autoneg being %AUTONEG_DISABLE.
79 * Otherwise, attempts to write different values may be ignored or
80 * rejected.
81 *
82 * Users should assume that all fields not marked read-only are
83 * writable and subject to validation by the driver. They should use
84 * %ETHTOOL_GSET to get the current values before making specific
85 * changes and then applying them with %ETHTOOL_SSET.
86 *
87 * Drivers that implement set_settings() should validate all fields
88 * other than @cmd that are not described as read-only or deprecated,
89 * and must ignore all fields described as read-only.
90 *
91 * Deprecated fields should be ignored by both users and drivers.
92 */
20struct ethtool_cmd { 93struct ethtool_cmd {
21 __u32 cmd; 94 __u32 cmd;
22 __u32 supported; /* Features this interface supports */ 95 __u32 supported;
23 __u32 advertising; /* Features this interface advertises */ 96 __u32 advertising;
24 __u16 speed; /* The forced speed (lower bits) in 97 __u16 speed;
25 * Mbps. Please use 98 __u8 duplex;
26 * ethtool_cmd_speed()/_set() to 99 __u8 port;
27 * access it */ 100 __u8 phy_address;
28 __u8 duplex; /* Duplex, half or full */ 101 __u8 transceiver;
29 __u8 port; /* Which connector port */ 102 __u8 autoneg;
30 __u8 phy_address; /* MDIO PHY address (PRTAD for clause 45). 103 __u8 mdio_support;
31 * May be read-only or read-write 104 __u32 maxtxpkt;
32 * depending on the driver. 105 __u32 maxrxpkt;
33 */ 106 __u16 speed_hi;
34 __u8 transceiver; /* Which transceiver to use */ 107 __u8 eth_tp_mdix;
35 __u8 autoneg; /* Enable or disable autonegotiation */ 108 __u8 eth_tp_mdix_ctrl;
36 __u8 mdio_support; /* MDIO protocols supported. Read-only. 109 __u32 lp_advertising;
37 * Not set by all drivers.
38 */
39 __u32 maxtxpkt; /* Tx pkts before generating tx int */
40 __u32 maxrxpkt; /* Rx pkts before generating rx int */
41 __u16 speed_hi; /* The forced speed (upper
42 * bits) in Mbps. Please use
43 * ethtool_cmd_speed()/_set() to
44 * access it */
45 __u8 eth_tp_mdix; /* twisted pair MDI-X status */
46 __u8 eth_tp_mdix_ctrl; /* twisted pair MDI-X control, when set,
47 * link should be renegotiated if necessary
48 */
49 __u32 lp_advertising; /* Features the link partner advertises */
50 __u32 reserved[2]; 110 __u32 reserved[2];
51}; 111};
52 112
@@ -79,37 +139,68 @@ static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
79 139
80#define ETHTOOL_FWVERS_LEN 32 140#define ETHTOOL_FWVERS_LEN 32
81#define ETHTOOL_BUSINFO_LEN 32 141#define ETHTOOL_BUSINFO_LEN 32
82/* these strings are set to whatever the driver author decides... */ 142
143/**
144 * struct ethtool_drvinfo - general driver and device information
145 * @cmd: Command number = %ETHTOOL_GDRVINFO
146 * @driver: Driver short name. This should normally match the name
147 * in its bus driver structure (e.g. pci_driver::name). Must
148 * not be an empty string.
149 * @version: Driver version string; may be an empty string
150 * @fw_version: Firmware version string; may be an empty string
151 * @bus_info: Device bus address. This should match the dev_name()
152 * string for the underlying bus device, if there is one. May be
153 * an empty string.
154 * @n_priv_flags: Number of flags valid for %ETHTOOL_GPFLAGS and
155 * %ETHTOOL_SPFLAGS commands; also the number of strings in the
156 * %ETH_SS_PRIV_FLAGS set
157 * @n_stats: Number of u64 statistics returned by the %ETHTOOL_GSTATS
158 * command; also the number of strings in the %ETH_SS_STATS set
159 * @testinfo_len: Number of results returned by the %ETHTOOL_TEST
160 * command; also the number of strings in the %ETH_SS_TEST set
161 * @eedump_len: Size of EEPROM accessible through the %ETHTOOL_GEEPROM
162 * and %ETHTOOL_SEEPROM commands, in bytes
163 * @regdump_len: Size of register dump returned by the %ETHTOOL_GREGS
164 * command, in bytes
165 *
166 * Users can use the %ETHTOOL_GSSET_INFO command to get the number of
167 * strings in any string set (from Linux 2.6.34).
168 *
169 * Drivers should set at most @driver, @version, @fw_version and
170 * @bus_info in their get_drvinfo() implementation. The ethtool
171 * core fills in the other fields using other driver operations.
172 */
83struct ethtool_drvinfo { 173struct ethtool_drvinfo {
84 __u32 cmd; 174 __u32 cmd;
85 char driver[32]; /* driver short name, "tulip", "eepro100" */ 175 char driver[32];
86 char version[32]; /* driver version string */ 176 char version[32];
87 char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */ 177 char fw_version[ETHTOOL_FWVERS_LEN];
88 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ 178 char bus_info[ETHTOOL_BUSINFO_LEN];
89 /* For PCI devices, use pci_name(pci_dev). */
90 char reserved1[32]; 179 char reserved1[32];
91 char reserved2[12]; 180 char reserved2[12];
92 /* 181 __u32 n_priv_flags;
93 * Some struct members below are filled in 182 __u32 n_stats;
94 * using ops->get_sset_count(). Obtaining
95 * this info from ethtool_drvinfo is now
96 * deprecated; Use ETHTOOL_GSSET_INFO
97 * instead.
98 */
99 __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
100 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
101 __u32 testinfo_len; 183 __u32 testinfo_len;
102 __u32 eedump_len; /* Size of data from ETHTOOL_GEEPROM (bytes) */ 184 __u32 eedump_len;
103 __u32 regdump_len; /* Size of data from ETHTOOL_GREGS (bytes) */ 185 __u32 regdump_len;
104}; 186};
105 187
106#define SOPASS_MAX 6 188#define SOPASS_MAX 6
107/* wake-on-lan settings */ 189
190/**
191 * struct ethtool_wolinfo - Wake-On-Lan configuration
192 * @cmd: Command number = %ETHTOOL_GWOL or %ETHTOOL_SWOL
193 * @supported: Bitmask of %WAKE_* flags for supported Wake-On-Lan modes.
194 * Read-only.
195 * @wolopts: Bitmask of %WAKE_* flags for enabled Wake-On-Lan modes.
196 * @sopass: SecureOn(tm) password; meaningful only if %WAKE_MAGICSECURE
197 * is set in @wolopts.
198 */
108struct ethtool_wolinfo { 199struct ethtool_wolinfo {
109 __u32 cmd; 200 __u32 cmd;
110 __u32 supported; 201 __u32 supported;
111 __u32 wolopts; 202 __u32 wolopts;
112 __u8 sopass[SOPASS_MAX]; /* SecureOn(tm) password */ 203 __u8 sopass[SOPASS_MAX];
113}; 204};
114 205
115/* for passing single values */ 206/* for passing single values */
@@ -118,20 +209,51 @@ struct ethtool_value {
118 __u32 data; 209 __u32 data;
119}; 210};
120 211
121/* for passing big chunks of data */ 212/**
213 * struct ethtool_regs - hardware register dump
214 * @cmd: Command number = %ETHTOOL_GREGS
215 * @version: Dump format version. This is driver-specific and may
216 * distinguish different chips/revisions. Drivers must use new
217 * version numbers whenever the dump format changes in an
218 * incompatible way.
219 * @len: On entry, the real length of @data. On return, the number of
220 * bytes used.
221 * @data: Buffer for the register dump
222 *
223 * Users should use %ETHTOOL_GDRVINFO to find the maximum length of
224 * a register dump for the interface. They must allocate the buffer
225 * immediately following this structure.
226 */
122struct ethtool_regs { 227struct ethtool_regs {
123 __u32 cmd; 228 __u32 cmd;
124 __u32 version; /* driver-specific, indicates different chips/revs */ 229 __u32 version;
125 __u32 len; /* bytes */ 230 __u32 len;
126 __u8 data[0]; 231 __u8 data[0];
127}; 232};
128 233
129/* for passing EEPROM chunks */ 234/**
235 * struct ethtool_eeprom - EEPROM dump
236 * @cmd: Command number = %ETHTOOL_GEEPROM, %ETHTOOL_GMODULEEEPROM or
237 * %ETHTOOL_SEEPROM
238 * @magic: A 'magic cookie' value to guard against accidental changes.
239 * The value passed in to %ETHTOOL_SEEPROM must match the value
240 * returned by %ETHTOOL_GEEPROM for the same device. This is
241 * unused when @cmd is %ETHTOOL_GMODULEEEPROM.
242 * @offset: Offset within the EEPROM to begin reading/writing, in bytes
243 * @len: On entry, number of bytes to read/write. On successful
244 * return, number of bytes actually read/written. In case of
245 * error, this may indicate at what point the error occurred.
246 * @data: Buffer to read/write from
247 *
248 * Users may use %ETHTOOL_GDRVINFO or %ETHTOOL_GMODULEINFO to find
249 * the length of an on-board or module EEPROM, respectively. They
250 * must allocate the buffer immediately following this structure.
251 */
130struct ethtool_eeprom { 252struct ethtool_eeprom {
131 __u32 cmd; 253 __u32 cmd;
132 __u32 magic; 254 __u32 magic;
133 __u32 offset; /* in bytes */ 255 __u32 offset;
134 __u32 len; /* in bytes */ 256 __u32 len;
135 __u8 data[0]; 257 __u8 data[0];
136}; 258};
137 259
@@ -229,17 +351,18 @@ struct ethtool_modinfo {
229 * @rate_sample_interval: How often to do adaptive coalescing packet rate 351 * @rate_sample_interval: How often to do adaptive coalescing packet rate
230 * sampling, measured in seconds. Must not be zero. 352 * sampling, measured in seconds. Must not be zero.
231 * 353 *
232 * Each pair of (usecs, max_frames) fields specifies this exit 354 * Each pair of (usecs, max_frames) fields specifies that interrupts
233 * condition for interrupt coalescing: 355 * should be coalesced until
234 * (usecs > 0 && time_since_first_completion >= usecs) || 356 * (usecs > 0 && time_since_first_completion >= usecs) ||
235 * (max_frames > 0 && completed_frames >= max_frames) 357 * (max_frames > 0 && completed_frames >= max_frames)
358 *
236 * It is illegal to set both usecs and max_frames to zero as this 359 * It is illegal to set both usecs and max_frames to zero as this
237 * would cause interrupts to never be generated. To disable 360 * would cause interrupts to never be generated. To disable
238 * coalescing, set usecs = 0 and max_frames = 1. 361 * coalescing, set usecs = 0 and max_frames = 1.
239 * 362 *
240 * Some implementations ignore the value of max_frames and use the 363 * Some implementations ignore the value of max_frames and use the
241 * condition: 364 * condition time_since_first_completion >= usecs
242 * time_since_first_completion >= usecs 365 *
243 * This is deprecated. Drivers for hardware that does not support 366 * This is deprecated. Drivers for hardware that does not support
244 * counting completions should validate that max_frames == !rx_usecs. 367 * counting completions should validate that max_frames == !rx_usecs.
245 * 368 *
@@ -279,22 +402,37 @@ struct ethtool_coalesce {
279 __u32 rate_sample_interval; 402 __u32 rate_sample_interval;
280}; 403};
281 404
282/* for configuring RX/TX ring parameters */ 405/**
406 * struct ethtool_ringparam - RX/TX ring parameters
407 * @cmd: Command number = %ETHTOOL_GRINGPARAM or %ETHTOOL_SRINGPARAM
408 * @rx_max_pending: Maximum supported number of pending entries per
409 * RX ring. Read-only.
410 * @rx_mini_max_pending: Maximum supported number of pending entries
411 * per RX mini ring. Read-only.
412 * @rx_jumbo_max_pending: Maximum supported number of pending entries
413 * per RX jumbo ring. Read-only.
414 * @tx_max_pending: Maximum supported number of pending entries per
415 * TX ring. Read-only.
416 * @rx_pending: Current maximum number of pending entries per RX ring
417 * @rx_mini_pending: Current maximum number of pending entries per RX
418 * mini ring
419 * @rx_jumbo_pending: Current maximum number of pending entries per RX
420 * jumbo ring
421 * @tx_pending: Current maximum supported number of pending entries
422 * per TX ring
423 *
424 * If the interface does not have separate RX mini and/or jumbo rings,
425 * @rx_mini_max_pending and/or @rx_jumbo_max_pending will be 0.
426 *
427 * There may also be driver-dependent minimum values for the number
428 * of entries per ring.
429 */
283struct ethtool_ringparam { 430struct ethtool_ringparam {
284 __u32 cmd; /* ETHTOOL_{G,S}RINGPARAM */ 431 __u32 cmd;
285
286 /* Read only attributes. These indicate the maximum number
287 * of pending RX/TX ring entries the driver will allow the
288 * user to set.
289 */
290 __u32 rx_max_pending; 432 __u32 rx_max_pending;
291 __u32 rx_mini_max_pending; 433 __u32 rx_mini_max_pending;
292 __u32 rx_jumbo_max_pending; 434 __u32 rx_jumbo_max_pending;
293 __u32 tx_max_pending; 435 __u32 tx_max_pending;
294
295 /* Values changeable by the user. The valid values are
296 * in the range 1 to the "*_max_pending" counterpart above.
297 */
298 __u32 rx_pending; 436 __u32 rx_pending;
299 __u32 rx_mini_pending; 437 __u32 rx_mini_pending;
300 __u32 rx_jumbo_pending; 438 __u32 rx_jumbo_pending;
@@ -329,51 +467,96 @@ struct ethtool_channels {
329 __u32 combined_count; 467 __u32 combined_count;
330}; 468};
331 469
332/* for configuring link flow control parameters */ 470/**
471 * struct ethtool_pauseparam - Ethernet pause (flow control) parameters
472 * @cmd: Command number = %ETHTOOL_GPAUSEPARAM or %ETHTOOL_SPAUSEPARAM
473 * @autoneg: Flag to enable autonegotiation of pause frame use
474 * @rx_pause: Flag to enable reception of pause frames
475 * @tx_pause: Flag to enable transmission of pause frames
476 *
477 * Drivers should reject a non-zero setting of @autoneg when
478 * autoneogotiation is disabled (or not supported) for the link.
479 *
480 * If the link is autonegotiated, drivers should use
481 * mii_advertise_flowctrl() or similar code to set the advertised
482 * pause frame capabilities based on the @rx_pause and @tx_pause flags,
483 * even if @autoneg is zero. They should also allow the advertised
484 * pause frame capabilities to be controlled directly through the
485 * advertising field of &struct ethtool_cmd.
486 *
487 * If @autoneg is non-zero, the MAC is configured to send and/or
488 * receive pause frames according to the result of autonegotiation.
489 * Otherwise, it is configured directly based on the @rx_pause and
490 * @tx_pause flags.
491 */
333struct ethtool_pauseparam { 492struct ethtool_pauseparam {
334 __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ 493 __u32 cmd;
335
336 /* If the link is being auto-negotiated (via ethtool_cmd.autoneg
337 * being true) the user may set 'autoneg' here non-zero to have the
338 * pause parameters be auto-negotiated too. In such a case, the
339 * {rx,tx}_pause values below determine what capabilities are
340 * advertised.
341 *
342 * If 'autoneg' is zero or the link is not being auto-negotiated,
343 * then {rx,tx}_pause force the driver to use/not-use pause
344 * flow control.
345 */
346 __u32 autoneg; 494 __u32 autoneg;
347 __u32 rx_pause; 495 __u32 rx_pause;
348 __u32 tx_pause; 496 __u32 tx_pause;
349}; 497};
350 498
351#define ETH_GSTRING_LEN 32 499#define ETH_GSTRING_LEN 32
500
501/**
502 * enum ethtool_stringset - string set ID
503 * @ETH_SS_TEST: Self-test result names, for use with %ETHTOOL_TEST
504 * @ETH_SS_STATS: Statistic names, for use with %ETHTOOL_GSTATS
505 * @ETH_SS_PRIV_FLAGS: Driver private flag names, for use with
506 * %ETHTOOL_GPFLAGS and %ETHTOOL_SPFLAGS
507 * @ETH_SS_NTUPLE_FILTERS: Previously used with %ETHTOOL_GRXNTUPLE;
508 * now deprecated
509 * @ETH_SS_FEATURES: Device feature names
510 */
352enum ethtool_stringset { 511enum ethtool_stringset {
353 ETH_SS_TEST = 0, 512 ETH_SS_TEST = 0,
354 ETH_SS_STATS, 513 ETH_SS_STATS,
355 ETH_SS_PRIV_FLAGS, 514 ETH_SS_PRIV_FLAGS,
356 ETH_SS_NTUPLE_FILTERS, /* Do not use, GRXNTUPLE is now deprecated */ 515 ETH_SS_NTUPLE_FILTERS,
357 ETH_SS_FEATURES, 516 ETH_SS_FEATURES,
358}; 517};
359 518
360/* for passing string sets for data tagging */ 519/**
520 * struct ethtool_gstrings - string set for data tagging
521 * @cmd: Command number = %ETHTOOL_GSTRINGS
522 * @string_set: String set ID; one of &enum ethtool_stringset
523 * @len: On return, the number of strings in the string set
524 * @data: Buffer for strings. Each string is null-padded to a size of
525 * %ETH_GSTRING_LEN.
526 *
527 * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in
528 * the string set. They must allocate a buffer of the appropriate
529 * size immediately following this structure.
530 */
361struct ethtool_gstrings { 531struct ethtool_gstrings {
362 __u32 cmd; /* ETHTOOL_GSTRINGS */ 532 __u32 cmd;
363 __u32 string_set; /* string set id e.c. ETH_SS_TEST, etc*/ 533 __u32 string_set;
364 __u32 len; /* number of strings in the string set */ 534 __u32 len;
365 __u8 data[0]; 535 __u8 data[0];
366}; 536};
367 537
538/**
539 * struct ethtool_sset_info - string set information
540 * @cmd: Command number = %ETHTOOL_GSSET_INFO
541 * @sset_mask: On entry, a bitmask of string sets to query, with bits
542 * numbered according to &enum ethtool_stringset. On return, a
543 * bitmask of those string sets queried that are supported.
544 * @data: Buffer for string set sizes. On return, this contains the
545 * size of each string set that was queried and supported, in
546 * order of ID.
547 *
548 * Example: The user passes in @sset_mask = 0x7 (sets 0, 1, 2) and on
549 * return @sset_mask == 0x6 (sets 1, 2). Then @data[0] contains the
550 * size of set 1 and @data[1] contains the size of set 2.
551 *
552 * Users must allocate a buffer of the appropriate size (4 * number of
553 * sets queried) immediately following this structure.
554 */
368struct ethtool_sset_info { 555struct ethtool_sset_info {
369 __u32 cmd; /* ETHTOOL_GSSET_INFO */ 556 __u32 cmd;
370 __u32 reserved; 557 __u32 reserved;
371 __u64 sset_mask; /* input: each bit selects an sset to query */ 558 __u64 sset_mask;
372 /* output: each bit a returned sset */ 559 __u32 data[0];
373 __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits
374 in sset_mask. One bit implies one
375 __u32, two bits implies two
376 __u32's, etc. */
377}; 560};
378 561
379/** 562/**
@@ -393,24 +576,58 @@ enum ethtool_test_flags {
393 ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3), 576 ETH_TEST_FL_EXTERNAL_LB_DONE = (1 << 3),
394}; 577};
395 578
396/* for requesting NIC test and getting results*/ 579/**
580 * struct ethtool_test - device self-test invocation
581 * @cmd: Command number = %ETHTOOL_TEST
582 * @flags: A bitmask of flags from &enum ethtool_test_flags. Some
583 * flags may be set by the user on entry; others may be set by
584 * the driver on return.
585 * @len: On return, the number of test results
586 * @data: Array of test results
587 *
588 * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
589 * number of test results that will be returned. They must allocate a
590 * buffer of the appropriate size (8 * number of results) immediately
591 * following this structure.
592 */
397struct ethtool_test { 593struct ethtool_test {
398 __u32 cmd; /* ETHTOOL_TEST */ 594 __u32 cmd;
399 __u32 flags; /* ETH_TEST_FL_xxx */ 595 __u32 flags;
400 __u32 reserved; 596 __u32 reserved;
401 __u32 len; /* result length, in number of u64 elements */ 597 __u32 len;
402 __u64 data[0]; 598 __u64 data[0];
403}; 599};
404 600
405/* for dumping NIC-specific statistics */ 601/**
602 * struct ethtool_stats - device-specific statistics
603 * @cmd: Command number = %ETHTOOL_GSTATS
604 * @n_stats: On return, the number of statistics
605 * @data: Array of statistics
606 *
607 * Users must use %ETHTOOL_GSSET_INFO or %ETHTOOL_GDRVINFO to find the
608 * number of statistics that will be returned. They must allocate a
609 * buffer of the appropriate size (8 * number of statistics)
610 * immediately following this structure.
611 */
406struct ethtool_stats { 612struct ethtool_stats {
407 __u32 cmd; /* ETHTOOL_GSTATS */ 613 __u32 cmd;
408 __u32 n_stats; /* number of u64's being returned */ 614 __u32 n_stats;
409 __u64 data[0]; 615 __u64 data[0];
410}; 616};
411 617
618/**
619 * struct ethtool_perm_addr - permanent hardware address
620 * @cmd: Command number = %ETHTOOL_GPERMADDR
621 * @size: On entry, the size of the buffer. On return, the size of the
622 * address. The command fails if the buffer is too small.
623 * @data: Buffer for the address
624 *
625 * Users must allocate the buffer immediately following this structure.
626 * A buffer size of %MAX_ADDR_LEN should be sufficient for any address
627 * type.
628 */
412struct ethtool_perm_addr { 629struct ethtool_perm_addr {
413 __u32 cmd; /* ETHTOOL_GPERMADDR */ 630 __u32 cmd;
414 __u32 size; 631 __u32 size;
415 __u8 data[0]; 632 __u8 data[0];
416}; 633};
@@ -593,7 +810,7 @@ struct ethtool_rx_flow_spec {
593 * %ETHTOOL_SRXCLSRLINS may add the rule at any suitable unused 810 * %ETHTOOL_SRXCLSRLINS may add the rule at any suitable unused
594 * location, and may remove a rule at a later location (lower 811 * location, and may remove a rule at a later location (lower
595 * priority) that matches exactly the same set of flows. The special 812 * priority) that matches exactly the same set of flows. The special
596 * values are: %RX_CLS_LOC_ANY, selecting any location; 813 * values are %RX_CLS_LOC_ANY, selecting any location;
597 * %RX_CLS_LOC_FIRST, selecting the first suitable location (maximum 814 * %RX_CLS_LOC_FIRST, selecting the first suitable location (maximum
598 * priority); and %RX_CLS_LOC_LAST, selecting the last suitable 815 * priority); and %RX_CLS_LOC_LAST, selecting the last suitable
599 * location (minimum priority). Additional special values may be 816 * location (minimum priority). Additional special values may be
@@ -704,9 +921,6 @@ struct ethtool_flash {
704 * for %ETHTOOL_GET_DUMP_FLAG command 921 * for %ETHTOOL_GET_DUMP_FLAG command
705 * @data: data collected for get dump data operation 922 * @data: data collected for get dump data operation
706 */ 923 */
707
708#define ETH_FW_DUMP_DISABLE 0
709
710struct ethtool_dump { 924struct ethtool_dump {
711 __u32 cmd; 925 __u32 cmd;
712 __u32 version; 926 __u32 version;
@@ -715,6 +929,8 @@ struct ethtool_dump {
715 __u8 data[0]; 929 __u8 data[0];
716}; 930};
717 931
932#define ETH_FW_DUMP_DISABLE 0
933
718/* for returning and changing feature sets */ 934/* for returning and changing feature sets */
719 935
720/** 936/**
@@ -734,8 +950,9 @@ struct ethtool_get_features_block {
734/** 950/**
735 * struct ethtool_gfeatures - command to get state of device's features 951 * struct ethtool_gfeatures - command to get state of device's features
736 * @cmd: command number = %ETHTOOL_GFEATURES 952 * @cmd: command number = %ETHTOOL_GFEATURES
737 * @size: in: number of elements in the features[] array; 953 * @size: On entry, the number of elements in the features[] array;
738 * out: number of elements in features[] needed to hold all features 954 * on return, the number of elements in features[] needed to hold
955 * all features
739 * @features: state of features 956 * @features: state of features
740 */ 957 */
741struct ethtool_gfeatures { 958struct ethtool_gfeatures {
@@ -905,7 +1122,6 @@ enum ethtool_sfeatures_retval_bits {
905#define SPARC_ETH_GSET ETHTOOL_GSET 1122#define SPARC_ETH_GSET ETHTOOL_GSET
906#define SPARC_ETH_SSET ETHTOOL_SSET 1123#define SPARC_ETH_SSET ETHTOOL_SSET
907 1124
908/* Indicates what features are supported by the interface. */
909#define SUPPORTED_10baseT_Half (1 << 0) 1125#define SUPPORTED_10baseT_Half (1 << 0)
910#define SUPPORTED_10baseT_Full (1 << 1) 1126#define SUPPORTED_10baseT_Full (1 << 1)
911#define SUPPORTED_100baseT_Half (1 << 2) 1127#define SUPPORTED_100baseT_Half (1 << 2)
@@ -934,7 +1150,6 @@ enum ethtool_sfeatures_retval_bits {
934#define SUPPORTED_40000baseSR4_Full (1 << 25) 1150#define SUPPORTED_40000baseSR4_Full (1 << 25)
935#define SUPPORTED_40000baseLR4_Full (1 << 26) 1151#define SUPPORTED_40000baseLR4_Full (1 << 26)
936 1152
937/* Indicates what features are advertised by the interface. */
938#define ADVERTISED_10baseT_Half (1 << 0) 1153#define ADVERTISED_10baseT_Half (1 << 0)
939#define ADVERTISED_10baseT_Full (1 << 1) 1154#define ADVERTISED_10baseT_Full (1 << 1)
940#define ADVERTISED_100baseT_Half (1 << 2) 1155#define ADVERTISED_100baseT_Half (1 << 2)
@@ -999,9 +1214,7 @@ enum ethtool_sfeatures_retval_bits {
999#define XCVR_DUMMY2 0x03 1214#define XCVR_DUMMY2 0x03
1000#define XCVR_DUMMY3 0x04 1215#define XCVR_DUMMY3 0x04
1001 1216
1002/* Enable or disable autonegotiation. If this is set to enable, 1217/* Enable or disable autonegotiation. */
1003 * the forced link modes above are completely ignored.
1004 */
1005#define AUTONEG_DISABLE 0x00 1218#define AUTONEG_DISABLE 0x00
1006#define AUTONEG_ENABLE 0x01 1219#define AUTONEG_ENABLE 0x01
1007 1220
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index d758163b0e43..9cf2394f0bcf 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -27,65 +27,91 @@
27#define IFALIASZ 256 27#define IFALIASZ 256
28#include <linux/hdlc/ioctl.h> 28#include <linux/hdlc/ioctl.h>
29 29
30/* Standard interface flags (netdevice->flags). */ 30/**
31#define IFF_UP 0x1 /* interface is up */ 31 * enum net_device_flags - &struct net_device flags
32#define IFF_BROADCAST 0x2 /* broadcast address valid */ 32 *
33#define IFF_DEBUG 0x4 /* turn on debugging */ 33 * These are the &struct net_device flags, they can be set by drivers, the
34#define IFF_LOOPBACK 0x8 /* is a loopback net */ 34 * kernel and some can be triggered by userspace. Userspace can query and
35#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ 35 * set these flags using userspace utilities but there is also a sysfs
36#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ 36 * entry available for all dev flags which can be queried and set. These flags
37#define IFF_RUNNING 0x40 /* interface RFC2863 OPER_UP */ 37 * are shared for all types of net_devices. The sysfs entries are available
38#define IFF_NOARP 0x80 /* no ARP protocol */ 38 * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
39#define IFF_PROMISC 0x100 /* receive all packets */ 39 * are annotated below, note that only a few flags can be toggled and some
40#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ 40 * other flags are always always preserved from the original net_device flags
41 41 * even if you try to set them via sysfs. Flags which are always preserved
42#define IFF_MASTER 0x400 /* master of a load balancer */ 42 * are kept under the flag grouping @IFF_VOLATILE. Flags which are volatile
43#define IFF_SLAVE 0x800 /* slave of a load balancer */ 43 * are annotated below as such.
44 44 *
45#define IFF_MULTICAST 0x1000 /* Supports multicast */ 45 * You should have a pretty good reason to be extending these flags.
46 46 *
47#define IFF_PORTSEL 0x2000 /* can set media type */ 47 * @IFF_UP: interface is up. Can be toggled through sysfs.
48#define IFF_AUTOMEDIA 0x4000 /* auto media select active */ 48 * @IFF_BROADCAST: broadcast address valid. Volatile.
49#define IFF_DYNAMIC 0x8000 /* dialup device with changing addresses*/ 49 * @IFF_DEBUG: turn on debugging. Can be toggled through sysfs.
50 50 * @IFF_LOOPBACK: is a loopback net. Volatile.
51#define IFF_LOWER_UP 0x10000 /* driver signals L1 up */ 51 * @IFF_POINTOPOINT: interface is has p-p link. Volatile.
52#define IFF_DORMANT 0x20000 /* driver signals dormant */ 52 * @IFF_NOTRAILERS: avoid use of trailers. Can be toggled through sysfs.
53 * Volatile.
54 * @IFF_RUNNING: interface RFC2863 OPER_UP. Volatile.
55 * @IFF_NOARP: no ARP protocol. Can be toggled through sysfs. Volatile.
56 * @IFF_PROMISC: receive all packets. Can be toggled through sysfs.
57 * @IFF_ALLMULTI: receive all multicast packets. Can be toggled through
58 * sysfs.
59 * @IFF_MASTER: master of a load balancer. Volatile.
60 * @IFF_SLAVE: slave of a load balancer. Volatile.
61 * @IFF_MULTICAST: Supports multicast. Can be toggled through sysfs.
62 * @IFF_PORTSEL: can set media type. Can be toggled through sysfs.
63 * @IFF_AUTOMEDIA: auto media select active. Can be toggled through sysfs.
64 * @IFF_DYNAMIC: dialup device with changing addresses. Can be toggled
65 * through sysfs.
66 * @IFF_LOWER_UP: driver signals L1 up. Volatile.
67 * @IFF_DORMANT: driver signals dormant. Volatile.
68 * @IFF_ECHO: echo sent packets. Volatile.
69 */
70enum net_device_flags {
71 IFF_UP = 1<<0, /* sysfs */
72 IFF_BROADCAST = 1<<1, /* volatile */
73 IFF_DEBUG = 1<<2, /* sysfs */
74 IFF_LOOPBACK = 1<<3, /* volatile */
75 IFF_POINTOPOINT = 1<<4, /* volatile */
76 IFF_NOTRAILERS = 1<<5, /* sysfs */
77 IFF_RUNNING = 1<<6, /* volatile */
78 IFF_NOARP = 1<<7, /* sysfs */
79 IFF_PROMISC = 1<<8, /* sysfs */
80 IFF_ALLMULTI = 1<<9, /* sysfs */
81 IFF_MASTER = 1<<10, /* volatile */
82 IFF_SLAVE = 1<<11, /* volatile */
83 IFF_MULTICAST = 1<<12, /* sysfs */
84 IFF_PORTSEL = 1<<13, /* sysfs */
85 IFF_AUTOMEDIA = 1<<14, /* sysfs */
86 IFF_DYNAMIC = 1<<15, /* sysfs */
87 IFF_LOWER_UP = 1<<16, /* volatile */
88 IFF_DORMANT = 1<<17, /* volatile */
89 IFF_ECHO = 1<<18, /* volatile */
90};
53 91
54#define IFF_ECHO 0x40000 /* echo sent packets */ 92#define IFF_UP IFF_UP
93#define IFF_BROADCAST IFF_BROADCAST
94#define IFF_DEBUG IFF_DEBUG
95#define IFF_LOOPBACK IFF_LOOPBACK
96#define IFF_POINTOPOINT IFF_POINTOPOINT
97#define IFF_NOTRAILERS IFF_NOTRAILERS
98#define IFF_RUNNING IFF_RUNNING
99#define IFF_NOARP IFF_NOARP
100#define IFF_PROMISC IFF_PROMISC
101#define IFF_ALLMULTI IFF_ALLMULTI
102#define IFF_MASTER IFF_MASTER
103#define IFF_SLAVE IFF_SLAVE
104#define IFF_MULTICAST IFF_MULTICAST
105#define IFF_PORTSEL IFF_PORTSEL
106#define IFF_AUTOMEDIA IFF_AUTOMEDIA
107#define IFF_DYNAMIC IFF_DYNAMIC
108#define IFF_LOWER_UP IFF_LOWER_UP
109#define IFF_DORMANT IFF_DORMANT
110#define IFF_ECHO IFF_ECHO
55 111
56#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ 112#define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
57 IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) 113 IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
58 114
59/* Private (from user) interface flags (netdevice->priv_flags). */
60#define IFF_802_1Q_VLAN 0x1 /* 802.1Q VLAN device. */
61#define IFF_EBRIDGE 0x2 /* Ethernet bridging device. */
62#define IFF_SLAVE_INACTIVE 0x4 /* bonding slave not the curr. active */
63#define IFF_MASTER_8023AD 0x8 /* bonding master, 802.3ad. */
64#define IFF_MASTER_ALB 0x10 /* bonding master, balance-alb. */
65#define IFF_BONDING 0x20 /* bonding master or slave */
66#define IFF_SLAVE_NEEDARP 0x40 /* need ARPs for validation */
67#define IFF_ISATAP 0x80 /* ISATAP interface (RFC4214) */
68#define IFF_MASTER_ARPMON 0x100 /* bonding master, ARP mon in use */
69#define IFF_WAN_HDLC 0x200 /* WAN HDLC device */
70#define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to
71 * release skb->dst
72 */
73#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
74#define IFF_DISABLE_NETPOLL 0x1000 /* disable netpoll at run-time */
75#define IFF_MACVLAN_PORT 0x2000 /* device used as macvlan port */
76#define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
77#define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
78 * datapath port */
79#define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing
80 * skbs on transmit */
81#define IFF_UNICAST_FLT 0x20000 /* Supports unicast filtering */
82#define IFF_TEAM_PORT 0x40000 /* device used as team port */
83#define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */
84#define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address
85 * change when it's running */
86#define IFF_MACVLAN 0x200000 /* Macvlan device */
87
88
89#define IF_GET_IFACE 0x0001 /* for querying only */ 115#define IF_GET_IFACE 0x0001 /* for querying only */
90#define IF_GET_PROTO 0x0002 116#define IF_GET_PROTO 0x0002
91 117
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 2ce0f6a78fa5..0f8210b8e0bc 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -68,11 +68,11 @@
68#define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */ 68#define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */
69#define ETH_P_WCCP 0x883E /* Web-cache coordination protocol 69#define ETH_P_WCCP 0x883E /* Web-cache coordination protocol
70 * defined in draft-wilson-wrec-wccp-v2-00.txt */ 70 * defined in draft-wilson-wrec-wccp-v2-00.txt */
71#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
72#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
73#define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */ 71#define ETH_P_MPLS_UC 0x8847 /* MPLS Unicast traffic */
74#define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */ 72#define ETH_P_MPLS_MC 0x8848 /* MPLS Multicast traffic */
75#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */ 73#define ETH_P_ATMMPOA 0x884c /* MultiProtocol Over ATM */
74#define ETH_P_PPP_DISC 0x8863 /* PPPoE discovery messages */
75#define ETH_P_PPP_SES 0x8864 /* PPPoE session messages */
76#define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */ 76#define ETH_P_LINK_CTL 0x886c /* HPNA, wlan link local tunnel */
77#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport 77#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
78 * over Ethernet 78 * over Ethernet
@@ -89,6 +89,8 @@
89#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ 89#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
90#define ETH_P_TDLS 0x890D /* TDLS */ 90#define ETH_P_TDLS 0x890D /* TDLS */
91#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ 91#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */
92#define ETH_P_80221 0x8917 /* IEEE 802.21 Media Independent Handover Protocol */
93#define ETH_P_LOOPBACK 0x9000 /* Ethernet loopback packet, per IEEE 802.3 */
92#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ 94#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
93#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ 95#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
94#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ 96#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 16410b6e7819..9a7f7ace6649 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -144,6 +144,7 @@ enum {
144 IFLA_NUM_RX_QUEUES, 144 IFLA_NUM_RX_QUEUES,
145 IFLA_CARRIER, 145 IFLA_CARRIER,
146 IFLA_PHYS_PORT_ID, 146 IFLA_PHYS_PORT_ID,
147 IFLA_CARRIER_CHANGES,
147 __IFLA_MAX 148 __IFLA_MAX
148}; 149};
149 150
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h
index 393c5de09d42..c33a65e3d62c 100644
--- a/include/uapi/linux/in.h
+++ b/include/uapi/linux/in.h
@@ -120,6 +120,10 @@ struct in_addr {
120 * this socket to prevent accepting spoofed ones. 120 * this socket to prevent accepting spoofed ones.
121 */ 121 */
122#define IP_PMTUDISC_INTERFACE 4 122#define IP_PMTUDISC_INTERFACE 4
123/* weaker version of IP_PMTUDISC_INTERFACE, which allos packets to get
124 * fragmented if they exeed the interface mtu
125 */
126#define IP_PMTUDISC_OMIT 5
123 127
124#define IP_MULTICAST_IF 32 128#define IP_MULTICAST_IF 32
125#define IP_MULTICAST_TTL 33 129#define IP_MULTICAST_TTL 33
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index e9a1d2d973b6..0d8e0f0342dc 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -185,6 +185,10 @@ struct in6_flowlabel_req {
185 * also see comments on IP_PMTUDISC_INTERFACE 185 * also see comments on IP_PMTUDISC_INTERFACE
186 */ 186 */
187#define IPV6_PMTUDISC_INTERFACE 4 187#define IPV6_PMTUDISC_INTERFACE 4
188/* weaker version of IPV6_PMTUDISC_INTERFACE, which allows packets to
189 * get fragmented if they exceed the interface mtu
190 */
191#define IPV6_PMTUDISC_OMIT 5
188 192
189/* Flowlabel */ 193/* Flowlabel */
190#define IPV6_FLOWLABEL_MGR 32 194#define IPV6_FLOWLABEL_MGR 32
diff --git a/include/uapi/linux/mpls.h b/include/uapi/linux/mpls.h
new file mode 100644
index 000000000000..bc9abfe88c9a
--- /dev/null
+++ b/include/uapi/linux/mpls.h
@@ -0,0 +1,34 @@
1#ifndef _UAPI_MPLS_H
2#define _UAPI_MPLS_H
3
4#include <linux/types.h>
5#include <asm/byteorder.h>
6
7/* Reference: RFC 5462, RFC 3032
8 *
9 * 0 1 2 3
10 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
11 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
12 * | Label | TC |S| TTL |
13 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
14 *
15 * Label: Label Value, 20 bits
16 * TC: Traffic Class field, 3 bits
17 * S: Bottom of Stack, 1 bit
18 * TTL: Time to Live, 8 bits
19 */
20
21struct mpls_label {
22 __be32 entry;
23};
24
25#define MPLS_LS_LABEL_MASK 0xFFFFF000
26#define MPLS_LS_LABEL_SHIFT 12
27#define MPLS_LS_TC_MASK 0x00000E00
28#define MPLS_LS_TC_SHIFT 9
29#define MPLS_LS_S_MASK 0x00000100
30#define MPLS_LS_S_SHIFT 8
31#define MPLS_LS_TTL_MASK 0x000000FF
32#define MPLS_LS_TTL_SHIFT 0
33
34#endif /* _UAPI_MPLS_H */
diff --git a/include/uapi/linux/netdevice.h b/include/uapi/linux/netdevice.h
index 6b9500bc2d56..fdfbd1c17065 100644
--- a/include/uapi/linux/netdevice.h
+++ b/include/uapi/linux/netdevice.h
@@ -49,5 +49,11 @@ enum {
49 IF_PORT_100BASEFX 49 IF_PORT_100BASEFX
50}; 50};
51 51
52/* hardware address assignment types */
53#define NET_ADDR_PERM 0 /* address is permanent (default) */
54#define NET_ADDR_RANDOM 1 /* address is generated randomly */
55#define NET_ADDR_STOLEN 2 /* address is stolen from other device */
56#define NET_ADDR_SET 3 /* address is set using
57 * dev_set_mac_address() */
52 58
53#endif /* _UAPI_LINUX_NETDEVICE_H */ 59#endif /* _UAPI_LINUX_NETDEVICE_H */
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index 25d3b2f79c02..78c2f2e79920 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -82,6 +82,8 @@ enum {
82 IPSET_ATTR_PROTO, /* 7 */ 82 IPSET_ATTR_PROTO, /* 7 */
83 IPSET_ATTR_CADT_FLAGS, /* 8 */ 83 IPSET_ATTR_CADT_FLAGS, /* 8 */
84 IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */ 84 IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */
85 IPSET_ATTR_MARK, /* 10 */
86 IPSET_ATTR_MARKMASK, /* 11 */
85 /* Reserve empty slots */ 87 /* Reserve empty slots */
86 IPSET_ATTR_CADT_MAX = 16, 88 IPSET_ATTR_CADT_MAX = 16,
87 /* Create-only specific attributes */ 89 /* Create-only specific attributes */
@@ -144,6 +146,7 @@ enum ipset_errno {
144 IPSET_ERR_IPADDR_IPV6, 146 IPSET_ERR_IPADDR_IPV6,
145 IPSET_ERR_COUNTER, 147 IPSET_ERR_COUNTER,
146 IPSET_ERR_COMMENT, 148 IPSET_ERR_COMMENT,
149 IPSET_ERR_INVALID_MARKMASK,
147 150
148 /* Type specific error codes */ 151 /* Type specific error codes */
149 IPSET_ERR_TYPE_SPECIFIC = 4352, 152 IPSET_ERR_TYPE_SPECIFIC = 4352,
@@ -182,9 +185,18 @@ enum ipset_cadt_flags {
182 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), 185 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS),
183 IPSET_FLAG_BIT_WITH_COMMENT = 4, 186 IPSET_FLAG_BIT_WITH_COMMENT = 4,
184 IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), 187 IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT),
188 IPSET_FLAG_BIT_WITH_FORCEADD = 5,
189 IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD),
185 IPSET_FLAG_CADT_MAX = 15, 190 IPSET_FLAG_CADT_MAX = 15,
186}; 191};
187 192
193/* The flag bits which correspond to the non-extension create flags */
194enum ipset_create_flags {
195 IPSET_CREATE_FLAG_BIT_FORCEADD = 0,
196 IPSET_CREATE_FLAG_FORCEADD = (1 << IPSET_CREATE_FLAG_BIT_FORCEADD),
197 IPSET_CREATE_FLAG_BIT_MAX = 7,
198};
199
188/* Commands with settype-specific attributes */ 200/* Commands with settype-specific attributes */
189enum ipset_adt { 201enum ipset_adt {
190 IPSET_ADD, 202 IPSET_ADD,
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 83c985a6170b..c88ccbfda5f1 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -1,7 +1,8 @@
1#ifndef _LINUX_NF_TABLES_H 1#ifndef _LINUX_NF_TABLES_H
2#define _LINUX_NF_TABLES_H 2#define _LINUX_NF_TABLES_H
3 3
4#define NFT_CHAIN_MAXNAMELEN 32 4#define NFT_CHAIN_MAXNAMELEN 32
5#define NFT_USERDATA_MAXLEN 256
5 6
6enum nft_registers { 7enum nft_registers {
7 NFT_REG_VERDICT, 8 NFT_REG_VERDICT,
@@ -156,6 +157,7 @@ enum nft_chain_attributes {
156 * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes) 157 * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes)
157 * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes) 158 * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes)
158 * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64) 159 * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64)
160 * @NFTA_RULE_USERDATA: user data (NLA_BINARY, NFT_USERDATA_MAXLEN)
159 */ 161 */
160enum nft_rule_attributes { 162enum nft_rule_attributes {
161 NFTA_RULE_UNSPEC, 163 NFTA_RULE_UNSPEC,
@@ -165,6 +167,7 @@ enum nft_rule_attributes {
165 NFTA_RULE_EXPRESSIONS, 167 NFTA_RULE_EXPRESSIONS,
166 NFTA_RULE_COMPAT, 168 NFTA_RULE_COMPAT,
167 NFTA_RULE_POSITION, 169 NFTA_RULE_POSITION,
170 NFTA_RULE_USERDATA,
168 __NFTA_RULE_MAX 171 __NFTA_RULE_MAX
169}; 172};
170#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1) 173#define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1)
@@ -601,6 +604,7 @@ enum nft_ct_keys {
601 NFT_CT_PROTOCOL, 604 NFT_CT_PROTOCOL,
602 NFT_CT_PROTO_SRC, 605 NFT_CT_PROTO_SRC,
603 NFT_CT_PROTO_DST, 606 NFT_CT_PROTO_DST,
607 NFT_CT_LABELS,
604}; 608};
605 609
606/** 610/**
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 6ad6cc03ccd3..9789dc95b6a8 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -150,6 +150,8 @@ enum nfc_commands {
150 * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) 150 * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED)
151 * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status 151 * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status
152 * @NFC_ATTR_APDU: Secure element APDU 152 * @NFC_ATTR_APDU: Secure element APDU
153 * @NFC_ATTR_TARGET_ISO15693_DSFID: ISO 15693 Data Storage Format Identifier
154 * @NFC_ATTR_TARGET_ISO15693_UID: ISO 15693 Unique Identifier
153 */ 155 */
154enum nfc_attrs { 156enum nfc_attrs {
155 NFC_ATTR_UNSPEC, 157 NFC_ATTR_UNSPEC,
@@ -178,6 +180,8 @@ enum nfc_attrs {
178 NFC_ATTR_SE_AID, 180 NFC_ATTR_SE_AID,
179 NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS, 181 NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS,
180 NFC_ATTR_SE_APDU, 182 NFC_ATTR_SE_APDU,
183 NFC_ATTR_TARGET_ISO15693_DSFID,
184 NFC_ATTR_TARGET_ISO15693_UID,
181/* private: internal use only */ 185/* private: internal use only */
182 __NFC_ATTR_AFTER_LAST 186 __NFC_ATTR_AFTER_LAST
183}; 187};
@@ -200,6 +204,7 @@ enum nfc_sdp_attr {
200#define NFC_SENSF_RES_MAXSIZE 18 204#define NFC_SENSF_RES_MAXSIZE 18
201#define NFC_GB_MAXSIZE 48 205#define NFC_GB_MAXSIZE 48
202#define NFC_FIRMWARE_NAME_MAXSIZE 32 206#define NFC_FIRMWARE_NAME_MAXSIZE 32
207#define NFC_ISO15693_UID_MAXSIZE 8
203 208
204/* NFC protocols */ 209/* NFC protocols */
205#define NFC_PROTO_JEWEL 1 210#define NFC_PROTO_JEWEL 1
@@ -208,8 +213,9 @@ enum nfc_sdp_attr {
208#define NFC_PROTO_ISO14443 4 213#define NFC_PROTO_ISO14443 4
209#define NFC_PROTO_NFC_DEP 5 214#define NFC_PROTO_NFC_DEP 5
210#define NFC_PROTO_ISO14443_B 6 215#define NFC_PROTO_ISO14443_B 6
216#define NFC_PROTO_ISO15693 7
211 217
212#define NFC_PROTO_MAX 7 218#define NFC_PROTO_MAX 8
213 219
214/* NFC communication modes */ 220/* NFC communication modes */
215#define NFC_COMM_ACTIVE 0 221#define NFC_COMM_ACTIVE 0
@@ -227,6 +233,7 @@ enum nfc_sdp_attr {
227#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) 233#define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443)
228#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) 234#define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP)
229#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) 235#define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B)
236#define NFC_PROTO_ISO15693_MASK (1 << NFC_PROTO_ISO15693)
230 237
231/* NFC Secure Elements */ 238/* NFC Secure Elements */
232#define NFC_SE_UICC 0x1 239#define NFC_SE_UICC 0x1
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 91054fd660e0..1ba9d626aa83 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -303,8 +303,9 @@
303 * passed, all channels allowed for the current regulatory domain 303 * passed, all channels allowed for the current regulatory domain
304 * are used. Extra IEs can also be passed from the userspace by 304 * are used. Extra IEs can also be passed from the userspace by
305 * using the %NL80211_ATTR_IE attribute. 305 * using the %NL80211_ATTR_IE attribute.
306 * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT 306 * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
307 * if scheduled scan is not running. 307 * scheduled scan is not running. The caller may assume that as soon
308 * as the call returns, it is safe to start a new scheduled scan again.
308 * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan 309 * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan
309 * results available. 310 * results available.
310 * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has 311 * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has
@@ -418,8 +419,18 @@
418 * %NL80211_ATTR_SSID attribute, and can optionally specify the association 419 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
419 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, 420 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
420 * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, 421 * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
421 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and 422 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
422 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT. 423 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and
424 * %NL80211_ATTR_WIPHY_FREQ_HINT.
425 * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are
426 * restrictions on BSS selection, i.e., they effectively prevent roaming
427 * within the ESS. %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT
428 * can be included to provide a recommendation of the initial BSS while
429 * allowing the driver to roam to other BSSes within the ESS and also to
430 * ignore this recommendation if the indicated BSS is not ideal. Only one
431 * set of BSSID,frequency parameters is used (i.e., either the enforcing
432 * %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
433 * %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
423 * Background scan period can optionally be 434 * Background scan period can optionally be
424 * specified in %NL80211_ATTR_BG_SCAN_PERIOD, 435 * specified in %NL80211_ATTR_BG_SCAN_PERIOD,
425 * if not specified default background scan configuration 436 * if not specified default background scan configuration
@@ -1555,6 +1566,19 @@ enum nl80211_commands {
1555 * data is in the format defined for the payload of the QoS Map Set element 1566 * data is in the format defined for the payload of the QoS Map Set element
1556 * in IEEE Std 802.11-2012, 8.4.2.97. 1567 * in IEEE Std 802.11-2012, 8.4.2.97.
1557 * 1568 *
1569 * @NL80211_ATTR_MAC_HINT: MAC address recommendation as initial BSS
1570 * @NL80211_ATTR_WIPHY_FREQ_HINT: frequency of the recommended initial BSS
1571 *
1572 * @NL80211_ATTR_MAX_AP_ASSOC_STA: Device attribute that indicates how many
1573 * associated stations are supported in AP mode (including P2P GO); u32.
1574 * Since drivers may not have a fixed limit on the maximum number (e.g.,
1575 * other concurrent operations may affect this), drivers are allowed to
1576 * advertise values that cannot always be met. In such cases, an attempt
1577 * to add a new station entry with @NL80211_CMD_NEW_STATION may fail.
1578 *
1579 * @NL80211_ATTR_TDLS_PEER_CAPABILITY: flags for TDLS peer capabilities, u32.
1580 * As specified in the &enum nl80211_tdls_peer_capability.
1581 *
1558 * @NL80211_ATTR_MAX: highest attribute number currently defined 1582 * @NL80211_ATTR_MAX: highest attribute number currently defined
1559 * @__NL80211_ATTR_AFTER_LAST: internal use 1583 * @__NL80211_ATTR_AFTER_LAST: internal use
1560 */ 1584 */
@@ -1883,6 +1907,13 @@ enum nl80211_attrs {
1883 1907
1884 NL80211_ATTR_QOS_MAP, 1908 NL80211_ATTR_QOS_MAP,
1885 1909
1910 NL80211_ATTR_MAC_HINT,
1911 NL80211_ATTR_WIPHY_FREQ_HINT,
1912
1913 NL80211_ATTR_MAX_AP_ASSOC_STA,
1914
1915 NL80211_ATTR_TDLS_PEER_CAPABILITY,
1916
1886 /* add attributes here, update the policy in nl80211.c */ 1917 /* add attributes here, update the policy in nl80211.c */
1887 1918
1888 __NL80211_ATTR_AFTER_LAST, 1919 __NL80211_ATTR_AFTER_LAST,
@@ -2304,6 +2335,7 @@ enum nl80211_band_attr {
2304 * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel 2335 * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel
2305 * using this channel as the primary or any of the secondary channels 2336 * using this channel as the primary or any of the secondary channels
2306 * isn't possible 2337 * isn't possible
2338 * @NL80211_FREQUENCY_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
2307 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number 2339 * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
2308 * currently defined 2340 * currently defined
2309 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use 2341 * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -2322,6 +2354,7 @@ enum nl80211_frequency_attr {
2322 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS, 2354 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS,
2323 NL80211_FREQUENCY_ATTR_NO_80MHZ, 2355 NL80211_FREQUENCY_ATTR_NO_80MHZ,
2324 NL80211_FREQUENCY_ATTR_NO_160MHZ, 2356 NL80211_FREQUENCY_ATTR_NO_160MHZ,
2357 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME,
2325 2358
2326 /* keep last */ 2359 /* keep last */
2327 __NL80211_FREQUENCY_ATTR_AFTER_LAST, 2360 __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -2412,12 +2445,14 @@ enum nl80211_reg_type {
2412 * in KHz. This is not a center a frequency but an actual regulatory 2445 * in KHz. This is not a center a frequency but an actual regulatory
2413 * band edge. 2446 * band edge.
2414 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this 2447 * @NL80211_ATTR_FREQ_RANGE_MAX_BW: maximum allowed bandwidth for this
2415 * frequency range, in KHz. 2448 * frequency range, in KHz.
2416 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain 2449 * @NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN: the maximum allowed antenna gain
2417 * for a given frequency range. The value is in mBi (100 * dBi). 2450 * for a given frequency range. The value is in mBi (100 * dBi).
2418 * If you don't have one then don't send this. 2451 * If you don't have one then don't send this.
2419 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for 2452 * @NL80211_ATTR_POWER_RULE_MAX_EIRP: the maximum allowed EIRP for
2420 * a given frequency range. The value is in mBm (100 * dBm). 2453 * a given frequency range. The value is in mBm (100 * dBm).
2454 * @NL80211_ATTR_DFS_CAC_TIME: DFS CAC time in milliseconds.
2455 * If not present or 0 default CAC time will be used.
2421 * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number 2456 * @NL80211_REG_RULE_ATTR_MAX: highest regulatory rule attribute number
2422 * currently defined 2457 * currently defined
2423 * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use 2458 * @__NL80211_REG_RULE_ATTR_AFTER_LAST: internal use
@@ -2433,6 +2468,8 @@ enum nl80211_reg_rule_attr {
2433 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN, 2468 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN,
2434 NL80211_ATTR_POWER_RULE_MAX_EIRP, 2469 NL80211_ATTR_POWER_RULE_MAX_EIRP,
2435 2470
2471 NL80211_ATTR_DFS_CAC_TIME,
2472
2436 /* keep last */ 2473 /* keep last */
2437 __NL80211_REG_RULE_ATTR_AFTER_LAST, 2474 __NL80211_REG_RULE_ATTR_AFTER_LAST,
2438 NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1 2475 NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
@@ -2442,9 +2479,15 @@ enum nl80211_reg_rule_attr {
2442 * enum nl80211_sched_scan_match_attr - scheduled scan match attributes 2479 * enum nl80211_sched_scan_match_attr - scheduled scan match attributes
2443 * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved 2480 * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
2444 * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching, 2481 * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
2445 * only report BSS with matching SSID. 2482 * only report BSS with matching SSID.
2446 * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a 2483 * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
2447 * BSS in scan results. Filtering is turned off if not specified. 2484 * BSS in scan results. Filtering is turned off if not specified. Note that
2485 * if this attribute is in a match set of its own, then it is treated as
2486 * the default value for all matchsets with an SSID, rather than being a
2487 * matchset of its own without an RSSI filter. This is due to problems with
2488 * how this API was implemented in the past. Also, due to the same problem,
2489 * the only way to create a matchset with only an RSSI filter (with this
2490 * attribute) is if there's only a single matchset with the RSSI attribute.
2448 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter 2491 * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
2449 * attribute number currently defined 2492 * attribute number currently defined
2450 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use 2493 * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
@@ -2477,6 +2520,9 @@ enum nl80211_sched_scan_match_attr {
2477 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed, 2520 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
2478 * this includes probe requests or modes of operation that require 2521 * this includes probe requests or modes of operation that require
2479 * beaconing. 2522 * beaconing.
2523 * @NL80211_RRF_AUTO_BW: maximum available bandwidth should be calculated
2524 * base on contiguous rules and wider channels will be allowed to cross
2525 * multiple contiguous/overlapping frequency ranges.
2480 */ 2526 */
2481enum nl80211_reg_rule_flags { 2527enum nl80211_reg_rule_flags {
2482 NL80211_RRF_NO_OFDM = 1<<0, 2528 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2488,6 +2534,7 @@ enum nl80211_reg_rule_flags {
2488 NL80211_RRF_PTMP_ONLY = 1<<6, 2534 NL80211_RRF_PTMP_ONLY = 1<<6,
2489 NL80211_RRF_NO_IR = 1<<7, 2535 NL80211_RRF_NO_IR = 1<<7,
2490 __NL80211_RRF_NO_IBSS = 1<<8, 2536 __NL80211_RRF_NO_IBSS = 1<<8,
2537 NL80211_RRF_AUTO_BW = 1<<11,
2491}; 2538};
2492 2539
2493#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR 2540#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
@@ -3131,6 +3178,7 @@ enum nl80211_key_attributes {
3131 * in an array of MCS numbers. 3178 * in an array of MCS numbers.
3132 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection, 3179 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
3133 * see &struct nl80211_txrate_vht 3180 * see &struct nl80211_txrate_vht
3181 * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
3134 * @__NL80211_TXRATE_AFTER_LAST: internal 3182 * @__NL80211_TXRATE_AFTER_LAST: internal
3135 * @NL80211_TXRATE_MAX: highest TX rate attribute 3183 * @NL80211_TXRATE_MAX: highest TX rate attribute
3136 */ 3184 */
@@ -3139,6 +3187,7 @@ enum nl80211_tx_rate_attributes {
3139 NL80211_TXRATE_LEGACY, 3187 NL80211_TXRATE_LEGACY,
3140 NL80211_TXRATE_HT, 3188 NL80211_TXRATE_HT,
3141 NL80211_TXRATE_VHT, 3189 NL80211_TXRATE_VHT,
3190 NL80211_TXRATE_GI,
3142 3191
3143 /* keep last */ 3192 /* keep last */
3144 __NL80211_TXRATE_AFTER_LAST, 3193 __NL80211_TXRATE_AFTER_LAST,
@@ -3156,6 +3205,12 @@ struct nl80211_txrate_vht {
3156 __u16 mcs[NL80211_VHT_NSS_MAX]; 3205 __u16 mcs[NL80211_VHT_NSS_MAX];
3157}; 3206};
3158 3207
3208enum nl80211_txrate_gi {
3209 NL80211_TXRATE_DEFAULT_GI,
3210 NL80211_TXRATE_FORCE_SGI,
3211 NL80211_TXRATE_FORCE_LGI,
3212};
3213
3159/** 3214/**
3160 * enum nl80211_band - Frequency band 3215 * enum nl80211_band - Frequency band
3161 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band 3216 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
@@ -3801,11 +3856,6 @@ enum nl80211_ap_sme_features {
3801 * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested 3856 * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
3802 * to work properly to suppport receiving regulatory hints from 3857 * to work properly to suppport receiving regulatory hints from
3803 * cellular base stations. 3858 * cellular base stations.
3804 * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: If this is set, an active
3805 * P2P Device (%NL80211_IFTYPE_P2P_DEVICE) requires its own channel
3806 * in the interface combinations, even when it's only used for scan
3807 * and remain-on-channel. This could be due to, for example, the
3808 * remain-on-channel implementation requiring a channel context.
3809 * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of 3859 * @NL80211_FEATURE_SAE: This driver supports simultaneous authentication of
3810 * equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station 3860 * equals (SAE) with user space SME (NL80211_CMD_AUTHENTICATE) in station
3811 * mode 3861 * mode
@@ -3847,7 +3897,7 @@ enum nl80211_feature_flags {
3847 NL80211_FEATURE_HT_IBSS = 1 << 1, 3897 NL80211_FEATURE_HT_IBSS = 1 << 1,
3848 NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, 3898 NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
3849 NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, 3899 NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3,
3850 NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 1 << 4, 3900 /* bit 4 is reserved - don't use */
3851 NL80211_FEATURE_SAE = 1 << 5, 3901 NL80211_FEATURE_SAE = 1 << 5,
3852 NL80211_FEATURE_LOW_PRIORITY_SCAN = 1 << 6, 3902 NL80211_FEATURE_LOW_PRIORITY_SCAN = 1 << 6,
3853 NL80211_FEATURE_SCAN_FLUSH = 1 << 7, 3903 NL80211_FEATURE_SCAN_FLUSH = 1 << 7,
@@ -4037,4 +4087,20 @@ struct nl80211_vendor_cmd_info {
4037 __u32 subcmd; 4087 __u32 subcmd;
4038}; 4088};
4039 4089
4090/**
4091 * enum nl80211_tdls_peer_capability - TDLS peer flags.
4092 *
4093 * Used by tdls_mgmt() to determine which conditional elements need
4094 * to be added to TDLS Setup frames.
4095 *
4096 * @NL80211_TDLS_PEER_HT: TDLS peer is HT capable.
4097 * @NL80211_TDLS_PEER_VHT: TDLS peer is VHT capable.
4098 * @NL80211_TDLS_PEER_WMM: TDLS peer is WMM capable.
4099 */
4100enum nl80211_tdls_peer_capability {
4101 NL80211_TDLS_PEER_HT = 1<<0,
4102 NL80211_TDLS_PEER_VHT = 1<<1,
4103 NL80211_TDLS_PEER_WMM = 1<<2,
4104};
4105
4040#endif /* __LINUX_NL80211_H */ 4106#endif /* __LINUX_NL80211_H */
diff --git a/include/uapi/linux/pfkeyv2.h b/include/uapi/linux/pfkeyv2.h
index 0b80c806631f..ada7f0171ccc 100644
--- a/include/uapi/linux/pfkeyv2.h
+++ b/include/uapi/linux/pfkeyv2.h
@@ -235,6 +235,18 @@ struct sadb_x_kmaddress {
235} __attribute__((packed)); 235} __attribute__((packed));
236/* sizeof(struct sadb_x_kmaddress) == 8 */ 236/* sizeof(struct sadb_x_kmaddress) == 8 */
237 237
238/* To specify the SA dump filter */
239struct sadb_x_filter {
240 __u16 sadb_x_filter_len;
241 __u16 sadb_x_filter_exttype;
242 __u32 sadb_x_filter_saddr[4];
243 __u32 sadb_x_filter_daddr[4];
244 __u16 sadb_x_filter_family;
245 __u8 sadb_x_filter_splen;
246 __u8 sadb_x_filter_dplen;
247} __attribute__((packed));
248/* sizeof(struct sadb_x_filter) == 40 */
249
238/* Message types */ 250/* Message types */
239#define SADB_RESERVED 0 251#define SADB_RESERVED 0
240#define SADB_GETSPI 1 252#define SADB_GETSPI 1
@@ -358,7 +370,8 @@ struct sadb_x_kmaddress {
358#define SADB_X_EXT_SEC_CTX 24 370#define SADB_X_EXT_SEC_CTX 24
359/* Used with MIGRATE to pass @ to IKE for negotiation */ 371/* Used with MIGRATE to pass @ to IKE for negotiation */
360#define SADB_X_EXT_KMADDRESS 25 372#define SADB_X_EXT_KMADDRESS 25
361#define SADB_EXT_MAX 25 373#define SADB_X_EXT_FILTER 26
374#define SADB_EXT_MAX 26
362 375
363/* Identity Extension values */ 376/* Identity Extension values */
364#define SADB_IDENTTYPE_RESERVED 0 377#define SADB_IDENTTYPE_RESERVED 0
diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
index b65c834f83e9..f0b7bfe5da92 100644
--- a/include/uapi/linux/ptp_clock.h
+++ b/include/uapi/linux/ptp_clock.h
@@ -50,7 +50,8 @@ struct ptp_clock_caps {
50 int n_ext_ts; /* Number of external time stamp channels. */ 50 int n_ext_ts; /* Number of external time stamp channels. */
51 int n_per_out; /* Number of programmable periodic signals. */ 51 int n_per_out; /* Number of programmable periodic signals. */
52 int pps; /* Whether the clock supports a PPS callback. */ 52 int pps; /* Whether the clock supports a PPS callback. */
53 int rsv[15]; /* Reserved for future use. */ 53 int n_pins; /* Number of input/output pins. */
54 int rsv[14]; /* Reserved for future use. */
54}; 55};
55 56
56struct ptp_extts_request { 57struct ptp_extts_request {
@@ -80,6 +81,40 @@ struct ptp_sys_offset {
80 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; 81 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1];
81}; 82};
82 83
84enum ptp_pin_function {
85 PTP_PF_NONE,
86 PTP_PF_EXTTS,
87 PTP_PF_PEROUT,
88 PTP_PF_PHYSYNC,
89};
90
91struct ptp_pin_desc {
92 /*
93 * Hardware specific human readable pin name. This field is
94 * set by the kernel during the PTP_PIN_GETFUNC ioctl and is
95 * ignored for the PTP_PIN_SETFUNC ioctl.
96 */
97 char name[64];
98 /*
99 * Pin index in the range of zero to ptp_clock_caps.n_pins - 1.
100 */
101 unsigned int index;
102 /*
103 * Which of the PTP_PF_xxx functions to use on this pin.
104 */
105 unsigned int func;
106 /*
107 * The specific channel to use for this function.
108 * This corresponds to the 'index' field of the
109 * PTP_EXTTS_REQUEST and PTP_PEROUT_REQUEST ioctls.
110 */
111 unsigned int chan;
112 /*
113 * Reserved for future use.
114 */
115 unsigned int rsv[5];
116};
117
83#define PTP_CLK_MAGIC '=' 118#define PTP_CLK_MAGIC '='
84 119
85#define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps) 120#define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps)
@@ -87,6 +122,8 @@ struct ptp_sys_offset {
87#define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request) 122#define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request)
88#define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int) 123#define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int)
89#define PTP_SYS_OFFSET _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset) 124#define PTP_SYS_OFFSET _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset)
125#define PTP_PIN_GETFUNC _IOWR(PTP_CLK_MAGIC, 6, struct ptp_pin_desc)
126#define PTP_PIN_SETFUNC _IOW(PTP_CLK_MAGIC, 7, struct ptp_pin_desc)
90 127
91struct ptp_extts_event { 128struct ptp_extts_event {
92 struct ptp_clock_time t; /* Time event occured. */ 129 struct ptp_clock_time t; /* Time event occured. */
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index bbaba22f2d1b..df40137f33dd 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -252,6 +252,7 @@ enum
252 LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */ 252 LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */
253 LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */ 253 LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */
254 LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */ 254 LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */
255 LINUX_MIB_TCPFASTOPENACTIVEFAIL, /* TCPFastOpenActiveFail */
255 LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/ 256 LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/
256 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ 257 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
257 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ 258 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
@@ -259,6 +260,11 @@ enum
259 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */ 260 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
260 LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */ 261 LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */
261 LINUX_MIB_TCPAUTOCORKING, /* TCPAutoCorking */ 262 LINUX_MIB_TCPAUTOCORKING, /* TCPAutoCorking */
263 LINUX_MIB_TCPFROMZEROWINDOWADV, /* TCPFromZeroWindowAdv */
264 LINUX_MIB_TCPTOZEROWINDOWADV, /* TCPToZeroWindowAdv */
265 LINUX_MIB_TCPWANTZEROWINDOWADV, /* TCPWantZeroWindowAdv */
266 LINUX_MIB_TCPSYNRETRANS, /* TCPSynRetrans */
267 LINUX_MIB_TCPORIGDATASENT, /* TCPOrigDataSent */
262 __LINUX_MIB_MAX 268 __LINUX_MIB_MAX
263}; 269};
264 270
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 377f1e59411d..3b9718328d8b 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -186,6 +186,9 @@ struct tcp_info {
186 __u32 tcpi_rcv_space; 186 __u32 tcpi_rcv_space;
187 187
188 __u32 tcpi_total_retrans; 188 __u32 tcpi_total_retrans;
189
190 __u64 tcpi_pacing_rate;
191 __u64 tcpi_max_pacing_rate;
189}; 192};
190 193
191/* for TCP_MD5SIG socket option */ 194/* for TCP_MD5SIG socket option */
diff --git a/include/uapi/linux/tcp_metrics.h b/include/uapi/linux/tcp_metrics.h
index 54a37b13f2c4..93533926035c 100644
--- a/include/uapi/linux/tcp_metrics.h
+++ b/include/uapi/linux/tcp_metrics.h
@@ -11,12 +11,15 @@
11#define TCP_METRICS_GENL_VERSION 0x1 11#define TCP_METRICS_GENL_VERSION 0x1
12 12
13enum tcp_metric_index { 13enum tcp_metric_index {
14 TCP_METRIC_RTT, 14 TCP_METRIC_RTT, /* in ms units */
15 TCP_METRIC_RTTVAR, 15 TCP_METRIC_RTTVAR, /* in ms units */
16 TCP_METRIC_SSTHRESH, 16 TCP_METRIC_SSTHRESH,
17 TCP_METRIC_CWND, 17 TCP_METRIC_CWND,
18 TCP_METRIC_REORDERING, 18 TCP_METRIC_REORDERING,
19 19
20 TCP_METRIC_RTT_US, /* in usec units */
21 TCP_METRIC_RTTVAR_US, /* in usec units */
22
20 /* Always last. */ 23 /* Always last. */
21 __TCP_METRIC_MAX, 24 __TCP_METRIC_MAX,
22}; 25};
diff --git a/include/uapi/linux/usb/cdc.h b/include/uapi/linux/usb/cdc.h
index f35aa0a338c7..b6a9cdd6e096 100644
--- a/include/uapi/linux/usb/cdc.h
+++ b/include/uapi/linux/usb/cdc.h
@@ -56,6 +56,7 @@
56#define USB_CDC_OBEX_TYPE 0x15 56#define USB_CDC_OBEX_TYPE 0x15
57#define USB_CDC_NCM_TYPE 0x1a 57#define USB_CDC_NCM_TYPE 0x1a
58#define USB_CDC_MBIM_TYPE 0x1b 58#define USB_CDC_MBIM_TYPE 0x1b
59#define USB_CDC_MBIM_EXTENDED_TYPE 0x1c
59 60
60/* "Header Functional Descriptor" from CDC spec 5.2.3.1 */ 61/* "Header Functional Descriptor" from CDC spec 5.2.3.1 */
61struct usb_cdc_header_desc { 62struct usb_cdc_header_desc {
@@ -205,6 +206,17 @@ struct usb_cdc_mbim_desc {
205 __u8 bmNetworkCapabilities; 206 __u8 bmNetworkCapabilities;
206} __attribute__ ((packed)); 207} __attribute__ ((packed));
207 208
209/* "MBIM Extended Functional Descriptor" from CDC MBIM spec 1.0 errata-1 */
210struct usb_cdc_mbim_extended_desc {
211 __u8 bLength;
212 __u8 bDescriptorType;
213 __u8 bDescriptorSubType;
214
215 __le16 bcdMBIMExtendedVersion;
216 __u8 bMaxOutstandingCommandMessages;
217 __le16 wMTU;
218} __attribute__ ((packed));
219
208/*-------------------------------------------------------------------------*/ 220/*-------------------------------------------------------------------------*/
209 221
210/* 222/*
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index a8cd6a4a2970..25e5dd916ba4 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -298,6 +298,8 @@ enum xfrm_attr_type_t {
298 XFRMA_TFCPAD, /* __u32 */ 298 XFRMA_TFCPAD, /* __u32 */
299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ 299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */
300 XFRMA_SA_EXTRA_FLAGS, /* __u32 */ 300 XFRMA_SA_EXTRA_FLAGS, /* __u32 */
301 XFRMA_PROTO, /* __u8 */
302 XFRMA_ADDRESS_FILTER, /* struct xfrm_address_filter */
301 __XFRMA_MAX 303 __XFRMA_MAX
302 304
303#define XFRMA_MAX (__XFRMA_MAX - 1) 305#define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -474,6 +476,14 @@ struct xfrm_user_mapping {
474 __be16 new_sport; 476 __be16 new_sport;
475}; 477};
476 478
479struct xfrm_address_filter {
480 xfrm_address_t saddr;
481 xfrm_address_t daddr;
482 __u16 family;
483 __u8 splen;
484 __u8 dplen;
485};
486
477#ifndef __KERNEL__ 487#ifndef __KERNEL__
478/* backwards compatibility for userspace */ 488/* backwards compatibility for userspace */
479#define XFRMGRP_ACQUIRE 1 489#define XFRMGRP_ACQUIRE 1