diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/caif/caif_socket.h | 164 | ||||
-rw-r--r-- | include/linux/caif/if_caif.h | 34 | ||||
-rw-r--r-- | include/linux/can/platform/mcp251x.h | 4 | ||||
-rw-r--r-- | include/linux/ethtool.h | 116 | ||||
-rw-r--r-- | include/linux/genetlink.h | 8 | ||||
-rw-r--r-- | include/linux/if_arp.h | 1 | ||||
-rw-r--r-- | include/linux/if_ether.h | 1 | ||||
-rw-r--r-- | include/linux/if_link.h | 33 | ||||
-rw-r--r-- | include/linux/if_pppol2tp.h | 16 | ||||
-rw-r--r-- | include/linux/if_pppox.h | 9 | ||||
-rw-r--r-- | include/linux/l2tp.h | 163 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 26 | ||||
-rw-r--r-- | include/linux/netdevice.h | 138 | ||||
-rw-r--r-- | include/linux/nl80211.h | 50 | ||||
-rw-r--r-- | include/linux/notifier.h | 9 | ||||
-rw-r--r-- | include/linux/phy.h | 13 | ||||
-rw-r--r-- | include/linux/ppp_channel.h | 3 | ||||
-rw-r--r-- | include/linux/rculist.h | 13 | ||||
-rw-r--r-- | include/linux/skbuff.h | 3 | ||||
-rw-r--r-- | include/linux/snmp.h | 2 | ||||
-rw-r--r-- | include/linux/socket.h | 5 | ||||
-rw-r--r-- | include/linux/tipc.h | 30 | ||||
-rw-r--r-- | include/linux/tty.h | 4 | ||||
-rw-r--r-- | include/linux/wireless.h | 4 |
24 files changed, 717 insertions, 132 deletions
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h new file mode 100644 index 000000000000..8e5c8444a3f4 --- /dev/null +++ b/include/linux/caif/caif_socket.h | |||
@@ -0,0 +1,164 @@ | |||
1 | /* linux/caif_socket.h | ||
2 | * CAIF Definitions for CAIF socket and network layer | ||
3 | * Copyright (C) ST-Ericsson AB 2010 | ||
4 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #ifndef _LINUX_CAIF_SOCKET_H | ||
9 | #define _LINUX_CAIF_SOCKET_H | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #include <linux/socket.h> | ||
15 | #else | ||
16 | #include <sys/socket.h> | ||
17 | #endif | ||
18 | |||
19 | |||
20 | /** | ||
21 | * enum caif_link_selector - Physical Link Selection. | ||
22 | * @CAIF_LINK_HIGH_BANDW: Physical interface for high-bandwidth | ||
23 | * traffic. | ||
24 | * @CAIF_LINK_LOW_LATENCY: Physical interface for low-latency | ||
25 | * traffic. | ||
26 | * | ||
27 | * CAIF Link Layers can register their link properties. | ||
28 | * This enum is used for choosing between CAIF Link Layers when | ||
29 | * setting up CAIF Channels when multiple CAIF Link Layers exists. | ||
30 | */ | ||
31 | enum caif_link_selector { | ||
32 | CAIF_LINK_HIGH_BANDW, | ||
33 | CAIF_LINK_LOW_LATENCY | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * enum caif_channel_priority - CAIF channel priorities. | ||
38 | * | ||
39 | * @CAIF_PRIO_MIN: Min priority for a channel. | ||
40 | * @CAIF_PRIO_LOW: Low-priority channel. | ||
41 | * @CAIF_PRIO_NORMAL: Normal/default priority level. | ||
42 | * @CAIF_PRIO_HIGH: High priority level | ||
43 | * @CAIF_PRIO_MAX: Max priority for channel | ||
44 | * | ||
45 | * Priority can be set on CAIF Channels in order to | ||
46 | * prioritize between traffic on different CAIF Channels. | ||
47 | * These priority levels are recommended, but the priority value | ||
48 | * is not restricted to the values defined in this enum, any value | ||
49 | * between CAIF_PRIO_MIN and CAIF_PRIO_MAX could be used. | ||
50 | */ | ||
51 | enum caif_channel_priority { | ||
52 | CAIF_PRIO_MIN = 0x01, | ||
53 | CAIF_PRIO_LOW = 0x04, | ||
54 | CAIF_PRIO_NORMAL = 0x0f, | ||
55 | CAIF_PRIO_HIGH = 0x14, | ||
56 | CAIF_PRIO_MAX = 0x1F | ||
57 | }; | ||
58 | |||
59 | /** | ||
60 | * enum caif_protocol_type - CAIF Channel type. | ||
61 | * @CAIFPROTO_AT: Classic AT channel. | ||
62 | * @CAIFPROTO_DATAGRAM: Datagram channel. | ||
63 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. | ||
64 | * @CAIFPROTO_UTIL: Utility (Psock) channel. | ||
65 | * @CAIFPROTO_RFM: Remote File Manager | ||
66 | * | ||
67 | * This enum defines the CAIF Channel type to be used. This defines | ||
68 | * the service to connect to on the modem. | ||
69 | */ | ||
70 | enum caif_protocol_type { | ||
71 | CAIFPROTO_AT, | ||
72 | CAIFPROTO_DATAGRAM, | ||
73 | CAIFPROTO_DATAGRAM_LOOP, | ||
74 | CAIFPROTO_UTIL, | ||
75 | CAIFPROTO_RFM, | ||
76 | _CAIFPROTO_MAX | ||
77 | }; | ||
78 | #define CAIFPROTO_MAX _CAIFPROTO_MAX | ||
79 | |||
80 | /** | ||
81 | * enum caif_at_type - AT Service Endpoint | ||
82 | * @CAIF_ATTYPE_PLAIN: Connects to a plain vanilla AT channel. | ||
83 | */ | ||
84 | enum caif_at_type { | ||
85 | CAIF_ATTYPE_PLAIN = 2 | ||
86 | }; | ||
87 | |||
88 | /** | ||
89 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. | ||
90 | * @u: Union of address data 'switched' by family. | ||
91 | * : | ||
92 | * @u.at: Applies when family = CAIFPROTO_AT. | ||
93 | * | ||
94 | * @u.at.type: Type of AT link to set up (enum caif_at_type). | ||
95 | * | ||
96 | * @u.util: Applies when family = CAIFPROTO_UTIL | ||
97 | * | ||
98 | * @u.util.service: Utility service name. | ||
99 | * | ||
100 | * @u.dgm: Applies when family = CAIFPROTO_DATAGRAM | ||
101 | * | ||
102 | * @u.dgm.connection_id: Datagram connection id. | ||
103 | * | ||
104 | * @u.dgm.nsapi: NSAPI of the PDP-Context. | ||
105 | * | ||
106 | * @u.rfm: Applies when family = CAIFPROTO_RFM | ||
107 | * | ||
108 | * @u.rfm.connection_id: Connection ID for RFM. | ||
109 | * | ||
110 | * @u.rfm.volume: Volume to mount. | ||
111 | * | ||
112 | * Description: | ||
113 | * This structure holds the connect parameters used for setting up a | ||
114 | * CAIF Channel. It defines the service to connect to on the modem. | ||
115 | */ | ||
116 | struct sockaddr_caif { | ||
117 | sa_family_t family; | ||
118 | union { | ||
119 | struct { | ||
120 | __u8 type; /* type: enum caif_at_type */ | ||
121 | } at; /* CAIFPROTO_AT */ | ||
122 | struct { | ||
123 | char service[16]; | ||
124 | } util; /* CAIFPROTO_UTIL */ | ||
125 | union { | ||
126 | __u32 connection_id; | ||
127 | __u8 nsapi; | ||
128 | } dgm; /* CAIFPROTO_DATAGRAM(_LOOP)*/ | ||
129 | struct { | ||
130 | __u32 connection_id; | ||
131 | char volume[16]; | ||
132 | } rfm; /* CAIFPROTO_RFM */ | ||
133 | } u; | ||
134 | }; | ||
135 | |||
136 | /** | ||
137 | * enum caif_socket_opts - CAIF option values for getsockopt and setsockopt. | ||
138 | * | ||
139 | * @CAIFSO_LINK_SELECT: Selector used if multiple CAIF Link layers are | ||
140 | * available. Either a high bandwidth | ||
141 | * link can be selected (CAIF_LINK_HIGH_BANDW) or | ||
142 | * or a low latency link (CAIF_LINK_LOW_LATENCY). | ||
143 | * This option is of type __u32. | ||
144 | * Alternatively SO_BINDTODEVICE can be used. | ||
145 | * | ||
146 | * @CAIFSO_REQ_PARAM: Used to set the request parameters for a | ||
147 | * utility channel. (maximum 256 bytes). This | ||
148 | * option must be set before connecting. | ||
149 | * | ||
150 | * @CAIFSO_RSP_PARAM: Gets the response parameters for a utility | ||
151 | * channel. (maximum 256 bytes). This option | ||
152 | * is valid after a successful connect. | ||
153 | * | ||
154 | * | ||
155 | * This enum defines the CAIF Socket options to be used on a socket | ||
156 | * | ||
157 | */ | ||
158 | enum caif_socket_opts { | ||
159 | CAIFSO_LINK_SELECT = 127, | ||
160 | CAIFSO_REQ_PARAM = 128, | ||
161 | CAIFSO_RSP_PARAM = 129, | ||
162 | }; | ||
163 | |||
164 | #endif /* _LINUX_CAIF_SOCKET_H */ | ||
diff --git a/include/linux/caif/if_caif.h b/include/linux/caif/if_caif.h new file mode 100644 index 000000000000..5e7eed4edf51 --- /dev/null +++ b/include/linux/caif/if_caif.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson AB 2010 | ||
3 | * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef IF_CAIF_H_ | ||
8 | #define IF_CAIF_H_ | ||
9 | #include <linux/sockios.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/socket.h> | ||
12 | |||
13 | /** | ||
14 | * enum ifla_caif - CAIF NetlinkRT parameters. | ||
15 | * @IFLA_CAIF_IPV4_CONNID: Connection ID for IPv4 PDP Context. | ||
16 | * The type of attribute is NLA_U32. | ||
17 | * @IFLA_CAIF_IPV6_CONNID: Connection ID for IPv6 PDP Context. | ||
18 | * The type of attribute is NLA_U32. | ||
19 | * @IFLA_CAIF_LOOPBACK: If different from zero, device is doing loopback | ||
20 | * The type of attribute is NLA_U8. | ||
21 | * | ||
22 | * When using RT Netlink to create, destroy or configure a CAIF IP interface, | ||
23 | * enum ifla_caif is used to specify the configuration attributes. | ||
24 | */ | ||
25 | enum ifla_caif { | ||
26 | __IFLA_CAIF_UNSPEC, | ||
27 | IFLA_CAIF_IPV4_CONNID, | ||
28 | IFLA_CAIF_IPV6_CONNID, | ||
29 | IFLA_CAIF_LOOPBACK, | ||
30 | __IFLA_CAIF_MAX | ||
31 | }; | ||
32 | #define IFLA_CAIF_MAX (__IFLA_CAIF_MAX-1) | ||
33 | |||
34 | #endif /*IF_CAIF_H_*/ | ||
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 1448177d86d5..dba28268e651 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
@@ -26,8 +26,8 @@ | |||
26 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
27 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
28 | int model; | 28 | int model; |
29 | #define CAN_MCP251X_MCP2510 0 | 29 | #define CAN_MCP251X_MCP2510 0x2510 |
30 | #define CAN_MCP251X_MCP2515 1 | 30 | #define CAN_MCP251X_MCP2515 0x2515 |
31 | int (*board_specific_setup)(struct spi_device *spi); | 31 | int (*board_specific_setup)(struct spi_device *spi); |
32 | int (*transceiver_enable)(int enable); | 32 | int (*transceiver_enable)(int enable); |
33 | int (*power_enable) (int enable); | 33 | int (*power_enable) (int enable); |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b33f316bb92e..276b40a16835 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -310,6 +310,7 @@ struct ethtool_perm_addr { | |||
310 | enum ethtool_flags { | 310 | enum ethtool_flags { |
311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ | 311 | ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ |
312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ | 312 | ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */ |
313 | ETH_FLAG_RXHASH = (1 << 28), | ||
313 | }; | 314 | }; |
314 | 315 | ||
315 | /* The following structures are for supporting RX network flow | 316 | /* The following structures are for supporting RX network flow |
@@ -490,12 +491,12 @@ void ethtool_ntuple_flush(struct net_device *dev); | |||
490 | * get_ufo: Report whether UDP fragmentation offload is enabled | 491 | * get_ufo: Report whether UDP fragmentation offload is enabled |
491 | * set_ufo: Turn UDP fragmentation offload on or off | 492 | * set_ufo: Turn UDP fragmentation offload on or off |
492 | * self_test: Run specified self-tests | 493 | * self_test: Run specified self-tests |
493 | * get_strings: Return a set of strings that describe the requested objects | 494 | * get_strings: Return a set of strings that describe the requested objects |
494 | * phys_id: Identify the device | 495 | * phys_id: Identify the device |
495 | * get_stats: Return statistics about the device | 496 | * get_stats: Return statistics about the device |
496 | * get_flags: get 32-bit flags bitmap | 497 | * get_flags: get 32-bit flags bitmap |
497 | * set_flags: set 32-bit flags bitmap | 498 | * set_flags: set 32-bit flags bitmap |
498 | * | 499 | * |
499 | * Description: | 500 | * Description: |
500 | * | 501 | * |
501 | * get_settings: | 502 | * get_settings: |
@@ -531,14 +532,20 @@ struct ethtool_ops { | |||
531 | int (*nway_reset)(struct net_device *); | 532 | int (*nway_reset)(struct net_device *); |
532 | u32 (*get_link)(struct net_device *); | 533 | u32 (*get_link)(struct net_device *); |
533 | int (*get_eeprom_len)(struct net_device *); | 534 | int (*get_eeprom_len)(struct net_device *); |
534 | int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 535 | int (*get_eeprom)(struct net_device *, |
535 | int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); | 536 | struct ethtool_eeprom *, u8 *); |
537 | int (*set_eeprom)(struct net_device *, | ||
538 | struct ethtool_eeprom *, u8 *); | ||
536 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); | 539 | int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); |
537 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); | 540 | int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); |
538 | void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); | 541 | void (*get_ringparam)(struct net_device *, |
539 | int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); | 542 | struct ethtool_ringparam *); |
540 | void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 543 | int (*set_ringparam)(struct net_device *, |
541 | int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*); | 544 | struct ethtool_ringparam *); |
545 | void (*get_pauseparam)(struct net_device *, | ||
546 | struct ethtool_pauseparam*); | ||
547 | int (*set_pauseparam)(struct net_device *, | ||
548 | struct ethtool_pauseparam*); | ||
542 | u32 (*get_rx_csum)(struct net_device *); | 549 | u32 (*get_rx_csum)(struct net_device *); |
543 | int (*set_rx_csum)(struct net_device *, u32); | 550 | int (*set_rx_csum)(struct net_device *, u32); |
544 | u32 (*get_tx_csum)(struct net_device *); | 551 | u32 (*get_tx_csum)(struct net_device *); |
@@ -550,21 +557,24 @@ struct ethtool_ops { | |||
550 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 557 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
551 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 558 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
552 | int (*phys_id)(struct net_device *, u32); | 559 | int (*phys_id)(struct net_device *, u32); |
553 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 560 | void (*get_ethtool_stats)(struct net_device *, |
561 | struct ethtool_stats *, u64 *); | ||
554 | int (*begin)(struct net_device *); | 562 | int (*begin)(struct net_device *); |
555 | void (*complete)(struct net_device *); | 563 | void (*complete)(struct net_device *); |
556 | u32 (*get_ufo)(struct net_device *); | 564 | u32 (*get_ufo)(struct net_device *); |
557 | int (*set_ufo)(struct net_device *, u32); | 565 | int (*set_ufo)(struct net_device *, u32); |
558 | u32 (*get_flags)(struct net_device *); | 566 | u32 (*get_flags)(struct net_device *); |
559 | int (*set_flags)(struct net_device *, u32); | 567 | int (*set_flags)(struct net_device *, u32); |
560 | u32 (*get_priv_flags)(struct net_device *); | 568 | u32 (*get_priv_flags)(struct net_device *); |
561 | int (*set_priv_flags)(struct net_device *, u32); | 569 | int (*set_priv_flags)(struct net_device *, u32); |
562 | int (*get_sset_count)(struct net_device *, int); | 570 | int (*get_sset_count)(struct net_device *, int); |
563 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); | 571 | int (*get_rxnfc)(struct net_device *, |
572 | struct ethtool_rxnfc *, void *); | ||
564 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 573 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
565 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | 574 | int (*flash_device)(struct net_device *, struct ethtool_flash *); |
566 | int (*reset)(struct net_device *, u32 *); | 575 | int (*reset)(struct net_device *, u32 *); |
567 | int (*set_rx_ntuple)(struct net_device *, struct ethtool_rx_ntuple *); | 576 | int (*set_rx_ntuple)(struct net_device *, |
577 | struct ethtool_rx_ntuple *); | ||
568 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); | 578 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); |
569 | }; | 579 | }; |
570 | #endif /* __KERNEL__ */ | 580 | #endif /* __KERNEL__ */ |
@@ -576,29 +586,29 @@ struct ethtool_ops { | |||
576 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ | 586 | #define ETHTOOL_GREGS 0x00000004 /* Get NIC registers. */ |
577 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ | 587 | #define ETHTOOL_GWOL 0x00000005 /* Get wake-on-lan options. */ |
578 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ | 588 | #define ETHTOOL_SWOL 0x00000006 /* Set wake-on-lan options. */ |
579 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ | 589 | #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ |
580 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ | 590 | #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ |
581 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ | 591 | #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ |
582 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ | 592 | #define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ |
583 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ | 593 | #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ |
584 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ | 594 | #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ |
585 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ | 595 | #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |
586 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ | 596 | #define ETHTOOL_SCOALESCE 0x0000000f /* Set coalesce config. */ |
587 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ | 597 | #define ETHTOOL_GRINGPARAM 0x00000010 /* Get ring parameters */ |
588 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ | 598 | #define ETHTOOL_SRINGPARAM 0x00000011 /* Set ring parameters. */ |
589 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ | 599 | #define ETHTOOL_GPAUSEPARAM 0x00000012 /* Get pause parameters */ |
590 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ | 600 | #define ETHTOOL_SPAUSEPARAM 0x00000013 /* Set pause parameters. */ |
591 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ | 601 | #define ETHTOOL_GRXCSUM 0x00000014 /* Get RX hw csum enable (ethtool_value) */ |
592 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ | 602 | #define ETHTOOL_SRXCSUM 0x00000015 /* Set RX hw csum enable (ethtool_value) */ |
593 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ | 603 | #define ETHTOOL_GTXCSUM 0x00000016 /* Get TX hw csum enable (ethtool_value) */ |
594 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ | 604 | #define ETHTOOL_STXCSUM 0x00000017 /* Set TX hw csum enable (ethtool_value) */ |
595 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable | 605 | #define ETHTOOL_GSG 0x00000018 /* Get scatter-gather enable |
596 | * (ethtool_value) */ | 606 | * (ethtool_value) */ |
597 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable | 607 | #define ETHTOOL_SSG 0x00000019 /* Set scatter-gather enable |
598 | * (ethtool_value). */ | 608 | * (ethtool_value). */ |
599 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ | 609 | #define ETHTOOL_TEST 0x0000001a /* execute NIC self-test. */ |
600 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ | 610 | #define ETHTOOL_GSTRINGS 0x0000001b /* get specified string set */ |
601 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ | 611 | #define ETHTOOL_PHYS_ID 0x0000001c /* identify the NIC */ |
602 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ | 612 | #define ETHTOOL_GSTATS 0x0000001d /* get NIC-specific statistics */ |
603 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ | 613 | #define ETHTOOL_GTSO 0x0000001e /* Get TSO enable (ethtool_value) */ |
604 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ | 614 | #define ETHTOOL_STSO 0x0000001f /* Set TSO enable (ethtool_value) */ |
@@ -609,24 +619,24 @@ struct ethtool_ops { | |||
609 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ | 619 | #define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */ |
610 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ | 620 | #define ETHTOOL_GFLAGS 0x00000025 /* Get flags bitmap(ethtool_value) */ |
611 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ | 621 | #define ETHTOOL_SFLAGS 0x00000026 /* Set flags bitmap(ethtool_value) */ |
612 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ | 622 | #define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ |
613 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ | 623 | #define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ |
614 | 624 | ||
615 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ | 625 | #define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ |
616 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ | 626 | #define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ |
617 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ | 627 | #define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ |
618 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ | 628 | #define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ |
619 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ | 629 | #define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ |
620 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ | 630 | #define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ |
621 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ | 631 | #define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ |
622 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ | 632 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ |
623 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | 633 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ |
624 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 634 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
625 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 635 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
626 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | 636 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ |
627 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 637 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ |
628 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 638 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
629 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ | 639 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
630 | 640 | ||
631 | /* compatibility with older code */ | 641 | /* compatibility with older code */ |
632 | #define SPARC_ETH_GSET ETHTOOL_GSET | 642 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -635,18 +645,18 @@ struct ethtool_ops { | |||
635 | /* Indicates what features are supported by the interface. */ | 645 | /* Indicates what features are supported by the interface. */ |
636 | #define SUPPORTED_10baseT_Half (1 << 0) | 646 | #define SUPPORTED_10baseT_Half (1 << 0) |
637 | #define SUPPORTED_10baseT_Full (1 << 1) | 647 | #define SUPPORTED_10baseT_Full (1 << 1) |
638 | #define SUPPORTED_100baseT_Half (1 << 2) | 648 | #define SUPPORTED_100baseT_Half (1 << 2) |
639 | #define SUPPORTED_100baseT_Full (1 << 3) | 649 | #define SUPPORTED_100baseT_Full (1 << 3) |
640 | #define SUPPORTED_1000baseT_Half (1 << 4) | 650 | #define SUPPORTED_1000baseT_Half (1 << 4) |
641 | #define SUPPORTED_1000baseT_Full (1 << 5) | 651 | #define SUPPORTED_1000baseT_Full (1 << 5) |
642 | #define SUPPORTED_Autoneg (1 << 6) | 652 | #define SUPPORTED_Autoneg (1 << 6) |
643 | #define SUPPORTED_TP (1 << 7) | 653 | #define SUPPORTED_TP (1 << 7) |
644 | #define SUPPORTED_AUI (1 << 8) | 654 | #define SUPPORTED_AUI (1 << 8) |
645 | #define SUPPORTED_MII (1 << 9) | 655 | #define SUPPORTED_MII (1 << 9) |
646 | #define SUPPORTED_FIBRE (1 << 10) | 656 | #define SUPPORTED_FIBRE (1 << 10) |
647 | #define SUPPORTED_BNC (1 << 11) | 657 | #define SUPPORTED_BNC (1 << 11) |
648 | #define SUPPORTED_10000baseT_Full (1 << 12) | 658 | #define SUPPORTED_10000baseT_Full (1 << 12) |
649 | #define SUPPORTED_Pause (1 << 13) | 659 | #define SUPPORTED_Pause (1 << 13) |
650 | #define SUPPORTED_Asym_Pause (1 << 14) | 660 | #define SUPPORTED_Asym_Pause (1 << 14) |
651 | #define SUPPORTED_2500baseX_Full (1 << 15) | 661 | #define SUPPORTED_2500baseX_Full (1 << 15) |
652 | #define SUPPORTED_Backplane (1 << 16) | 662 | #define SUPPORTED_Backplane (1 << 16) |
@@ -656,8 +666,8 @@ struct ethtool_ops { | |||
656 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 666 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
657 | 667 | ||
658 | /* Indicates what features are advertised by the interface. */ | 668 | /* Indicates what features are advertised by the interface. */ |
659 | #define ADVERTISED_10baseT_Half (1 << 0) | 669 | #define ADVERTISED_10baseT_Half (1 << 0) |
660 | #define ADVERTISED_10baseT_Full (1 << 1) | 670 | #define ADVERTISED_10baseT_Full (1 << 1) |
661 | #define ADVERTISED_100baseT_Half (1 << 2) | 671 | #define ADVERTISED_100baseT_Half (1 << 2) |
662 | #define ADVERTISED_100baseT_Full (1 << 3) | 672 | #define ADVERTISED_100baseT_Full (1 << 3) |
663 | #define ADVERTISED_1000baseT_Half (1 << 4) | 673 | #define ADVERTISED_1000baseT_Half (1 << 4) |
@@ -696,12 +706,12 @@ struct ethtool_ops { | |||
696 | #define DUPLEX_FULL 0x01 | 706 | #define DUPLEX_FULL 0x01 |
697 | 707 | ||
698 | /* Which connector port. */ | 708 | /* Which connector port. */ |
699 | #define PORT_TP 0x00 | 709 | #define PORT_TP 0x00 |
700 | #define PORT_AUI 0x01 | 710 | #define PORT_AUI 0x01 |
701 | #define PORT_MII 0x02 | 711 | #define PORT_MII 0x02 |
702 | #define PORT_FIBRE 0x03 | 712 | #define PORT_FIBRE 0x03 |
703 | #define PORT_BNC 0x04 | 713 | #define PORT_BNC 0x04 |
704 | #define PORT_DA 0x05 | 714 | #define PORT_DA 0x05 |
705 | #define PORT_NONE 0xef | 715 | #define PORT_NONE 0xef |
706 | #define PORT_OTHER 0xff | 716 | #define PORT_OTHER 0xff |
707 | 717 | ||
@@ -715,7 +725,7 @@ struct ethtool_ops { | |||
715 | /* Enable or disable autonegotiation. If this is set to enable, | 725 | /* Enable or disable autonegotiation. If this is set to enable, |
716 | * the forced link modes above are completely ignored. | 726 | * the forced link modes above are completely ignored. |
717 | */ | 727 | */ |
718 | #define AUTONEG_DISABLE 0x00 | 728 | #define AUTONEG_DISABLE 0x00 |
719 | #define AUTONEG_ENABLE 0x01 | 729 | #define AUTONEG_ENABLE 0x01 |
720 | 730 | ||
721 | /* Mode MDI or MDI-X */ | 731 | /* Mode MDI or MDI-X */ |
@@ -746,8 +756,8 @@ struct ethtool_ops { | |||
746 | #define AH_V6_FLOW 0x0b | 756 | #define AH_V6_FLOW 0x0b |
747 | #define ESP_V6_FLOW 0x0c | 757 | #define ESP_V6_FLOW 0x0c |
748 | #define IP_USER_FLOW 0x0d | 758 | #define IP_USER_FLOW 0x0d |
749 | #define IPV4_FLOW 0x10 | 759 | #define IPV4_FLOW 0x10 |
750 | #define IPV6_FLOW 0x11 | 760 | #define IPV6_FLOW 0x11 |
751 | 761 | ||
752 | /* L3-L4 network traffic flow hash options */ | 762 | /* L3-L4 network traffic flow hash options */ |
753 | #define RXH_L2DA (1 << 1) | 763 | #define RXH_L2DA (1 << 1) |
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index b834ef6d59fa..61549b26ad6f 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -80,4 +80,12 @@ enum { | |||
80 | 80 | ||
81 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) | 81 | #define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1) |
82 | 82 | ||
83 | #ifdef __KERNEL__ | ||
84 | |||
85 | /* All generic netlink requests are serialized by a global lock. */ | ||
86 | extern void genl_lock(void); | ||
87 | extern void genl_unlock(void); | ||
88 | |||
89 | #endif /* __KERNEL__ */ | ||
90 | |||
83 | #endif /* __LINUX_GENERIC_NETLINK_H */ | 91 | #endif /* __LINUX_GENERIC_NETLINK_H */ |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index e80b7f88f7c6..6d722f41ee7c 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -90,6 +90,7 @@ | |||
90 | 90 | ||
91 | #define ARPHRD_PHONET 820 /* PhoNet media type */ | 91 | #define ARPHRD_PHONET 820 /* PhoNet media type */ |
92 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ | 92 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ |
93 | #define ARPHRD_CAIF 822 /* CAIF media type */ | ||
93 | 94 | ||
94 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ | 95 | #define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ |
95 | #define ARPHRD_NONE 0xFFFE /* zero header length */ | 96 | #define ARPHRD_NONE 0xFFFE /* zero header length */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 299b4121f914..bed7a4682b90 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -109,6 +109,7 @@ | |||
109 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ | 109 | #define ETH_P_TRAILER 0x001C /* Trailer switch tagging */ |
110 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ | 110 | #define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ |
111 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ | 111 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ |
112 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ | ||
112 | 113 | ||
113 | /* | 114 | /* |
114 | * This is an Ethernet frame header. | 115 | * This is an Ethernet frame header. |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c9bf92cd7653..cfd420ba72df 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -37,6 +37,38 @@ struct rtnl_link_stats { | |||
37 | __u32 tx_compressed; | 37 | __u32 tx_compressed; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct rtnl_link_stats64 { | ||
41 | __u64 rx_packets; /* total packets received */ | ||
42 | __u64 tx_packets; /* total packets transmitted */ | ||
43 | __u64 rx_bytes; /* total bytes received */ | ||
44 | __u64 tx_bytes; /* total bytes transmitted */ | ||
45 | __u64 rx_errors; /* bad packets received */ | ||
46 | __u64 tx_errors; /* packet transmit problems */ | ||
47 | __u64 rx_dropped; /* no space in linux buffers */ | ||
48 | __u64 tx_dropped; /* no space available in linux */ | ||
49 | __u64 multicast; /* multicast packets received */ | ||
50 | __u64 collisions; | ||
51 | |||
52 | /* detailed rx_errors: */ | ||
53 | __u64 rx_length_errors; | ||
54 | __u64 rx_over_errors; /* receiver ring buff overflow */ | ||
55 | __u64 rx_crc_errors; /* recved pkt with crc error */ | ||
56 | __u64 rx_frame_errors; /* recv'd frame alignment error */ | ||
57 | __u64 rx_fifo_errors; /* recv'r fifo overrun */ | ||
58 | __u64 rx_missed_errors; /* receiver missed packet */ | ||
59 | |||
60 | /* detailed tx_errors */ | ||
61 | __u64 tx_aborted_errors; | ||
62 | __u64 tx_carrier_errors; | ||
63 | __u64 tx_fifo_errors; | ||
64 | __u64 tx_heartbeat_errors; | ||
65 | __u64 tx_window_errors; | ||
66 | |||
67 | /* for cslip etc */ | ||
68 | __u64 rx_compressed; | ||
69 | __u64 tx_compressed; | ||
70 | }; | ||
71 | |||
40 | /* The struct should be in sync with struct ifmap */ | 72 | /* The struct should be in sync with struct ifmap */ |
41 | struct rtnl_link_ifmap { | 73 | struct rtnl_link_ifmap { |
42 | __u64 mem_start; | 74 | __u64 mem_start; |
@@ -83,6 +115,7 @@ enum { | |||
83 | IFLA_VF_VLAN, | 115 | IFLA_VF_VLAN, |
84 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 116 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
85 | IFLA_VFINFO, | 117 | IFLA_VFINFO, |
118 | IFLA_STATS64, | ||
86 | __IFLA_MAX | 119 | __IFLA_MAX |
87 | }; | 120 | }; |
88 | 121 | ||
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index c58baea4a25b..184bc5566207 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) | 2 | * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) |
3 | * | 3 | * |
4 | * This file supplies definitions required by the PPP over L2TP driver | 4 | * This file supplies definitions required by the PPP over L2TP driver |
5 | * (pppol2tp.c). All version information wrt this file is located in pppol2tp.c | 5 | * (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c |
6 | * | 6 | * |
7 | * License: | 7 | * License: |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
@@ -35,6 +35,20 @@ struct pppol2tp_addr { | |||
35 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ | 35 | __u16 d_tunnel, d_session; /* For sending outgoing packets */ |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | ||
39 | * bits. So we need a different sockaddr structure. | ||
40 | */ | ||
41 | struct pppol2tpv3_addr { | ||
42 | pid_t pid; /* pid that owns the fd. | ||
43 | * 0 => current */ | ||
44 | int fd; /* FD of UDP or IP socket to use */ | ||
45 | |||
46 | struct sockaddr_in addr; /* IP address and port to send to */ | ||
47 | |||
48 | __u32 s_tunnel, s_session; /* For matching incoming packets */ | ||
49 | __u32 d_tunnel, d_session; /* For sending outgoing packets */ | ||
50 | }; | ||
51 | |||
38 | /* Socket options: | 52 | /* Socket options: |
39 | * DEBUG - bitmask of debug message categories | 53 | * DEBUG - bitmask of debug message categories |
40 | * SENDSEQ - 0 => don't send packets with sequence numbers | 54 | * SENDSEQ - 0 => don't send packets with sequence numbers |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 90b5fae5d714..a6577af0c4e6 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
@@ -72,6 +72,15 @@ struct sockaddr_pppol2tp { | |||
72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
73 | }__attribute__ ((packed)); | 73 | }__attribute__ ((packed)); |
74 | 74 | ||
75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | ||
76 | * bits. So we need a different sockaddr structure. | ||
77 | */ | ||
78 | struct sockaddr_pppol2tpv3 { | ||
79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | ||
80 | unsigned int sa_protocol; /* protocol identifier */ | ||
81 | struct pppol2tpv3_addr pppol2tp; | ||
82 | } __attribute__ ((packed)); | ||
83 | |||
75 | /********************************************************************* | 84 | /********************************************************************* |
76 | * | 85 | * |
77 | * ioctl interface for defining forwarding of connections | 86 | * ioctl interface for defining forwarding of connections |
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h new file mode 100644 index 000000000000..4bdb31df8e72 --- /dev/null +++ b/include/linux/l2tp.h | |||
@@ -0,0 +1,163 @@ | |||
1 | /* | ||
2 | * L2TP-over-IP socket for L2TPv3. | ||
3 | * | ||
4 | * Author: James Chapman <jchapman@katalix.com> | ||
5 | */ | ||
6 | |||
7 | #ifndef _LINUX_L2TP_H_ | ||
8 | #define _LINUX_L2TP_H_ | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | #ifdef __KERNEL__ | ||
12 | #include <linux/socket.h> | ||
13 | #include <linux/in.h> | ||
14 | #else | ||
15 | #include <netinet/in.h> | ||
16 | #endif | ||
17 | |||
18 | #define IPPROTO_L2TP 115 | ||
19 | |||
20 | /** | ||
21 | * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets | ||
22 | * @l2tp_family: address family number AF_L2TPIP. | ||
23 | * @l2tp_addr: protocol specific address information | ||
24 | * @l2tp_conn_id: connection id of tunnel | ||
25 | */ | ||
26 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ | ||
27 | struct sockaddr_l2tpip { | ||
28 | /* The first fields must match struct sockaddr_in */ | ||
29 | sa_family_t l2tp_family; /* AF_INET */ | ||
30 | __be16 l2tp_unused; /* INET port number (unused) */ | ||
31 | struct in_addr l2tp_addr; /* Internet address */ | ||
32 | |||
33 | __u32 l2tp_conn_id; /* Connection ID of tunnel */ | ||
34 | |||
35 | /* Pad to size of `struct sockaddr'. */ | ||
36 | unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - | ||
37 | sizeof(__be16) - sizeof(struct in_addr) - | ||
38 | sizeof(__u32)]; | ||
39 | }; | ||
40 | |||
41 | /***************************************************************************** | ||
42 | * NETLINK_GENERIC netlink family. | ||
43 | *****************************************************************************/ | ||
44 | |||
45 | /* | ||
46 | * Commands. | ||
47 | * Valid TLVs of each command are:- | ||
48 | * TUNNEL_CREATE - CONN_ID, pw_type, netns, ifname, ipinfo, udpinfo, udpcsum, vlanid | ||
49 | * TUNNEL_DELETE - CONN_ID | ||
50 | * TUNNEL_MODIFY - CONN_ID, udpcsum | ||
51 | * TUNNEL_GETSTATS - CONN_ID, (stats) | ||
52 | * TUNNEL_GET - CONN_ID, (...) | ||
53 | * SESSION_CREATE - SESSION_ID, PW_TYPE, offset, data_seq, cookie, peer_cookie, offset, l2spec | ||
54 | * SESSION_DELETE - SESSION_ID | ||
55 | * SESSION_MODIFY - SESSION_ID, data_seq | ||
56 | * SESSION_GET - SESSION_ID, (...) | ||
57 | * SESSION_GETSTATS - SESSION_ID, (stats) | ||
58 | * | ||
59 | */ | ||
60 | enum { | ||
61 | L2TP_CMD_NOOP, | ||
62 | L2TP_CMD_TUNNEL_CREATE, | ||
63 | L2TP_CMD_TUNNEL_DELETE, | ||
64 | L2TP_CMD_TUNNEL_MODIFY, | ||
65 | L2TP_CMD_TUNNEL_GET, | ||
66 | L2TP_CMD_SESSION_CREATE, | ||
67 | L2TP_CMD_SESSION_DELETE, | ||
68 | L2TP_CMD_SESSION_MODIFY, | ||
69 | L2TP_CMD_SESSION_GET, | ||
70 | __L2TP_CMD_MAX, | ||
71 | }; | ||
72 | |||
73 | #define L2TP_CMD_MAX (__L2TP_CMD_MAX - 1) | ||
74 | |||
75 | /* | ||
76 | * ATTR types defined for L2TP | ||
77 | */ | ||
78 | enum { | ||
79 | L2TP_ATTR_NONE, /* no data */ | ||
80 | L2TP_ATTR_PW_TYPE, /* u16, enum l2tp_pwtype */ | ||
81 | L2TP_ATTR_ENCAP_TYPE, /* u16, enum l2tp_encap_type */ | ||
82 | L2TP_ATTR_OFFSET, /* u16 */ | ||
83 | L2TP_ATTR_DATA_SEQ, /* u16 */ | ||
84 | L2TP_ATTR_L2SPEC_TYPE, /* u8, enum l2tp_l2spec_type */ | ||
85 | L2TP_ATTR_L2SPEC_LEN, /* u8, enum l2tp_l2spec_type */ | ||
86 | L2TP_ATTR_PROTO_VERSION, /* u8 */ | ||
87 | L2TP_ATTR_IFNAME, /* string */ | ||
88 | L2TP_ATTR_CONN_ID, /* u32 */ | ||
89 | L2TP_ATTR_PEER_CONN_ID, /* u32 */ | ||
90 | L2TP_ATTR_SESSION_ID, /* u32 */ | ||
91 | L2TP_ATTR_PEER_SESSION_ID, /* u32 */ | ||
92 | L2TP_ATTR_UDP_CSUM, /* u8 */ | ||
93 | L2TP_ATTR_VLAN_ID, /* u16 */ | ||
94 | L2TP_ATTR_COOKIE, /* 0, 4 or 8 bytes */ | ||
95 | L2TP_ATTR_PEER_COOKIE, /* 0, 4 or 8 bytes */ | ||
96 | L2TP_ATTR_DEBUG, /* u32 */ | ||
97 | L2TP_ATTR_RECV_SEQ, /* u8 */ | ||
98 | L2TP_ATTR_SEND_SEQ, /* u8 */ | ||
99 | L2TP_ATTR_LNS_MODE, /* u8 */ | ||
100 | L2TP_ATTR_USING_IPSEC, /* u8 */ | ||
101 | L2TP_ATTR_RECV_TIMEOUT, /* msec */ | ||
102 | L2TP_ATTR_FD, /* int */ | ||
103 | L2TP_ATTR_IP_SADDR, /* u32 */ | ||
104 | L2TP_ATTR_IP_DADDR, /* u32 */ | ||
105 | L2TP_ATTR_UDP_SPORT, /* u16 */ | ||
106 | L2TP_ATTR_UDP_DPORT, /* u16 */ | ||
107 | L2TP_ATTR_MTU, /* u16 */ | ||
108 | L2TP_ATTR_MRU, /* u16 */ | ||
109 | L2TP_ATTR_STATS, /* nested */ | ||
110 | __L2TP_ATTR_MAX, | ||
111 | }; | ||
112 | |||
113 | #define L2TP_ATTR_MAX (__L2TP_ATTR_MAX - 1) | ||
114 | |||
115 | /* Nested in L2TP_ATTR_STATS */ | ||
116 | enum { | ||
117 | L2TP_ATTR_STATS_NONE, /* no data */ | ||
118 | L2TP_ATTR_TX_PACKETS, /* u64 */ | ||
119 | L2TP_ATTR_TX_BYTES, /* u64 */ | ||
120 | L2TP_ATTR_TX_ERRORS, /* u64 */ | ||
121 | L2TP_ATTR_RX_PACKETS, /* u64 */ | ||
122 | L2TP_ATTR_RX_BYTES, /* u64 */ | ||
123 | L2TP_ATTR_RX_SEQ_DISCARDS, /* u64 */ | ||
124 | L2TP_ATTR_RX_OOS_PACKETS, /* u64 */ | ||
125 | L2TP_ATTR_RX_ERRORS, /* u64 */ | ||
126 | __L2TP_ATTR_STATS_MAX, | ||
127 | }; | ||
128 | |||
129 | #define L2TP_ATTR_STATS_MAX (__L2TP_ATTR_STATS_MAX - 1) | ||
130 | |||
131 | enum l2tp_pwtype { | ||
132 | L2TP_PWTYPE_NONE = 0x0000, | ||
133 | L2TP_PWTYPE_ETH_VLAN = 0x0004, | ||
134 | L2TP_PWTYPE_ETH = 0x0005, | ||
135 | L2TP_PWTYPE_PPP = 0x0007, | ||
136 | L2TP_PWTYPE_PPP_AC = 0x0008, | ||
137 | L2TP_PWTYPE_IP = 0x000b, | ||
138 | __L2TP_PWTYPE_MAX | ||
139 | }; | ||
140 | |||
141 | enum l2tp_l2spec_type { | ||
142 | L2TP_L2SPECTYPE_NONE, | ||
143 | L2TP_L2SPECTYPE_DEFAULT, | ||
144 | }; | ||
145 | |||
146 | enum l2tp_encap_type { | ||
147 | L2TP_ENCAPTYPE_UDP, | ||
148 | L2TP_ENCAPTYPE_IP, | ||
149 | }; | ||
150 | |||
151 | enum l2tp_seqmode { | ||
152 | L2TP_SEQ_NONE = 0, | ||
153 | L2TP_SEQ_IP = 1, | ||
154 | L2TP_SEQ_ALL = 2, | ||
155 | }; | ||
156 | |||
157 | /* | ||
158 | * NETLINK_GENERIC related info | ||
159 | */ | ||
160 | #define L2TP_GENL_NAME "l2tp" | ||
161 | #define L2TP_GENL_VERSION 0x1 | ||
162 | |||
163 | #endif | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index f58e9d836f32..55f1f9c9506c 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -474,4 +474,30 @@ struct platform_device_id { | |||
474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 474 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
475 | }; | 475 | }; |
476 | 476 | ||
477 | #define MDIO_MODULE_PREFIX "mdio:" | ||
478 | |||
479 | #define MDIO_ID_FMT "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | ||
480 | #define MDIO_ID_ARGS(_id) \ | ||
481 | (_id)>>31, ((_id)>>30) & 1, ((_id)>>29) & 1, ((_id)>>28) & 1, \ | ||
482 | ((_id)>>27) & 1, ((_id)>>26) & 1, ((_id)>>25) & 1, ((_id)>>24) & 1, \ | ||
483 | ((_id)>>23) & 1, ((_id)>>22) & 1, ((_id)>>21) & 1, ((_id)>>20) & 1, \ | ||
484 | ((_id)>>19) & 1, ((_id)>>18) & 1, ((_id)>>17) & 1, ((_id)>>16) & 1, \ | ||
485 | ((_id)>>15) & 1, ((_id)>>14) & 1, ((_id)>>13) & 1, ((_id)>>12) & 1, \ | ||
486 | ((_id)>>11) & 1, ((_id)>>10) & 1, ((_id)>>9) & 1, ((_id)>>8) & 1, \ | ||
487 | ((_id)>>7) & 1, ((_id)>>6) & 1, ((_id)>>5) & 1, ((_id)>>4) & 1, \ | ||
488 | ((_id)>>3) & 1, ((_id)>>2) & 1, ((_id)>>1) & 1, (_id) & 1 | ||
489 | |||
490 | /** | ||
491 | * struct mdio_device_id - identifies PHY devices on an MDIO/MII bus | ||
492 | * @phy_id: The result of | ||
493 | * (mdio_read(&MII_PHYSID1) << 16 | mdio_read(&PHYSID2)) & @phy_id_mask | ||
494 | * for this PHY type | ||
495 | * @phy_id_mask: Defines the significant bits of @phy_id. A value of 0 | ||
496 | * is used to terminate an array of struct mdio_device_id. | ||
497 | */ | ||
498 | struct mdio_device_id { | ||
499 | __u32 phy_id; | ||
500 | __u32 phy_id_mask; | ||
501 | }; | ||
502 | |||
477 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 503 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fa8b47637997..d1a21b576a40 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -223,29 +223,11 @@ struct netif_rx_stats { | |||
223 | unsigned dropped; | 223 | unsigned dropped; |
224 | unsigned time_squeeze; | 224 | unsigned time_squeeze; |
225 | unsigned cpu_collision; | 225 | unsigned cpu_collision; |
226 | unsigned received_rps; | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 229 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
229 | 230 | ||
230 | struct dev_addr_list { | ||
231 | struct dev_addr_list *next; | ||
232 | u8 da_addr[MAX_ADDR_LEN]; | ||
233 | u8 da_addrlen; | ||
234 | u8 da_synced; | ||
235 | int da_users; | ||
236 | int da_gusers; | ||
237 | }; | ||
238 | |||
239 | /* | ||
240 | * We tag multicasts with these structures. | ||
241 | */ | ||
242 | |||
243 | #define dev_mc_list dev_addr_list | ||
244 | #define dmi_addr da_addr | ||
245 | #define dmi_addrlen da_addrlen | ||
246 | #define dmi_users da_users | ||
247 | #define dmi_gusers da_gusers | ||
248 | |||
249 | struct netdev_hw_addr { | 231 | struct netdev_hw_addr { |
250 | struct list_head list; | 232 | struct list_head list; |
251 | unsigned char addr[MAX_ADDR_LEN]; | 233 | unsigned char addr[MAX_ADDR_LEN]; |
@@ -254,8 +236,10 @@ struct netdev_hw_addr { | |||
254 | #define NETDEV_HW_ADDR_T_SAN 2 | 236 | #define NETDEV_HW_ADDR_T_SAN 2 |
255 | #define NETDEV_HW_ADDR_T_SLAVE 3 | 237 | #define NETDEV_HW_ADDR_T_SLAVE 3 |
256 | #define NETDEV_HW_ADDR_T_UNICAST 4 | 238 | #define NETDEV_HW_ADDR_T_UNICAST 4 |
239 | #define NETDEV_HW_ADDR_T_MULTICAST 5 | ||
257 | int refcount; | 240 | int refcount; |
258 | bool synced; | 241 | bool synced; |
242 | bool global_use; | ||
259 | struct rcu_head rcu_head; | 243 | struct rcu_head rcu_head; |
260 | }; | 244 | }; |
261 | 245 | ||
@@ -264,16 +248,20 @@ struct netdev_hw_addr_list { | |||
264 | int count; | 248 | int count; |
265 | }; | 249 | }; |
266 | 250 | ||
267 | #define netdev_uc_count(dev) ((dev)->uc.count) | 251 | #define netdev_hw_addr_list_count(l) ((l)->count) |
268 | #define netdev_uc_empty(dev) ((dev)->uc.count == 0) | 252 | #define netdev_hw_addr_list_empty(l) (netdev_hw_addr_list_count(l) == 0) |
269 | #define netdev_for_each_uc_addr(ha, dev) \ | 253 | #define netdev_hw_addr_list_for_each(ha, l) \ |
270 | list_for_each_entry(ha, &dev->uc.list, list) | 254 | list_for_each_entry(ha, &(l)->list, list) |
271 | 255 | ||
272 | #define netdev_mc_count(dev) ((dev)->mc_count) | 256 | #define netdev_uc_count(dev) netdev_hw_addr_list_count(&(dev)->uc) |
273 | #define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0) | 257 | #define netdev_uc_empty(dev) netdev_hw_addr_list_empty(&(dev)->uc) |
258 | #define netdev_for_each_uc_addr(ha, dev) \ | ||
259 | netdev_hw_addr_list_for_each(ha, &(dev)->uc) | ||
274 | 260 | ||
275 | #define netdev_for_each_mc_addr(mclist, dev) \ | 261 | #define netdev_mc_count(dev) netdev_hw_addr_list_count(&(dev)->mc) |
276 | for (mclist = dev->mc_list; mclist; mclist = mclist->next) | 262 | #define netdev_mc_empty(dev) netdev_hw_addr_list_empty(&(dev)->mc) |
263 | #define netdev_for_each_mc_addr(ha, dev) \ | ||
264 | netdev_hw_addr_list_for_each(ha, &(dev)->mc) | ||
277 | 265 | ||
278 | struct hh_cache { | 266 | struct hh_cache { |
279 | struct hh_cache *hh_next; /* Next entry */ | 267 | struct hh_cache *hh_next; /* Next entry */ |
@@ -530,6 +518,26 @@ struct netdev_queue { | |||
530 | unsigned long tx_dropped; | 518 | unsigned long tx_dropped; |
531 | } ____cacheline_aligned_in_smp; | 519 | } ____cacheline_aligned_in_smp; |
532 | 520 | ||
521 | #ifdef CONFIG_RPS | ||
522 | /* | ||
523 | * This structure holds an RPS map which can be of variable length. The | ||
524 | * map is an array of CPUs. | ||
525 | */ | ||
526 | struct rps_map { | ||
527 | unsigned int len; | ||
528 | struct rcu_head rcu; | ||
529 | u16 cpus[0]; | ||
530 | }; | ||
531 | #define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + (_num * sizeof(u16))) | ||
532 | |||
533 | /* This structure contains an instance of an RX queue. */ | ||
534 | struct netdev_rx_queue { | ||
535 | struct rps_map *rps_map; | ||
536 | struct kobject kobj; | ||
537 | struct netdev_rx_queue *first; | ||
538 | atomic_t count; | ||
539 | } ____cacheline_aligned_in_smp; | ||
540 | #endif | ||
533 | 541 | ||
534 | /* | 542 | /* |
535 | * This structure defines the management hooks for network devices. | 543 | * This structure defines the management hooks for network devices. |
@@ -764,6 +772,7 @@ struct net_device { | |||
764 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ | 772 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ |
765 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ | 773 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ |
766 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 774 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
775 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | ||
767 | 776 | ||
768 | /* Segmentation offload features */ | 777 | /* Segmentation offload features */ |
769 | #define NETIF_F_GSO_SHIFT 16 | 778 | #define NETIF_F_GSO_SHIFT 16 |
@@ -840,12 +849,10 @@ struct net_device { | |||
840 | unsigned char addr_len; /* hardware address length */ | 849 | unsigned char addr_len; /* hardware address length */ |
841 | unsigned short dev_id; /* for shared network cards */ | 850 | unsigned short dev_id; /* for shared network cards */ |
842 | 851 | ||
843 | struct netdev_hw_addr_list uc; /* Secondary unicast | ||
844 | mac addresses */ | ||
845 | int uc_promisc; | ||
846 | spinlock_t addr_list_lock; | 852 | spinlock_t addr_list_lock; |
847 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 853 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ |
848 | int mc_count; /* Number of installed mcasts */ | 854 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ |
855 | int uc_promisc; | ||
849 | unsigned int promiscuity; | 856 | unsigned int promiscuity; |
850 | unsigned int allmulti; | 857 | unsigned int allmulti; |
851 | 858 | ||
@@ -878,6 +885,15 @@ struct net_device { | |||
878 | 885 | ||
879 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 886 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
880 | 887 | ||
888 | #ifdef CONFIG_RPS | ||
889 | struct kset *queues_kset; | ||
890 | |||
891 | struct netdev_rx_queue *_rx; | ||
892 | |||
893 | /* Number of RX queues allocated at alloc_netdev_mq() time */ | ||
894 | unsigned int num_rx_queues; | ||
895 | #endif | ||
896 | |||
881 | struct netdev_queue rx_queue; | 897 | struct netdev_queue rx_queue; |
882 | 898 | ||
883 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; | 899 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; |
@@ -1311,14 +1327,18 @@ static inline int unregister_gifconf(unsigned int family) | |||
1311 | */ | 1327 | */ |
1312 | struct softnet_data { | 1328 | struct softnet_data { |
1313 | struct Qdisc *output_queue; | 1329 | struct Qdisc *output_queue; |
1314 | struct sk_buff_head input_pkt_queue; | ||
1315 | struct list_head poll_list; | 1330 | struct list_head poll_list; |
1316 | struct sk_buff *completion_queue; | 1331 | struct sk_buff *completion_queue; |
1317 | 1332 | ||
1333 | /* Elements below can be accessed between CPUs for RPS */ | ||
1334 | #ifdef CONFIG_SMP | ||
1335 | struct call_single_data csd ____cacheline_aligned_in_smp; | ||
1336 | #endif | ||
1337 | struct sk_buff_head input_pkt_queue; | ||
1318 | struct napi_struct backlog; | 1338 | struct napi_struct backlog; |
1319 | }; | 1339 | }; |
1320 | 1340 | ||
1321 | DECLARE_PER_CPU(struct softnet_data,softnet_data); | 1341 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); |
1322 | 1342 | ||
1323 | #define HAVE_NETIF_QUEUE | 1343 | #define HAVE_NETIF_QUEUE |
1324 | 1344 | ||
@@ -1945,6 +1965,22 @@ extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
1945 | extern int register_netdev(struct net_device *dev); | 1965 | extern int register_netdev(struct net_device *dev); |
1946 | extern void unregister_netdev(struct net_device *dev); | 1966 | extern void unregister_netdev(struct net_device *dev); |
1947 | 1967 | ||
1968 | /* General hardware address lists handling functions */ | ||
1969 | extern int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list, | ||
1970 | struct netdev_hw_addr_list *from_list, | ||
1971 | int addr_len, unsigned char addr_type); | ||
1972 | extern void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list, | ||
1973 | struct netdev_hw_addr_list *from_list, | ||
1974 | int addr_len, unsigned char addr_type); | ||
1975 | extern int __hw_addr_sync(struct netdev_hw_addr_list *to_list, | ||
1976 | struct netdev_hw_addr_list *from_list, | ||
1977 | int addr_len); | ||
1978 | extern void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, | ||
1979 | struct netdev_hw_addr_list *from_list, | ||
1980 | int addr_len); | ||
1981 | extern void __hw_addr_flush(struct netdev_hw_addr_list *list); | ||
1982 | extern void __hw_addr_init(struct netdev_hw_addr_list *list); | ||
1983 | |||
1948 | /* Functions used for device addresses handling */ | 1984 | /* Functions used for device addresses handling */ |
1949 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, | 1985 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, |
1950 | unsigned char addr_type); | 1986 | unsigned char addr_type); |
@@ -1956,26 +1992,34 @@ extern int dev_addr_add_multiple(struct net_device *to_dev, | |||
1956 | extern int dev_addr_del_multiple(struct net_device *to_dev, | 1992 | extern int dev_addr_del_multiple(struct net_device *to_dev, |
1957 | struct net_device *from_dev, | 1993 | struct net_device *from_dev, |
1958 | unsigned char addr_type); | 1994 | unsigned char addr_type); |
1995 | extern void dev_addr_flush(struct net_device *dev); | ||
1996 | extern int dev_addr_init(struct net_device *dev); | ||
1997 | |||
1998 | /* Functions used for unicast addresses handling */ | ||
1999 | extern int dev_uc_add(struct net_device *dev, unsigned char *addr); | ||
2000 | extern int dev_uc_del(struct net_device *dev, unsigned char *addr); | ||
2001 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); | ||
2002 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); | ||
2003 | extern void dev_uc_flush(struct net_device *dev); | ||
2004 | extern void dev_uc_init(struct net_device *dev); | ||
2005 | |||
2006 | /* Functions used for multicast addresses handling */ | ||
2007 | extern int dev_mc_add(struct net_device *dev, unsigned char *addr); | ||
2008 | extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); | ||
2009 | extern int dev_mc_del(struct net_device *dev, unsigned char *addr); | ||
2010 | extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); | ||
2011 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
2012 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
2013 | extern void dev_mc_flush(struct net_device *dev); | ||
2014 | extern void dev_mc_init(struct net_device *dev); | ||
1959 | 2015 | ||
1960 | /* Functions used for secondary unicast and multicast support */ | 2016 | /* Functions used for secondary unicast and multicast support */ |
1961 | extern void dev_set_rx_mode(struct net_device *dev); | 2017 | extern void dev_set_rx_mode(struct net_device *dev); |
1962 | extern void __dev_set_rx_mode(struct net_device *dev); | 2018 | extern void __dev_set_rx_mode(struct net_device *dev); |
1963 | extern int dev_unicast_delete(struct net_device *dev, void *addr); | ||
1964 | extern int dev_unicast_add(struct net_device *dev, void *addr); | ||
1965 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); | ||
1966 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); | ||
1967 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | ||
1968 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | ||
1969 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
1970 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
1971 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
1972 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
1973 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
1974 | extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
1975 | extern int dev_set_promiscuity(struct net_device *dev, int inc); | 2019 | extern int dev_set_promiscuity(struct net_device *dev, int inc); |
1976 | extern int dev_set_allmulti(struct net_device *dev, int inc); | 2020 | extern int dev_set_allmulti(struct net_device *dev, int inc); |
1977 | extern void netdev_state_change(struct net_device *dev); | 2021 | extern void netdev_state_change(struct net_device *dev); |
1978 | extern void netdev_bonding_change(struct net_device *dev, | 2022 | extern int netdev_bonding_change(struct net_device *dev, |
1979 | unsigned long event); | 2023 | unsigned long event); |
1980 | extern void netdev_features_change(struct net_device *dev); | 2024 | extern void netdev_features_change(struct net_device *dev); |
1981 | /* Load a device via the kmod */ | 2025 | /* Load a device via the kmod */ |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 28ba20fda3e2..daf6a3432b92 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -323,6 +323,12 @@ | |||
323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the | 323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the |
324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged | 324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged |
325 | * the frame. | 325 | * the frame. |
326 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command | ||
327 | * is used to configure connection quality monitoring notification trigger | ||
328 | * levels. | ||
329 | * @NL80211_CMD_NOTIFY_CQM: Connection quality monitor notification. This | ||
330 | * command is used as an event to indicate the that a trigger level was | ||
331 | * reached. | ||
326 | * | 332 | * |
327 | * @NL80211_CMD_MAX: highest used command number | 333 | * @NL80211_CMD_MAX: highest used command number |
328 | * @__NL80211_CMD_AFTER_LAST: internal use | 334 | * @__NL80211_CMD_AFTER_LAST: internal use |
@@ -419,6 +425,9 @@ enum nl80211_commands { | |||
419 | NL80211_CMD_SET_POWER_SAVE, | 425 | NL80211_CMD_SET_POWER_SAVE, |
420 | NL80211_CMD_GET_POWER_SAVE, | 426 | NL80211_CMD_GET_POWER_SAVE, |
421 | 427 | ||
428 | NL80211_CMD_SET_CQM, | ||
429 | NL80211_CMD_NOTIFY_CQM, | ||
430 | |||
422 | /* add new commands above here */ | 431 | /* add new commands above here */ |
423 | 432 | ||
424 | /* used to define NL80211_CMD_MAX below */ | 433 | /* used to define NL80211_CMD_MAX below */ |
@@ -691,6 +700,9 @@ enum nl80211_commands { | |||
691 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 700 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
692 | * acknowledged by the recipient. | 701 | * acknowledged by the recipient. |
693 | * | 702 | * |
703 | * @NL80211_ATTR_CQM: connection quality monitor configuration in a | ||
704 | * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. | ||
705 | * | ||
694 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 706 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
695 | * @__NL80211_ATTR_AFTER_LAST: internal use | 707 | * @__NL80211_ATTR_AFTER_LAST: internal use |
696 | */ | 708 | */ |
@@ -842,6 +854,8 @@ enum nl80211_attrs { | |||
842 | 854 | ||
843 | NL80211_ATTR_PS_STATE, | 855 | NL80211_ATTR_PS_STATE, |
844 | 856 | ||
857 | NL80211_ATTR_CQM, | ||
858 | |||
845 | /* add attributes here, update the policy in nl80211.c */ | 859 | /* add attributes here, update the policy in nl80211.c */ |
846 | 860 | ||
847 | __NL80211_ATTR_AFTER_LAST, | 861 | __NL80211_ATTR_AFTER_LAST, |
@@ -1583,4 +1597,40 @@ enum nl80211_ps_state { | |||
1583 | NL80211_PS_ENABLED, | 1597 | NL80211_PS_ENABLED, |
1584 | }; | 1598 | }; |
1585 | 1599 | ||
1600 | /** | ||
1601 | * enum nl80211_attr_cqm - connection quality monitor attributes | ||
1602 | * @__NL80211_ATTR_CQM_INVALID: invalid | ||
1603 | * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies | ||
1604 | * the threshold for the RSSI level at which an event will be sent. Zero | ||
1605 | * to disable. | ||
1606 | * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies | ||
1607 | * the minimum amount the RSSI level must change after an event before a | ||
1608 | * new event may be issued (to reduce effects of RSSI oscillation). | ||
1609 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | ||
1610 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | ||
1611 | * @NL80211_ATTR_CQM_MAX: highest key attribute | ||
1612 | */ | ||
1613 | enum nl80211_attr_cqm { | ||
1614 | __NL80211_ATTR_CQM_INVALID, | ||
1615 | NL80211_ATTR_CQM_RSSI_THOLD, | ||
1616 | NL80211_ATTR_CQM_RSSI_HYST, | ||
1617 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | ||
1618 | |||
1619 | /* keep last */ | ||
1620 | __NL80211_ATTR_CQM_AFTER_LAST, | ||
1621 | NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1 | ||
1622 | }; | ||
1623 | |||
1624 | /** | ||
1625 | * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event | ||
1626 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the | ||
1627 | * configured threshold | ||
1628 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the | ||
1629 | * configured threshold | ||
1630 | */ | ||
1631 | enum nl80211_cqm_rssi_threshold_event { | ||
1632 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | ||
1633 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | ||
1634 | }; | ||
1635 | |||
1586 | #endif /* __LINUX_NL80211_H */ | 1636 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index fee6c2f68075..9c5d3fad01f3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -182,7 +182,10 @@ static inline int notifier_to_errno(int ret) | |||
182 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... | 182 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... |
183 | */ | 183 | */ |
184 | 184 | ||
185 | /* netdevice notifier chain */ | 185 | /* netdevice notifier chain. Please remember to update the rtnetlink |
186 | * notification exclusion list in rtnetlink_event() when adding new | ||
187 | * types. | ||
188 | */ | ||
186 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ | 189 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ |
187 | #define NETDEV_DOWN 0x0002 | 190 | #define NETDEV_DOWN 0x0002 |
188 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface | 191 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface |
@@ -199,8 +202,8 @@ static inline int notifier_to_errno(int ret) | |||
199 | #define NETDEV_FEAT_CHANGE 0x000B | 202 | #define NETDEV_FEAT_CHANGE 0x000B |
200 | #define NETDEV_BONDING_FAILOVER 0x000C | 203 | #define NETDEV_BONDING_FAILOVER 0x000C |
201 | #define NETDEV_PRE_UP 0x000D | 204 | #define NETDEV_PRE_UP 0x000D |
202 | #define NETDEV_BONDING_OLDTYPE 0x000E | 205 | #define NETDEV_PRE_TYPE_CHANGE 0x000E |
203 | #define NETDEV_BONDING_NEWTYPE 0x000F | 206 | #define NETDEV_POST_TYPE_CHANGE 0x000F |
204 | #define NETDEV_POST_INIT 0x0010 | 207 | #define NETDEV_POST_INIT 0x0010 |
205 | #define NETDEV_UNREGISTER_BATCH 0x0011 | 208 | #define NETDEV_UNREGISTER_BATCH 0x0011 |
206 | 209 | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 14d7fdf6a90a..987e111f7b11 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mii.h> | 24 | #include <linux/mii.h> |
25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mod_devicetable.h> | ||
27 | 28 | ||
28 | #include <asm/atomic.h> | 29 | #include <asm/atomic.h> |
29 | 30 | ||
@@ -81,6 +82,10 @@ typedef enum { | |||
81 | */ | 82 | */ |
82 | #define MII_BUS_ID_SIZE (20 - 3) | 83 | #define MII_BUS_ID_SIZE (20 - 3) |
83 | 84 | ||
85 | /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit | ||
86 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ | ||
87 | #define MII_ADDR_C45 (1<<30) | ||
88 | |||
84 | /* | 89 | /* |
85 | * The Bus class for PHYs. Devices which provide access to | 90 | * The Bus class for PHYs. Devices which provide access to |
86 | * PHYs should register using this structure | 91 | * PHYs should register using this structure |
@@ -127,8 +132,8 @@ int mdiobus_register(struct mii_bus *bus); | |||
127 | void mdiobus_unregister(struct mii_bus *bus); | 132 | void mdiobus_unregister(struct mii_bus *bus); |
128 | void mdiobus_free(struct mii_bus *bus); | 133 | void mdiobus_free(struct mii_bus *bus); |
129 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); | 134 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); |
130 | int mdiobus_read(struct mii_bus *bus, int addr, u16 regnum); | 135 | int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); |
131 | int mdiobus_write(struct mii_bus *bus, int addr, u16 regnum, u16 val); | 136 | int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); |
132 | 137 | ||
133 | 138 | ||
134 | #define PHY_INTERRUPT_DISABLED 0x0 | 139 | #define PHY_INTERRUPT_DISABLED 0x0 |
@@ -422,7 +427,7 @@ struct phy_fixup { | |||
422 | * because the bus read/write functions may wait for an interrupt | 427 | * because the bus read/write functions may wait for an interrupt |
423 | * to conclude the operation. | 428 | * to conclude the operation. |
424 | */ | 429 | */ |
425 | static inline int phy_read(struct phy_device *phydev, u16 regnum) | 430 | static inline int phy_read(struct phy_device *phydev, u32 regnum) |
426 | { | 431 | { |
427 | return mdiobus_read(phydev->bus, phydev->addr, regnum); | 432 | return mdiobus_read(phydev->bus, phydev->addr, regnum); |
428 | } | 433 | } |
@@ -437,7 +442,7 @@ static inline int phy_read(struct phy_device *phydev, u16 regnum) | |||
437 | * because the bus read/write functions may wait for an interrupt | 442 | * because the bus read/write functions may wait for an interrupt |
438 | * to conclude the operation. | 443 | * to conclude the operation. |
439 | */ | 444 | */ |
440 | static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | 445 | static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) |
441 | { | 446 | { |
442 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 447 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
443 | } | 448 | } |
diff --git a/include/linux/ppp_channel.h b/include/linux/ppp_channel.h index 0d3fa63e90ea..bff98ec1bfed 100644 --- a/include/linux/ppp_channel.h +++ b/include/linux/ppp_channel.h | |||
@@ -72,6 +72,9 @@ extern int ppp_channel_index(struct ppp_channel *); | |||
72 | /* Get the unit number associated with a channel, or -1 if none */ | 72 | /* Get the unit number associated with a channel, or -1 if none */ |
73 | extern int ppp_unit_number(struct ppp_channel *); | 73 | extern int ppp_unit_number(struct ppp_channel *); |
74 | 74 | ||
75 | /* Get the device name associated with a channel, or NULL if none */ | ||
76 | extern char *ppp_dev_name(struct ppp_channel *); | ||
77 | |||
75 | /* | 78 | /* |
76 | * SMP locking notes: | 79 | * SMP locking notes: |
77 | * The channel code must ensure that when it calls ppp_unregister_channel, | 80 | * The channel code must ensure that when it calls ppp_unregister_channel, |
diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 2c9b46cff3d7..004908b104d5 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
@@ -428,5 +428,18 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev, | |||
428 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | 428 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ |
429 | pos = rcu_dereference_raw(pos->next)) | 429 | pos = rcu_dereference_raw(pos->next)) |
430 | 430 | ||
431 | /** | ||
432 | * hlist_for_each_entry_continue_rcu - iterate over a hlist continuing after current point | ||
433 | * @tpos: the type * to use as a loop cursor. | ||
434 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
435 | * @member: the name of the hlist_node within the struct. | ||
436 | */ | ||
437 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ | ||
438 | for (pos = rcu_dereference((pos)->next); \ | ||
439 | pos && ({ prefetch(pos->next); 1; }) && \ | ||
440 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | ||
441 | pos = rcu_dereference(pos->next)) | ||
442 | |||
443 | |||
431 | #endif /* __KERNEL__ */ | 444 | #endif /* __KERNEL__ */ |
432 | #endif | 445 | #endif |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 124f90cd5a38..cf42f194616e 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -294,6 +294,7 @@ typedef unsigned char *sk_buff_data_t; | |||
294 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 294 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
295 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 295 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
296 | * @skb_iif: ifindex of device we arrived on | 296 | * @skb_iif: ifindex of device we arrived on |
297 | * @rxhash: the packet hash computed on receive | ||
297 | * @queue_mapping: Queue mapping for multiqueue devices | 298 | * @queue_mapping: Queue mapping for multiqueue devices |
298 | * @tc_index: Traffic control index | 299 | * @tc_index: Traffic control index |
299 | * @tc_verd: traffic control verdict | 300 | * @tc_verd: traffic control verdict |
@@ -369,6 +370,8 @@ struct sk_buff { | |||
369 | #endif | 370 | #endif |
370 | #endif | 371 | #endif |
371 | 372 | ||
373 | __u32 rxhash; | ||
374 | |||
372 | kmemcheck_bitfield_begin(flags2); | 375 | kmemcheck_bitfield_begin(flags2); |
373 | __u16 queue_mapping:16; | 376 | __u16 queue_mapping:16; |
374 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 377 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index 4435d1084755..52797714ade7 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -100,6 +100,7 @@ enum | |||
100 | ICMP6_MIB_INMSGS, /* InMsgs */ | 100 | ICMP6_MIB_INMSGS, /* InMsgs */ |
101 | ICMP6_MIB_INERRORS, /* InErrors */ | 101 | ICMP6_MIB_INERRORS, /* InErrors */ |
102 | ICMP6_MIB_OUTMSGS, /* OutMsgs */ | 102 | ICMP6_MIB_OUTMSGS, /* OutMsgs */ |
103 | ICMP6_MIB_OUTERRORS, /* OutErrors */ | ||
103 | __ICMP6_MIB_MAX | 104 | __ICMP6_MIB_MAX |
104 | }; | 105 | }; |
105 | 106 | ||
@@ -227,6 +228,7 @@ enum | |||
227 | LINUX_MIB_SACKSHIFTFALLBACK, | 228 | LINUX_MIB_SACKSHIFTFALLBACK, |
228 | LINUX_MIB_TCPBACKLOGDROP, | 229 | LINUX_MIB_TCPBACKLOGDROP, |
229 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ |
231 | LINUX_MIB_TCPDEFERACCEPTDROP, | ||
230 | __LINUX_MIB_MAX | 232 | __LINUX_MIB_MAX |
231 | }; | 233 | }; |
232 | 234 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index 354cc5617f8b..032a19eb61b1 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -189,7 +189,8 @@ struct ucred { | |||
189 | #define AF_ISDN 34 /* mISDN sockets */ | 189 | #define AF_ISDN 34 /* mISDN sockets */ |
190 | #define AF_PHONET 35 /* Phonet sockets */ | 190 | #define AF_PHONET 35 /* Phonet sockets */ |
191 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ | 191 | #define AF_IEEE802154 36 /* IEEE802154 sockets */ |
192 | #define AF_MAX 37 /* For now.. */ | 192 | #define AF_CAIF 37 /* CAIF sockets */ |
193 | #define AF_MAX 38 /* For now.. */ | ||
193 | 194 | ||
194 | /* Protocol families, same as address families. */ | 195 | /* Protocol families, same as address families. */ |
195 | #define PF_UNSPEC AF_UNSPEC | 196 | #define PF_UNSPEC AF_UNSPEC |
@@ -229,6 +230,7 @@ struct ucred { | |||
229 | #define PF_ISDN AF_ISDN | 230 | #define PF_ISDN AF_ISDN |
230 | #define PF_PHONET AF_PHONET | 231 | #define PF_PHONET AF_PHONET |
231 | #define PF_IEEE802154 AF_IEEE802154 | 232 | #define PF_IEEE802154 AF_IEEE802154 |
233 | #define PF_CAIF AF_CAIF | ||
232 | #define PF_MAX AF_MAX | 234 | #define PF_MAX AF_MAX |
233 | 235 | ||
234 | /* Maximum queue length specifiable by listen. */ | 236 | /* Maximum queue length specifiable by listen. */ |
@@ -301,6 +303,7 @@ struct ucred { | |||
301 | #define SOL_PNPIPE 275 | 303 | #define SOL_PNPIPE 275 |
302 | #define SOL_RDS 276 | 304 | #define SOL_RDS 276 |
303 | #define SOL_IUCV 277 | 305 | #define SOL_IUCV 277 |
306 | #define SOL_CAIF 278 | ||
304 | 307 | ||
305 | /* IPX options */ | 308 | /* IPX options */ |
306 | #define IPX_TYPE 1 | 309 | #define IPX_TYPE 1 |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index 3d92396639de..9536d8aeadf1 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -127,23 +127,17 @@ static inline unsigned int tipc_node(__u32 addr) | |||
127 | * TIPC topology subscription service definitions | 127 | * TIPC topology subscription service definitions |
128 | */ | 128 | */ |
129 | 129 | ||
130 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ | 130 | #define TIPC_SUB_SERVICE 0x00 /* Filter for service availability */ |
131 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ | 131 | #define TIPC_SUB_PORTS 0x01 /* Filter for port availability */ |
132 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ | 132 | #define TIPC_SUB_CANCEL 0x04 /* Cancel a subscription */ |
133 | #if 0 | ||
134 | /* The following filter options are not currently implemented */ | ||
135 | #define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */ | ||
136 | #define TIPC_SUB_NO_UNBIND_EVTS 0x08 /* filter out "withdraw" events */ | ||
137 | #define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */ | ||
138 | #endif | ||
139 | 133 | ||
140 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ | 134 | #define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ |
141 | 135 | ||
142 | struct tipc_subscr { | 136 | struct tipc_subscr { |
143 | struct tipc_name_seq seq; /* name sequence of interest */ | 137 | struct tipc_name_seq seq; /* NBO. Name sequence of interest */ |
144 | __u32 timeout; /* subscription duration (in ms) */ | 138 | __u32 timeout; /* NBO. Subscription duration (in ms) */ |
145 | __u32 filter; /* bitmask of filter options */ | 139 | __u32 filter; /* NBO. Bitmask of filter options */ |
146 | char usr_handle[8]; /* available for subscriber use */ | 140 | char usr_handle[8]; /* Opaque. Available for subscriber use */ |
147 | }; | 141 | }; |
148 | 142 | ||
149 | #define TIPC_PUBLISHED 1 /* publication event */ | 143 | #define TIPC_PUBLISHED 1 /* publication event */ |
@@ -151,11 +145,11 @@ struct tipc_subscr { | |||
151 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ | 145 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ |
152 | 146 | ||
153 | struct tipc_event { | 147 | struct tipc_event { |
154 | __u32 event; /* event type */ | 148 | __u32 event; /* NBO. Event type, as defined above */ |
155 | __u32 found_lower; /* matching name seq instances */ | 149 | __u32 found_lower; /* NBO. Matching name seq instances */ |
156 | __u32 found_upper; /* " " " " */ | 150 | __u32 found_upper; /* " " " " " */ |
157 | struct tipc_portid port; /* associated port */ | 151 | struct tipc_portid port; /* NBO. Associated port */ |
158 | struct tipc_subscr s; /* associated subscription */ | 152 | struct tipc_subscr s; /* Original, associated subscription */ |
159 | }; | 153 | }; |
160 | 154 | ||
161 | /* | 155 | /* |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4409967db0c4..bb44fa9ae135 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
26 | #define NR_LDISCS 20 | 26 | #define NR_LDISCS 21 |
27 | 27 | ||
28 | /* line disciplines */ | 28 | /* line disciplines */ |
29 | #define N_TTY 0 | 29 | #define N_TTY 0 |
@@ -46,8 +46,8 @@ | |||
46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | 46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ |
47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ | 47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ |
48 | #define N_PPS 18 /* Pulse per Second */ | 48 | #define N_PPS 18 /* Pulse per Second */ |
49 | |||
50 | #define N_V253 19 /* Codec control over voice modem */ | 49 | #define N_V253 19 /* Codec control over voice modem */ |
50 | #define N_CAIF 20 /* CAIF protocol for talking to modems */ | ||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 53 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 5b4c6c772a9b..e6827eedf18b 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -346,6 +346,8 @@ | |||
346 | #define SIOCIWFIRST 0x8B00 | 346 | #define SIOCIWFIRST 0x8B00 |
347 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ | 347 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ |
348 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | 348 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) |
349 | #define IW_HANDLER(id, func) \ | ||
350 | [IW_IOCTL_IDX(id)] = func | ||
349 | 351 | ||
350 | /* Odd : get (world access), even : set (root access) */ | 352 | /* Odd : get (world access), even : set (root access) */ |
351 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) | 353 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) |
@@ -648,7 +650,7 @@ | |||
648 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ | 650 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ |
649 | #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ | 651 | #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? \ |
650 | (cmd - SIOCIWFIRSTPRIV + 0x60) : \ | 652 | (cmd - SIOCIWFIRSTPRIV + 0x60) : \ |
651 | (cmd - SIOCSIWCOMMIT)) | 653 | (cmd - SIOCIWFIRST)) |
652 | #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) | 654 | #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) |
653 | #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) | 655 | #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) |
654 | /* Event capability constants - event autogenerated by the kernel | 656 | /* Event capability constants - event autogenerated by the kernel |