diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:04:44 -0400 |
| commit | f8965467f366fd18f01feafb5db10512d7b4422c (patch) | |
| tree | 3706a9cd779859271ca61b85c63a1bc3f82d626e /include/linux | |
| parent | a26272e5200765691e67d6780e52b32498fdb659 (diff) | |
| parent | 2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1674 commits)
qlcnic: adding co maintainer
ixgbe: add support for active DA cables
ixgbe: dcb, do not tag tc_prio_control frames
ixgbe: fix ixgbe_tx_is_paused logic
ixgbe: always enable vlan strip/insert when DCB is enabled
ixgbe: remove some redundant code in setting FCoE FIP filter
ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
ixgbe: fix header len when unsplit packet overflows to data buffer
ipv6: Never schedule DAD timer on dead address
ipv6: Use POSTDAD state
ipv6: Use state_lock to protect ifa state
ipv6: Replace inet6_ifaddr->dead with state
cxgb4: notify upper drivers if the device is already up when they load
cxgb4: keep interrupts available when the ports are brought down
cxgb4: fix initial addition of MAC address
cnic: Return SPQ credit to bnx2x after ring setup and shutdown.
cnic: Convert cnic_local_flags to atomic ops.
can: Fix SJA1000 command register writes on SMP systems
bridge: fix build for CONFIG_SYSFS disabled
ARCNET: Limit com20020 PCI ID matches for SOHARD cards
...
Fix up various conflicts with pcmcia tree drivers/net/
{pcmcia/3c589_cs.c, wireless/orinoco/orinoco_cs.c and
wireless/orinoco/spectrum_cs.c} and feature removal
(Documentation/feature-removal-schedule.txt).
Also fix a non-content conflict due to pm_qos_requirement getting
renamed in the PM tree (now pm_qos_request) in net/mac80211/scan.c
Diffstat (limited to 'include/linux')
66 files changed, 1425 insertions, 471 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index e2ea0b2159cd..2fc8e14cc24a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -94,6 +94,7 @@ header-y += if_ppp.h | |||
| 94 | header-y += if_slip.h | 94 | header-y += if_slip.h |
| 95 | header-y += if_strip.h | 95 | header-y += if_strip.h |
| 96 | header-y += if_tun.h | 96 | header-y += if_tun.h |
| 97 | header-y += if_x25.h | ||
| 97 | header-y += in_route.h | 98 | header-y += in_route.h |
| 98 | header-y += ioctl.h | 99 | header-y += ioctl.h |
| 99 | header-y += ip6_tunnel.h | 100 | header-y += ip6_tunnel.h |
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h new file mode 100644 index 000000000000..2a61eb1beb85 --- /dev/null +++ b/include/linux/caif/caif_socket.h | |||
| @@ -0,0 +1,165 @@ | |||
| 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 | * enum caif_link_selector - Physical Link Selection. | ||
| 21 | * @CAIF_LINK_HIGH_BANDW: Physical interface for high-bandwidth | ||
| 22 | * traffic. | ||
| 23 | * @CAIF_LINK_LOW_LATENCY: Physical interface for low-latency | ||
| 24 | * traffic. | ||
| 25 | * | ||
| 26 | * CAIF Link Layers can register their link properties. | ||
| 27 | * This enum is used for choosing between CAIF Link Layers when | ||
| 28 | * setting up CAIF Channels when multiple CAIF Link Layers exists. | ||
| 29 | */ | ||
| 30 | enum caif_link_selector { | ||
| 31 | CAIF_LINK_HIGH_BANDW, | ||
| 32 | CAIF_LINK_LOW_LATENCY | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * enum caif_channel_priority - CAIF channel priorities. | ||
| 37 | * | ||
| 38 | * @CAIF_PRIO_MIN: Min priority for a channel. | ||
| 39 | * @CAIF_PRIO_LOW: Low-priority channel. | ||
| 40 | * @CAIF_PRIO_NORMAL: Normal/default priority level. | ||
| 41 | * @CAIF_PRIO_HIGH: High priority level | ||
| 42 | * @CAIF_PRIO_MAX: Max priority for channel | ||
| 43 | * | ||
| 44 | * Priority can be set on CAIF Channels in order to | ||
| 45 | * prioritize between traffic on different CAIF Channels. | ||
| 46 | * These priority levels are recommended, but the priority value | ||
| 47 | * is not restricted to the values defined in this enum, any value | ||
| 48 | * between CAIF_PRIO_MIN and CAIF_PRIO_MAX could be used. | ||
| 49 | */ | ||
| 50 | enum caif_channel_priority { | ||
| 51 | CAIF_PRIO_MIN = 0x01, | ||
| 52 | CAIF_PRIO_LOW = 0x04, | ||
| 53 | CAIF_PRIO_NORMAL = 0x0f, | ||
| 54 | CAIF_PRIO_HIGH = 0x14, | ||
| 55 | CAIF_PRIO_MAX = 0x1F | ||
| 56 | }; | ||
| 57 | |||
| 58 | /** | ||
| 59 | * enum caif_protocol_type - CAIF Channel type. | ||
| 60 | * @CAIFPROTO_AT: Classic AT channel. | ||
| 61 | * @CAIFPROTO_DATAGRAM: Datagram channel. | ||
| 62 | * @CAIFPROTO_DATAGRAM_LOOP: Datagram loopback channel, used for testing. | ||
| 63 | * @CAIFPROTO_UTIL: Utility (Psock) channel. | ||
| 64 | * @CAIFPROTO_RFM: Remote File Manager | ||
| 65 | * | ||
| 66 | * This enum defines the CAIF Channel type to be used. This defines | ||
| 67 | * the service to connect to on the modem. | ||
| 68 | */ | ||
| 69 | enum caif_protocol_type { | ||
| 70 | CAIFPROTO_AT, | ||
| 71 | CAIFPROTO_DATAGRAM, | ||
| 72 | CAIFPROTO_DATAGRAM_LOOP, | ||
| 73 | CAIFPROTO_UTIL, | ||
| 74 | CAIFPROTO_RFM, | ||
| 75 | _CAIFPROTO_MAX | ||
| 76 | }; | ||
| 77 | #define CAIFPROTO_MAX _CAIFPROTO_MAX | ||
| 78 | |||
| 79 | /** | ||
| 80 | * enum caif_at_type - AT Service Endpoint | ||
| 81 | * @CAIF_ATTYPE_PLAIN: Connects to a plain vanilla AT channel. | ||
| 82 | */ | ||
| 83 | enum caif_at_type { | ||
| 84 | CAIF_ATTYPE_PLAIN = 2 | ||
| 85 | }; | ||
| 86 | |||
| 87 | /** | ||
| 88 | * struct sockaddr_caif - the sockaddr structure for CAIF sockets. | ||
| 89 | * @family: Address family number, must be AF_CAIF. | ||
| 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 | * of type PF_CAIF. | ||
| 157 | * | ||
| 158 | */ | ||
| 159 | enum caif_socket_opts { | ||
| 160 | CAIFSO_LINK_SELECT = 127, | ||
| 161 | CAIFSO_REQ_PARAM = 128, | ||
| 162 | CAIFSO_RSP_PARAM = 129, | ||
| 163 | }; | ||
| 164 | |||
| 165 | #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/dev.h b/include/linux/can/dev.h index 6e5a7f00223d..cc0bb4961669 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #ifndef CAN_DEV_H | 14 | #ifndef CAN_DEV_H |
| 15 | #define CAN_DEV_H | 15 | #define CAN_DEV_H |
| 16 | 16 | ||
| 17 | #include <linux/can.h> | ||
| 17 | #include <linux/can/netlink.h> | 18 | #include <linux/can/netlink.h> |
| 18 | #include <linux/can/error.h> | 19 | #include <linux/can/error.h> |
| 19 | 20 | ||
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/can/platform/sja1000.h b/include/linux/can/platform/sja1000.h index 01ee2aeb048d..96f8fcc78d78 100644 --- a/include/linux/can/platform/sja1000.h +++ b/include/linux/can/platform/sja1000.h | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #define OCR_TX_SHIFT 2 | 26 | #define OCR_TX_SHIFT 2 |
| 27 | 27 | ||
| 28 | struct sja1000_platform_data { | 28 | struct sja1000_platform_data { |
| 29 | u32 clock; /* CAN bus oscillator frequency in Hz */ | 29 | u32 osc_freq; /* CAN bus oscillator frequency in Hz */ |
| 30 | 30 | ||
| 31 | u8 ocr; /* output control register */ | 31 | u8 ocr; /* output control register */ |
| 32 | u8 cdr; /* clock divider register */ | 32 | u8 cdr; /* clock divider register */ |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index b7cdbb4373df..8723491f7dfd 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
| @@ -22,8 +22,6 @@ | |||
| 22 | 22 | ||
| 23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
| 24 | 24 | ||
| 25 | #define DCB_PROTO_VERSION 1 | ||
| 26 | |||
| 27 | struct dcbmsg { | 25 | struct dcbmsg { |
| 28 | __u8 dcb_family; | 26 | __u8 dcb_family; |
| 29 | __u8 cmd; | 27 | __u8 cmd; |
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/filter.h b/include/linux/filter.h index 29a0e3db9f43..151f5d703b7e 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -123,7 +123,8 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */ | |||
| 123 | #define SKF_AD_NLATTR_NEST 16 | 123 | #define SKF_AD_NLATTR_NEST 16 |
| 124 | #define SKF_AD_MARK 20 | 124 | #define SKF_AD_MARK 20 |
| 125 | #define SKF_AD_QUEUE 24 | 125 | #define SKF_AD_QUEUE 24 |
| 126 | #define SKF_AD_MAX 28 | 126 | #define SKF_AD_HATYPE 28 |
| 127 | #define SKF_AD_MAX 32 | ||
| 127 | #define SKF_NET_OFF (-0x100000) | 128 | #define SKF_NET_OFF (-0x100000) |
| 128 | #define SKF_LL_OFF (-0x200000) | 129 | #define SKF_LL_OFF (-0x200000) |
| 129 | 130 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 948bd2bfb1de..4079ef99900f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1280,10 +1280,12 @@ static inline int lock_may_write(struct inode *inode, loff_t start, | |||
| 1280 | 1280 | ||
| 1281 | 1281 | ||
| 1282 | struct fasync_struct { | 1282 | struct fasync_struct { |
| 1283 | int magic; | 1283 | spinlock_t fa_lock; |
| 1284 | int fa_fd; | 1284 | int magic; |
| 1285 | struct fasync_struct *fa_next; /* singly linked list */ | 1285 | int fa_fd; |
| 1286 | struct file *fa_file; | 1286 | struct fasync_struct *fa_next; /* singly linked list */ |
| 1287 | struct file *fa_file; | ||
| 1288 | struct rcu_head fa_rcu; | ||
| 1287 | }; | 1289 | }; |
| 1288 | 1290 | ||
| 1289 | #define FASYNC_MAGIC 0x4601 | 1291 | #define FASYNC_MAGIC 0x4601 |
| @@ -1292,8 +1294,6 @@ struct fasync_struct { | |||
| 1292 | extern int fasync_helper(int, struct file *, int, struct fasync_struct **); | 1294 | extern int fasync_helper(int, struct file *, int, struct fasync_struct **); |
| 1293 | /* can be called from interrupts */ | 1295 | /* can be called from interrupts */ |
| 1294 | extern void kill_fasync(struct fasync_struct **, int, int); | 1296 | extern void kill_fasync(struct fasync_struct **, int, int); |
| 1295 | /* only for net: no internal synchronization */ | ||
| 1296 | extern void __kill_fasync(struct fasync_struct *, int, int); | ||
| 1297 | 1297 | ||
| 1298 | extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); | 1298 | extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); |
| 1299 | extern int f_setown(struct file *filp, unsigned long arg, int force); | 1299 | extern int f_setown(struct file *filp, unsigned long arg, int force); |
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/ieee80211.h b/include/linux/ieee80211.h index 19984958ab7b..97b2eae6a22c 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -876,6 +876,7 @@ struct ieee80211_ht_cap { | |||
| 876 | #define IEEE80211_HT_CAP_SGI_40 0x0040 | 876 | #define IEEE80211_HT_CAP_SGI_40 0x0040 |
| 877 | #define IEEE80211_HT_CAP_TX_STBC 0x0080 | 877 | #define IEEE80211_HT_CAP_TX_STBC 0x0080 |
| 878 | #define IEEE80211_HT_CAP_RX_STBC 0x0300 | 878 | #define IEEE80211_HT_CAP_RX_STBC 0x0300 |
| 879 | #define IEEE80211_HT_CAP_RX_STBC_SHIFT 8 | ||
| 879 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 | 880 | #define IEEE80211_HT_CAP_DELAY_BA 0x0400 |
| 880 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 | 881 | #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 |
| 881 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 | 882 | #define IEEE80211_HT_CAP_DSSSCCK40 0x1000 |
| @@ -1211,6 +1212,8 @@ enum ieee80211_category { | |||
| 1211 | WLAN_CATEGORY_SA_QUERY = 8, | 1212 | WLAN_CATEGORY_SA_QUERY = 8, |
| 1212 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1213 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
| 1213 | WLAN_CATEGORY_WMM = 17, | 1214 | WLAN_CATEGORY_WMM = 17, |
| 1215 | WLAN_CATEGORY_MESH_PLINK = 30, /* Pending ANA approval */ | ||
| 1216 | WLAN_CATEGORY_MESH_PATH_SEL = 32, /* Pending ANA approval */ | ||
| 1214 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1217 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
| 1215 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1218 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
| 1216 | }; | 1219 | }; |
| @@ -1324,7 +1327,6 @@ enum ieee80211_back_actioncode { | |||
| 1324 | enum ieee80211_back_parties { | 1327 | enum ieee80211_back_parties { |
| 1325 | WLAN_BACK_RECIPIENT = 0, | 1328 | WLAN_BACK_RECIPIENT = 0, |
| 1326 | WLAN_BACK_INITIATOR = 1, | 1329 | WLAN_BACK_INITIATOR = 1, |
| 1327 | WLAN_BACK_TIMER = 2, | ||
| 1328 | }; | 1330 | }; |
| 1329 | 1331 | ||
| 1330 | /* SA Query action */ | 1332 | /* SA Query action */ |
diff --git a/include/linux/if.h b/include/linux/if.h index 3a9f410a296b..be350e62a905 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
| @@ -71,6 +71,8 @@ | |||
| 71 | * release skb->dst | 71 | * release skb->dst |
| 72 | */ | 72 | */ |
| 73 | #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */ | 73 | #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */ |
| 74 | #define IFF_IN_NETPOLL 0x1000 /* whether we are processing netpoll */ | ||
| 75 | #define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */ | ||
| 74 | 76 | ||
| 75 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 77 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
| 76 | #define IF_GET_PROTO 0x0002 | 78 | #define IF_GET_PROTO 0x0002 |
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 d94963b379d9..85c812db5a3f 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; |
| @@ -80,6 +112,9 @@ enum { | |||
| 80 | IFLA_IFALIAS, | 112 | IFLA_IFALIAS, |
| 81 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ | 113 | IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ |
| 82 | IFLA_VFINFO_LIST, | 114 | IFLA_VFINFO_LIST, |
| 115 | IFLA_STATS64, | ||
| 116 | IFLA_VF_PORTS, | ||
| 117 | IFLA_PORT_SELF, | ||
| 83 | __IFLA_MAX | 118 | __IFLA_MAX |
| 84 | }; | 119 | }; |
| 85 | 120 | ||
| @@ -241,4 +276,77 @@ struct ifla_vf_info { | |||
| 241 | __u32 qos; | 276 | __u32 qos; |
| 242 | __u32 tx_rate; | 277 | __u32 tx_rate; |
| 243 | }; | 278 | }; |
| 279 | |||
| 280 | /* VF ports management section | ||
| 281 | * | ||
| 282 | * Nested layout of set/get msg is: | ||
| 283 | * | ||
| 284 | * [IFLA_NUM_VF] | ||
| 285 | * [IFLA_VF_PORTS] | ||
| 286 | * [IFLA_VF_PORT] | ||
| 287 | * [IFLA_PORT_*], ... | ||
| 288 | * [IFLA_VF_PORT] | ||
| 289 | * [IFLA_PORT_*], ... | ||
| 290 | * ... | ||
| 291 | * [IFLA_PORT_SELF] | ||
| 292 | * [IFLA_PORT_*], ... | ||
| 293 | */ | ||
| 294 | |||
| 295 | enum { | ||
| 296 | IFLA_VF_PORT_UNSPEC, | ||
| 297 | IFLA_VF_PORT, /* nest */ | ||
| 298 | __IFLA_VF_PORT_MAX, | ||
| 299 | }; | ||
| 300 | |||
| 301 | #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1) | ||
| 302 | |||
| 303 | enum { | ||
| 304 | IFLA_PORT_UNSPEC, | ||
| 305 | IFLA_PORT_VF, /* __u32 */ | ||
| 306 | IFLA_PORT_PROFILE, /* string */ | ||
| 307 | IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */ | ||
| 308 | IFLA_PORT_INSTANCE_UUID, /* binary UUID */ | ||
| 309 | IFLA_PORT_HOST_UUID, /* binary UUID */ | ||
| 310 | IFLA_PORT_REQUEST, /* __u8 */ | ||
| 311 | IFLA_PORT_RESPONSE, /* __u16, output only */ | ||
| 312 | __IFLA_PORT_MAX, | ||
| 313 | }; | ||
| 314 | |||
| 315 | #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1) | ||
| 316 | |||
| 317 | #define PORT_PROFILE_MAX 40 | ||
| 318 | #define PORT_UUID_MAX 16 | ||
| 319 | #define PORT_SELF_VF -1 | ||
| 320 | |||
| 321 | enum { | ||
| 322 | PORT_REQUEST_PREASSOCIATE = 0, | ||
| 323 | PORT_REQUEST_PREASSOCIATE_RR, | ||
| 324 | PORT_REQUEST_ASSOCIATE, | ||
| 325 | PORT_REQUEST_DISASSOCIATE, | ||
| 326 | }; | ||
| 327 | |||
| 328 | enum { | ||
| 329 | PORT_VDP_RESPONSE_SUCCESS = 0, | ||
| 330 | PORT_VDP_RESPONSE_INVALID_FORMAT, | ||
| 331 | PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES, | ||
| 332 | PORT_VDP_RESPONSE_UNUSED_VTID, | ||
| 333 | PORT_VDP_RESPONSE_VTID_VIOLATION, | ||
| 334 | PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION, | ||
| 335 | PORT_VDP_RESPONSE_OUT_OF_SYNC, | ||
| 336 | /* 0x08-0xFF reserved for future VDP use */ | ||
| 337 | PORT_PROFILE_RESPONSE_SUCCESS = 0x100, | ||
| 338 | PORT_PROFILE_RESPONSE_INPROGRESS, | ||
| 339 | PORT_PROFILE_RESPONSE_INVALID, | ||
| 340 | PORT_PROFILE_RESPONSE_BADSTATE, | ||
| 341 | PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES, | ||
| 342 | PORT_PROFILE_RESPONSE_ERROR, | ||
| 343 | }; | ||
| 344 | |||
| 345 | struct ifla_port_vsi { | ||
| 346 | __u8 vsi_mgr_id; | ||
| 347 | __u8 vsi_type_id[3]; | ||
| 348 | __u8 vsi_type_version; | ||
| 349 | __u8 pad[3]; | ||
| 350 | }; | ||
| 351 | |||
| 244 | #endif /* _LINUX_IF_LINK_H */ | 352 | #endif /* _LINUX_IF_LINK_H */ |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index b78a712247da..9ea047aca795 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
| @@ -85,6 +85,7 @@ extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb, | |||
| 85 | struct net_device *dev); | 85 | struct net_device *dev); |
| 86 | 86 | ||
| 87 | 87 | ||
| 88 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); | 88 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct macvlan_port *, |
| 89 | struct sk_buff *); | ||
| 89 | 90 | ||
| 90 | #endif /* _LINUX_IF_MACVLAN_H */ | 91 | #endif /* _LINUX_IF_MACVLAN_H */ |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index aa57a5f993fc..6ac23ef1801a 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
| @@ -47,6 +47,7 @@ struct sockaddr_ll { | |||
| 47 | #define PACKET_TX_RING 13 | 47 | #define PACKET_TX_RING 13 |
| 48 | #define PACKET_LOSS 14 | 48 | #define PACKET_LOSS 14 |
| 49 | #define PACKET_VNET_HDR 15 | 49 | #define PACKET_VNET_HDR 15 |
| 50 | #define PACKET_TX_TIMESTAMP 16 | ||
| 50 | 51 | ||
| 51 | struct tpacket_stats { | 52 | struct tpacket_stats { |
| 52 | unsigned int tp_packets; | 53 | unsigned int tp_packets; |
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/if_tun.h b/include/linux/if_tun.h index 1350a246893a..06b1829731fd 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
| @@ -51,6 +51,8 @@ | |||
| 51 | #define TUNSETSNDBUF _IOW('T', 212, int) | 51 | #define TUNSETSNDBUF _IOW('T', 212, int) |
| 52 | #define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog) | 52 | #define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog) |
| 53 | #define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog) | 53 | #define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog) |
| 54 | #define TUNGETVNETHDRSZ _IOR('T', 215, int) | ||
| 55 | #define TUNSETVNETHDRSZ _IOW('T', 216, int) | ||
| 54 | 56 | ||
| 55 | /* TUNSETIFF ifr flags */ | 57 | /* TUNSETIFF ifr flags */ |
| 56 | #define IFF_TUN 0x0001 | 58 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/if_x25.h b/include/linux/if_x25.h new file mode 100644 index 000000000000..897765f5feb8 --- /dev/null +++ b/include/linux/if_x25.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * Linux X.25 packet to device interface | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef _IF_X25_H | ||
| 16 | #define _IF_X25_H | ||
| 17 | |||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | /* Documentation/networking/x25-iface.txt */ | ||
| 21 | #define X25_IFACE_DATA 0x00 | ||
| 22 | #define X25_IFACE_CONNECT 0x01 | ||
| 23 | #define X25_IFACE_DISCONNECT 0x02 | ||
| 24 | #define X25_IFACE_PARAMS 0x03 | ||
| 25 | |||
| 26 | #endif /* _IF_X25_H */ | ||
diff --git a/include/linux/in6.h b/include/linux/in6.h index bd55c6e46b2e..c4bf46f764bf 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h | |||
| @@ -221,10 +221,10 @@ struct in6_flowlabel_req { | |||
| 221 | #define IPV6_RTHDR 57 | 221 | #define IPV6_RTHDR 57 |
| 222 | #define IPV6_RECVDSTOPTS 58 | 222 | #define IPV6_RECVDSTOPTS 58 |
| 223 | #define IPV6_DSTOPTS 59 | 223 | #define IPV6_DSTOPTS 59 |
| 224 | #if 0 /* not yet */ | ||
| 225 | #define IPV6_RECVPATHMTU 60 | 224 | #define IPV6_RECVPATHMTU 60 |
| 226 | #define IPV6_PATHMTU 61 | 225 | #define IPV6_PATHMTU 61 |
| 227 | #define IPV6_DONTFRAG 62 | 226 | #define IPV6_DONTFRAG 62 |
| 227 | #if 0 /* not yet */ | ||
| 228 | #define IPV6_USE_MIN_MTU 63 | 228 | #define IPV6_USE_MIN_MTU 63 |
| 229 | #endif | 229 | #endif |
| 230 | 230 | ||
| @@ -265,6 +265,9 @@ struct in6_flowlabel_req { | |||
| 265 | #define IPV6_PREFER_SRC_CGA 0x0008 | 265 | #define IPV6_PREFER_SRC_CGA 0x0008 |
| 266 | #define IPV6_PREFER_SRC_NONCGA 0x0800 | 266 | #define IPV6_PREFER_SRC_NONCGA 0x0800 |
| 267 | 267 | ||
| 268 | /* RFC5082: Generalized Ttl Security Mechanism */ | ||
| 269 | #define IPV6_MINHOPCOUNT 73 | ||
| 270 | |||
| 268 | /* | 271 | /* |
| 269 | * Multicast Routing: | 272 | * Multicast Routing: |
| 270 | * see include/linux/mroute6.h. | 273 | * see include/linux/mroute6.h. |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index e0cc9a7db2b5..99e1ab7e3eec 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -21,6 +21,10 @@ struct in6_pktinfo { | |||
| 21 | int ipi6_ifindex; | 21 | int ipi6_ifindex; |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | struct ip6_mtuinfo { | ||
| 25 | struct sockaddr_in6 ip6m_addr; | ||
| 26 | __u32 ip6m_mtu; | ||
| 27 | }; | ||
| 24 | 28 | ||
| 25 | struct in6_ifreq { | 29 | struct in6_ifreq { |
| 26 | struct in6_addr ifr6_addr; | 30 | struct in6_addr ifr6_addr; |
| @@ -250,9 +254,11 @@ struct inet6_skb_parm { | |||
| 250 | 254 | ||
| 251 | #define IP6SKB_XFRM_TRANSFORMED 1 | 255 | #define IP6SKB_XFRM_TRANSFORMED 1 |
| 252 | #define IP6SKB_FORWARDED 2 | 256 | #define IP6SKB_FORWARDED 2 |
| 257 | #define IP6SKB_REROUTED 4 | ||
| 253 | }; | 258 | }; |
| 254 | 259 | ||
| 255 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 260 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
| 261 | #define IP6CBMTU(skb) ((struct ip6_mtuinfo *)((skb)->cb)) | ||
| 256 | 262 | ||
| 257 | static inline int inet6_iif(const struct sk_buff *skb) | 263 | static inline int inet6_iif(const struct sk_buff *skb) |
| 258 | { | 264 | { |
| @@ -334,21 +340,25 @@ struct ipv6_pinfo { | |||
| 334 | dstopts:1, | 340 | dstopts:1, |
| 335 | odstopts:1, | 341 | odstopts:1, |
| 336 | rxflow:1, | 342 | rxflow:1, |
| 337 | rxtclass:1; | 343 | rxtclass:1, |
| 344 | rxpmtu:1; | ||
| 338 | } bits; | 345 | } bits; |
| 339 | __u16 all; | 346 | __u16 all; |
| 340 | } rxopt; | 347 | } rxopt; |
| 341 | 348 | ||
| 342 | /* sockopt flags */ | 349 | /* sockopt flags */ |
| 343 | __u8 recverr:1, | 350 | __u16 recverr:1, |
| 344 | sndflow:1, | 351 | sndflow:1, |
| 345 | pmtudisc:2, | 352 | pmtudisc:2, |
| 346 | ipv6only:1, | 353 | ipv6only:1, |
| 347 | srcprefs:3; /* 001: prefer temporary address | 354 | srcprefs:3, /* 001: prefer temporary address |
| 348 | * 010: prefer public address | 355 | * 010: prefer public address |
| 349 | * 100: prefer care-of address | 356 | * 100: prefer care-of address |
| 350 | */ | 357 | */ |
| 358 | dontfrag:1; | ||
| 359 | __u8 min_hopcount; | ||
| 351 | __u8 tclass; | 360 | __u8 tclass; |
| 361 | __u8 padding; | ||
| 352 | 362 | ||
| 353 | __u32 dst_cookie; | 363 | __u32 dst_cookie; |
| 354 | 364 | ||
| @@ -358,6 +368,7 @@ struct ipv6_pinfo { | |||
| 358 | 368 | ||
| 359 | struct ipv6_txoptions *opt; | 369 | struct ipv6_txoptions *opt; |
| 360 | struct sk_buff *pktoptions; | 370 | struct sk_buff *pktoptions; |
| 371 | struct sk_buff *rxpmtu; | ||
| 361 | struct { | 372 | struct { |
| 362 | struct ipv6_txoptions *opt; | 373 | struct ipv6_txoptions *opt; |
| 363 | u8 hop_limit; | 374 | u8 hop_limit; |
| @@ -372,6 +383,7 @@ struct raw6_sock { | |||
| 372 | __u32 checksum; /* perform checksum */ | 383 | __u32 checksum; /* perform checksum */ |
| 373 | __u32 offset; /* checksum offset */ | 384 | __u32 offset; /* checksum offset */ |
| 374 | struct icmp6_filter filter; | 385 | struct icmp6_filter filter; |
| 386 | __u32 ip6mr_table; | ||
| 375 | /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ | 387 | /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ |
| 376 | struct ipv6_pinfo inet6; | 388 | struct ipv6_pinfo inet6; |
| 377 | }; | 389 | }; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 9fb1c1299032..fc33af911852 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * 'kernel.h' contains some often-used function prototypes etc | 5 | * 'kernel.h' contains some often-used function prototypes etc |
| 6 | */ | 6 | */ |
| 7 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | ||
| 8 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | ||
| 7 | 9 | ||
| 8 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
| 9 | 11 | ||
| @@ -37,8 +39,8 @@ extern const char linux_proc_banner[]; | |||
| 37 | 39 | ||
| 38 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
| 39 | 41 | ||
| 40 | #define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) | 42 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) |
| 41 | #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) | 43 | #define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) |
| 42 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) | 44 | #define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) |
| 43 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) | 45 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) |
| 44 | 46 | ||
diff --git a/include/linux/ks8842.h b/include/linux/ks8842.h new file mode 100644 index 000000000000..da0341b8ca0a --- /dev/null +++ b/include/linux/ks8842.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | * ks8842.h KS8842 platform data struct definition | ||
| 3 | * Copyright (c) 2010 Intel Corporation | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _LINUX_KS8842_H | ||
| 20 | #define _LINUX_KS8842_H | ||
| 21 | |||
| 22 | #include <linux/if_ether.h> | ||
| 23 | |||
| 24 | /** | ||
| 25 | * struct ks8842_platform_data - Platform data of the KS8842 network driver | ||
| 26 | * @macaddr: The MAC address of the device, set to all 0:s to use the on in | ||
| 27 | * the chip. | ||
| 28 | * | ||
| 29 | */ | ||
| 30 | struct ks8842_platform_data { | ||
| 31 | u8 macaddr[ETH_ALEN]; | ||
| 32 | }; | ||
| 33 | |||
| 34 | #endif | ||
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/mmc/sdio.h b/include/linux/mmc/sdio.h index 0ebaef577ff5..329a8faa6e37 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
| @@ -94,6 +94,8 @@ | |||
| 94 | 94 | ||
| 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 | 95 | #define SDIO_BUS_WIDTH_1BIT 0x00 |
| 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 | 96 | #define SDIO_BUS_WIDTH_4BIT 0x02 |
| 97 | #define SDIO_BUS_ECSI 0x20 /* Enable continuous SPI interrupt */ | ||
| 98 | #define SDIO_BUS_SCSI 0x40 /* Support continuous SPI interrupt */ | ||
| 97 | 99 | ||
| 98 | #define SDIO_BUS_ASYNC_INT 0x20 | 100 | #define SDIO_BUS_ASYNC_INT 0x20 |
| 99 | 101 | ||
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 56fde4364e4c..007fbaafead0 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -474,6 +474,32 @@ 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 | struct zorro_device_id { | 503 | struct zorro_device_id { |
| 478 | __u32 id; /* Device ID or ZORRO_WILDCARD */ | 504 | __u32 id; /* Device ID or ZORRO_WILDCARD */ |
| 479 | kernel_ulong_t driver_data; /* Data private to the driver */ | 505 | kernel_ulong_t driver_data; /* Data private to the driver */ |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index c5f3d53548e2..fa04b246c9ae 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
| @@ -27,7 +27,8 @@ | |||
| 27 | #define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ | 27 | #define MRT_DEL_MFC (MRT_BASE+5) /* Delete a multicast forwarding entry */ |
| 28 | #define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ | 28 | #define MRT_VERSION (MRT_BASE+6) /* Get the kernel multicast version */ |
| 29 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ | 29 | #define MRT_ASSERT (MRT_BASE+7) /* Activate PIM assert mode */ |
| 30 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ | 30 | #define MRT_PIM (MRT_BASE+8) /* enable PIM code */ |
| 31 | #define MRT_TABLE (MRT_BASE+9) /* Specify mroute table ID */ | ||
| 31 | 32 | ||
| 32 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ | 33 | #define SIOCGETVIFCNT SIOCPROTOPRIVATE /* IP protocol privates */ |
| 33 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) | 34 | #define SIOCGETSGCNT (SIOCPROTOPRIVATE+1) |
| @@ -191,10 +192,7 @@ struct vif_device { | |||
| 191 | #define VIFF_STATIC 0x8000 | 192 | #define VIFF_STATIC 0x8000 |
| 192 | 193 | ||
| 193 | struct mfc_cache { | 194 | struct mfc_cache { |
| 194 | struct mfc_cache *next; /* Next entry on cache line */ | 195 | struct list_head list; |
| 195 | #ifdef CONFIG_NET_NS | ||
| 196 | struct net *mfc_net; | ||
| 197 | #endif | ||
| 198 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ | 196 | __be32 mfc_mcastgrp; /* Group the entry belongs to */ |
| 199 | __be32 mfc_origin; /* Source of packet */ | 197 | __be32 mfc_origin; /* Source of packet */ |
| 200 | vifi_t mfc_parent; /* Source interface */ | 198 | vifi_t mfc_parent; /* Source interface */ |
| @@ -217,18 +215,6 @@ struct mfc_cache { | |||
| 217 | } mfc_un; | 215 | } mfc_un; |
| 218 | }; | 216 | }; |
| 219 | 217 | ||
| 220 | static inline | ||
| 221 | struct net *mfc_net(const struct mfc_cache *mfc) | ||
| 222 | { | ||
| 223 | return read_pnet(&mfc->mfc_net); | ||
| 224 | } | ||
| 225 | |||
| 226 | static inline | ||
| 227 | void mfc_net_set(struct mfc_cache *mfc, struct net *net) | ||
| 228 | { | ||
| 229 | write_pnet(&mfc->mfc_net, hold_net(net)); | ||
| 230 | } | ||
| 231 | |||
| 232 | #define MFC_STATIC 1 | 218 | #define MFC_STATIC 1 |
| 233 | #define MFC_NOTIFY 2 | 219 | #define MFC_NOTIFY 2 |
| 234 | 220 | ||
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 2caa1a8e525d..6091ab77f388 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
| @@ -24,7 +24,8 @@ | |||
| 24 | #define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */ | 24 | #define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */ |
| 25 | #define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */ | 25 | #define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */ |
| 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ |
| 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ | 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ |
| 28 | #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ | ||
| 28 | 29 | ||
| 29 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ | 30 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ |
| 30 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) | 31 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) |
| @@ -182,10 +183,7 @@ struct mif_device { | |||
| 182 | #define VIFF_STATIC 0x8000 | 183 | #define VIFF_STATIC 0x8000 |
| 183 | 184 | ||
| 184 | struct mfc6_cache { | 185 | struct mfc6_cache { |
| 185 | struct mfc6_cache *next; /* Next entry on cache line */ | 186 | struct list_head list; |
| 186 | #ifdef CONFIG_NET_NS | ||
| 187 | struct net *mfc6_net; | ||
| 188 | #endif | ||
| 189 | struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */ | 187 | struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */ |
| 190 | struct in6_addr mf6c_origin; /* Source of packet */ | 188 | struct in6_addr mf6c_origin; /* Source of packet */ |
| 191 | mifi_t mf6c_parent; /* Source interface */ | 189 | mifi_t mf6c_parent; /* Source interface */ |
| @@ -208,18 +206,6 @@ struct mfc6_cache { | |||
| 208 | } mfc_un; | 206 | } mfc_un; |
| 209 | }; | 207 | }; |
| 210 | 208 | ||
| 211 | static inline | ||
| 212 | struct net *mfc6_net(const struct mfc6_cache *mfc) | ||
| 213 | { | ||
| 214 | return read_pnet(&mfc->mfc6_net); | ||
| 215 | } | ||
| 216 | |||
| 217 | static inline | ||
| 218 | void mfc6_net_set(struct mfc6_cache *mfc, struct net *net) | ||
| 219 | { | ||
| 220 | write_pnet(&mfc->mfc6_net, hold_net(net)); | ||
| 221 | } | ||
| 222 | |||
| 223 | #define MFC_STATIC 1 | 209 | #define MFC_STATIC 1 |
| 224 | #define MFC_NOTIFY 2 | 210 | #define MFC_NOTIFY 2 |
| 225 | 211 | ||
| @@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb, | |||
| 244 | struct rtmsg *rtm, int nowait); | 230 | struct rtmsg *rtm, int nowait); |
| 245 | 231 | ||
| 246 | #ifdef CONFIG_IPV6_MROUTE | 232 | #ifdef CONFIG_IPV6_MROUTE |
| 247 | static inline struct sock *mroute6_socket(struct net *net) | 233 | extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb); |
| 248 | { | ||
| 249 | return net->ipv6.mroute6_sk; | ||
| 250 | } | ||
| 251 | extern int ip6mr_sk_done(struct sock *sk); | 234 | extern int ip6mr_sk_done(struct sock *sk); |
| 252 | #else | 235 | #else |
| 253 | static inline struct sock *mroute6_socket(struct net *net) { return NULL; } | 236 | static inline struct sock *mroute6_socket(struct net *net, struct sk_buff *skb) |
| 254 | static inline int ip6mr_sk_done(struct sock *sk) { return 0; } | 237 | { |
| 238 | return NULL; | ||
| 239 | } | ||
| 240 | static inline int ip6mr_sk_done(struct sock *sk) | ||
| 241 | { | ||
| 242 | return 0; | ||
| 243 | } | ||
| 255 | #endif | 244 | #endif |
| 256 | #endif | 245 | #endif |
| 257 | 246 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 4157b5d42bd6..2b4deeeb8646 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -59,6 +59,7 @@ typedef enum { | |||
| 59 | #include <linux/wait.h> | 59 | #include <linux/wait.h> |
| 60 | #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ | 60 | #include <linux/fcntl.h> /* For O_CLOEXEC and O_NONBLOCK */ |
| 61 | #include <linux/kmemcheck.h> | 61 | #include <linux/kmemcheck.h> |
| 62 | #include <linux/rcupdate.h> | ||
| 62 | 63 | ||
| 63 | struct poll_table_struct; | 64 | struct poll_table_struct; |
| 64 | struct pipe_inode_info; | 65 | struct pipe_inode_info; |
| @@ -116,6 +117,12 @@ enum sock_shutdown_cmd { | |||
| 116 | SHUT_RDWR = 2, | 117 | SHUT_RDWR = 2, |
| 117 | }; | 118 | }; |
| 118 | 119 | ||
| 120 | struct socket_wq { | ||
| 121 | wait_queue_head_t wait; | ||
| 122 | struct fasync_struct *fasync_list; | ||
| 123 | struct rcu_head rcu; | ||
| 124 | } ____cacheline_aligned_in_smp; | ||
| 125 | |||
| 119 | /** | 126 | /** |
| 120 | * struct socket - general BSD socket | 127 | * struct socket - general BSD socket |
| 121 | * @state: socket state (%SS_CONNECTED, etc) | 128 | * @state: socket state (%SS_CONNECTED, etc) |
| @@ -135,11 +142,8 @@ struct socket { | |||
| 135 | kmemcheck_bitfield_end(type); | 142 | kmemcheck_bitfield_end(type); |
| 136 | 143 | ||
| 137 | unsigned long flags; | 144 | unsigned long flags; |
| 138 | /* | 145 | |
| 139 | * Please keep fasync_list & wait fields in the same cache line | 146 | struct socket_wq *wq; |
| 140 | */ | ||
| 141 | struct fasync_struct *fasync_list; | ||
| 142 | wait_queue_head_t wait; | ||
| 143 | 147 | ||
| 144 | struct file *file; | 148 | struct file *file; |
| 145 | struct sock *sk; | 149 | struct sock *sk; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3857517f1ca5..a1bff6518166 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -219,34 +219,6 @@ struct neighbour; | |||
| 219 | struct neigh_parms; | 219 | struct neigh_parms; |
| 220 | struct sk_buff; | 220 | struct sk_buff; |
| 221 | 221 | ||
| 222 | struct netif_rx_stats { | ||
| 223 | unsigned total; | ||
| 224 | unsigned dropped; | ||
| 225 | unsigned time_squeeze; | ||
| 226 | unsigned cpu_collision; | ||
| 227 | }; | ||
| 228 | |||
| 229 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | ||
| 230 | |||
| 231 | struct dev_addr_list { | ||
| 232 | struct dev_addr_list *next; | ||
| 233 | u8 da_addr[MAX_ADDR_LEN]; | ||
| 234 | u8 da_addrlen; | ||
| 235 | u8 da_synced; | ||
| 236 | int da_users; | ||
| 237 | int da_gusers; | ||
| 238 | }; | ||
| 239 | |||
| 240 | /* | ||
| 241 | * We tag multicasts with these structures. | ||
| 242 | */ | ||
| 243 | |||
| 244 | #define dev_mc_list dev_addr_list | ||
| 245 | #define dmi_addr da_addr | ||
| 246 | #define dmi_addrlen da_addrlen | ||
| 247 | #define dmi_users da_users | ||
| 248 | #define dmi_gusers da_gusers | ||
| 249 | |||
| 250 | struct netdev_hw_addr { | 222 | struct netdev_hw_addr { |
| 251 | struct list_head list; | 223 | struct list_head list; |
| 252 | unsigned char addr[MAX_ADDR_LEN]; | 224 | unsigned char addr[MAX_ADDR_LEN]; |
| @@ -255,8 +227,10 @@ struct netdev_hw_addr { | |||
| 255 | #define NETDEV_HW_ADDR_T_SAN 2 | 227 | #define NETDEV_HW_ADDR_T_SAN 2 |
| 256 | #define NETDEV_HW_ADDR_T_SLAVE 3 | 228 | #define NETDEV_HW_ADDR_T_SLAVE 3 |
| 257 | #define NETDEV_HW_ADDR_T_UNICAST 4 | 229 | #define NETDEV_HW_ADDR_T_UNICAST 4 |
| 230 | #define NETDEV_HW_ADDR_T_MULTICAST 5 | ||
| 258 | int refcount; | 231 | int refcount; |
| 259 | bool synced; | 232 | bool synced; |
| 233 | bool global_use; | ||
| 260 | struct rcu_head rcu_head; | 234 | struct rcu_head rcu_head; |
| 261 | }; | 235 | }; |
| 262 | 236 | ||
| @@ -265,16 +239,20 @@ struct netdev_hw_addr_list { | |||
| 265 | int count; | 239 | int count; |
| 266 | }; | 240 | }; |
| 267 | 241 | ||
| 268 | #define netdev_uc_count(dev) ((dev)->uc.count) | 242 | #define netdev_hw_addr_list_count(l) ((l)->count) |
| 269 | #define netdev_uc_empty(dev) ((dev)->uc.count == 0) | 243 | #define netdev_hw_addr_list_empty(l) (netdev_hw_addr_list_count(l) == 0) |
| 270 | #define netdev_for_each_uc_addr(ha, dev) \ | 244 | #define netdev_hw_addr_list_for_each(ha, l) \ |
| 271 | list_for_each_entry(ha, &dev->uc.list, list) | 245 | list_for_each_entry(ha, &(l)->list, list) |
| 272 | 246 | ||
| 273 | #define netdev_mc_count(dev) ((dev)->mc_count) | 247 | #define netdev_uc_count(dev) netdev_hw_addr_list_count(&(dev)->uc) |
| 274 | #define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0) | 248 | #define netdev_uc_empty(dev) netdev_hw_addr_list_empty(&(dev)->uc) |
| 249 | #define netdev_for_each_uc_addr(ha, dev) \ | ||
| 250 | netdev_hw_addr_list_for_each(ha, &(dev)->uc) | ||
| 275 | 251 | ||
| 276 | #define netdev_for_each_mc_addr(mclist, dev) \ | 252 | #define netdev_mc_count(dev) netdev_hw_addr_list_count(&(dev)->mc) |
| 277 | for (mclist = dev->mc_list; mclist; mclist = mclist->next) | 253 | #define netdev_mc_empty(dev) netdev_hw_addr_list_empty(&(dev)->mc) |
| 254 | #define netdev_for_each_mc_addr(ha, dev) \ | ||
| 255 | netdev_hw_addr_list_for_each(ha, &(dev)->mc) | ||
| 278 | 256 | ||
| 279 | struct hh_cache { | 257 | struct hh_cache { |
| 280 | struct hh_cache *hh_next; /* Next entry */ | 258 | struct hh_cache *hh_next; /* Next entry */ |
| @@ -531,6 +509,85 @@ struct netdev_queue { | |||
| 531 | unsigned long tx_dropped; | 509 | unsigned long tx_dropped; |
| 532 | } ____cacheline_aligned_in_smp; | 510 | } ____cacheline_aligned_in_smp; |
| 533 | 511 | ||
| 512 | #ifdef CONFIG_RPS | ||
| 513 | /* | ||
| 514 | * This structure holds an RPS map which can be of variable length. The | ||
| 515 | * map is an array of CPUs. | ||
| 516 | */ | ||
| 517 | struct rps_map { | ||
| 518 | unsigned int len; | ||
| 519 | struct rcu_head rcu; | ||
| 520 | u16 cpus[0]; | ||
| 521 | }; | ||
| 522 | #define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + (_num * sizeof(u16))) | ||
| 523 | |||
| 524 | /* | ||
| 525 | * The rps_dev_flow structure contains the mapping of a flow to a CPU and the | ||
| 526 | * tail pointer for that CPU's input queue at the time of last enqueue. | ||
| 527 | */ | ||
| 528 | struct rps_dev_flow { | ||
| 529 | u16 cpu; | ||
| 530 | u16 fill; | ||
| 531 | unsigned int last_qtail; | ||
| 532 | }; | ||
| 533 | |||
| 534 | /* | ||
| 535 | * The rps_dev_flow_table structure contains a table of flow mappings. | ||
| 536 | */ | ||
| 537 | struct rps_dev_flow_table { | ||
| 538 | unsigned int mask; | ||
| 539 | struct rcu_head rcu; | ||
| 540 | struct work_struct free_work; | ||
| 541 | struct rps_dev_flow flows[0]; | ||
| 542 | }; | ||
| 543 | #define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \ | ||
| 544 | (_num * sizeof(struct rps_dev_flow))) | ||
| 545 | |||
| 546 | /* | ||
| 547 | * The rps_sock_flow_table contains mappings of flows to the last CPU | ||
| 548 | * on which they were processed by the application (set in recvmsg). | ||
| 549 | */ | ||
| 550 | struct rps_sock_flow_table { | ||
| 551 | unsigned int mask; | ||
| 552 | u16 ents[0]; | ||
| 553 | }; | ||
| 554 | #define RPS_SOCK_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_sock_flow_table) + \ | ||
| 555 | (_num * sizeof(u16))) | ||
| 556 | |||
| 557 | #define RPS_NO_CPU 0xffff | ||
| 558 | |||
| 559 | static inline void rps_record_sock_flow(struct rps_sock_flow_table *table, | ||
| 560 | u32 hash) | ||
| 561 | { | ||
| 562 | if (table && hash) { | ||
| 563 | unsigned int cpu, index = hash & table->mask; | ||
| 564 | |||
| 565 | /* We only give a hint, preemption can change cpu under us */ | ||
| 566 | cpu = raw_smp_processor_id(); | ||
| 567 | |||
| 568 | if (table->ents[index] != cpu) | ||
| 569 | table->ents[index] = cpu; | ||
| 570 | } | ||
| 571 | } | ||
| 572 | |||
| 573 | static inline void rps_reset_sock_flow(struct rps_sock_flow_table *table, | ||
| 574 | u32 hash) | ||
| 575 | { | ||
| 576 | if (table && hash) | ||
| 577 | table->ents[hash & table->mask] = RPS_NO_CPU; | ||
| 578 | } | ||
| 579 | |||
| 580 | extern struct rps_sock_flow_table *rps_sock_flow_table; | ||
| 581 | |||
| 582 | /* This structure contains an instance of an RX queue. */ | ||
| 583 | struct netdev_rx_queue { | ||
| 584 | struct rps_map *rps_map; | ||
| 585 | struct rps_dev_flow_table *rps_flow_table; | ||
| 586 | struct kobject kobj; | ||
| 587 | struct netdev_rx_queue *first; | ||
| 588 | atomic_t count; | ||
| 589 | } ____cacheline_aligned_in_smp; | ||
| 590 | #endif /* CONFIG_RPS */ | ||
| 534 | 591 | ||
| 535 | /* | 592 | /* |
| 536 | * This structure defines the management hooks for network devices. | 593 | * This structure defines the management hooks for network devices. |
| @@ -630,6 +687,9 @@ struct netdev_queue { | |||
| 630 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); | 687 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); |
| 631 | * int (*ndo_get_vf_config)(struct net_device *dev, | 688 | * int (*ndo_get_vf_config)(struct net_device *dev, |
| 632 | * int vf, struct ifla_vf_info *ivf); | 689 | * int vf, struct ifla_vf_info *ivf); |
| 690 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | ||
| 691 | * struct nlattr *port[]); | ||
| 692 | * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); | ||
| 633 | */ | 693 | */ |
| 634 | #define HAVE_NET_DEVICE_OPS | 694 | #define HAVE_NET_DEVICE_OPS |
| 635 | struct net_device_ops { | 695 | struct net_device_ops { |
| @@ -668,6 +728,7 @@ struct net_device_ops { | |||
| 668 | unsigned short vid); | 728 | unsigned short vid); |
| 669 | #ifdef CONFIG_NET_POLL_CONTROLLER | 729 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 670 | void (*ndo_poll_controller)(struct net_device *dev); | 730 | void (*ndo_poll_controller)(struct net_device *dev); |
| 731 | void (*ndo_netpoll_cleanup)(struct net_device *dev); | ||
| 671 | #endif | 732 | #endif |
| 672 | int (*ndo_set_vf_mac)(struct net_device *dev, | 733 | int (*ndo_set_vf_mac)(struct net_device *dev, |
| 673 | int queue, u8 *mac); | 734 | int queue, u8 *mac); |
| @@ -678,6 +739,11 @@ struct net_device_ops { | |||
| 678 | int (*ndo_get_vf_config)(struct net_device *dev, | 739 | int (*ndo_get_vf_config)(struct net_device *dev, |
| 679 | int vf, | 740 | int vf, |
| 680 | struct ifla_vf_info *ivf); | 741 | struct ifla_vf_info *ivf); |
| 742 | int (*ndo_set_vf_port)(struct net_device *dev, | ||
| 743 | int vf, | ||
| 744 | struct nlattr *port[]); | ||
| 745 | int (*ndo_get_vf_port)(struct net_device *dev, | ||
| 746 | int vf, struct sk_buff *skb); | ||
| 681 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 747 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
| 682 | int (*ndo_fcoe_enable)(struct net_device *dev); | 748 | int (*ndo_fcoe_enable)(struct net_device *dev); |
| 683 | int (*ndo_fcoe_disable)(struct net_device *dev); | 749 | int (*ndo_fcoe_disable)(struct net_device *dev); |
| @@ -768,6 +834,7 @@ struct net_device { | |||
| 768 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ | 834 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ |
| 769 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ | 835 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ |
| 770 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 836 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
| 837 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | ||
| 771 | 838 | ||
| 772 | /* Segmentation offload features */ | 839 | /* Segmentation offload features */ |
| 773 | #define NETIF_F_GSO_SHIFT 16 | 840 | #define NETIF_F_GSO_SHIFT 16 |
| @@ -824,7 +891,7 @@ struct net_device { | |||
| 824 | unsigned char operstate; /* RFC2863 operstate */ | 891 | unsigned char operstate; /* RFC2863 operstate */ |
| 825 | unsigned char link_mode; /* mapping policy to operstate */ | 892 | unsigned char link_mode; /* mapping policy to operstate */ |
| 826 | 893 | ||
| 827 | unsigned mtu; /* interface MTU value */ | 894 | unsigned int mtu; /* interface MTU value */ |
| 828 | unsigned short type; /* interface hardware type */ | 895 | unsigned short type; /* interface hardware type */ |
| 829 | unsigned short hard_header_len; /* hardware hdr length */ | 896 | unsigned short hard_header_len; /* hardware hdr length */ |
| 830 | 897 | ||
| @@ -844,12 +911,10 @@ struct net_device { | |||
| 844 | unsigned char addr_len; /* hardware address length */ | 911 | unsigned char addr_len; /* hardware address length */ |
| 845 | unsigned short dev_id; /* for shared network cards */ | 912 | unsigned short dev_id; /* for shared network cards */ |
| 846 | 913 | ||
| 847 | struct netdev_hw_addr_list uc; /* Secondary unicast | ||
| 848 | mac addresses */ | ||
| 849 | int uc_promisc; | ||
| 850 | spinlock_t addr_list_lock; | 914 | spinlock_t addr_list_lock; |
| 851 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 915 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ |
| 852 | int mc_count; /* Number of installed mcasts */ | 916 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ |
| 917 | int uc_promisc; | ||
| 853 | unsigned int promiscuity; | 918 | unsigned int promiscuity; |
| 854 | unsigned int allmulti; | 919 | unsigned int allmulti; |
| 855 | 920 | ||
| @@ -882,6 +947,15 @@ struct net_device { | |||
| 882 | 947 | ||
| 883 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 948 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
| 884 | 949 | ||
| 950 | #ifdef CONFIG_RPS | ||
| 951 | struct kset *queues_kset; | ||
| 952 | |||
| 953 | struct netdev_rx_queue *_rx; | ||
| 954 | |||
| 955 | /* Number of RX queues allocated at alloc_netdev_mq() time */ | ||
| 956 | unsigned int num_rx_queues; | ||
| 957 | #endif | ||
| 958 | |||
| 885 | struct netdev_queue rx_queue; | 959 | struct netdev_queue rx_queue; |
| 886 | 960 | ||
| 887 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; | 961 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; |
| @@ -1310,19 +1384,44 @@ static inline int unregister_gifconf(unsigned int family) | |||
| 1310 | } | 1384 | } |
| 1311 | 1385 | ||
| 1312 | /* | 1386 | /* |
| 1313 | * Incoming packets are placed on per-cpu queues so that | 1387 | * Incoming packets are placed on per-cpu queues |
| 1314 | * no locking is needed. | ||
| 1315 | */ | 1388 | */ |
| 1316 | struct softnet_data { | 1389 | struct softnet_data { |
| 1317 | struct Qdisc *output_queue; | 1390 | struct Qdisc *output_queue; |
| 1318 | struct sk_buff_head input_pkt_queue; | 1391 | struct Qdisc **output_queue_tailp; |
| 1319 | struct list_head poll_list; | 1392 | struct list_head poll_list; |
| 1320 | struct sk_buff *completion_queue; | 1393 | struct sk_buff *completion_queue; |
| 1321 | 1394 | struct sk_buff_head process_queue; | |
| 1395 | |||
| 1396 | /* stats */ | ||
| 1397 | unsigned int processed; | ||
| 1398 | unsigned int time_squeeze; | ||
| 1399 | unsigned int cpu_collision; | ||
| 1400 | unsigned int received_rps; | ||
| 1401 | |||
| 1402 | #ifdef CONFIG_RPS | ||
| 1403 | struct softnet_data *rps_ipi_list; | ||
| 1404 | |||
| 1405 | /* Elements below can be accessed between CPUs for RPS */ | ||
| 1406 | struct call_single_data csd ____cacheline_aligned_in_smp; | ||
| 1407 | struct softnet_data *rps_ipi_next; | ||
| 1408 | unsigned int cpu; | ||
| 1409 | unsigned int input_queue_head; | ||
| 1410 | #endif | ||
| 1411 | unsigned dropped; | ||
| 1412 | struct sk_buff_head input_pkt_queue; | ||
| 1322 | struct napi_struct backlog; | 1413 | struct napi_struct backlog; |
| 1323 | }; | 1414 | }; |
| 1324 | 1415 | ||
| 1325 | DECLARE_PER_CPU(struct softnet_data,softnet_data); | 1416 | static inline void input_queue_head_add(struct softnet_data *sd, |
| 1417 | unsigned int len) | ||
| 1418 | { | ||
| 1419 | #ifdef CONFIG_RPS | ||
| 1420 | sd->input_queue_head += len; | ||
| 1421 | #endif | ||
| 1422 | } | ||
| 1423 | |||
| 1424 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); | ||
| 1326 | 1425 | ||
| 1327 | #define HAVE_NETIF_QUEUE | 1426 | #define HAVE_NETIF_QUEUE |
| 1328 | 1427 | ||
| @@ -1949,6 +2048,22 @@ extern struct net_device *alloc_netdev_mq(int sizeof_priv, const char *name, | |||
| 1949 | extern int register_netdev(struct net_device *dev); | 2048 | extern int register_netdev(struct net_device *dev); |
| 1950 | extern void unregister_netdev(struct net_device *dev); | 2049 | extern void unregister_netdev(struct net_device *dev); |
| 1951 | 2050 | ||
| 2051 | /* General hardware address lists handling functions */ | ||
| 2052 | extern int __hw_addr_add_multiple(struct netdev_hw_addr_list *to_list, | ||
| 2053 | struct netdev_hw_addr_list *from_list, | ||
| 2054 | int addr_len, unsigned char addr_type); | ||
| 2055 | extern void __hw_addr_del_multiple(struct netdev_hw_addr_list *to_list, | ||
| 2056 | struct netdev_hw_addr_list *from_list, | ||
| 2057 | int addr_len, unsigned char addr_type); | ||
| 2058 | extern int __hw_addr_sync(struct netdev_hw_addr_list *to_list, | ||
| 2059 | struct netdev_hw_addr_list *from_list, | ||
| 2060 | int addr_len); | ||
| 2061 | extern void __hw_addr_unsync(struct netdev_hw_addr_list *to_list, | ||
| 2062 | struct netdev_hw_addr_list *from_list, | ||
| 2063 | int addr_len); | ||
| 2064 | extern void __hw_addr_flush(struct netdev_hw_addr_list *list); | ||
| 2065 | extern void __hw_addr_init(struct netdev_hw_addr_list *list); | ||
| 2066 | |||
| 1952 | /* Functions used for device addresses handling */ | 2067 | /* Functions used for device addresses handling */ |
| 1953 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, | 2068 | extern int dev_addr_add(struct net_device *dev, unsigned char *addr, |
| 1954 | unsigned char addr_type); | 2069 | unsigned char addr_type); |
| @@ -1960,26 +2075,34 @@ extern int dev_addr_add_multiple(struct net_device *to_dev, | |||
| 1960 | extern int dev_addr_del_multiple(struct net_device *to_dev, | 2075 | extern int dev_addr_del_multiple(struct net_device *to_dev, |
| 1961 | struct net_device *from_dev, | 2076 | struct net_device *from_dev, |
| 1962 | unsigned char addr_type); | 2077 | unsigned char addr_type); |
| 2078 | extern void dev_addr_flush(struct net_device *dev); | ||
| 2079 | extern int dev_addr_init(struct net_device *dev); | ||
| 2080 | |||
| 2081 | /* Functions used for unicast addresses handling */ | ||
| 2082 | extern int dev_uc_add(struct net_device *dev, unsigned char *addr); | ||
| 2083 | extern int dev_uc_del(struct net_device *dev, unsigned char *addr); | ||
| 2084 | extern int dev_uc_sync(struct net_device *to, struct net_device *from); | ||
| 2085 | extern void dev_uc_unsync(struct net_device *to, struct net_device *from); | ||
| 2086 | extern void dev_uc_flush(struct net_device *dev); | ||
| 2087 | extern void dev_uc_init(struct net_device *dev); | ||
| 2088 | |||
| 2089 | /* Functions used for multicast addresses handling */ | ||
| 2090 | extern int dev_mc_add(struct net_device *dev, unsigned char *addr); | ||
| 2091 | extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); | ||
| 2092 | extern int dev_mc_del(struct net_device *dev, unsigned char *addr); | ||
| 2093 | extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); | ||
| 2094 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
| 2095 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
| 2096 | extern void dev_mc_flush(struct net_device *dev); | ||
| 2097 | extern void dev_mc_init(struct net_device *dev); | ||
| 1963 | 2098 | ||
| 1964 | /* Functions used for secondary unicast and multicast support */ | 2099 | /* Functions used for secondary unicast and multicast support */ |
| 1965 | extern void dev_set_rx_mode(struct net_device *dev); | 2100 | extern void dev_set_rx_mode(struct net_device *dev); |
| 1966 | extern void __dev_set_rx_mode(struct net_device *dev); | 2101 | extern void __dev_set_rx_mode(struct net_device *dev); |
| 1967 | extern int dev_unicast_delete(struct net_device *dev, void *addr); | ||
| 1968 | extern int dev_unicast_add(struct net_device *dev, void *addr); | ||
| 1969 | extern int dev_unicast_sync(struct net_device *to, struct net_device *from); | ||
| 1970 | extern void dev_unicast_unsync(struct net_device *to, struct net_device *from); | ||
| 1971 | extern int dev_mc_delete(struct net_device *dev, void *addr, int alen, int all); | ||
| 1972 | extern int dev_mc_add(struct net_device *dev, void *addr, int alen, int newonly); | ||
| 1973 | extern int dev_mc_sync(struct net_device *to, struct net_device *from); | ||
| 1974 | extern void dev_mc_unsync(struct net_device *to, struct net_device *from); | ||
| 1975 | extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *addr, int alen, int all); | ||
| 1976 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | ||
| 1977 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
| 1978 | extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | ||
| 1979 | extern int dev_set_promiscuity(struct net_device *dev, int inc); | 2102 | extern int dev_set_promiscuity(struct net_device *dev, int inc); |
| 1980 | extern int dev_set_allmulti(struct net_device *dev, int inc); | 2103 | extern int dev_set_allmulti(struct net_device *dev, int inc); |
| 1981 | extern void netdev_state_change(struct net_device *dev); | 2104 | extern void netdev_state_change(struct net_device *dev); |
| 1982 | extern void netdev_bonding_change(struct net_device *dev, | 2105 | extern int netdev_bonding_change(struct net_device *dev, |
| 1983 | unsigned long event); | 2106 | unsigned long event); |
| 1984 | extern void netdev_features_change(struct net_device *dev); | 2107 | extern void netdev_features_change(struct net_device *dev); |
| 1985 | /* Load a device via the kmod */ | 2108 | /* Load a device via the kmod */ |
| @@ -1989,6 +2112,7 @@ extern const struct net_device_stats *dev_get_stats(struct net_device *dev); | |||
| 1989 | extern void dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats); | 2112 | extern void dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats); |
| 1990 | 2113 | ||
| 1991 | extern int netdev_max_backlog; | 2114 | extern int netdev_max_backlog; |
| 2115 | extern int netdev_tstamp_prequeue; | ||
| 1992 | extern int weight_p; | 2116 | extern int weight_p; |
| 1993 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2117 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
| 1994 | extern int skb_checksum_help(struct sk_buff *skb); | 2118 | extern int skb_checksum_help(struct sk_buff *skb); |
| @@ -2049,54 +2173,14 @@ static inline void netif_set_gso_max_size(struct net_device *dev, | |||
| 2049 | dev->gso_max_size = size; | 2173 | dev->gso_max_size = size; |
| 2050 | } | 2174 | } |
| 2051 | 2175 | ||
| 2052 | static inline void skb_bond_set_mac_by_master(struct sk_buff *skb, | 2176 | extern int __skb_bond_should_drop(struct sk_buff *skb, |
| 2053 | struct net_device *master) | 2177 | struct net_device *master); |
| 2054 | { | ||
| 2055 | if (skb->pkt_type == PACKET_HOST) { | ||
| 2056 | u16 *dest = (u16 *) eth_hdr(skb)->h_dest; | ||
| 2057 | 2178 | ||
| 2058 | memcpy(dest, master->dev_addr, ETH_ALEN); | ||
| 2059 | } | ||
| 2060 | } | ||
| 2061 | |||
| 2062 | /* On bonding slaves other than the currently active slave, suppress | ||
| 2063 | * duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and | ||
| 2064 | * ARP on active-backup slaves with arp_validate enabled. | ||
| 2065 | */ | ||
| 2066 | static inline int skb_bond_should_drop(struct sk_buff *skb, | 2179 | static inline int skb_bond_should_drop(struct sk_buff *skb, |
| 2067 | struct net_device *master) | 2180 | struct net_device *master) |
| 2068 | { | 2181 | { |
| 2069 | if (master) { | 2182 | if (master) |
| 2070 | struct net_device *dev = skb->dev; | 2183 | return __skb_bond_should_drop(skb, master); |
| 2071 | |||
| 2072 | if (master->priv_flags & IFF_MASTER_ARPMON) | ||
| 2073 | dev->last_rx = jiffies; | ||
| 2074 | |||
| 2075 | if ((master->priv_flags & IFF_MASTER_ALB) && master->br_port) { | ||
| 2076 | /* Do address unmangle. The local destination address | ||
| 2077 | * will be always the one master has. Provides the right | ||
| 2078 | * functionality in a bridge. | ||
| 2079 | */ | ||
| 2080 | skb_bond_set_mac_by_master(skb, master); | ||
| 2081 | } | ||
| 2082 | |||
| 2083 | if (dev->priv_flags & IFF_SLAVE_INACTIVE) { | ||
| 2084 | if ((dev->priv_flags & IFF_SLAVE_NEEDARP) && | ||
| 2085 | skb->protocol == __cpu_to_be16(ETH_P_ARP)) | ||
| 2086 | return 0; | ||
| 2087 | |||
| 2088 | if (master->priv_flags & IFF_MASTER_ALB) { | ||
| 2089 | if (skb->pkt_type != PACKET_BROADCAST && | ||
| 2090 | skb->pkt_type != PACKET_MULTICAST) | ||
| 2091 | return 0; | ||
| 2092 | } | ||
| 2093 | if (master->priv_flags & IFF_MASTER_8023AD && | ||
| 2094 | skb->protocol == __cpu_to_be16(ETH_P_SLOW)) | ||
| 2095 | return 0; | ||
| 2096 | |||
| 2097 | return 1; | ||
| 2098 | } | ||
| 2099 | } | ||
| 2100 | return 0; | 2184 | return 0; |
| 2101 | } | 2185 | } |
| 2102 | 2186 | ||
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index a5a63e41b8af..48767cd16453 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
| @@ -16,6 +16,7 @@ header-y += xt_RATEEST.h | |||
| 16 | header-y += xt_SECMARK.h | 16 | header-y += xt_SECMARK.h |
| 17 | header-y += xt_TCPMSS.h | 17 | header-y += xt_TCPMSS.h |
| 18 | header-y += xt_TCPOPTSTRIP.h | 18 | header-y += xt_TCPOPTSTRIP.h |
| 19 | header-y += xt_TEE.h | ||
| 19 | header-y += xt_TPROXY.h | 20 | header-y += xt_TPROXY.h |
| 20 | header-y += xt_comment.h | 21 | header-y += xt_comment.h |
| 21 | header-y += xt_connbytes.h | 22 | header-y += xt_connbytes.h |
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index c608677dda60..14e6d32002c4 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
| @@ -113,6 +113,7 @@ struct ip_conntrack_stat { | |||
| 113 | unsigned int expect_new; | 113 | unsigned int expect_new; |
| 114 | unsigned int expect_create; | 114 | unsigned int expect_create; |
| 115 | unsigned int expect_delete; | 115 | unsigned int expect_delete; |
| 116 | unsigned int search_restart; | ||
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 118 | /* call to create an explicit dependency on nf_conntrack. */ | 119 | /* call to create an explicit dependency on nf_conntrack. */ |
diff --git a/include/linux/netfilter/nf_conntrack_tuple_common.h b/include/linux/netfilter/nf_conntrack_tuple_common.h index 8e145f0d61cb..2ea22b018a87 100644 --- a/include/linux/netfilter/nf_conntrack_tuple_common.h +++ b/include/linux/netfilter/nf_conntrack_tuple_common.h | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | #ifndef _NF_CONNTRACK_TUPLE_COMMON_H | 1 | #ifndef _NF_CONNTRACK_TUPLE_COMMON_H |
| 2 | #define _NF_CONNTRACK_TUPLE_COMMON_H | 2 | #define _NF_CONNTRACK_TUPLE_COMMON_H |
| 3 | 3 | ||
| 4 | enum ip_conntrack_dir | 4 | enum ip_conntrack_dir { |
| 5 | { | ||
| 6 | IP_CT_DIR_ORIGINAL, | 5 | IP_CT_DIR_ORIGINAL, |
| 7 | IP_CT_DIR_REPLY, | 6 | IP_CT_DIR_REPLY, |
| 8 | IP_CT_DIR_MAX | 7 | IP_CT_DIR_MAX |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 84c7c928e9eb..c2ee5d8550cf 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #ifndef _X_TABLES_H | 1 | #ifndef _X_TABLES_H |
| 2 | #define _X_TABLES_H | 2 | #define _X_TABLES_H |
| 3 | 3 | #include <linux/kernel.h> | |
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | #define XT_FUNCTION_MAXNAMELEN 30 | 6 | #define XT_FUNCTION_MAXNAMELEN 30 |
| 7 | #define XT_EXTENSION_MAXNAMELEN 29 | ||
| 7 | #define XT_TABLE_MAXNAMELEN 32 | 8 | #define XT_TABLE_MAXNAMELEN 32 |
| 8 | 9 | ||
| 9 | struct xt_entry_match { | 10 | struct xt_entry_match { |
| @@ -12,8 +13,7 @@ struct xt_entry_match { | |||
| 12 | __u16 match_size; | 13 | __u16 match_size; |
| 13 | 14 | ||
| 14 | /* Used by userspace */ | 15 | /* Used by userspace */ |
| 15 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 16 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 16 | |||
| 17 | __u8 revision; | 17 | __u8 revision; |
| 18 | } user; | 18 | } user; |
| 19 | struct { | 19 | struct { |
| @@ -36,8 +36,7 @@ struct xt_entry_target { | |||
| 36 | __u16 target_size; | 36 | __u16 target_size; |
| 37 | 37 | ||
| 38 | /* Used by userspace */ | 38 | /* Used by userspace */ |
| 39 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 39 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 40 | |||
| 41 | __u8 revision; | 40 | __u8 revision; |
| 42 | } user; | 41 | } user; |
| 43 | struct { | 42 | struct { |
| @@ -70,8 +69,7 @@ struct xt_standard_target { | |||
| 70 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision | 69 | /* The argument to IPT_SO_GET_REVISION_*. Returns highest revision |
| 71 | * kernel supports, if >= revision. */ | 70 | * kernel supports, if >= revision. */ |
| 72 | struct xt_get_revision { | 71 | struct xt_get_revision { |
| 73 | char name[XT_FUNCTION_MAXNAMELEN-1]; | 72 | char name[XT_EXTENSION_MAXNAMELEN]; |
| 74 | |||
| 75 | __u8 revision; | 73 | __u8 revision; |
| 76 | }; | 74 | }; |
| 77 | 75 | ||
| @@ -93,7 +91,7 @@ struct _xt_align { | |||
| 93 | __u64 u64; | 91 | __u64 u64; |
| 94 | }; | 92 | }; |
| 95 | 93 | ||
| 96 | #define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align)) | 94 | #define XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _xt_align)) |
| 97 | 95 | ||
| 98 | /* Standard return verdict, or do jump. */ | 96 | /* Standard return verdict, or do jump. */ |
| 99 | #define XT_STANDARD_TARGET "" | 97 | #define XT_STANDARD_TARGET "" |
| @@ -185,40 +183,53 @@ struct xt_counters_info { | |||
| 185 | #include <linux/netdevice.h> | 183 | #include <linux/netdevice.h> |
| 186 | 184 | ||
| 187 | /** | 185 | /** |
| 188 | * struct xt_match_param - parameters for match extensions' match functions | 186 | * struct xt_action_param - parameters for matches/targets |
| 189 | * | 187 | * |
| 188 | * @match: the match extension | ||
| 189 | * @target: the target extension | ||
| 190 | * @matchinfo: per-match data | ||
| 191 | * @targetinfo: per-target data | ||
| 190 | * @in: input netdevice | 192 | * @in: input netdevice |
| 191 | * @out: output netdevice | 193 | * @out: output netdevice |
| 192 | * @match: struct xt_match through which this function was invoked | ||
| 193 | * @matchinfo: per-match data | ||
| 194 | * @fragoff: packet is a fragment, this is the data offset | 194 | * @fragoff: packet is a fragment, this is the data offset |
| 195 | * @thoff: position of transport header relative to skb->data | 195 | * @thoff: position of transport header relative to skb->data |
| 196 | * @hook: hook number given packet came from | 196 | * @hook: hook number given packet came from |
| 197 | * @family: Actual NFPROTO_* through which the function is invoked | 197 | * @family: Actual NFPROTO_* through which the function is invoked |
| 198 | * (helpful when match->family == NFPROTO_UNSPEC) | 198 | * (helpful when match->family == NFPROTO_UNSPEC) |
| 199 | * | ||
| 200 | * Fields written to by extensions: | ||
| 201 | * | ||
| 199 | * @hotdrop: drop packet if we had inspection problems | 202 | * @hotdrop: drop packet if we had inspection problems |
| 203 | * Network namespace obtainable using dev_net(in/out) | ||
| 200 | */ | 204 | */ |
| 201 | struct xt_match_param { | 205 | struct xt_action_param { |
| 206 | union { | ||
| 207 | const struct xt_match *match; | ||
| 208 | const struct xt_target *target; | ||
| 209 | }; | ||
| 210 | union { | ||
| 211 | const void *matchinfo, *targinfo; | ||
| 212 | }; | ||
| 202 | const struct net_device *in, *out; | 213 | const struct net_device *in, *out; |
| 203 | const struct xt_match *match; | ||
| 204 | const void *matchinfo; | ||
| 205 | int fragoff; | 214 | int fragoff; |
| 206 | unsigned int thoff; | 215 | unsigned int thoff; |
| 207 | unsigned int hooknum; | 216 | unsigned int hooknum; |
| 208 | u_int8_t family; | 217 | u_int8_t family; |
| 209 | bool *hotdrop; | 218 | bool hotdrop; |
| 210 | }; | 219 | }; |
| 211 | 220 | ||
| 212 | /** | 221 | /** |
| 213 | * struct xt_mtchk_param - parameters for match extensions' | 222 | * struct xt_mtchk_param - parameters for match extensions' |
| 214 | * checkentry functions | 223 | * checkentry functions |
| 215 | * | 224 | * |
| 225 | * @net: network namespace through which the check was invoked | ||
| 216 | * @table: table the rule is tried to be inserted into | 226 | * @table: table the rule is tried to be inserted into |
| 217 | * @entryinfo: the family-specific rule data | 227 | * @entryinfo: the family-specific rule data |
| 218 | * (struct ipt_ip, ip6t_ip, ebt_entry) | 228 | * (struct ipt_ip, ip6t_ip, arpt_arp or (note) ebt_entry) |
| 219 | * @match: struct xt_match through which this function was invoked | 229 | * @match: struct xt_match through which this function was invoked |
| 220 | * @matchinfo: per-match data | 230 | * @matchinfo: per-match data |
| 221 | * @hook_mask: via which hooks the new rule is reachable | 231 | * @hook_mask: via which hooks the new rule is reachable |
| 232 | * Other fields as above. | ||
| 222 | */ | 233 | */ |
| 223 | struct xt_mtchk_param { | 234 | struct xt_mtchk_param { |
| 224 | struct net *net; | 235 | struct net *net; |
| @@ -230,7 +241,10 @@ struct xt_mtchk_param { | |||
| 230 | u_int8_t family; | 241 | u_int8_t family; |
| 231 | }; | 242 | }; |
| 232 | 243 | ||
| 233 | /* Match destructor parameters */ | 244 | /** |
| 245 | * struct xt_mdtor_param - match destructor parameters | ||
| 246 | * Fields as above. | ||
| 247 | */ | ||
| 234 | struct xt_mtdtor_param { | 248 | struct xt_mtdtor_param { |
| 235 | struct net *net; | 249 | struct net *net; |
| 236 | const struct xt_match *match; | 250 | const struct xt_match *match; |
| @@ -239,23 +253,6 @@ struct xt_mtdtor_param { | |||
| 239 | }; | 253 | }; |
| 240 | 254 | ||
| 241 | /** | 255 | /** |
| 242 | * struct xt_target_param - parameters for target extensions' target functions | ||
| 243 | * | ||
| 244 | * @hooknum: hook through which this target was invoked | ||
| 245 | * @target: struct xt_target through which this function was invoked | ||
| 246 | * @targinfo: per-target data | ||
| 247 | * | ||
| 248 | * Other fields see above. | ||
| 249 | */ | ||
| 250 | struct xt_target_param { | ||
| 251 | const struct net_device *in, *out; | ||
| 252 | const struct xt_target *target; | ||
| 253 | const void *targinfo; | ||
| 254 | unsigned int hooknum; | ||
| 255 | u_int8_t family; | ||
| 256 | }; | ||
| 257 | |||
| 258 | /** | ||
| 259 | * struct xt_tgchk_param - parameters for target extensions' | 256 | * struct xt_tgchk_param - parameters for target extensions' |
| 260 | * checkentry functions | 257 | * checkentry functions |
| 261 | * | 258 | * |
| @@ -285,7 +282,7 @@ struct xt_tgdtor_param { | |||
| 285 | struct xt_match { | 282 | struct xt_match { |
| 286 | struct list_head list; | 283 | struct list_head list; |
| 287 | 284 | ||
| 288 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 285 | const char name[XT_EXTENSION_MAXNAMELEN]; |
| 289 | u_int8_t revision; | 286 | u_int8_t revision; |
| 290 | 287 | ||
| 291 | /* Return true or false: return FALSE and set *hotdrop = 1 to | 288 | /* Return true or false: return FALSE and set *hotdrop = 1 to |
| @@ -294,10 +291,10 @@ struct xt_match { | |||
| 294 | non-linear skb, using skb_header_pointer and | 291 | non-linear skb, using skb_header_pointer and |
| 295 | skb_ip_make_writable. */ | 292 | skb_ip_make_writable. */ |
| 296 | bool (*match)(const struct sk_buff *skb, | 293 | bool (*match)(const struct sk_buff *skb, |
| 297 | const struct xt_match_param *); | 294 | struct xt_action_param *); |
| 298 | 295 | ||
| 299 | /* Called when user tries to insert an entry of this type. */ | 296 | /* Called when user tries to insert an entry of this type. */ |
| 300 | bool (*checkentry)(const struct xt_mtchk_param *); | 297 | int (*checkentry)(const struct xt_mtchk_param *); |
| 301 | 298 | ||
| 302 | /* Called when entry of this type deleted. */ | 299 | /* Called when entry of this type deleted. */ |
| 303 | void (*destroy)(const struct xt_mtdtor_param *); | 300 | void (*destroy)(const struct xt_mtdtor_param *); |
| @@ -309,9 +306,6 @@ struct xt_match { | |||
| 309 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ | 306 | /* Set this to THIS_MODULE if you are a module, otherwise NULL */ |
| 310 | struct module *me; | 307 | struct module *me; |
| 311 | 308 | ||
| 312 | /* Free to use by each match */ | ||
| 313 | unsigned long data; | ||
| 314 | |||
| 315 | const char *table; | 309 | const char *table; |
| 316 | unsigned int matchsize; | 310 | unsigned int matchsize; |
| 317 | #ifdef CONFIG_COMPAT | 311 | #ifdef CONFIG_COMPAT |
| @@ -327,19 +321,20 @@ struct xt_match { | |||
| 327 | struct xt_target { | 321 | struct xt_target { |
| 328 | struct list_head list; | 322 | struct list_head list; |
| 329 | 323 | ||
| 330 | const char name[XT_FUNCTION_MAXNAMELEN-1]; | 324 | const char name[XT_EXTENSION_MAXNAMELEN]; |
| 325 | u_int8_t revision; | ||
| 331 | 326 | ||
| 332 | /* Returns verdict. Argument order changed since 2.6.9, as this | 327 | /* Returns verdict. Argument order changed since 2.6.9, as this |
| 333 | must now handle non-linear skbs, using skb_copy_bits and | 328 | must now handle non-linear skbs, using skb_copy_bits and |
| 334 | skb_ip_make_writable. */ | 329 | skb_ip_make_writable. */ |
| 335 | unsigned int (*target)(struct sk_buff *skb, | 330 | unsigned int (*target)(struct sk_buff *skb, |
| 336 | const struct xt_target_param *); | 331 | const struct xt_action_param *); |
| 337 | 332 | ||
| 338 | /* Called when user tries to insert an entry of this type: | 333 | /* Called when user tries to insert an entry of this type: |
| 339 | hook_mask is a bitmask of hooks from which it can be | 334 | hook_mask is a bitmask of hooks from which it can be |
| 340 | called. */ | 335 | called. */ |
| 341 | /* Should return true or false. */ | 336 | /* Should return true or false, or an error code (-Exxxx). */ |
| 342 | bool (*checkentry)(const struct xt_tgchk_param *); | 337 | int (*checkentry)(const struct xt_tgchk_param *); |
| 343 | 338 | ||
| 344 | /* Called when entry of this type deleted. */ | 339 | /* Called when entry of this type deleted. */ |
| 345 | void (*destroy)(const struct xt_tgdtor_param *); | 340 | void (*destroy)(const struct xt_tgdtor_param *); |
| @@ -360,7 +355,6 @@ struct xt_target { | |||
| 360 | unsigned short proto; | 355 | unsigned short proto; |
| 361 | 356 | ||
| 362 | unsigned short family; | 357 | unsigned short family; |
| 363 | u_int8_t revision; | ||
| 364 | }; | 358 | }; |
| 365 | 359 | ||
| 366 | /* Furniture shopping... */ | 360 | /* Furniture shopping... */ |
| @@ -398,6 +392,13 @@ struct xt_table_info { | |||
| 398 | unsigned int hook_entry[NF_INET_NUMHOOKS]; | 392 | unsigned int hook_entry[NF_INET_NUMHOOKS]; |
| 399 | unsigned int underflow[NF_INET_NUMHOOKS]; | 393 | unsigned int underflow[NF_INET_NUMHOOKS]; |
| 400 | 394 | ||
| 395 | /* | ||
| 396 | * Number of user chains. Since tables cannot have loops, at most | ||
| 397 | * @stacksize jumps (number of user chains) can possibly be made. | ||
| 398 | */ | ||
| 399 | unsigned int stacksize; | ||
| 400 | unsigned int *stackptr; | ||
| 401 | void ***jumpstack; | ||
| 401 | /* ipt_entry tables: one per CPU */ | 402 | /* ipt_entry tables: one per CPU */ |
| 402 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ | 403 | /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */ |
| 403 | void *entries[1]; | 404 | void *entries[1]; |
| @@ -433,6 +434,8 @@ extern struct xt_table_info *xt_replace_table(struct xt_table *table, | |||
| 433 | 434 | ||
| 434 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); | 435 | extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision); |
| 435 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); | 436 | extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision); |
| 437 | extern struct xt_match *xt_request_find_match(u8 af, const char *name, | ||
| 438 | u8 revision); | ||
| 436 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, | 439 | extern struct xt_target *xt_request_find_target(u8 af, const char *name, |
| 437 | u8 revision); | 440 | u8 revision); |
| 438 | extern int xt_find_revision(u8 af, const char *name, u8 revision, | 441 | extern int xt_find_revision(u8 af, const char *name, u8 revision, |
| @@ -598,7 +601,7 @@ struct _compat_xt_align { | |||
| 598 | compat_u64 u64; | 601 | compat_u64 u64; |
| 599 | }; | 602 | }; |
| 600 | 603 | ||
| 601 | #define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align)) | 604 | #define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align)) |
| 602 | 605 | ||
| 603 | extern void xt_compat_lock(u_int8_t af); | 606 | extern void xt_compat_lock(u_int8_t af); |
| 604 | extern void xt_compat_unlock(u_int8_t af); | 607 | extern void xt_compat_unlock(u_int8_t af); |
diff --git a/include/linux/netfilter/xt_CONNMARK.h b/include/linux/netfilter/xt_CONNMARK.h index 0a8545866752..2f2e48ec8023 100644 --- a/include/linux/netfilter/xt_CONNMARK.h +++ b/include/linux/netfilter/xt_CONNMARK.h | |||
| @@ -1,26 +1,6 @@ | |||
| 1 | #ifndef _XT_CONNMARK_H_target | 1 | #ifndef _XT_CONNMARK_H_target |
| 2 | #define _XT_CONNMARK_H_target | 2 | #define _XT_CONNMARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/netfilter/xt_connmark.h> |
| 5 | |||
| 6 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | ||
| 7 | * by Henrik Nordstrom <hno@marasystems.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | */ | ||
| 14 | |||
| 15 | enum { | ||
| 16 | XT_CONNMARK_SET = 0, | ||
| 17 | XT_CONNMARK_SAVE, | ||
| 18 | XT_CONNMARK_RESTORE | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct xt_connmark_tginfo1 { | ||
| 22 | __u32 ctmark, ctmask, nfmask; | ||
| 23 | __u8 mode; | ||
| 24 | }; | ||
| 25 | 5 | ||
| 26 | #endif /*_XT_CONNMARK_H_target*/ | 6 | #endif /*_XT_CONNMARK_H_target*/ |
diff --git a/include/linux/netfilter/xt_MARK.h b/include/linux/netfilter/xt_MARK.h index bc9561bdef79..41c456deba22 100644 --- a/include/linux/netfilter/xt_MARK.h +++ b/include/linux/netfilter/xt_MARK.h | |||
| @@ -1,10 +1,6 @@ | |||
| 1 | #ifndef _XT_MARK_H_target | 1 | #ifndef _XT_MARK_H_target |
| 2 | #define _XT_MARK_H_target | 2 | #define _XT_MARK_H_target |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/netfilter/xt_mark.h> |
| 5 | |||
| 6 | struct xt_mark_tginfo2 { | ||
| 7 | __u32 mark, mask; | ||
| 8 | }; | ||
| 9 | 5 | ||
| 10 | #endif /*_XT_MARK_H_target */ | 6 | #endif /*_XT_MARK_H_target */ |
diff --git a/include/linux/netfilter/xt_TEE.h b/include/linux/netfilter/xt_TEE.h new file mode 100644 index 000000000000..5c21d5c829af --- /dev/null +++ b/include/linux/netfilter/xt_TEE.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef _XT_TEE_TARGET_H | ||
| 2 | #define _XT_TEE_TARGET_H | ||
| 3 | |||
| 4 | struct xt_tee_tginfo { | ||
| 5 | union nf_inet_addr gw; | ||
| 6 | char oif[16]; | ||
| 7 | |||
| 8 | /* used internally by the kernel */ | ||
| 9 | struct xt_tee_priv *priv __attribute__((aligned(8))); | ||
| 10 | }; | ||
| 11 | |||
| 12 | #endif /* _XT_TEE_TARGET_H */ | ||
diff --git a/include/linux/netfilter/xt_connmark.h b/include/linux/netfilter/xt_connmark.h index 619e47cde01a..efc17a8305fb 100644 --- a/include/linux/netfilter/xt_connmark.h +++ b/include/linux/netfilter/xt_connmark.h | |||
| @@ -12,6 +12,17 @@ | |||
| 12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | enum { | ||
| 16 | XT_CONNMARK_SET = 0, | ||
| 17 | XT_CONNMARK_SAVE, | ||
| 18 | XT_CONNMARK_RESTORE | ||
| 19 | }; | ||
| 20 | |||
| 21 | struct xt_connmark_tginfo1 { | ||
| 22 | __u32 ctmark, ctmask, nfmask; | ||
| 23 | __u8 mode; | ||
| 24 | }; | ||
| 25 | |||
| 15 | struct xt_connmark_mtinfo1 { | 26 | struct xt_connmark_mtinfo1 { |
| 16 | __u32 mark, mask; | 27 | __u32 mark, mask; |
| 17 | __u8 invert; | 28 | __u8 invert; |
diff --git a/include/linux/netfilter/xt_mark.h b/include/linux/netfilter/xt_mark.h index 6607c8f38ea5..ecadc40d5cde 100644 --- a/include/linux/netfilter/xt_mark.h +++ b/include/linux/netfilter/xt_mark.h | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | 5 | ||
| 6 | struct xt_mark_tginfo2 { | ||
| 7 | __u32 mark, mask; | ||
| 8 | }; | ||
| 9 | |||
| 6 | struct xt_mark_mtinfo1 { | 10 | struct xt_mark_mtinfo1 { |
| 7 | __u32 mark, mask; | 11 | __u32 mark, mask; |
| 8 | __u8 invert; | 12 | __u8 invert; |
diff --git a/include/linux/netfilter/xt_recent.h b/include/linux/netfilter/xt_recent.h index d2c276609925..83318e01425e 100644 --- a/include/linux/netfilter/xt_recent.h +++ b/include/linux/netfilter/xt_recent.h | |||
| @@ -9,6 +9,7 @@ enum { | |||
| 9 | XT_RECENT_UPDATE = 1 << 2, | 9 | XT_RECENT_UPDATE = 1 << 2, |
| 10 | XT_RECENT_REMOVE = 1 << 3, | 10 | XT_RECENT_REMOVE = 1 << 3, |
| 11 | XT_RECENT_TTL = 1 << 4, | 11 | XT_RECENT_TTL = 1 << 4, |
| 12 | XT_RECENT_REAP = 1 << 5, | ||
| 12 | 13 | ||
| 13 | XT_RECENT_SOURCE = 0, | 14 | XT_RECENT_SOURCE = 0, |
| 14 | XT_RECENT_DEST = 1, | 15 | XT_RECENT_DEST = 1, |
| @@ -16,6 +17,12 @@ enum { | |||
| 16 | XT_RECENT_NAME_LEN = 200, | 17 | XT_RECENT_NAME_LEN = 200, |
| 17 | }; | 18 | }; |
| 18 | 19 | ||
| 20 | /* Only allowed with --rcheck and --update */ | ||
| 21 | #define XT_RECENT_MODIFIERS (XT_RECENT_TTL|XT_RECENT_REAP) | ||
| 22 | |||
| 23 | #define XT_RECENT_VALID_FLAGS (XT_RECENT_CHECK|XT_RECENT_SET|XT_RECENT_UPDATE|\ | ||
| 24 | XT_RECENT_REMOVE|XT_RECENT_TTL|XT_RECENT_REAP) | ||
| 25 | |||
| 19 | struct xt_recent_mtinfo { | 26 | struct xt_recent_mtinfo { |
| 20 | __u32 seconds; | 27 | __u32 seconds; |
| 21 | __u32 hit_count; | 28 | __u32 hit_count; |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index f8105e54716a..0ddd161f3b06 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
| @@ -41,10 +41,10 @@ enum nf_br_hook_priorities { | |||
| 41 | 41 | ||
| 42 | #define BRNF_PKT_TYPE 0x01 | 42 | #define BRNF_PKT_TYPE 0x01 |
| 43 | #define BRNF_BRIDGED_DNAT 0x02 | 43 | #define BRNF_BRIDGED_DNAT 0x02 |
| 44 | #define BRNF_DONT_TAKE_PARENT 0x04 | 44 | #define BRNF_BRIDGED 0x04 |
| 45 | #define BRNF_BRIDGED 0x08 | 45 | #define BRNF_NF_BRIDGE_PREROUTING 0x08 |
| 46 | #define BRNF_NF_BRIDGE_PREROUTING 0x10 | 46 | #define BRNF_8021Q 0x10 |
| 47 | 47 | #define BRNF_PPPoE 0x20 | |
| 48 | 48 | ||
| 49 | /* Only used in br_forward.c */ | 49 | /* Only used in br_forward.c */ |
| 50 | extern int nf_bridge_copy_header(struct sk_buff *skb); | 50 | extern int nf_bridge_copy_header(struct sk_buff *skb); |
| @@ -68,6 +68,27 @@ static inline unsigned int nf_bridge_encap_header_len(const struct sk_buff *skb) | |||
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | static inline unsigned int nf_bridge_mtu_reduction(const struct sk_buff *skb) | ||
| 72 | { | ||
| 73 | if (unlikely(skb->nf_bridge->mask & BRNF_PPPoE)) | ||
| 74 | return PPPOE_SES_HLEN; | ||
| 75 | return 0; | ||
| 76 | } | ||
| 77 | |||
| 78 | extern int br_handle_frame_finish(struct sk_buff *skb); | ||
| 79 | /* Only used in br_device.c */ | ||
| 80 | static inline int br_nf_pre_routing_finish_bridge_slow(struct sk_buff *skb) | ||
| 81 | { | ||
| 82 | struct nf_bridge_info *nf_bridge = skb->nf_bridge; | ||
| 83 | |||
| 84 | skb_pull(skb, ETH_HLEN); | ||
| 85 | nf_bridge->mask ^= BRNF_BRIDGED_DNAT; | ||
| 86 | skb_copy_to_linear_data_offset(skb, -(ETH_HLEN-ETH_ALEN), | ||
| 87 | skb->nf_bridge->data, ETH_HLEN-ETH_ALEN); | ||
| 88 | skb->dev = nf_bridge->physindev; | ||
| 89 | return br_handle_frame_finish(skb); | ||
| 90 | } | ||
| 91 | |||
| 71 | /* This is called by the IP fragmenting code and it ensures there is | 92 | /* This is called by the IP fragmenting code and it ensures there is |
| 72 | * enough room for the encapsulating header (if there is one). */ | 93 | * enough room for the encapsulating header (if there is one). */ |
| 73 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) | 94 | static inline unsigned int nf_bridge_pad(const struct sk_buff *skb) |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index e5ba03d783c6..18442ff19c07 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -316,10 +316,6 @@ extern int ip6t_ext_hdr(u8 nexthdr); | |||
| 316 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, | 316 | extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, |
| 317 | int target, unsigned short *fragoff); | 317 | int target, unsigned short *fragoff); |
| 318 | 318 | ||
| 319 | extern int ip6_masked_addrcmp(const struct in6_addr *addr1, | ||
| 320 | const struct in6_addr *mask, | ||
| 321 | const struct in6_addr *addr2); | ||
| 322 | |||
| 323 | #define IP6T_ALIGN(s) XT_ALIGN(s) | 319 | #define IP6T_ALIGN(s) XT_ALIGN(s) |
| 324 | 320 | ||
| 325 | #ifdef CONFIG_COMPAT | 321 | #ifdef CONFIG_COMPAT |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index a765ea898549..e9e231215865 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | struct netpoll { | 15 | struct netpoll { |
| 16 | struct net_device *dev; | 16 | struct net_device *dev; |
| 17 | struct net_device *real_dev; | ||
| 17 | char dev_name[IFNAMSIZ]; | 18 | char dev_name[IFNAMSIZ]; |
| 18 | const char *name; | 19 | const char *name; |
| 19 | void (*rx_hook)(struct netpoll *, int, char *, int); | 20 | void (*rx_hook)(struct netpoll *, int, char *, int); |
| @@ -36,8 +37,11 @@ struct netpoll_info { | |||
| 36 | struct sk_buff_head txq; | 37 | struct sk_buff_head txq; |
| 37 | 38 | ||
| 38 | struct delayed_work tx_work; | 39 | struct delayed_work tx_work; |
| 40 | |||
| 41 | struct netpoll *netpoll; | ||
| 39 | }; | 42 | }; |
| 40 | 43 | ||
| 44 | void netpoll_poll_dev(struct net_device *dev); | ||
| 41 | void netpoll_poll(struct netpoll *np); | 45 | void netpoll_poll(struct netpoll *np); |
| 42 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 46 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
| 43 | void netpoll_print_options(struct netpoll *np); | 47 | void netpoll_print_options(struct netpoll *np); |
| @@ -47,22 +51,23 @@ int netpoll_trap(void); | |||
| 47 | void netpoll_set_trap(int trap); | 51 | void netpoll_set_trap(int trap); |
| 48 | void netpoll_cleanup(struct netpoll *np); | 52 | void netpoll_cleanup(struct netpoll *np); |
| 49 | int __netpoll_rx(struct sk_buff *skb); | 53 | int __netpoll_rx(struct sk_buff *skb); |
| 54 | void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb); | ||
| 50 | 55 | ||
| 51 | 56 | ||
| 52 | #ifdef CONFIG_NETPOLL | 57 | #ifdef CONFIG_NETPOLL |
| 53 | static inline int netpoll_rx(struct sk_buff *skb) | 58 | static inline bool netpoll_rx(struct sk_buff *skb) |
| 54 | { | 59 | { |
| 55 | struct netpoll_info *npinfo = skb->dev->npinfo; | 60 | struct netpoll_info *npinfo = skb->dev->npinfo; |
| 56 | unsigned long flags; | 61 | unsigned long flags; |
| 57 | int ret = 0; | 62 | bool ret = false; |
| 58 | 63 | ||
| 59 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 64 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) |
| 60 | return 0; | 65 | return false; |
| 61 | 66 | ||
| 62 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 67 | spin_lock_irqsave(&npinfo->rx_lock, flags); |
| 63 | /* check rx_flags again with the lock held */ | 68 | /* check rx_flags again with the lock held */ |
| 64 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 69 | if (npinfo->rx_flags && __netpoll_rx(skb)) |
| 65 | ret = 1; | 70 | ret = true; |
| 66 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 71 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); |
| 67 | 72 | ||
| 68 | return ret; | 73 | return ret; |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 28ba20fda3e2..b7c77f9712f4 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -52,6 +52,8 @@ | |||
| 52 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, | 52 | * %NL80211_ATTR_WIPHY_CHANNEL_TYPE, %NL80211_ATTR_WIPHY_RETRY_SHORT, |
| 53 | * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, | 53 | * %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, |
| 54 | * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. | 54 | * and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD. |
| 55 | * However, for setting the channel, see %NL80211_CMD_SET_CHANNEL | ||
| 56 | * instead, the support here is for backward compatibility only. | ||
| 55 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request | 57 | * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request |
| 56 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and | 58 | * or rename notification. Has attributes %NL80211_ATTR_WIPHY and |
| 57 | * %NL80211_ATTR_WIPHY_NAME. | 59 | * %NL80211_ATTR_WIPHY_NAME. |
| @@ -323,6 +325,21 @@ | |||
| 323 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the | 325 | * the TX command and %NL80211_ATTR_FRAME includes the contents of the |
| 324 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged | 326 | * frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged |
| 325 | * the frame. | 327 | * the frame. |
| 328 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command | ||
| 329 | * is used to configure connection quality monitoring notification trigger | ||
| 330 | * levels. | ||
| 331 | * @NL80211_CMD_NOTIFY_CQM: Connection quality monitor notification. This | ||
| 332 | * command is used as an event to indicate the that a trigger level was | ||
| 333 | * reached. | ||
| 334 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ | ||
| 335 | * and %NL80211_ATTR_WIPHY_CHANNEL_TYPE) the given interface (identifed | ||
| 336 | * by %NL80211_ATTR_IFINDEX) shall operate on. | ||
| 337 | * In case multiple channels are supported by the device, the mechanism | ||
| 338 | * with which it switches channels is implementation-defined. | ||
| 339 | * When a monitor interface is given, it can only switch channel while | ||
| 340 | * no other interfaces are operating to avoid disturbing the operation | ||
| 341 | * of any other interfaces, and other interfaces will again take | ||
| 342 | * precedence when they are used. | ||
| 326 | * | 343 | * |
| 327 | * @NL80211_CMD_MAX: highest used command number | 344 | * @NL80211_CMD_MAX: highest used command number |
| 328 | * @__NL80211_CMD_AFTER_LAST: internal use | 345 | * @__NL80211_CMD_AFTER_LAST: internal use |
| @@ -419,6 +436,11 @@ enum nl80211_commands { | |||
| 419 | NL80211_CMD_SET_POWER_SAVE, | 436 | NL80211_CMD_SET_POWER_SAVE, |
| 420 | NL80211_CMD_GET_POWER_SAVE, | 437 | NL80211_CMD_GET_POWER_SAVE, |
| 421 | 438 | ||
| 439 | NL80211_CMD_SET_CQM, | ||
| 440 | NL80211_CMD_NOTIFY_CQM, | ||
| 441 | |||
| 442 | NL80211_CMD_SET_CHANNEL, | ||
| 443 | |||
| 422 | /* add new commands above here */ | 444 | /* add new commands above here */ |
| 423 | 445 | ||
| 424 | /* used to define NL80211_CMD_MAX below */ | 446 | /* used to define NL80211_CMD_MAX below */ |
| @@ -691,6 +713,18 @@ enum nl80211_commands { | |||
| 691 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 713 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
| 692 | * acknowledged by the recipient. | 714 | * acknowledged by the recipient. |
| 693 | * | 715 | * |
| 716 | * @NL80211_ATTR_CQM: connection quality monitor configuration in a | ||
| 717 | * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. | ||
| 718 | * | ||
| 719 | * @NL80211_ATTR_LOCAL_STATE_CHANGE: Flag attribute to indicate that a command | ||
| 720 | * is requesting a local authentication/association state change without | ||
| 721 | * invoking actual management frame exchange. This can be used with | ||
| 722 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_DEAUTHENTICATE, | ||
| 723 | * NL80211_CMD_DISASSOCIATE. | ||
| 724 | * | ||
| 725 | * @NL80211_ATTR_AP_ISOLATE: (AP mode) Do not forward traffic between stations | ||
| 726 | * connected to this BSS. | ||
| 727 | * | ||
| 694 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 728 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 695 | * @__NL80211_ATTR_AFTER_LAST: internal use | 729 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 696 | */ | 730 | */ |
| @@ -842,6 +876,12 @@ enum nl80211_attrs { | |||
| 842 | 876 | ||
| 843 | NL80211_ATTR_PS_STATE, | 877 | NL80211_ATTR_PS_STATE, |
| 844 | 878 | ||
| 879 | NL80211_ATTR_CQM, | ||
| 880 | |||
| 881 | NL80211_ATTR_LOCAL_STATE_CHANGE, | ||
| 882 | |||
| 883 | NL80211_ATTR_AP_ISOLATE, | ||
| 884 | |||
| 845 | /* add attributes here, update the policy in nl80211.c */ | 885 | /* add attributes here, update the policy in nl80211.c */ |
| 846 | 886 | ||
| 847 | __NL80211_ATTR_AFTER_LAST, | 887 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1583,4 +1623,40 @@ enum nl80211_ps_state { | |||
| 1583 | NL80211_PS_ENABLED, | 1623 | NL80211_PS_ENABLED, |
| 1584 | }; | 1624 | }; |
| 1585 | 1625 | ||
| 1626 | /** | ||
| 1627 | * enum nl80211_attr_cqm - connection quality monitor attributes | ||
| 1628 | * @__NL80211_ATTR_CQM_INVALID: invalid | ||
| 1629 | * @NL80211_ATTR_CQM_RSSI_THOLD: RSSI threshold in dBm. This value specifies | ||
| 1630 | * the threshold for the RSSI level at which an event will be sent. Zero | ||
| 1631 | * to disable. | ||
| 1632 | * @NL80211_ATTR_CQM_RSSI_HYST: RSSI hysteresis in dBm. This value specifies | ||
| 1633 | * the minimum amount the RSSI level must change after an event before a | ||
| 1634 | * new event may be issued (to reduce effects of RSSI oscillation). | ||
| 1635 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | ||
| 1636 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | ||
| 1637 | * @NL80211_ATTR_CQM_MAX: highest key attribute | ||
| 1638 | */ | ||
| 1639 | enum nl80211_attr_cqm { | ||
| 1640 | __NL80211_ATTR_CQM_INVALID, | ||
| 1641 | NL80211_ATTR_CQM_RSSI_THOLD, | ||
| 1642 | NL80211_ATTR_CQM_RSSI_HYST, | ||
| 1643 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | ||
| 1644 | |||
| 1645 | /* keep last */ | ||
| 1646 | __NL80211_ATTR_CQM_AFTER_LAST, | ||
| 1647 | NL80211_ATTR_CQM_MAX = __NL80211_ATTR_CQM_AFTER_LAST - 1 | ||
| 1648 | }; | ||
| 1649 | |||
| 1650 | /** | ||
| 1651 | * enum nl80211_cqm_rssi_threshold_event - RSSI threshold event | ||
| 1652 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW - The RSSI level is lower than the | ||
| 1653 | * configured threshold | ||
| 1654 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH - The RSSI is higher than the | ||
| 1655 | * configured threshold | ||
| 1656 | */ | ||
| 1657 | enum nl80211_cqm_rssi_threshold_event { | ||
| 1658 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | ||
| 1659 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | ||
| 1660 | }; | ||
| 1661 | |||
| 1586 | #endif /* __LINUX_NL80211_H */ | 1662 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index fee6c2f68075..7c3609622334 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,10 +202,11 @@ 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 |
| 209 | #define NETDEV_BONDING_DESLAVE 0x0012 | ||
| 206 | 210 | ||
| 207 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 211 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
| 208 | #define SYS_RESTART SYS_DOWN | 212 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index c8f302991b66..c4c3d68be19a 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -442,7 +442,10 @@ | |||
| 442 | #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Lnk Autonomous Bandwidth Interrupt Enable */ | 442 | #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Lnk Autonomous Bandwidth Interrupt Enable */ |
| 443 | #define PCI_EXP_LNKSTA 18 /* Link Status */ | 443 | #define PCI_EXP_LNKSTA 18 /* Link Status */ |
| 444 | #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ | 444 | #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ |
| 445 | #define PCI_EXP_LNKSTA_CLS_2_5GB 0x01 /* Current Link Speed 2.5GT/s */ | ||
| 446 | #define PCI_EXP_LNKSTA_CLS_5_0GB 0x02 /* Current Link Speed 5.0GT/s */ | ||
| 445 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Nogotiated Link Width */ | 447 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Nogotiated Link Width */ |
| 448 | #define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ | ||
| 446 | #define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ | 449 | #define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ |
| 447 | #define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ | 450 | #define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ |
| 448 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ | 451 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ |
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..4ec3b38ce9c5 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h | |||
| @@ -428,5 +428,47 @@ 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_rcu_bh - iterate over rcu list of given type | ||
| 433 | * @tpos: the type * to use as a loop cursor. | ||
| 434 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
| 435 | * @head: the head for your list. | ||
| 436 | * @member: the name of the hlist_node within the struct. | ||
| 437 | * | ||
| 438 | * This list-traversal primitive may safely run concurrently with | ||
| 439 | * the _rcu list-mutation primitives such as hlist_add_head_rcu() | ||
| 440 | * as long as the traversal is guarded by rcu_read_lock(). | ||
| 441 | */ | ||
| 442 | #define hlist_for_each_entry_rcu_bh(tpos, pos, head, member) \ | ||
| 443 | for (pos = rcu_dereference_bh((head)->first); \ | ||
| 444 | pos && ({ prefetch(pos->next); 1; }) && \ | ||
| 445 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | ||
| 446 | pos = rcu_dereference_bh(pos->next)) | ||
| 447 | |||
| 448 | /** | ||
| 449 | * hlist_for_each_entry_continue_rcu - iterate over a hlist continuing after current point | ||
| 450 | * @tpos: the type * to use as a loop cursor. | ||
| 451 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
| 452 | * @member: the name of the hlist_node within the struct. | ||
| 453 | */ | ||
| 454 | #define hlist_for_each_entry_continue_rcu(tpos, pos, member) \ | ||
| 455 | for (pos = rcu_dereference((pos)->next); \ | ||
| 456 | pos && ({ prefetch(pos->next); 1; }) && \ | ||
| 457 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | ||
| 458 | pos = rcu_dereference(pos->next)) | ||
| 459 | |||
| 460 | /** | ||
| 461 | * hlist_for_each_entry_continue_rcu_bh - iterate over a hlist continuing after current point | ||
| 462 | * @tpos: the type * to use as a loop cursor. | ||
| 463 | * @pos: the &struct hlist_node to use as a loop cursor. | ||
| 464 | * @member: the name of the hlist_node within the struct. | ||
| 465 | */ | ||
| 466 | #define hlist_for_each_entry_continue_rcu_bh(tpos, pos, member) \ | ||
| 467 | for (pos = rcu_dereference_bh((pos)->next); \ | ||
| 468 | pos && ({ prefetch(pos->next); 1; }) && \ | ||
| 469 | ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1; }); \ | ||
| 470 | pos = rcu_dereference_bh(pos->next)) | ||
| 471 | |||
| 472 | |||
| 431 | #endif /* __KERNEL__ */ | 473 | #endif /* __KERNEL__ */ |
| 432 | #endif | 474 | #endif |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index d1c7c90e9cd4..fbc8cb0d48c3 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -7,6 +7,13 @@ | |||
| 7 | #include <linux/if_addr.h> | 7 | #include <linux/if_addr.h> |
| 8 | #include <linux/neighbour.h> | 8 | #include <linux/neighbour.h> |
| 9 | 9 | ||
| 10 | /* rtnetlink families. Values up to 127 are reserved for real address | ||
| 11 | * families, values above 128 may be used arbitrarily. | ||
| 12 | */ | ||
| 13 | #define RTNL_FAMILY_IPMR 128 | ||
| 14 | #define RTNL_FAMILY_IP6MR 129 | ||
| 15 | #define RTNL_FAMILY_MAX 129 | ||
| 16 | |||
| 10 | /**** | 17 | /**** |
| 11 | * Routing/neighbour discovery messages. | 18 | * Routing/neighbour discovery messages. |
| 12 | ****/ | 19 | ****/ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 124f90cd5a38..7cdfb4d52847 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -187,7 +187,6 @@ union skb_shared_tx { | |||
| 187 | * the end of the header data, ie. at skb->end. | 187 | * the end of the header data, ie. at skb->end. |
| 188 | */ | 188 | */ |
| 189 | struct skb_shared_info { | 189 | struct skb_shared_info { |
| 190 | atomic_t dataref; | ||
| 191 | unsigned short nr_frags; | 190 | unsigned short nr_frags; |
| 192 | unsigned short gso_size; | 191 | unsigned short gso_size; |
| 193 | /* Warning: this field is not always filled in (UFO)! */ | 192 | /* Warning: this field is not always filled in (UFO)! */ |
| @@ -197,6 +196,12 @@ struct skb_shared_info { | |||
| 197 | union skb_shared_tx tx_flags; | 196 | union skb_shared_tx tx_flags; |
| 198 | struct sk_buff *frag_list; | 197 | struct sk_buff *frag_list; |
| 199 | struct skb_shared_hwtstamps hwtstamps; | 198 | struct skb_shared_hwtstamps hwtstamps; |
| 199 | |||
| 200 | /* | ||
| 201 | * Warning : all fields before dataref are cleared in __alloc_skb() | ||
| 202 | */ | ||
| 203 | atomic_t dataref; | ||
| 204 | |||
| 200 | skb_frag_t frags[MAX_SKB_FRAGS]; | 205 | skb_frag_t frags[MAX_SKB_FRAGS]; |
| 201 | /* Intermediate layers must ensure that destructor_arg | 206 | /* Intermediate layers must ensure that destructor_arg |
| 202 | * remains valid until skb destructor */ | 207 | * remains valid until skb destructor */ |
| @@ -259,7 +264,7 @@ typedef unsigned char *sk_buff_data_t; | |||
| 259 | * @transport_header: Transport layer header | 264 | * @transport_header: Transport layer header |
| 260 | * @network_header: Network layer header | 265 | * @network_header: Network layer header |
| 261 | * @mac_header: Link layer header | 266 | * @mac_header: Link layer header |
| 262 | * @_skb_dst: destination entry | 267 | * @_skb_refdst: destination entry (with norefcount bit) |
| 263 | * @sp: the security path, used for xfrm | 268 | * @sp: the security path, used for xfrm |
| 264 | * @cb: Control buffer. Free for use by every layer. Put private vars here | 269 | * @cb: Control buffer. Free for use by every layer. Put private vars here |
| 265 | * @len: Length of actual data | 270 | * @len: Length of actual data |
| @@ -294,6 +299,7 @@ typedef unsigned char *sk_buff_data_t; | |||
| 294 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 299 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
| 295 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 300 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
| 296 | * @skb_iif: ifindex of device we arrived on | 301 | * @skb_iif: ifindex of device we arrived on |
| 302 | * @rxhash: the packet hash computed on receive | ||
| 297 | * @queue_mapping: Queue mapping for multiqueue devices | 303 | * @queue_mapping: Queue mapping for multiqueue devices |
| 298 | * @tc_index: Traffic control index | 304 | * @tc_index: Traffic control index |
| 299 | * @tc_verd: traffic control verdict | 305 | * @tc_verd: traffic control verdict |
| @@ -322,7 +328,7 @@ struct sk_buff { | |||
| 322 | */ | 328 | */ |
| 323 | char cb[48] __aligned(8); | 329 | char cb[48] __aligned(8); |
| 324 | 330 | ||
| 325 | unsigned long _skb_dst; | 331 | unsigned long _skb_refdst; |
| 326 | #ifdef CONFIG_XFRM | 332 | #ifdef CONFIG_XFRM |
| 327 | struct sec_path *sp; | 333 | struct sec_path *sp; |
| 328 | #endif | 334 | #endif |
| @@ -369,6 +375,8 @@ struct sk_buff { | |||
| 369 | #endif | 375 | #endif |
| 370 | #endif | 376 | #endif |
| 371 | 377 | ||
| 378 | __u32 rxhash; | ||
| 379 | |||
| 372 | kmemcheck_bitfield_begin(flags2); | 380 | kmemcheck_bitfield_begin(flags2); |
| 373 | __u16 queue_mapping:16; | 381 | __u16 queue_mapping:16; |
| 374 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 382 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
| @@ -411,14 +419,64 @@ struct sk_buff { | |||
| 411 | 419 | ||
| 412 | #include <asm/system.h> | 420 | #include <asm/system.h> |
| 413 | 421 | ||
| 422 | /* | ||
| 423 | * skb might have a dst pointer attached, refcounted or not. | ||
| 424 | * _skb_refdst low order bit is set if refcount was _not_ taken | ||
| 425 | */ | ||
| 426 | #define SKB_DST_NOREF 1UL | ||
| 427 | #define SKB_DST_PTRMASK ~(SKB_DST_NOREF) | ||
| 428 | |||
| 429 | /** | ||
| 430 | * skb_dst - returns skb dst_entry | ||
| 431 | * @skb: buffer | ||
| 432 | * | ||
| 433 | * Returns skb dst_entry, regardless of reference taken or not. | ||
| 434 | */ | ||
| 414 | static inline struct dst_entry *skb_dst(const struct sk_buff *skb) | 435 | static inline struct dst_entry *skb_dst(const struct sk_buff *skb) |
| 415 | { | 436 | { |
| 416 | return (struct dst_entry *)skb->_skb_dst; | 437 | /* If refdst was not refcounted, check we still are in a |
| 438 | * rcu_read_lock section | ||
| 439 | */ | ||
| 440 | WARN_ON((skb->_skb_refdst & SKB_DST_NOREF) && | ||
| 441 | !rcu_read_lock_held() && | ||
| 442 | !rcu_read_lock_bh_held()); | ||
| 443 | return (struct dst_entry *)(skb->_skb_refdst & SKB_DST_PTRMASK); | ||
| 417 | } | 444 | } |
| 418 | 445 | ||
| 446 | /** | ||
| 447 | * skb_dst_set - sets skb dst | ||
| 448 | * @skb: buffer | ||
| 449 | * @dst: dst entry | ||
| 450 | * | ||
| 451 | * Sets skb dst, assuming a reference was taken on dst and should | ||
| 452 | * be released by skb_dst_drop() | ||
| 453 | */ | ||
| 419 | static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | 454 | static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) |
| 420 | { | 455 | { |
| 421 | skb->_skb_dst = (unsigned long)dst; | 456 | skb->_skb_refdst = (unsigned long)dst; |
| 457 | } | ||
| 458 | |||
| 459 | /** | ||
| 460 | * skb_dst_set_noref - sets skb dst, without a reference | ||
| 461 | * @skb: buffer | ||
| 462 | * @dst: dst entry | ||
| 463 | * | ||
| 464 | * Sets skb dst, assuming a reference was not taken on dst | ||
| 465 | * skb_dst_drop() should not dst_release() this dst | ||
| 466 | */ | ||
| 467 | static inline void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst) | ||
| 468 | { | ||
| 469 | WARN_ON(!rcu_read_lock_held() && !rcu_read_lock_bh_held()); | ||
| 470 | skb->_skb_refdst = (unsigned long)dst | SKB_DST_NOREF; | ||
| 471 | } | ||
| 472 | |||
| 473 | /** | ||
| 474 | * skb_dst_is_noref - Test if skb dst isnt refcounted | ||
| 475 | * @skb: buffer | ||
| 476 | */ | ||
| 477 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) | ||
| 478 | { | ||
| 479 | return (skb->_skb_refdst & SKB_DST_NOREF) && skb_dst(skb); | ||
| 422 | } | 480 | } |
| 423 | 481 | ||
| 424 | static inline struct rtable *skb_rtable(const struct sk_buff *skb) | 482 | static inline struct rtable *skb_rtable(const struct sk_buff *skb) |
| @@ -467,11 +525,6 @@ extern int skb_cow_data(struct sk_buff *skb, int tailbits, | |||
| 467 | struct sk_buff **trailer); | 525 | struct sk_buff **trailer); |
| 468 | extern int skb_pad(struct sk_buff *skb, int pad); | 526 | extern int skb_pad(struct sk_buff *skb, int pad); |
| 469 | #define dev_kfree_skb(a) consume_skb(a) | 527 | #define dev_kfree_skb(a) consume_skb(a) |
| 470 | #define dev_consume_skb(a) kfree_skb_clean(a) | ||
| 471 | extern void skb_over_panic(struct sk_buff *skb, int len, | ||
| 472 | void *here); | ||
| 473 | extern void skb_under_panic(struct sk_buff *skb, int len, | ||
| 474 | void *here); | ||
| 475 | 528 | ||
| 476 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | 529 | extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, |
| 477 | int getfrag(void *from, char *to, int offset, | 530 | int getfrag(void *from, char *to, int offset, |
| @@ -1130,6 +1183,11 @@ static inline unsigned char *__skb_pull(struct sk_buff *skb, unsigned int len) | |||
| 1130 | return skb->data += len; | 1183 | return skb->data += len; |
| 1131 | } | 1184 | } |
| 1132 | 1185 | ||
| 1186 | static inline unsigned char *skb_pull_inline(struct sk_buff *skb, unsigned int len) | ||
| 1187 | { | ||
| 1188 | return unlikely(len > skb->len) ? NULL : __skb_pull(skb, len); | ||
| 1189 | } | ||
| 1190 | |||
| 1133 | extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); | 1191 | extern unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta); |
| 1134 | 1192 | ||
| 1135 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) | 1193 | static inline unsigned char *__pskb_pull(struct sk_buff *skb, unsigned int len) |
| @@ -1353,9 +1411,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
| 1353 | * | 1411 | * |
| 1354 | * Various parts of the networking layer expect at least 32 bytes of | 1412 | * Various parts of the networking layer expect at least 32 bytes of |
| 1355 | * headroom, you should not reduce this. | 1413 | * headroom, you should not reduce this. |
| 1414 | * With RPS, we raised NET_SKB_PAD to 64 so that get_rps_cpus() fetches span | ||
| 1415 | * a 64 bytes aligned block to fit modern (>= 64 bytes) cache line sizes | ||
| 1416 | * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) | ||
| 1356 | */ | 1417 | */ |
| 1357 | #ifndef NET_SKB_PAD | 1418 | #ifndef NET_SKB_PAD |
| 1358 | #define NET_SKB_PAD 32 | 1419 | #define NET_SKB_PAD 64 |
| 1359 | #endif | 1420 | #endif |
| 1360 | 1421 | ||
| 1361 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); | 1422 | extern int ___pskb_trim(struct sk_buff *skb, unsigned int len); |
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/spi/wl12xx.h b/include/linux/spi/wl12xx.h index aed64ed3dc8a..a223ecbc71ef 100644 --- a/include/linux/spi/wl12xx.h +++ b/include/linux/spi/wl12xx.h | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | 26 | ||
| 27 | struct wl12xx_platform_data { | 27 | struct wl12xx_platform_data { |
| 28 | void (*set_power)(bool enable); | 28 | void (*set_power)(bool enable); |
| 29 | /* SDIO only: IRQ number if WLAN_IRQ line is used, 0 for SDIO IRQs */ | ||
| 30 | int irq; | ||
| 29 | bool use_eeprom; | 31 | bool use_eeprom; |
| 30 | }; | 32 | }; |
| 31 | 33 | ||
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 24f988547361..a2608bff9c78 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -305,6 +305,7 @@ struct ssb_bus { | |||
| 305 | /* ID information about the Chip. */ | 305 | /* ID information about the Chip. */ |
| 306 | u16 chip_id; | 306 | u16 chip_id; |
| 307 | u16 chip_rev; | 307 | u16 chip_rev; |
| 308 | u16 sprom_offset; | ||
| 308 | u16 sprom_size; /* number of words in sprom */ | 309 | u16 sprom_size; /* number of words in sprom */ |
| 309 | u8 chip_package; | 310 | u8 chip_package; |
| 310 | 311 | ||
| @@ -394,6 +395,9 @@ extern int ssb_bus_sdiobus_register(struct ssb_bus *bus, | |||
| 394 | 395 | ||
| 395 | extern void ssb_bus_unregister(struct ssb_bus *bus); | 396 | extern void ssb_bus_unregister(struct ssb_bus *bus); |
| 396 | 397 | ||
| 398 | /* Does the device have an SPROM? */ | ||
| 399 | extern bool ssb_is_sprom_available(struct ssb_bus *bus); | ||
| 400 | |||
| 397 | /* Set a fallback SPROM. | 401 | /* Set a fallback SPROM. |
| 398 | * See kdoc at the function definition for complete documentation. */ | 402 | * See kdoc at the function definition for complete documentation. */ |
| 399 | extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); | 403 | extern int ssb_arch_set_fallback_sprom(const struct ssb_sprom *sprom); |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 4e27acf0a92f..2cdf249b4e5f 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */ | 53 | #define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */ |
| 54 | #define SSB_CHIPCO_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | 54 | #define SSB_CHIPCO_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ |
| 55 | #define SSB_CHIPCO_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | 55 | #define SSB_CHIPCO_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ |
| 56 | #define SSB_CHIPCO_CAP_SPROM 0x40000000 /* SPROM present */ | ||
| 56 | #define SSB_CHIPCO_CORECTL 0x0008 | 57 | #define SSB_CHIPCO_CORECTL 0x0008 |
| 57 | #define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | 58 | #define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ |
| 58 | #define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | 59 | #define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ |
| @@ -385,6 +386,7 @@ | |||
| 385 | 386 | ||
| 386 | 387 | ||
| 387 | /** Chip specific Chip-Status register contents. */ | 388 | /** Chip specific Chip-Status register contents. */ |
| 389 | #define SSB_CHIPCO_CHST_4322_SPROM_EXISTS 0x00000040 /* SPROM present */ | ||
| 388 | #define SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL 0x00000003 | 390 | #define SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL 0x00000003 |
| 389 | #define SSB_CHIPCO_CHST_4325_DEFCIS_SEL 0 /* OTP is powered up, use def. CIS, no SPROM */ | 391 | #define SSB_CHIPCO_CHST_4325_DEFCIS_SEL 0 /* OTP is powered up, use def. CIS, no SPROM */ |
| 390 | #define SSB_CHIPCO_CHST_4325_SPROM_SEL 1 /* OTP is powered up, SPROM is present */ | 392 | #define SSB_CHIPCO_CHST_4325_SPROM_SEL 1 /* OTP is powered up, SPROM is present */ |
| @@ -398,6 +400,18 @@ | |||
| 398 | #define SSB_CHIPCO_CHST_4325_RCAL_VALUE_SHIFT 4 | 400 | #define SSB_CHIPCO_CHST_4325_RCAL_VALUE_SHIFT 4 |
| 399 | #define SSB_CHIPCO_CHST_4325_PMUTOP_2B 0x00000200 /* 1 for 2b, 0 for to 2a */ | 401 | #define SSB_CHIPCO_CHST_4325_PMUTOP_2B 0x00000200 /* 1 for 2b, 0 for to 2a */ |
| 400 | 402 | ||
| 403 | /** Macros to determine SPROM presence based on Chip-Status register. */ | ||
| 404 | #define SSB_CHIPCO_CHST_4312_SPROM_PRESENT(status) \ | ||
| 405 | ((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \ | ||
| 406 | SSB_CHIPCO_CHST_4325_OTP_SEL) | ||
| 407 | #define SSB_CHIPCO_CHST_4322_SPROM_PRESENT(status) \ | ||
| 408 | (status & SSB_CHIPCO_CHST_4322_SPROM_EXISTS) | ||
| 409 | #define SSB_CHIPCO_CHST_4325_SPROM_PRESENT(status) \ | ||
| 410 | (((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \ | ||
| 411 | SSB_CHIPCO_CHST_4325_DEFCIS_SEL) && \ | ||
| 412 | ((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \ | ||
| 413 | SSB_CHIPCO_CHST_4325_OTP_SEL)) | ||
| 414 | |||
| 401 | 415 | ||
| 402 | 416 | ||
| 403 | /** Clockcontrol masks and values **/ | 417 | /** Clockcontrol masks and values **/ |
| @@ -564,6 +578,7 @@ struct ssb_chipcommon_pmu { | |||
| 564 | struct ssb_chipcommon { | 578 | struct ssb_chipcommon { |
| 565 | struct ssb_device *dev; | 579 | struct ssb_device *dev; |
| 566 | u32 capabilities; | 580 | u32 capabilities; |
| 581 | u32 status; | ||
| 567 | /* Fast Powerup Delay constant */ | 582 | /* Fast Powerup Delay constant */ |
| 568 | u16 fast_pwrup_delay; | 583 | u16 fast_pwrup_delay; |
| 569 | struct ssb_chipcommon_pmu pmu; | 584 | struct ssb_chipcommon_pmu pmu; |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 9ae9082eaeb4..a6d5225b9275 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
| @@ -170,26 +170,27 @@ | |||
| 170 | #define SSB_SPROMSIZE_WORDS_R4 220 | 170 | #define SSB_SPROMSIZE_WORDS_R4 220 |
| 171 | #define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) | 171 | #define SSB_SPROMSIZE_BYTES_R123 (SSB_SPROMSIZE_WORDS_R123 * sizeof(u16)) |
| 172 | #define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) | 172 | #define SSB_SPROMSIZE_BYTES_R4 (SSB_SPROMSIZE_WORDS_R4 * sizeof(u16)) |
| 173 | #define SSB_SPROM_BASE 0x1000 | 173 | #define SSB_SPROM_BASE1 0x1000 |
| 174 | #define SSB_SPROM_REVISION 0x107E | 174 | #define SSB_SPROM_BASE31 0x0800 |
| 175 | #define SSB_SPROM_REVISION 0x007E | ||
| 175 | #define SSB_SPROM_REVISION_REV 0x00FF /* SPROM Revision number */ | 176 | #define SSB_SPROM_REVISION_REV 0x00FF /* SPROM Revision number */ |
| 176 | #define SSB_SPROM_REVISION_CRC 0xFF00 /* SPROM CRC8 value */ | 177 | #define SSB_SPROM_REVISION_CRC 0xFF00 /* SPROM CRC8 value */ |
| 177 | #define SSB_SPROM_REVISION_CRC_SHIFT 8 | 178 | #define SSB_SPROM_REVISION_CRC_SHIFT 8 |
| 178 | 179 | ||
| 179 | /* SPROM Revision 1 */ | 180 | /* SPROM Revision 1 */ |
| 180 | #define SSB_SPROM1_SPID 0x1004 /* Subsystem Product ID for PCI */ | 181 | #define SSB_SPROM1_SPID 0x0004 /* Subsystem Product ID for PCI */ |
| 181 | #define SSB_SPROM1_SVID 0x1006 /* Subsystem Vendor ID for PCI */ | 182 | #define SSB_SPROM1_SVID 0x0006 /* Subsystem Vendor ID for PCI */ |
| 182 | #define SSB_SPROM1_PID 0x1008 /* Product ID for PCI */ | 183 | #define SSB_SPROM1_PID 0x0008 /* Product ID for PCI */ |
| 183 | #define SSB_SPROM1_IL0MAC 0x1048 /* 6 bytes MAC address for 802.11b/g */ | 184 | #define SSB_SPROM1_IL0MAC 0x0048 /* 6 bytes MAC address for 802.11b/g */ |
| 184 | #define SSB_SPROM1_ET0MAC 0x104E /* 6 bytes MAC address for Ethernet */ | 185 | #define SSB_SPROM1_ET0MAC 0x004E /* 6 bytes MAC address for Ethernet */ |
| 185 | #define SSB_SPROM1_ET1MAC 0x1054 /* 6 bytes MAC address for 802.11a */ | 186 | #define SSB_SPROM1_ET1MAC 0x0054 /* 6 bytes MAC address for 802.11a */ |
| 186 | #define SSB_SPROM1_ETHPHY 0x105A /* Ethernet PHY settings */ | 187 | #define SSB_SPROM1_ETHPHY 0x005A /* Ethernet PHY settings */ |
| 187 | #define SSB_SPROM1_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ | 188 | #define SSB_SPROM1_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ |
| 188 | #define SSB_SPROM1_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ | 189 | #define SSB_SPROM1_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ |
| 189 | #define SSB_SPROM1_ETHPHY_ET1A_SHIFT 5 | 190 | #define SSB_SPROM1_ETHPHY_ET1A_SHIFT 5 |
| 190 | #define SSB_SPROM1_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */ | 191 | #define SSB_SPROM1_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */ |
| 191 | #define SSB_SPROM1_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */ | 192 | #define SSB_SPROM1_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */ |
| 192 | #define SSB_SPROM1_BINF 0x105C /* Board info */ | 193 | #define SSB_SPROM1_BINF 0x005C /* Board info */ |
| 193 | #define SSB_SPROM1_BINF_BREV 0x00FF /* Board Revision */ | 194 | #define SSB_SPROM1_BINF_BREV 0x00FF /* Board Revision */ |
| 194 | #define SSB_SPROM1_BINF_CCODE 0x0F00 /* Country Code */ | 195 | #define SSB_SPROM1_BINF_CCODE 0x0F00 /* Country Code */ |
| 195 | #define SSB_SPROM1_BINF_CCODE_SHIFT 8 | 196 | #define SSB_SPROM1_BINF_CCODE_SHIFT 8 |
| @@ -197,63 +198,63 @@ | |||
| 197 | #define SSB_SPROM1_BINF_ANTBG_SHIFT 12 | 198 | #define SSB_SPROM1_BINF_ANTBG_SHIFT 12 |
| 198 | #define SSB_SPROM1_BINF_ANTA 0xC000 /* Available A-PHY antennas */ | 199 | #define SSB_SPROM1_BINF_ANTA 0xC000 /* Available A-PHY antennas */ |
| 199 | #define SSB_SPROM1_BINF_ANTA_SHIFT 14 | 200 | #define SSB_SPROM1_BINF_ANTA_SHIFT 14 |
| 200 | #define SSB_SPROM1_PA0B0 0x105E | 201 | #define SSB_SPROM1_PA0B0 0x005E |
| 201 | #define SSB_SPROM1_PA0B1 0x1060 | 202 | #define SSB_SPROM1_PA0B1 0x0060 |
| 202 | #define SSB_SPROM1_PA0B2 0x1062 | 203 | #define SSB_SPROM1_PA0B2 0x0062 |
| 203 | #define SSB_SPROM1_GPIOA 0x1064 /* General Purpose IO pins 0 and 1 */ | 204 | #define SSB_SPROM1_GPIOA 0x0064 /* General Purpose IO pins 0 and 1 */ |
| 204 | #define SSB_SPROM1_GPIOA_P0 0x00FF /* Pin 0 */ | 205 | #define SSB_SPROM1_GPIOA_P0 0x00FF /* Pin 0 */ |
| 205 | #define SSB_SPROM1_GPIOA_P1 0xFF00 /* Pin 1 */ | 206 | #define SSB_SPROM1_GPIOA_P1 0xFF00 /* Pin 1 */ |
| 206 | #define SSB_SPROM1_GPIOA_P1_SHIFT 8 | 207 | #define SSB_SPROM1_GPIOA_P1_SHIFT 8 |
| 207 | #define SSB_SPROM1_GPIOB 0x1066 /* General Purpuse IO pins 2 and 3 */ | 208 | #define SSB_SPROM1_GPIOB 0x0066 /* General Purpuse IO pins 2 and 3 */ |
| 208 | #define SSB_SPROM1_GPIOB_P2 0x00FF /* Pin 2 */ | 209 | #define SSB_SPROM1_GPIOB_P2 0x00FF /* Pin 2 */ |
| 209 | #define SSB_SPROM1_GPIOB_P3 0xFF00 /* Pin 3 */ | 210 | #define SSB_SPROM1_GPIOB_P3 0xFF00 /* Pin 3 */ |
| 210 | #define SSB_SPROM1_GPIOB_P3_SHIFT 8 | 211 | #define SSB_SPROM1_GPIOB_P3_SHIFT 8 |
| 211 | #define SSB_SPROM1_MAXPWR 0x1068 /* Power Amplifier Max Power */ | 212 | #define SSB_SPROM1_MAXPWR 0x0068 /* Power Amplifier Max Power */ |
| 212 | #define SSB_SPROM1_MAXPWR_BG 0x00FF /* B-PHY and G-PHY (in dBm Q5.2) */ | 213 | #define SSB_SPROM1_MAXPWR_BG 0x00FF /* B-PHY and G-PHY (in dBm Q5.2) */ |
| 213 | #define SSB_SPROM1_MAXPWR_A 0xFF00 /* A-PHY (in dBm Q5.2) */ | 214 | #define SSB_SPROM1_MAXPWR_A 0xFF00 /* A-PHY (in dBm Q5.2) */ |
| 214 | #define SSB_SPROM1_MAXPWR_A_SHIFT 8 | 215 | #define SSB_SPROM1_MAXPWR_A_SHIFT 8 |
| 215 | #define SSB_SPROM1_PA1B0 0x106A | 216 | #define SSB_SPROM1_PA1B0 0x006A |
| 216 | #define SSB_SPROM1_PA1B1 0x106C | 217 | #define SSB_SPROM1_PA1B1 0x006C |
| 217 | #define SSB_SPROM1_PA1B2 0x106E | 218 | #define SSB_SPROM1_PA1B2 0x006E |
| 218 | #define SSB_SPROM1_ITSSI 0x1070 /* Idle TSSI Target */ | 219 | #define SSB_SPROM1_ITSSI 0x0070 /* Idle TSSI Target */ |
| 219 | #define SSB_SPROM1_ITSSI_BG 0x00FF /* B-PHY and G-PHY*/ | 220 | #define SSB_SPROM1_ITSSI_BG 0x00FF /* B-PHY and G-PHY*/ |
| 220 | #define SSB_SPROM1_ITSSI_A 0xFF00 /* A-PHY */ | 221 | #define SSB_SPROM1_ITSSI_A 0xFF00 /* A-PHY */ |
| 221 | #define SSB_SPROM1_ITSSI_A_SHIFT 8 | 222 | #define SSB_SPROM1_ITSSI_A_SHIFT 8 |
| 222 | #define SSB_SPROM1_BFLLO 0x1072 /* Boardflags (low 16 bits) */ | 223 | #define SSB_SPROM1_BFLLO 0x0072 /* Boardflags (low 16 bits) */ |
| 223 | #define SSB_SPROM1_AGAIN 0x1074 /* Antenna Gain (in dBm Q5.2) */ | 224 | #define SSB_SPROM1_AGAIN 0x0074 /* Antenna Gain (in dBm Q5.2) */ |
| 224 | #define SSB_SPROM1_AGAIN_BG 0x00FF /* B-PHY and G-PHY */ | 225 | #define SSB_SPROM1_AGAIN_BG 0x00FF /* B-PHY and G-PHY */ |
| 225 | #define SSB_SPROM1_AGAIN_BG_SHIFT 0 | 226 | #define SSB_SPROM1_AGAIN_BG_SHIFT 0 |
| 226 | #define SSB_SPROM1_AGAIN_A 0xFF00 /* A-PHY */ | 227 | #define SSB_SPROM1_AGAIN_A 0xFF00 /* A-PHY */ |
| 227 | #define SSB_SPROM1_AGAIN_A_SHIFT 8 | 228 | #define SSB_SPROM1_AGAIN_A_SHIFT 8 |
| 228 | 229 | ||
| 229 | /* SPROM Revision 2 (inherits from rev 1) */ | 230 | /* SPROM Revision 2 (inherits from rev 1) */ |
| 230 | #define SSB_SPROM2_BFLHI 0x1038 /* Boardflags (high 16 bits) */ | 231 | #define SSB_SPROM2_BFLHI 0x0038 /* Boardflags (high 16 bits) */ |
| 231 | #define SSB_SPROM2_MAXP_A 0x103A /* A-PHY Max Power */ | 232 | #define SSB_SPROM2_MAXP_A 0x003A /* A-PHY Max Power */ |
| 232 | #define SSB_SPROM2_MAXP_A_HI 0x00FF /* Max Power High */ | 233 | #define SSB_SPROM2_MAXP_A_HI 0x00FF /* Max Power High */ |
| 233 | #define SSB_SPROM2_MAXP_A_LO 0xFF00 /* Max Power Low */ | 234 | #define SSB_SPROM2_MAXP_A_LO 0xFF00 /* Max Power Low */ |
| 234 | #define SSB_SPROM2_MAXP_A_LO_SHIFT 8 | 235 | #define SSB_SPROM2_MAXP_A_LO_SHIFT 8 |
| 235 | #define SSB_SPROM2_PA1LOB0 0x103C /* A-PHY PowerAmplifier Low Settings */ | 236 | #define SSB_SPROM2_PA1LOB0 0x003C /* A-PHY PowerAmplifier Low Settings */ |
| 236 | #define SSB_SPROM2_PA1LOB1 0x103E /* A-PHY PowerAmplifier Low Settings */ | 237 | #define SSB_SPROM2_PA1LOB1 0x003E /* A-PHY PowerAmplifier Low Settings */ |
| 237 | #define SSB_SPROM2_PA1LOB2 0x1040 /* A-PHY PowerAmplifier Low Settings */ | 238 | #define SSB_SPROM2_PA1LOB2 0x0040 /* A-PHY PowerAmplifier Low Settings */ |
| 238 | #define SSB_SPROM2_PA1HIB0 0x1042 /* A-PHY PowerAmplifier High Settings */ | 239 | #define SSB_SPROM2_PA1HIB0 0x0042 /* A-PHY PowerAmplifier High Settings */ |
| 239 | #define SSB_SPROM2_PA1HIB1 0x1044 /* A-PHY PowerAmplifier High Settings */ | 240 | #define SSB_SPROM2_PA1HIB1 0x0044 /* A-PHY PowerAmplifier High Settings */ |
| 240 | #define SSB_SPROM2_PA1HIB2 0x1046 /* A-PHY PowerAmplifier High Settings */ | 241 | #define SSB_SPROM2_PA1HIB2 0x0046 /* A-PHY PowerAmplifier High Settings */ |
| 241 | #define SSB_SPROM2_OPO 0x1078 /* OFDM Power Offset from CCK Level */ | 242 | #define SSB_SPROM2_OPO 0x0078 /* OFDM Power Offset from CCK Level */ |
| 242 | #define SSB_SPROM2_OPO_VALUE 0x00FF | 243 | #define SSB_SPROM2_OPO_VALUE 0x00FF |
| 243 | #define SSB_SPROM2_OPO_UNUSED 0xFF00 | 244 | #define SSB_SPROM2_OPO_UNUSED 0xFF00 |
| 244 | #define SSB_SPROM2_CCODE 0x107C /* Two char Country Code */ | 245 | #define SSB_SPROM2_CCODE 0x007C /* Two char Country Code */ |
| 245 | 246 | ||
| 246 | /* SPROM Revision 3 (inherits most data from rev 2) */ | 247 | /* SPROM Revision 3 (inherits most data from rev 2) */ |
| 247 | #define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */ | 248 | #define SSB_SPROM3_OFDMAPO 0x002C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ |
| 248 | #define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ | 249 | #define SSB_SPROM3_OFDMALPO 0x0030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ |
| 249 | #define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ | 250 | #define SSB_SPROM3_OFDMAHPO 0x0034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ |
| 250 | #define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ | 251 | #define SSB_SPROM3_GPIOLDC 0x0042 /* GPIO LED Powersave Duty Cycle (4 bytes, BigEndian) */ |
| 251 | #define SSB_SPROM3_GPIOLDC 0x1042 /* GPIO LED Powersave Duty Cycle (4 bytes, BigEndian) */ | ||
| 252 | #define SSB_SPROM3_GPIOLDC_OFF 0x0000FF00 /* Off Count */ | 252 | #define SSB_SPROM3_GPIOLDC_OFF 0x0000FF00 /* Off Count */ |
| 253 | #define SSB_SPROM3_GPIOLDC_OFF_SHIFT 8 | 253 | #define SSB_SPROM3_GPIOLDC_OFF_SHIFT 8 |
| 254 | #define SSB_SPROM3_GPIOLDC_ON 0x00FF0000 /* On Count */ | 254 | #define SSB_SPROM3_GPIOLDC_ON 0x00FF0000 /* On Count */ |
| 255 | #define SSB_SPROM3_GPIOLDC_ON_SHIFT 16 | 255 | #define SSB_SPROM3_GPIOLDC_ON_SHIFT 16 |
| 256 | #define SSB_SPROM3_CCKPO 0x1078 /* CCK Power Offset */ | 256 | #define SSB_SPROM3_IL0MAC 0x004A /* 6 bytes MAC address for 802.11b/g */ |
| 257 | #define SSB_SPROM3_CCKPO 0x0078 /* CCK Power Offset */ | ||
| 257 | #define SSB_SPROM3_CCKPO_1M 0x000F /* 1M Rate PO */ | 258 | #define SSB_SPROM3_CCKPO_1M 0x000F /* 1M Rate PO */ |
| 258 | #define SSB_SPROM3_CCKPO_2M 0x00F0 /* 2M Rate PO */ | 259 | #define SSB_SPROM3_CCKPO_2M 0x00F0 /* 2M Rate PO */ |
| 259 | #define SSB_SPROM3_CCKPO_2M_SHIFT 4 | 260 | #define SSB_SPROM3_CCKPO_2M_SHIFT 4 |
| @@ -264,100 +265,100 @@ | |||
| 264 | #define SSB_SPROM3_OFDMGPO 0x107A /* G-PHY OFDM Power Offset (4 bytes, BigEndian) */ | 265 | #define SSB_SPROM3_OFDMGPO 0x107A /* G-PHY OFDM Power Offset (4 bytes, BigEndian) */ |
| 265 | 266 | ||
| 266 | /* SPROM Revision 4 */ | 267 | /* SPROM Revision 4 */ |
| 267 | #define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */ | 268 | #define SSB_SPROM4_BFLLO 0x0044 /* Boardflags (low 16 bits) */ |
| 268 | #define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */ | 269 | #define SSB_SPROM4_BFLHI 0x0046 /* Board Flags Hi */ |
| 270 | #define SSB_SPROM4_IL0MAC 0x004C /* 6 byte MAC address for a/b/g/n */ | ||
| 271 | #define SSB_SPROM4_CCODE 0x0052 /* Country Code (2 bytes) */ | ||
| 272 | #define SSB_SPROM4_GPIOA 0x0056 /* Gen. Purpose IO # 0 and 1 */ | ||
| 273 | #define SSB_SPROM4_GPIOA_P0 0x00FF /* Pin 0 */ | ||
| 274 | #define SSB_SPROM4_GPIOA_P1 0xFF00 /* Pin 1 */ | ||
| 275 | #define SSB_SPROM4_GPIOA_P1_SHIFT 8 | ||
| 276 | #define SSB_SPROM4_GPIOB 0x0058 /* Gen. Purpose IO # 2 and 3 */ | ||
| 277 | #define SSB_SPROM4_GPIOB_P2 0x00FF /* Pin 2 */ | ||
| 278 | #define SSB_SPROM4_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
| 279 | #define SSB_SPROM4_GPIOB_P3_SHIFT 8 | ||
| 280 | #define SSB_SPROM4_ETHPHY 0x005A /* Ethernet PHY settings ?? */ | ||
| 269 | #define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ | 281 | #define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ |
| 270 | #define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ | 282 | #define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ |
| 271 | #define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5 | 283 | #define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5 |
| 272 | #define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */ | 284 | #define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */ |
| 273 | #define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */ | 285 | #define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */ |
| 274 | #define SSB_SPROM4_CCODE 0x1052 /* Country Code (2 bytes) */ | 286 | #define SSB_SPROM4_ANTAVAIL 0x005D /* Antenna available bitfields */ |
| 275 | #define SSB_SPROM4_ANTAVAIL 0x105D /* Antenna available bitfields */ | 287 | #define SSB_SPROM4_ANTAVAIL_A 0x00FF /* A-PHY bitfield */ |
| 276 | #define SSB_SPROM4_ANTAVAIL_A 0x00FF /* A-PHY bitfield */ | 288 | #define SSB_SPROM4_ANTAVAIL_A_SHIFT 0 |
| 277 | #define SSB_SPROM4_ANTAVAIL_A_SHIFT 0 | 289 | #define SSB_SPROM4_ANTAVAIL_BG 0xFF00 /* B-PHY and G-PHY bitfield */ |
| 278 | #define SSB_SPROM4_ANTAVAIL_BG 0xFF00 /* B-PHY and G-PHY bitfield */ | 290 | #define SSB_SPROM4_ANTAVAIL_BG_SHIFT 8 |
| 279 | #define SSB_SPROM4_ANTAVAIL_BG_SHIFT 8 | 291 | #define SSB_SPROM4_AGAIN01 0x005E /* Antenna Gain (in dBm Q5.2) */ |
| 280 | #define SSB_SPROM4_BFLLO 0x1044 /* Boardflags (low 16 bits) */ | ||
| 281 | #define SSB_SPROM4_AGAIN01 0x105E /* Antenna Gain (in dBm Q5.2) */ | ||
| 282 | #define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */ | 292 | #define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */ |
| 283 | #define SSB_SPROM4_AGAIN0_SHIFT 0 | 293 | #define SSB_SPROM4_AGAIN0_SHIFT 0 |
| 284 | #define SSB_SPROM4_AGAIN1 0xFF00 /* Antenna 1 */ | 294 | #define SSB_SPROM4_AGAIN1 0xFF00 /* Antenna 1 */ |
| 285 | #define SSB_SPROM4_AGAIN1_SHIFT 8 | 295 | #define SSB_SPROM4_AGAIN1_SHIFT 8 |
| 286 | #define SSB_SPROM4_AGAIN23 0x1060 | 296 | #define SSB_SPROM4_AGAIN23 0x0060 |
| 287 | #define SSB_SPROM4_AGAIN2 0x00FF /* Antenna 2 */ | 297 | #define SSB_SPROM4_AGAIN2 0x00FF /* Antenna 2 */ |
| 288 | #define SSB_SPROM4_AGAIN2_SHIFT 0 | 298 | #define SSB_SPROM4_AGAIN2_SHIFT 0 |
| 289 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ | 299 | #define SSB_SPROM4_AGAIN3 0xFF00 /* Antenna 3 */ |
| 290 | #define SSB_SPROM4_AGAIN3_SHIFT 8 | 300 | #define SSB_SPROM4_AGAIN3_SHIFT 8 |
| 291 | #define SSB_SPROM4_BFLHI 0x1046 /* Board Flags Hi */ | 301 | #define SSB_SPROM4_MAXP_BG 0x0080 /* Max Power BG in path 1 */ |
| 292 | #define SSB_SPROM4_MAXP_BG 0x1080 /* Max Power BG in path 1 */ | ||
| 293 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | 302 | #define SSB_SPROM4_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ |
| 294 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 303 | #define SSB_SPROM4_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
| 295 | #define SSB_SPROM4_ITSSI_BG_SHIFT 8 | 304 | #define SSB_SPROM4_ITSSI_BG_SHIFT 8 |
| 296 | #define SSB_SPROM4_MAXP_A 0x108A /* Max Power A in path 1 */ | 305 | #define SSB_SPROM4_MAXP_A 0x008A /* Max Power A in path 1 */ |
| 297 | #define SSB_SPROM4_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ | 306 | #define SSB_SPROM4_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ |
| 298 | #define SSB_SPROM4_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ | 307 | #define SSB_SPROM4_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ |
| 299 | #define SSB_SPROM4_ITSSI_A_SHIFT 8 | 308 | #define SSB_SPROM4_ITSSI_A_SHIFT 8 |
| 300 | #define SSB_SPROM4_GPIOA 0x1056 /* Gen. Purpose IO # 0 and 1 */ | 309 | #define SSB_SPROM4_PA0B0 0x0082 /* The paXbY locations are */ |
| 301 | #define SSB_SPROM4_GPIOA_P0 0x00FF /* Pin 0 */ | 310 | #define SSB_SPROM4_PA0B1 0x0084 /* only guesses */ |
| 302 | #define SSB_SPROM4_GPIOA_P1 0xFF00 /* Pin 1 */ | 311 | #define SSB_SPROM4_PA0B2 0x0086 |
| 303 | #define SSB_SPROM4_GPIOA_P1_SHIFT 8 | 312 | #define SSB_SPROM4_PA1B0 0x008E |
| 304 | #define SSB_SPROM4_GPIOB 0x1058 /* Gen. Purpose IO # 2 and 3 */ | 313 | #define SSB_SPROM4_PA1B1 0x0090 |
| 305 | #define SSB_SPROM4_GPIOB_P2 0x00FF /* Pin 2 */ | 314 | #define SSB_SPROM4_PA1B2 0x0092 |
| 306 | #define SSB_SPROM4_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
| 307 | #define SSB_SPROM4_GPIOB_P3_SHIFT 8 | ||
| 308 | #define SSB_SPROM4_PA0B0 0x1082 /* The paXbY locations are */ | ||
| 309 | #define SSB_SPROM4_PA0B1 0x1084 /* only guesses */ | ||
| 310 | #define SSB_SPROM4_PA0B2 0x1086 | ||
| 311 | #define SSB_SPROM4_PA1B0 0x108E | ||
| 312 | #define SSB_SPROM4_PA1B1 0x1090 | ||
| 313 | #define SSB_SPROM4_PA1B2 0x1092 | ||
| 314 | 315 | ||
| 315 | /* SPROM Revision 5 (inherits most data from rev 4) */ | 316 | /* SPROM Revision 5 (inherits most data from rev 4) */ |
| 316 | #define SSB_SPROM5_BFLLO 0x104A /* Boardflags (low 16 bits) */ | 317 | #define SSB_SPROM5_CCODE 0x0044 /* Country Code (2 bytes) */ |
| 317 | #define SSB_SPROM5_BFLHI 0x104C /* Board Flags Hi */ | 318 | #define SSB_SPROM5_BFLLO 0x004A /* Boardflags (low 16 bits) */ |
| 318 | #define SSB_SPROM5_IL0MAC 0x1052 /* 6 byte MAC address for a/b/g/n */ | 319 | #define SSB_SPROM5_BFLHI 0x004C /* Board Flags Hi */ |
| 319 | #define SSB_SPROM5_CCODE 0x1044 /* Country Code (2 bytes) */ | 320 | #define SSB_SPROM5_IL0MAC 0x0052 /* 6 byte MAC address for a/b/g/n */ |
| 320 | #define SSB_SPROM5_GPIOA 0x1076 /* Gen. Purpose IO # 0 and 1 */ | 321 | #define SSB_SPROM5_GPIOA 0x0076 /* Gen. Purpose IO # 0 and 1 */ |
| 321 | #define SSB_SPROM5_GPIOA_P0 0x00FF /* Pin 0 */ | 322 | #define SSB_SPROM5_GPIOA_P0 0x00FF /* Pin 0 */ |
| 322 | #define SSB_SPROM5_GPIOA_P1 0xFF00 /* Pin 1 */ | 323 | #define SSB_SPROM5_GPIOA_P1 0xFF00 /* Pin 1 */ |
| 323 | #define SSB_SPROM5_GPIOA_P1_SHIFT 8 | 324 | #define SSB_SPROM5_GPIOA_P1_SHIFT 8 |
| 324 | #define SSB_SPROM5_GPIOB 0x1078 /* Gen. Purpose IO # 2 and 3 */ | 325 | #define SSB_SPROM5_GPIOB 0x0078 /* Gen. Purpose IO # 2 and 3 */ |
| 325 | #define SSB_SPROM5_GPIOB_P2 0x00FF /* Pin 2 */ | 326 | #define SSB_SPROM5_GPIOB_P2 0x00FF /* Pin 2 */ |
| 326 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ | 327 | #define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */ |
| 327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 | 328 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 |
| 328 | 329 | ||
| 329 | /* SPROM Revision 8 */ | 330 | /* SPROM Revision 8 */ |
| 330 | #define SSB_SPROM8_BOARDREV 0x1082 /* Board revision */ | 331 | #define SSB_SPROM8_BOARDREV 0x0082 /* Board revision */ |
| 331 | #define SSB_SPROM8_BFLLO 0x1084 /* Board flags (bits 0-15) */ | 332 | #define SSB_SPROM8_BFLLO 0x0084 /* Board flags (bits 0-15) */ |
| 332 | #define SSB_SPROM8_BFLHI 0x1086 /* Board flags (bits 16-31) */ | 333 | #define SSB_SPROM8_BFLHI 0x0086 /* Board flags (bits 16-31) */ |
| 333 | #define SSB_SPROM8_BFL2LO 0x1088 /* Board flags (bits 32-47) */ | 334 | #define SSB_SPROM8_BFL2LO 0x0088 /* Board flags (bits 32-47) */ |
| 334 | #define SSB_SPROM8_BFL2HI 0x108A /* Board flags (bits 48-63) */ | 335 | #define SSB_SPROM8_BFL2HI 0x008A /* Board flags (bits 48-63) */ |
| 335 | #define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ | 336 | #define SSB_SPROM8_IL0MAC 0x008C /* 6 byte MAC address */ |
| 336 | #define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ | 337 | #define SSB_SPROM8_CCODE 0x0092 /* 2 byte country code */ |
| 337 | #define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ | 338 | #define SSB_SPROM8_GPIOA 0x0096 /*Gen. Purpose IO # 0 and 1 */ |
| 338 | #define SSB_SPROM8_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */ | 339 | #define SSB_SPROM8_GPIOA_P0 0x00FF /* Pin 0 */ |
| 339 | #define SSB_SPROM8_ANTAVAIL_A_SHIFT 8 | 340 | #define SSB_SPROM8_GPIOA_P1 0xFF00 /* Pin 1 */ |
| 340 | #define SSB_SPROM8_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */ | 341 | #define SSB_SPROM8_GPIOA_P1_SHIFT 8 |
| 341 | #define SSB_SPROM8_ANTAVAIL_BG_SHIFT 0 | 342 | #define SSB_SPROM8_GPIOB 0x0098 /* Gen. Purpose IO # 2 and 3 */ |
| 342 | #define SSB_SPROM8_AGAIN01 0x109E /* Antenna Gain (in dBm Q5.2) */ | 343 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ |
| 344 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
| 345 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 | ||
| 346 | #define SSB_SPROM8_ANTAVAIL 0x009C /* Antenna available bitfields*/ | ||
| 347 | #define SSB_SPROM8_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */ | ||
| 348 | #define SSB_SPROM8_ANTAVAIL_A_SHIFT 8 | ||
| 349 | #define SSB_SPROM8_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */ | ||
| 350 | #define SSB_SPROM8_ANTAVAIL_BG_SHIFT 0 | ||
| 351 | #define SSB_SPROM8_AGAIN01 0x009E /* Antenna Gain (in dBm Q5.2) */ | ||
| 343 | #define SSB_SPROM8_AGAIN0 0x00FF /* Antenna 0 */ | 352 | #define SSB_SPROM8_AGAIN0 0x00FF /* Antenna 0 */ |
| 344 | #define SSB_SPROM8_AGAIN0_SHIFT 0 | 353 | #define SSB_SPROM8_AGAIN0_SHIFT 0 |
| 345 | #define SSB_SPROM8_AGAIN1 0xFF00 /* Antenna 1 */ | 354 | #define SSB_SPROM8_AGAIN1 0xFF00 /* Antenna 1 */ |
| 346 | #define SSB_SPROM8_AGAIN1_SHIFT 8 | 355 | #define SSB_SPROM8_AGAIN1_SHIFT 8 |
| 347 | #define SSB_SPROM8_AGAIN23 0x10A0 | 356 | #define SSB_SPROM8_AGAIN23 0x00A0 |
| 348 | #define SSB_SPROM8_AGAIN2 0x00FF /* Antenna 2 */ | 357 | #define SSB_SPROM8_AGAIN2 0x00FF /* Antenna 2 */ |
| 349 | #define SSB_SPROM8_AGAIN2_SHIFT 0 | 358 | #define SSB_SPROM8_AGAIN2_SHIFT 0 |
| 350 | #define SSB_SPROM8_AGAIN3 0xFF00 /* Antenna 3 */ | 359 | #define SSB_SPROM8_AGAIN3 0xFF00 /* Antenna 3 */ |
| 351 | #define SSB_SPROM8_AGAIN3_SHIFT 8 | 360 | #define SSB_SPROM8_AGAIN3_SHIFT 8 |
| 352 | #define SSB_SPROM8_GPIOA 0x1096 /*Gen. Purpose IO # 0 and 1 */ | 361 | #define SSB_SPROM8_RSSIPARM2G 0x00A4 /* RSSI params for 2GHz */ |
| 353 | #define SSB_SPROM8_GPIOA_P0 0x00FF /* Pin 0 */ | ||
| 354 | #define SSB_SPROM8_GPIOA_P1 0xFF00 /* Pin 1 */ | ||
| 355 | #define SSB_SPROM8_GPIOA_P1_SHIFT 8 | ||
| 356 | #define SSB_SPROM8_GPIOB 0x1098 /* Gen. Purpose IO # 2 and 3 */ | ||
| 357 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ | ||
| 358 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ | ||
| 359 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 | ||
| 360 | #define SSB_SPROM8_RSSIPARM2G 0x10A4 /* RSSI params for 2GHz */ | ||
| 361 | #define SSB_SPROM8_RSSISMF2G 0x000F | 362 | #define SSB_SPROM8_RSSISMF2G 0x000F |
| 362 | #define SSB_SPROM8_RSSISMC2G 0x00F0 | 363 | #define SSB_SPROM8_RSSISMC2G 0x00F0 |
| 363 | #define SSB_SPROM8_RSSISMC2G_SHIFT 4 | 364 | #define SSB_SPROM8_RSSISMC2G_SHIFT 4 |
| @@ -365,7 +366,7 @@ | |||
| 365 | #define SSB_SPROM8_RSSISAV2G_SHIFT 8 | 366 | #define SSB_SPROM8_RSSISAV2G_SHIFT 8 |
| 366 | #define SSB_SPROM8_BXA2G 0x1800 | 367 | #define SSB_SPROM8_BXA2G 0x1800 |
| 367 | #define SSB_SPROM8_BXA2G_SHIFT 11 | 368 | #define SSB_SPROM8_BXA2G_SHIFT 11 |
| 368 | #define SSB_SPROM8_RSSIPARM5G 0x10A6 /* RSSI params for 5GHz */ | 369 | #define SSB_SPROM8_RSSIPARM5G 0x00A6 /* RSSI params for 5GHz */ |
| 369 | #define SSB_SPROM8_RSSISMF5G 0x000F | 370 | #define SSB_SPROM8_RSSISMF5G 0x000F |
| 370 | #define SSB_SPROM8_RSSISMC5G 0x00F0 | 371 | #define SSB_SPROM8_RSSISMC5G 0x00F0 |
| 371 | #define SSB_SPROM8_RSSISMC5G_SHIFT 4 | 372 | #define SSB_SPROM8_RSSISMC5G_SHIFT 4 |
| @@ -373,47 +374,47 @@ | |||
| 373 | #define SSB_SPROM8_RSSISAV5G_SHIFT 8 | 374 | #define SSB_SPROM8_RSSISAV5G_SHIFT 8 |
| 374 | #define SSB_SPROM8_BXA5G 0x1800 | 375 | #define SSB_SPROM8_BXA5G 0x1800 |
| 375 | #define SSB_SPROM8_BXA5G_SHIFT 11 | 376 | #define SSB_SPROM8_BXA5G_SHIFT 11 |
| 376 | #define SSB_SPROM8_TRI25G 0x10A8 /* TX isolation 2.4&5.3GHz */ | 377 | #define SSB_SPROM8_TRI25G 0x00A8 /* TX isolation 2.4&5.3GHz */ |
| 377 | #define SSB_SPROM8_TRI2G 0x00FF /* TX isolation 2.4GHz */ | 378 | #define SSB_SPROM8_TRI2G 0x00FF /* TX isolation 2.4GHz */ |
| 378 | #define SSB_SPROM8_TRI5G 0xFF00 /* TX isolation 5.3GHz */ | 379 | #define SSB_SPROM8_TRI5G 0xFF00 /* TX isolation 5.3GHz */ |
| 379 | #define SSB_SPROM8_TRI5G_SHIFT 8 | 380 | #define SSB_SPROM8_TRI5G_SHIFT 8 |
| 380 | #define SSB_SPROM8_TRI5GHL 0x10AA /* TX isolation 5.2/5.8GHz */ | 381 | #define SSB_SPROM8_TRI5GHL 0x00AA /* TX isolation 5.2/5.8GHz */ |
| 381 | #define SSB_SPROM8_TRI5GL 0x00FF /* TX isolation 5.2GHz */ | 382 | #define SSB_SPROM8_TRI5GL 0x00FF /* TX isolation 5.2GHz */ |
| 382 | #define SSB_SPROM8_TRI5GH 0xFF00 /* TX isolation 5.8GHz */ | 383 | #define SSB_SPROM8_TRI5GH 0xFF00 /* TX isolation 5.8GHz */ |
| 383 | #define SSB_SPROM8_TRI5GH_SHIFT 8 | 384 | #define SSB_SPROM8_TRI5GH_SHIFT 8 |
| 384 | #define SSB_SPROM8_RXPO 0x10AC /* RX power offsets */ | 385 | #define SSB_SPROM8_RXPO 0x00AC /* RX power offsets */ |
| 385 | #define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */ | 386 | #define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */ |
| 386 | #define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */ | 387 | #define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */ |
| 387 | #define SSB_SPROM8_RXPO5G_SHIFT 8 | 388 | #define SSB_SPROM8_RXPO5G_SHIFT 8 |
| 388 | #define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power 2GHz in path 1 */ | 389 | #define SSB_SPROM8_MAXP_BG 0x00C0 /* Max Power 2GHz in path 1 */ |
| 389 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */ | 390 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */ |
| 390 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 391 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
| 391 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 | 392 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 |
| 392 | #define SSB_SPROM8_PA0B0 0x10C2 /* 2GHz power amp settings */ | 393 | #define SSB_SPROM8_PA0B0 0x00C2 /* 2GHz power amp settings */ |
| 393 | #define SSB_SPROM8_PA0B1 0x10C4 | 394 | #define SSB_SPROM8_PA0B1 0x00C4 |
| 394 | #define SSB_SPROM8_PA0B2 0x10C6 | 395 | #define SSB_SPROM8_PA0B2 0x00C6 |
| 395 | #define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power 5.3GHz */ | 396 | #define SSB_SPROM8_MAXP_A 0x00C8 /* Max Power 5.3GHz */ |
| 396 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power 5.3GHz */ | 397 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power 5.3GHz */ |
| 397 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ | 398 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ |
| 398 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 | 399 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 |
| 399 | #define SSB_SPROM8_MAXP_AHL 0x10CA /* Max Power 5.2/5.8GHz */ | 400 | #define SSB_SPROM8_MAXP_AHL 0x00CA /* Max Power 5.2/5.8GHz */ |
| 400 | #define SSB_SPROM8_MAXP_AH_MASK 0x00FF /* Mask for Max Power 5.8GHz */ | 401 | #define SSB_SPROM8_MAXP_AH_MASK 0x00FF /* Mask for Max Power 5.8GHz */ |
| 401 | #define SSB_SPROM8_MAXP_AL_MASK 0xFF00 /* Mask for Max Power 5.2GHz */ | 402 | #define SSB_SPROM8_MAXP_AL_MASK 0xFF00 /* Mask for Max Power 5.2GHz */ |
| 402 | #define SSB_SPROM8_MAXP_AL_SHIFT 8 | 403 | #define SSB_SPROM8_MAXP_AL_SHIFT 8 |
| 403 | #define SSB_SPROM8_PA1B0 0x10CC /* 5.3GHz power amp settings */ | 404 | #define SSB_SPROM8_PA1B0 0x00CC /* 5.3GHz power amp settings */ |
| 404 | #define SSB_SPROM8_PA1B1 0x10CE | 405 | #define SSB_SPROM8_PA1B1 0x00CE |
| 405 | #define SSB_SPROM8_PA1B2 0x10D0 | 406 | #define SSB_SPROM8_PA1B2 0x00D0 |
| 406 | #define SSB_SPROM8_PA1LOB0 0x10D2 /* 5.2GHz power amp settings */ | 407 | #define SSB_SPROM8_PA1LOB0 0x00D2 /* 5.2GHz power amp settings */ |
| 407 | #define SSB_SPROM8_PA1LOB1 0x10D4 | 408 | #define SSB_SPROM8_PA1LOB1 0x00D4 |
| 408 | #define SSB_SPROM8_PA1LOB2 0x10D6 | 409 | #define SSB_SPROM8_PA1LOB2 0x00D6 |
| 409 | #define SSB_SPROM8_PA1HIB0 0x10D8 /* 5.8GHz power amp settings */ | 410 | #define SSB_SPROM8_PA1HIB0 0x00D8 /* 5.8GHz power amp settings */ |
| 410 | #define SSB_SPROM8_PA1HIB1 0x10DA | 411 | #define SSB_SPROM8_PA1HIB1 0x00DA |
| 411 | #define SSB_SPROM8_PA1HIB2 0x10DC | 412 | #define SSB_SPROM8_PA1HIB2 0x00DC |
| 412 | #define SSB_SPROM8_CCK2GPO 0x1140 /* CCK power offset */ | 413 | #define SSB_SPROM8_CCK2GPO 0x0140 /* CCK power offset */ |
| 413 | #define SSB_SPROM8_OFDM2GPO 0x1142 /* 2.4GHz OFDM power offset */ | 414 | #define SSB_SPROM8_OFDM2GPO 0x0142 /* 2.4GHz OFDM power offset */ |
| 414 | #define SSB_SPROM8_OFDM5GPO 0x1146 /* 5.3GHz OFDM power offset */ | 415 | #define SSB_SPROM8_OFDM5GPO 0x0146 /* 5.3GHz OFDM power offset */ |
| 415 | #define SSB_SPROM8_OFDM5GLPO 0x114A /* 5.2GHz OFDM power offset */ | 416 | #define SSB_SPROM8_OFDM5GLPO 0x014A /* 5.2GHz OFDM power offset */ |
| 416 | #define SSB_SPROM8_OFDM5GHPO 0x114E /* 5.8GHz OFDM power offset */ | 417 | #define SSB_SPROM8_OFDM5GHPO 0x014E /* 5.8GHz OFDM power offset */ |
| 417 | 418 | ||
| 418 | /* Values for SSB_SPROM1_BINF_CCODE */ | 419 | /* Values for SSB_SPROM1_BINF_CCODE */ |
| 419 | enum { | 420 | enum { |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 32bfd1a8a48d..632ff7c03280 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
| @@ -33,6 +33,7 @@ struct plat_stmmacenet_data { | |||
| 33 | int bus_id; | 33 | int bus_id; |
| 34 | int pbl; | 34 | int pbl; |
| 35 | int has_gmac; | 35 | int has_gmac; |
| 36 | int enh_desc; | ||
| 36 | void (*fix_mac_speed)(void *priv, unsigned int speed); | 37 | void (*fix_mac_speed)(void *priv, unsigned int speed); |
| 37 | void (*bus_setup)(unsigned long ioaddr); | 38 | void (*bus_setup)(unsigned long ioaddr); |
| 38 | #ifdef CONFIG_STM_DRIVERS | 39 | #ifdef CONFIG_STM_DRIVERS |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index f66014c90c9f..7bb5cb64f3b8 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -980,6 +980,8 @@ extern int proc_doulongvec_minmax(struct ctl_table *, int, | |||
| 980 | void __user *, size_t *, loff_t *); | 980 | void __user *, size_t *, loff_t *); |
| 981 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, | 981 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, |
| 982 | void __user *, size_t *, loff_t *); | 982 | void __user *, size_t *, loff_t *); |
| 983 | extern int proc_do_large_bitmap(struct ctl_table *, int, | ||
| 984 | void __user *, size_t *, loff_t *); | ||
| 983 | 985 | ||
| 984 | /* | 986 | /* |
| 985 | * Register a set of sysctl names by calling register_sysctl_table | 987 | * Register a set of sysctl names by calling register_sysctl_table |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index 3d92396639de..181c8d0e6f73 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
| @@ -107,7 +107,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
| 107 | * Message importance levels | 107 | * Message importance levels |
| 108 | */ | 108 | */ |
| 109 | 109 | ||
| 110 | #define TIPC_LOW_IMPORTANCE 0 /* default */ | 110 | #define TIPC_LOW_IMPORTANCE 0 |
| 111 | #define TIPC_MEDIUM_IMPORTANCE 1 | 111 | #define TIPC_MEDIUM_IMPORTANCE 1 |
| 112 | #define TIPC_HIGH_IMPORTANCE 2 | 112 | #define TIPC_HIGH_IMPORTANCE 2 |
| 113 | #define TIPC_CRITICAL_IMPORTANCE 3 | 113 | #define TIPC_CRITICAL_IMPORTANCE 3 |
| @@ -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 | /* |
| @@ -188,7 +182,7 @@ struct sockaddr_tipc { | |||
| 188 | struct tipc_name_seq nameseq; | 182 | struct tipc_name_seq nameseq; |
| 189 | struct { | 183 | struct { |
| 190 | struct tipc_name name; | 184 | struct tipc_name name; |
| 191 | __u32 domain; /* 0: own zone */ | 185 | __u32 domain; |
| 192 | } name; | 186 | } name; |
| 193 | } addr; | 187 | } addr; |
| 194 | }; | 188 | }; |
| @@ -206,7 +200,7 @@ struct sockaddr_tipc { | |||
| 206 | */ | 200 | */ |
| 207 | 201 | ||
| 208 | #define TIPC_IMPORTANCE 127 /* Default: TIPC_LOW_IMPORTANCE */ | 202 | #define TIPC_IMPORTANCE 127 /* Default: TIPC_LOW_IMPORTANCE */ |
| 209 | #define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */ | 203 | #define TIPC_SRC_DROPPABLE 128 /* Default: based on socket type */ |
| 210 | #define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ | 204 | #define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ |
| 211 | #define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ | 205 | #define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ |
| 212 | #define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */ | 206 | #define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */ |
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 2bc6fa4adeb5..9cde86c32412 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | #define TIPC_CMD_SHOW_NAME_TABLE 0x0005 /* tx name_tbl_query, rx ultra_string */ | 74 | #define TIPC_CMD_SHOW_NAME_TABLE 0x0005 /* tx name_tbl_query, rx ultra_string */ |
| 75 | #define TIPC_CMD_SHOW_PORTS 0x0006 /* tx none, rx ultra_string */ | 75 | #define TIPC_CMD_SHOW_PORTS 0x0006 /* tx none, rx ultra_string */ |
| 76 | #define TIPC_CMD_SHOW_LINK_STATS 0x000B /* tx link_name, rx ultra_string */ | 76 | #define TIPC_CMD_SHOW_LINK_STATS 0x000B /* tx link_name, rx ultra_string */ |
| 77 | #define TIPC_CMD_SHOW_STATS 0x000F /* tx unsigned, rx ultra_string */ | ||
| 77 | 78 | ||
| 78 | #if 0 | 79 | #if 0 |
| 79 | #define TIPC_CMD_SHOW_PORT_STATS 0x0008 /* tx port_ref, rx ultra_string */ | 80 | #define TIPC_CMD_SHOW_PORT_STATS 0x0008 /* tx port_ref, rx ultra_string */ |
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 |
