aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:55:01 -0500
commitd7fc02c7bae7b1cf69269992cf880a43a350cdaa (patch)
treea43d56fa72913a1cc98a0bbebe054d08581b3a7c /include/linux
parentee1262dbc65ce0b6234a915d8432171e8d77f518 (diff)
parent28b4d5cc17c20786848cdc07b7ea237a309776bb (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: (1815 commits) mac80211: fix reorder buffer release iwmc3200wifi: Enable wimax core through module parameter iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter iwmc3200wifi: Coex table command does not expect a response iwmc3200wifi: Update wiwi priority table iwlwifi: driver version track kernel version iwlwifi: indicate uCode type when fail dump error/event log iwl3945: remove duplicated event logging code b43: fix two warnings ipw2100: fix rebooting hang with driver loaded cfg80211: indent regulatory messages with spaces iwmc3200wifi: fix NULL pointer dereference in pmkid update mac80211: Fix TX status reporting for injected data frames ath9k: enable 2GHz band only if the device supports it airo: Fix integer overflow warning rt2x00: Fix padding bug on L2PAD devices. WE: Fix set events not propagated b43legacy: avoid PPC fault during resume b43: avoid PPC fault during resume tcp: fix a timewait refcnt race ... Fix up conflicts due to sysctl cleanups (dead sysctl_check code and CTL_UNNUMBERED removed) in kernel/sysctl_check.c net/ipv4/sysctl_net_ipv4.c net/ipv6/addrconf.c net/sctp/sysctl.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/brcmphy.h19
-rw-r--r--include/linux/can/core.h2
-rw-r--r--include/linux/can/dev.h20
-rw-r--r--include/linux/can/platform/mcp251x.h36
-rw-r--r--include/linux/can/platform/ti_hecc.h40
-rw-r--r--include/linux/compat.h44
-rw-r--r--include/linux/cryptohash.h1
-rw-r--r--include/linux/dn.h9
-rw-r--r--include/linux/errqueue.h6
-rw-r--r--include/linux/ethtool.h43
-rw-r--r--include/linux/fib_rules.h17
-rw-r--r--include/linux/filter.h10
-rw-r--r--include/linux/gen_stats.h15
-rw-r--r--include/linux/i82593.h229
-rw-r--r--include/linux/ieee80211.h45
-rw-r--r--include/linux/if.h16
-rw-r--r--include/linux/if_addr.h9
-rw-r--r--include/linux/if_addrlabel.h6
-rw-r--r--include/linux/if_arcnet.h18
-rw-r--r--include/linux/if_arp.h3
-rw-r--r--include/linux/if_bonding.h3
-rw-r--r--include/linux/if_bridge.h9
-rw-r--r--include/linux/if_ec.h12
-rw-r--r--include/linux/if_ether.h4
-rw-r--r--include/linux/if_fddi.h22
-rw-r--r--include/linux/if_hippi.h15
-rw-r--r--include/linux/if_link.h42
-rw-r--r--include/linux/if_packet.h27
-rw-r--r--include/linux/if_plip.h3
-rw-r--r--include/linux/if_pppol2tp.h3
-rw-r--r--include/linux/if_tunnel.h18
-rw-r--r--include/linux/if_vlan.h41
-rw-r--r--include/linux/igmp.h15
-rw-r--r--include/linux/in.h18
-rw-r--r--include/linux/in6.h9
-rw-r--r--include/linux/inetdevice.h10
-rw-r--r--include/linux/ip_vs.h3
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/mmc/sdio_ids.h1
-rw-r--r--include/linux/mroute.h31
-rw-r--r--include/linux/mroute6.h15
-rw-r--r--include/linux/neighbour.h18
-rw-r--r--include/linux/net.h90
-rw-r--r--include/linux/netdevice.h156
-rw-r--r--include/linux/netfilter.h6
-rw-r--r--include/linux/netfilter/nf_conntrack_common.h6
-rw-r--r--include/linux/netfilter/nf_conntrack_ftp.h3
-rw-r--r--include/linux/netfilter/nf_conntrack_sctp.h3
-rw-r--r--include/linux/netfilter/nf_conntrack_tcp.h6
-rw-r--r--include/linux/netfilter/nfnetlink.h6
-rw-r--r--include/linux/netfilter/nfnetlink_compat.h3
-rw-r--r--include/linux/netfilter/x_tables.h45
-rw-r--r--include/linux/netfilter/xt_connbytes.h3
-rw-r--r--include/linux/netfilter/xt_esp.h3
-rw-r--r--include/linux/netfilter/xt_multiport.h9
-rw-r--r--include/linux/netfilter/xt_policy.h18
-rw-r--r--include/linux/netfilter/xt_state.h3
-rw-r--r--include/linux/netfilter/xt_string.h3
-rw-r--r--include/linux/netfilter/xt_tcpudp.h6
-rw-r--r--include/linux/netfilter_arp/arp_tables.h21
-rw-r--r--include/linux/netfilter_bridge/ebt_802_3.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_among.h9
-rw-r--r--include/linux/netfilter_bridge/ebt_arpreply.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_ip.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_ip6.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_limit.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_log.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_mark_m.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_mark_t.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_nat.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_pkttype.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_redirect.h3
-rw-r--r--include/linux/netfilter_bridge/ebt_stp.h6
-rw-r--r--include/linux/netfilter_bridge/ebtables.h39
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h27
-rw-r--r--include/linux/netfilter_ipv4/ipt_SAME.h3
-rw-r--r--include/linux/netfilter_ipv4/ipt_ah.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h27
-rw-r--r--include/linux/netfilter_ipv6/ip6t_ah.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_frag.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_ipv6header.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_mh.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_opts.h3
-rw-r--r--include/linux/netfilter_ipv6/ip6t_rt.h3
-rw-r--r--include/linux/netlink.h24
-rw-r--r--include/linux/nl80211.h62
-rw-r--r--include/linux/nl802154.h6
-rw-r--r--include/linux/notifier.h2
-rw-r--r--include/linux/pkt_cls.h84
-rw-r--r--include/linux/pkt_sched.h111
-rw-r--r--include/linux/rculist.h14
-rw-r--r--include/linux/rds.h8
-rw-r--r--include/linux/rfkill.h3
-rw-r--r--include/linux/route.h3
-rw-r--r--include/linux/rtnetlink.h63
-rw-r--r--include/linux/sctp.h1
-rw-r--r--include/linux/skbuff.h31
-rw-r--r--include/linux/smsc911x.h1
-rw-r--r--include/linux/socket.h13
-rw-r--r--include/linux/spi/wl12xx.h1
-rw-r--r--include/linux/ssb/ssb.h20
-rw-r--r--include/linux/syscalls.h4
-rw-r--r--include/linux/sysctl.h1
-rw-r--r--include/linux/tc_act/tc_defact.h6
-rw-r--r--include/linux/tc_act/tc_gact.h9
-rw-r--r--include/linux/tc_act/tc_ipt.h3
-rw-r--r--include/linux/tc_act/tc_mirred.h6
-rw-r--r--include/linux/tc_act/tc_nat.h6
-rw-r--r--include/linux/tc_act/tc_pedit.h9
-rw-r--r--include/linux/tc_act/tc_skbedit.h2
-rw-r--r--include/linux/tc_ematch/tc_em_cmp.h6
-rw-r--r--include/linux/tc_ematch/tc_em_meta.h15
-rw-r--r--include/linux/tc_ematch/tc_em_nbyte.h3
-rw-r--r--include/linux/tc_ematch/tc_em_text.h3
-rw-r--r--include/linux/tcp.h72
-rw-r--r--include/linux/udp.h15
-rw-r--r--include/linux/usb/usbnet.h8
-rw-r--r--include/linux/wimax/debug.h72
-rw-r--r--include/linux/wimax/i2400m.h13
-rw-r--r--include/linux/x25.h1
-rw-r--r--include/linux/xfrm.h35
121 files changed, 1303 insertions, 899 deletions
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index 9b64b6d67873..2b31b91f5871 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -1,6 +1,13 @@
1#define PHY_BRCM_WIRESPEED_ENABLE 0x00000001 1#define PHY_BCM_FLAGS_MODE_COPPER 0x00000001
2#define PHY_BRCM_AUTO_PWRDWN_ENABLE 0x00000002 2#define PHY_BCM_FLAGS_MODE_1000BX 0x00000002
3#define PHY_BRCM_APD_CLK125_ENABLE 0x00000004 3#define PHY_BCM_FLAGS_INTF_SGMII 0x00000010
4#define PHY_BRCM_STD_IBND_DISABLE 0x00000008 4#define PHY_BCM_FLAGS_INTF_XAUI 0x00000020
5#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00000010 5#define PHY_BRCM_WIRESPEED_ENABLE 0x00000100
6#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00000020 6#define PHY_BRCM_AUTO_PWRDWN_ENABLE 0x00000200
7#define PHY_BRCM_RX_REFCLK_UNUSED 0x00000400
8#define PHY_BRCM_STD_IBND_DISABLE 0x00000800
9#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00001000
10#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00002000
11#define PHY_BRCM_CLEAR_RGMII_MODE 0x00004000
12#define PHY_BRCM_DIS_TXCRXC_NOENRGY 0x00008000
13#define PHY_BCM_FLAGS_VALID 0x80000000
diff --git a/include/linux/can/core.h b/include/linux/can/core.h
index 25085cbadcfc..6c507bea275f 100644
--- a/include/linux/can/core.h
+++ b/include/linux/can/core.h
@@ -32,14 +32,12 @@
32 * struct can_proto - CAN protocol structure 32 * struct can_proto - CAN protocol structure
33 * @type: type argument in socket() syscall, e.g. SOCK_DGRAM. 33 * @type: type argument in socket() syscall, e.g. SOCK_DGRAM.
34 * @protocol: protocol number in socket() syscall. 34 * @protocol: protocol number in socket() syscall.
35 * @capability: capability needed to open the socket, or -1 for no restriction.
36 * @ops: pointer to struct proto_ops for sock->ops. 35 * @ops: pointer to struct proto_ops for sock->ops.
37 * @prot: pointer to struct proto structure. 36 * @prot: pointer to struct proto structure.
38 */ 37 */
39struct can_proto { 38struct can_proto {
40 int type; 39 int type;
41 int protocol; 40 int protocol;
42 int capability;
43 struct proto_ops *ops; 41 struct proto_ops *ops;
44 struct proto *prot; 42 struct proto *prot;
45}; 43};
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 5824b20b5fcb..1ed2a5cc03f5 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -29,8 +29,6 @@ enum can_mode {
29/* 29/*
30 * CAN common private data 30 * CAN common private data
31 */ 31 */
32#define CAN_ECHO_SKB_MAX 4
33
34struct can_priv { 32struct can_priv {
35 struct can_device_stats can_stats; 33 struct can_device_stats can_stats;
36 34
@@ -44,15 +42,16 @@ struct can_priv {
44 int restart_ms; 42 int restart_ms;
45 struct timer_list restart_timer; 43 struct timer_list restart_timer;
46 44
47 struct sk_buff *echo_skb[CAN_ECHO_SKB_MAX];
48
49 int (*do_set_bittiming)(struct net_device *dev); 45 int (*do_set_bittiming)(struct net_device *dev);
50 int (*do_set_mode)(struct net_device *dev, enum can_mode mode); 46 int (*do_set_mode)(struct net_device *dev, enum can_mode mode);
51 int (*do_get_state)(const struct net_device *dev, 47 int (*do_get_state)(const struct net_device *dev,
52 enum can_state *state); 48 enum can_state *state);
49
50 unsigned int echo_skb_max;
51 struct sk_buff **echo_skb;
53}; 52};
54 53
55struct net_device *alloc_candev(int sizeof_priv); 54struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
56void free_candev(struct net_device *dev); 55void free_candev(struct net_device *dev);
57 56
58int open_candev(struct net_device *dev); 57int open_candev(struct net_device *dev);
@@ -64,8 +63,13 @@ void unregister_candev(struct net_device *dev);
64int can_restart_now(struct net_device *dev); 63int can_restart_now(struct net_device *dev);
65void can_bus_off(struct net_device *dev); 64void can_bus_off(struct net_device *dev);
66 65
67void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); 66void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
68void can_get_echo_skb(struct net_device *dev, int idx); 67 unsigned int idx);
69void can_free_echo_skb(struct net_device *dev, int idx); 68void can_get_echo_skb(struct net_device *dev, unsigned int idx);
69void can_free_echo_skb(struct net_device *dev, unsigned int idx);
70
71struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf);
72struct sk_buff *alloc_can_err_skb(struct net_device *dev,
73 struct can_frame **cf);
70 74
71#endif /* CAN_DEV_H */ 75#endif /* CAN_DEV_H */
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h
new file mode 100644
index 000000000000..1448177d86d5
--- /dev/null
+++ b/include/linux/can/platform/mcp251x.h
@@ -0,0 +1,36 @@
1#ifndef __CAN_PLATFORM_MCP251X_H__
2#define __CAN_PLATFORM_MCP251X_H__
3
4/*
5 *
6 * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
7 *
8 */
9
10#include <linux/spi/spi.h>
11
12/**
13 * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
14 * @oscillator_frequency: - oscillator frequency in Hz
15 * @model: - actual type of chip
16 * @board_specific_setup: - called before probing the chip (power,reset)
17 * @transceiver_enable: - called to power on/off the transceiver
18 * @power_enable: - called to power on/off the mcp *and* the
19 * transceiver
20 *
21 * Please note that you should define power_enable or transceiver_enable or
22 * none of them. Defining both of them is no use.
23 *
24 */
25
26struct mcp251x_platform_data {
27 unsigned long oscillator_frequency;
28 int model;
29#define CAN_MCP251X_MCP2510 0
30#define CAN_MCP251X_MCP2515 1
31 int (*board_specific_setup)(struct spi_device *spi);
32 int (*transceiver_enable)(int enable);
33 int (*power_enable) (int enable);
34};
35
36#endif /* __CAN_PLATFORM_MCP251X_H__ */
diff --git a/include/linux/can/platform/ti_hecc.h b/include/linux/can/platform/ti_hecc.h
new file mode 100644
index 000000000000..4688c7bb1bd1
--- /dev/null
+++ b/include/linux/can/platform/ti_hecc.h
@@ -0,0 +1,40 @@
1/*
2 * TI HECC (High End CAN Controller) driver platform header
3 *
4 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed as is WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17/**
18 * struct hecc_platform_data - HECC Platform Data
19 *
20 * @scc_hecc_offset: mostly 0 - should really never change
21 * @scc_ram_offset: SCC RAM offset
22 * @hecc_ram_offset: HECC RAM offset
23 * @mbx_offset: Mailbox RAM offset
24 * @int_line: Interrupt line to use - 0 or 1
25 * @version: version for future use
26 *
27 * Platform data structure to get all platform specific settings.
28 * this structure also accounts the fact that the IP may have different
29 * RAM and mailbox offsets for different SOC's
30 */
31struct ti_hecc_platform_data {
32 u32 scc_hecc_offset;
33 u32 scc_ram_offset;
34 u32 hecc_ram_offset;
35 u32 mbx_offset;
36 u32 int_line;
37 u32 version;
38};
39
40
diff --git a/include/linux/compat.h b/include/linux/compat.h
index af931ee43dd8..ef68119a4fd2 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -10,6 +10,8 @@
10#include <linux/stat.h> 10#include <linux/stat.h>
11#include <linux/param.h> /* for HZ */ 11#include <linux/param.h> /* for HZ */
12#include <linux/sem.h> 12#include <linux/sem.h>
13#include <linux/socket.h>
14#include <linux/if.h>
13 15
14#include <asm/compat.h> 16#include <asm/compat.h>
15#include <asm/siginfo.h> 17#include <asm/siginfo.h>
@@ -154,6 +156,48 @@ typedef struct compat_sigevent {
154 } _sigev_un; 156 } _sigev_un;
155} compat_sigevent_t; 157} compat_sigevent_t;
156 158
159struct compat_ifmap {
160 compat_ulong_t mem_start;
161 compat_ulong_t mem_end;
162 unsigned short base_addr;
163 unsigned char irq;
164 unsigned char dma;
165 unsigned char port;
166};
167
168struct compat_if_settings
169{
170 unsigned int type; /* Type of physical device or protocol */
171 unsigned int size; /* Size of the data allocated by the caller */
172 compat_uptr_t ifs_ifsu; /* union of pointers */
173};
174
175struct compat_ifreq {
176 union {
177 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
178 } ifr_ifrn;
179 union {
180 struct sockaddr ifru_addr;
181 struct sockaddr ifru_dstaddr;
182 struct sockaddr ifru_broadaddr;
183 struct sockaddr ifru_netmask;
184 struct sockaddr ifru_hwaddr;
185 short ifru_flags;
186 compat_int_t ifru_ivalue;
187 compat_int_t ifru_mtu;
188 struct compat_ifmap ifru_map;
189 char ifru_slave[IFNAMSIZ]; /* Just fits the size */
190 char ifru_newname[IFNAMSIZ];
191 compat_caddr_t ifru_data;
192 struct compat_if_settings ifru_settings;
193 } ifr_ifru;
194};
195
196struct compat_ifconf {
197 compat_int_t ifc_len; /* size of buffer */
198 compat_caddr_t ifcbuf;
199};
200
157struct compat_robust_list { 201struct compat_robust_list {
158 compat_uptr_t next; 202 compat_uptr_t next;
159}; 203};
diff --git a/include/linux/cryptohash.h b/include/linux/cryptohash.h
index c118b2ad9807..ec78a4bbe1d5 100644
--- a/include/linux/cryptohash.h
+++ b/include/linux/cryptohash.h
@@ -2,6 +2,7 @@
2#define __CRYPTOHASH_H 2#define __CRYPTOHASH_H
3 3
4#define SHA_DIGEST_WORDS 5 4#define SHA_DIGEST_WORDS 5
5#define SHA_MESSAGE_BYTES (512 /*bits*/ / 8)
5#define SHA_WORKSPACE_WORDS 80 6#define SHA_WORKSPACE_WORDS 80
6 7
7void sha_init(__u32 *buf); 8void sha_init(__u32 *buf);
diff --git a/include/linux/dn.h b/include/linux/dn.h
index fe9990823193..9c50445462d9 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -71,14 +71,12 @@
71/* Structures */ 71/* Structures */
72 72
73 73
74struct dn_naddr 74struct dn_naddr {
75{
76 __le16 a_len; 75 __le16 a_len;
77 __u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */ 76 __u8 a_addr[DN_MAXADDL]; /* Two bytes little endian */
78}; 77};
79 78
80struct sockaddr_dn 79struct sockaddr_dn {
81{
82 __u16 sdn_family; 80 __u16 sdn_family;
83 __u8 sdn_flags; 81 __u8 sdn_flags;
84 __u8 sdn_objnum; 82 __u8 sdn_objnum;
@@ -101,8 +99,7 @@ struct optdata_dn {
101 __u8 opt_data[16]; /* User data */ 99 __u8 opt_data[16]; /* User data */
102}; 100};
103 101
104struct accessdata_dn 102struct accessdata_dn {
105{
106 __u8 acc_accl; 103 __u8 acc_accl;
107 __u8 acc_acc[DN_MAXACCL]; 104 __u8 acc_acc[DN_MAXACCL];
108 __u8 acc_passl; 105 __u8 acc_passl;
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h
index ec12cc74366f..034072cea853 100644
--- a/include/linux/errqueue.h
+++ b/include/linux/errqueue.h
@@ -3,8 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6struct sock_extended_err 6struct sock_extended_err {
7{
8 __u32 ee_errno; 7 __u32 ee_errno;
9 __u8 ee_origin; 8 __u8 ee_origin;
10 __u8 ee_type; 9 __u8 ee_type;
@@ -31,8 +30,7 @@ struct sock_extended_err
31 30
32#define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb)) 31#define SKB_EXT_ERR(skb) ((struct sock_exterr_skb *) ((skb)->cb))
33 32
34struct sock_exterr_skb 33struct sock_exterr_skb {
35{
36 union { 34 union {
37 struct inet_skb_parm h4; 35 struct inet_skb_parm h4;
38#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 36#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 15e4eb713694..ef4a2d84d922 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -49,13 +49,14 @@ static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
49 return (ep->speed_hi << 16) | ep->speed; 49 return (ep->speed_hi << 16) | ep->speed;
50} 50}
51 51
52#define ETHTOOL_FWVERS_LEN 32
52#define ETHTOOL_BUSINFO_LEN 32 53#define ETHTOOL_BUSINFO_LEN 32
53/* these strings are set to whatever the driver author decides... */ 54/* these strings are set to whatever the driver author decides... */
54struct ethtool_drvinfo { 55struct ethtool_drvinfo {
55 __u32 cmd; 56 __u32 cmd;
56 char driver[32]; /* driver short name, "tulip", "eepro100" */ 57 char driver[32]; /* driver short name, "tulip", "eepro100" */
57 char version[32]; /* driver version string */ 58 char version[32]; /* driver version string */
58 char fw_version[32]; /* firmware version string, if applicable */ 59 char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */
59 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ 60 char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */
60 /* For PCI devices, use pci_name(pci_dev). */ 61 /* For PCI devices, use pci_name(pci_dev). */
61 char reserved1[32]; 62 char reserved1[32];
@@ -495,13 +496,10 @@ struct ethtool_ops {
495 u32 (*get_priv_flags)(struct net_device *); 496 u32 (*get_priv_flags)(struct net_device *);
496 int (*set_priv_flags)(struct net_device *, u32); 497 int (*set_priv_flags)(struct net_device *, u32);
497 int (*get_sset_count)(struct net_device *, int); 498 int (*get_sset_count)(struct net_device *, int);
498
499 /* the following hooks are obsolete */
500 int (*self_test_count)(struct net_device *);/* use get_sset_count */
501 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
502 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); 499 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *);
503 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 500 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
504 int (*flash_device)(struct net_device *, struct ethtool_flash *); 501 int (*flash_device)(struct net_device *, struct ethtool_flash *);
502 int (*reset)(struct net_device *, u32 *);
505}; 503};
506#endif /* __KERNEL__ */ 504#endif /* __KERNEL__ */
507 505
@@ -559,6 +557,7 @@ struct ethtool_ops {
559#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ 557#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
560#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ 558#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
561#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ 559#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
560#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
562 561
563/* compatibility with older code */ 562/* compatibility with older code */
564#define SPARC_ETH_GSET ETHTOOL_GSET 563#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -633,6 +632,8 @@ struct ethtool_ops {
633#define PORT_MII 0x02 632#define PORT_MII 0x02
634#define PORT_FIBRE 0x03 633#define PORT_FIBRE 0x03
635#define PORT_BNC 0x04 634#define PORT_BNC 0x04
635#define PORT_DA 0x05
636#define PORT_NONE 0xef
636#define PORT_OTHER 0xff 637#define PORT_OTHER 0xff
637 638
638/* Which transceiver to use. */ 639/* Which transceiver to use. */
@@ -676,6 +677,8 @@ struct ethtool_ops {
676#define AH_V6_FLOW 0x0b 677#define AH_V6_FLOW 0x0b
677#define ESP_V6_FLOW 0x0c 678#define ESP_V6_FLOW 0x0c
678#define IP_USER_FLOW 0x0d 679#define IP_USER_FLOW 0x0d
680#define IPV4_FLOW 0x10
681#define IPV6_FLOW 0x11
679 682
680/* L3-L4 network traffic flow hash options */ 683/* L3-L4 network traffic flow hash options */
681#define RXH_L2DA (1 << 1) 684#define RXH_L2DA (1 << 1)
@@ -689,4 +692,34 @@ struct ethtool_ops {
689 692
690#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL 693#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
691 694
695/* Reset flags */
696/* The reset() operation must clear the flags for the components which
697 * were actually reset. On successful return, the flags indicate the
698 * components which were not reset, either because they do not exist
699 * in the hardware or because they cannot be reset independently. The
700 * driver must never reset any components that were not requested.
701 */
702enum ethtool_reset_flags {
703 /* These flags represent components dedicated to the interface
704 * the command is addressed to. Shift any flag left by
705 * ETH_RESET_SHARED_SHIFT to reset a shared component of the
706 * same type.
707 */
708 ETH_RESET_MGMT = 1 << 0, /* Management processor */
709 ETH_RESET_IRQ = 1 << 1, /* Interrupt requester */
710 ETH_RESET_DMA = 1 << 2, /* DMA engine */
711 ETH_RESET_FILTER = 1 << 3, /* Filtering/flow direction */
712 ETH_RESET_OFFLOAD = 1 << 4, /* Protocol offload */
713 ETH_RESET_MAC = 1 << 5, /* Media access controller */
714 ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */
715 ETH_RESET_RAM = 1 << 7, /* RAM shared between
716 * multiple components */
717
718 ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to
719 * this interface */
720 ETH_RESET_ALL = 0xffffffff, /* All components used by this
721 * interface, even if shared */
722};
723#define ETH_RESET_SHARED_SHIFT 16
724
692#endif /* _LINUX_ETHTOOL_H */ 725#endif /* _LINUX_ETHTOOL_H */
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
index 87b606b63f1e..51da65b68b85 100644
--- a/include/linux/fib_rules.h
+++ b/include/linux/fib_rules.h
@@ -8,13 +8,14 @@
8#define FIB_RULE_PERMANENT 0x00000001 8#define FIB_RULE_PERMANENT 0x00000001
9#define FIB_RULE_INVERT 0x00000002 9#define FIB_RULE_INVERT 0x00000002
10#define FIB_RULE_UNRESOLVED 0x00000004 10#define FIB_RULE_UNRESOLVED 0x00000004
11#define FIB_RULE_DEV_DETACHED 0x00000008 11#define FIB_RULE_IIF_DETACHED 0x00000008
12#define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED
13#define FIB_RULE_OIF_DETACHED 0x00000010
12 14
13/* try to find source address in routing lookups */ 15/* try to find source address in routing lookups */
14#define FIB_RULE_FIND_SADDR 0x00010000 16#define FIB_RULE_FIND_SADDR 0x00010000
15 17
16struct fib_rule_hdr 18struct fib_rule_hdr {
17{
18 __u8 family; 19 __u8 family;
19 __u8 dst_len; 20 __u8 dst_len;
20 __u8 src_len; 21 __u8 src_len;
@@ -28,12 +29,12 @@ struct fib_rule_hdr
28 __u32 flags; 29 __u32 flags;
29}; 30};
30 31
31enum 32enum {
32{
33 FRA_UNSPEC, 33 FRA_UNSPEC,
34 FRA_DST, /* destination address */ 34 FRA_DST, /* destination address */
35 FRA_SRC, /* source address */ 35 FRA_SRC, /* source address */
36 FRA_IFNAME, /* interface name */ 36 FRA_IIFNAME, /* interface name */
37#define FRA_IFNAME FRA_IIFNAME
37 FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */ 38 FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */
38 FRA_UNUSED2, 39 FRA_UNUSED2,
39 FRA_PRIORITY, /* priority/preference */ 40 FRA_PRIORITY, /* priority/preference */
@@ -47,13 +48,13 @@ enum
47 FRA_UNUSED8, 48 FRA_UNUSED8,
48 FRA_TABLE, /* Extended table id */ 49 FRA_TABLE, /* Extended table id */
49 FRA_FWMASK, /* mask for netfilter mark */ 50 FRA_FWMASK, /* mask for netfilter mark */
51 FRA_OIFNAME,
50 __FRA_MAX 52 __FRA_MAX
51}; 53};
52 54
53#define FRA_MAX (__FRA_MAX - 1) 55#define FRA_MAX (__FRA_MAX - 1)
54 56
55enum 57enum {
56{
57 FR_ACT_UNSPEC, 58 FR_ACT_UNSPEC,
58 FR_ACT_TO_TBL, /* Pass to fixed table */ 59 FR_ACT_TO_TBL, /* Pass to fixed table */
59 FR_ACT_GOTO, /* Jump to another rule */ 60 FR_ACT_GOTO, /* Jump to another rule */
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 1354aaf6abbe..29a0e3db9f43 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -23,16 +23,14 @@
23 * the BPF code definitions which need to match so you can share filters 23 * the BPF code definitions which need to match so you can share filters
24 */ 24 */
25 25
26struct sock_filter /* Filter block */ 26struct sock_filter { /* Filter block */
27{
28 __u16 code; /* Actual filter code */ 27 __u16 code; /* Actual filter code */
29 __u8 jt; /* Jump true */ 28 __u8 jt; /* Jump true */
30 __u8 jf; /* Jump false */ 29 __u8 jf; /* Jump false */
31 __u32 k; /* Generic multiuse field */ 30 __u32 k; /* Generic multiuse field */
32}; 31};
33 32
34struct sock_fprog /* Required for SO_ATTACH_FILTER. */ 33struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
35{
36 unsigned short len; /* Number of filter blocks */ 34 unsigned short len; /* Number of filter blocks */
37 struct sock_filter __user *filter; 35 struct sock_filter __user *filter;
38}; 36};
@@ -123,7 +121,9 @@ struct sock_fprog /* Required for SO_ATTACH_FILTER. */
123#define SKF_AD_IFINDEX 8 121#define SKF_AD_IFINDEX 8
124#define SKF_AD_NLATTR 12 122#define SKF_AD_NLATTR 12
125#define SKF_AD_NLATTR_NEST 16 123#define SKF_AD_NLATTR_NEST 16
126#define SKF_AD_MAX 20 124#define SKF_AD_MARK 20
125#define SKF_AD_QUEUE 24
126#define SKF_AD_MAX 28
127#define SKF_NET_OFF (-0x100000) 127#define SKF_NET_OFF (-0x100000)
128#define SKF_LL_OFF (-0x200000) 128#define SKF_LL_OFF (-0x200000)
129 129
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h
index 710e901085d0..552c8a0a12d1 100644
--- a/include/linux/gen_stats.h
+++ b/include/linux/gen_stats.h
@@ -18,13 +18,11 @@ enum {
18 * @bytes: number of seen bytes 18 * @bytes: number of seen bytes
19 * @packets: number of seen packets 19 * @packets: number of seen packets
20 */ 20 */
21struct gnet_stats_basic 21struct gnet_stats_basic {
22{
23 __u64 bytes; 22 __u64 bytes;
24 __u32 packets; 23 __u32 packets;
25}; 24};
26struct gnet_stats_basic_packed 25struct gnet_stats_basic_packed {
27{
28 __u64 bytes; 26 __u64 bytes;
29 __u32 packets; 27 __u32 packets;
30} __attribute__ ((packed)); 28} __attribute__ ((packed));
@@ -34,8 +32,7 @@ struct gnet_stats_basic_packed
34 * @bps: current byte rate 32 * @bps: current byte rate
35 * @pps: current packet rate 33 * @pps: current packet rate
36 */ 34 */
37struct gnet_stats_rate_est 35struct gnet_stats_rate_est {
38{
39 __u32 bps; 36 __u32 bps;
40 __u32 pps; 37 __u32 pps;
41}; 38};
@@ -48,8 +45,7 @@ struct gnet_stats_rate_est
48 * @requeues: number of requeues 45 * @requeues: number of requeues
49 * @overlimits: number of enqueues over the limit 46 * @overlimits: number of enqueues over the limit
50 */ 47 */
51struct gnet_stats_queue 48struct gnet_stats_queue {
52{
53 __u32 qlen; 49 __u32 qlen;
54 __u32 backlog; 50 __u32 backlog;
55 __u32 drops; 51 __u32 drops;
@@ -62,8 +58,7 @@ struct gnet_stats_queue
62 * @interval: sampling period 58 * @interval: sampling period
63 * @ewma_log: the log of measurement window weight 59 * @ewma_log: the log of measurement window weight
64 */ 60 */
65struct gnet_estimator 61struct gnet_estimator {
66{
67 signed char interval; 62 signed char interval;
68 unsigned char ewma_log; 63 unsigned char ewma_log;
69}; 64};
diff --git a/include/linux/i82593.h b/include/linux/i82593.h
new file mode 100644
index 000000000000..afac5c7a323d
--- /dev/null
+++ b/include/linux/i82593.h
@@ -0,0 +1,229 @@
1/*
2 * Definitions for Intel 82593 CSMA/CD Core LAN Controller
3 * The definitions are taken from the 1992 users manual with Intel
4 * order number 297125-001.
5 *
6 * /usr/src/pc/RCS/i82593.h,v 1.1 1996/07/17 15:23:12 root Exp
7 *
8 * Copyright 1994, Anders Klemets <klemets@it.kth.se>
9 *
10 * HISTORY
11 * i82593.h,v
12 * Revision 1.4 2005/11/4 09:15:00 baroniunas
13 * Modified copyright with permission of author as follows:
14 *
15 * "If I82539.H is the only file with my copyright statement
16 * that is included in the Source Forge project, then you have
17 * my approval to change the copyright statement to be a GPL
18 * license, in the way you proposed on October 10."
19 *
20 * Revision 1.1 1996/07/17 15:23:12 root
21 * Initial revision
22 *
23 * Revision 1.3 1995/04/05 15:13:58 adj
24 * Initial alpha release
25 *
26 * Revision 1.2 1994/06/16 23:57:31 klemets
27 * Mirrored all the fields in the configuration block.
28 *
29 * Revision 1.1 1994/06/02 20:25:34 klemets
30 * Initial revision
31 *
32 *
33 */
34#ifndef _I82593_H
35#define _I82593_H
36
37/* Intel 82593 CSMA/CD Core LAN Controller */
38
39/* Port 0 Command Register definitions */
40
41/* Execution operations */
42#define OP0_NOP 0 /* CHNL = 0 */
43#define OP0_SWIT_TO_PORT_1 0 /* CHNL = 1 */
44#define OP0_IA_SETUP 1
45#define OP0_CONFIGURE 2
46#define OP0_MC_SETUP 3
47#define OP0_TRANSMIT 4
48#define OP0_TDR 5
49#define OP0_DUMP 6
50#define OP0_DIAGNOSE 7
51#define OP0_TRANSMIT_NO_CRC 9
52#define OP0_RETRANSMIT 12
53#define OP0_ABORT 13
54/* Reception operations */
55#define OP0_RCV_ENABLE 8
56#define OP0_RCV_DISABLE 10
57#define OP0_STOP_RCV 11
58/* Status pointer control operations */
59#define OP0_FIX_PTR 15 /* CHNL = 1 */
60#define OP0_RLS_PTR 15 /* CHNL = 0 */
61#define OP0_RESET 14
62
63#define CR0_CHNL (1 << 4) /* 0=Channel 0, 1=Channel 1 */
64#define CR0_STATUS_0 0x00
65#define CR0_STATUS_1 0x20
66#define CR0_STATUS_2 0x40
67#define CR0_STATUS_3 0x60
68#define CR0_INT_ACK (1 << 7) /* 0=No ack, 1=acknowledge */
69
70/* Port 0 Status Register definitions */
71
72#define SR0_NO_RESULT 0 /* dummy */
73#define SR0_EVENT_MASK 0x0f
74#define SR0_IA_SETUP_DONE 1
75#define SR0_CONFIGURE_DONE 2
76#define SR0_MC_SETUP_DONE 3
77#define SR0_TRANSMIT_DONE 4
78#define SR0_TDR_DONE 5
79#define SR0_DUMP_DONE 6
80#define SR0_DIAGNOSE_PASSED 7
81#define SR0_TRANSMIT_NO_CRC_DONE 9
82#define SR0_RETRANSMIT_DONE 12
83#define SR0_EXECUTION_ABORTED 13
84#define SR0_END_OF_FRAME 8
85#define SR0_RECEPTION_ABORTED 10
86#define SR0_DIAGNOSE_FAILED 15
87#define SR0_STOP_REG_HIT 11
88
89#define SR0_CHNL (1 << 4)
90#define SR0_EXECUTION (1 << 5)
91#define SR0_RECEPTION (1 << 6)
92#define SR0_INTERRUPT (1 << 7)
93#define SR0_BOTH_RX_TX (SR0_EXECUTION | SR0_RECEPTION)
94
95#define SR3_EXEC_STATE_MASK 0x03
96#define SR3_EXEC_IDLE 0
97#define SR3_TX_ABORT_IN_PROGRESS 1
98#define SR3_EXEC_ACTIVE 2
99#define SR3_ABORT_IN_PROGRESS 3
100#define SR3_EXEC_CHNL (1 << 2)
101#define SR3_STP_ON_NO_RSRC (1 << 3)
102#define SR3_RCVING_NO_RSRC (1 << 4)
103#define SR3_RCV_STATE_MASK 0x60
104#define SR3_RCV_IDLE 0x00
105#define SR3_RCV_READY 0x20
106#define SR3_RCV_ACTIVE 0x40
107#define SR3_RCV_STOP_IN_PROG 0x60
108#define SR3_RCV_CHNL (1 << 7)
109
110/* Port 1 Command Register definitions */
111
112#define OP1_NOP 0
113#define OP1_SWIT_TO_PORT_0 1
114#define OP1_INT_DISABLE 2
115#define OP1_INT_ENABLE 3
116#define OP1_SET_TS 5
117#define OP1_RST_TS 7
118#define OP1_POWER_DOWN 8
119#define OP1_RESET_RING_MNGMT 11
120#define OP1_RESET 14
121#define OP1_SEL_RST 15
122
123#define CR1_STATUS_4 0x00
124#define CR1_STATUS_5 0x20
125#define CR1_STATUS_6 0x40
126#define CR1_STOP_REG_UPDATE (1 << 7)
127
128/* Receive frame status bits */
129
130#define RX_RCLD (1 << 0)
131#define RX_IA_MATCH (1 << 1)
132#define RX_NO_AD_MATCH (1 << 2)
133#define RX_NO_SFD (1 << 3)
134#define RX_SRT_FRM (1 << 7)
135#define RX_OVRRUN (1 << 8)
136#define RX_ALG_ERR (1 << 10)
137#define RX_CRC_ERR (1 << 11)
138#define RX_LEN_ERR (1 << 12)
139#define RX_RCV_OK (1 << 13)
140#define RX_TYP_LEN (1 << 15)
141
142/* Transmit status bits */
143
144#define TX_NCOL_MASK 0x0f
145#define TX_FRTL (1 << 4)
146#define TX_MAX_COL (1 << 5)
147#define TX_HRT_BEAT (1 << 6)
148#define TX_DEFER (1 << 7)
149#define TX_UND_RUN (1 << 8)
150#define TX_LOST_CTS (1 << 9)
151#define TX_LOST_CRS (1 << 10)
152#define TX_LTCOL (1 << 11)
153#define TX_OK (1 << 13)
154#define TX_COLL (1 << 15)
155
156struct i82593_conf_block {
157 u_char fifo_limit : 4,
158 forgnesi : 1,
159 fifo_32 : 1,
160 d6mod : 1,
161 throttle_enb : 1;
162 u_char throttle : 6,
163 cntrxint : 1,
164 contin : 1;
165 u_char addr_len : 3,
166 acloc : 1,
167 preamb_len : 2,
168 loopback : 2;
169 u_char lin_prio : 3,
170 tbofstop : 1,
171 exp_prio : 3,
172 bof_met : 1;
173 u_char : 4,
174 ifrm_spc : 4;
175 u_char : 5,
176 slottim_low : 3;
177 u_char slottim_hi : 3,
178 : 1,
179 max_retr : 4;
180 u_char prmisc : 1,
181 bc_dis : 1,
182 : 1,
183 crs_1 : 1,
184 nocrc_ins : 1,
185 crc_1632 : 1,
186 : 1,
187 crs_cdt : 1;
188 u_char cs_filter : 3,
189 crs_src : 1,
190 cd_filter : 3,
191 : 1;
192 u_char : 2,
193 min_fr_len : 6;
194 u_char lng_typ : 1,
195 lng_fld : 1,
196 rxcrc_xf : 1,
197 artx : 1,
198 sarec : 1,
199 tx_jabber : 1, /* why is this called max_len in the manual? */
200 hash_1 : 1,
201 lbpkpol : 1;
202 u_char : 6,
203 fdx : 1,
204 : 1;
205 u_char dummy_6 : 6, /* supposed to be ones */
206 mult_ia : 1,
207 dis_bof : 1;
208 u_char dummy_1 : 1, /* supposed to be one */
209 tx_ifs_retrig : 2,
210 mc_all : 1,
211 rcv_mon : 2,
212 frag_acpt : 1,
213 tstrttrs : 1;
214 u_char fretx : 1,
215 runt_eop : 1,
216 hw_sw_pin : 1,
217 big_endn : 1,
218 syncrqs : 1,
219 sttlen : 1,
220 tx_eop : 1,
221 rx_eop : 1;
222 u_char rbuf_size : 5,
223 rcvstop : 1,
224 : 2;
225};
226
227#define I82593_MAX_MULTICAST_ADDRESSES 128 /* Hardware hashed filter */
228
229#endif /* _I82593_H */
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 52e15e079c61..d9724a28c0c2 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -115,7 +115,6 @@
115#define IEEE80211_MAX_SSID_LEN 32 115#define IEEE80211_MAX_SSID_LEN 32
116 116
117#define IEEE80211_MAX_MESH_ID_LEN 32 117#define IEEE80211_MAX_MESH_ID_LEN 32
118#define IEEE80211_MESH_CONFIG_LEN 24
119 118
120#define IEEE80211_QOS_CTL_LEN 2 119#define IEEE80211_QOS_CTL_LEN 2
121#define IEEE80211_QOS_CTL_TID_MASK 0x000F 120#define IEEE80211_QOS_CTL_TID_MASK 0x000F
@@ -472,7 +471,7 @@ static inline int ieee80211_is_cfendack(__le16 fc)
472} 471}
473 472
474/** 473/**
475 * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC 474 * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame
476 * @fc: frame control bytes in little-endian byteorder 475 * @fc: frame control bytes in little-endian byteorder
477 */ 476 */
478static inline int ieee80211_is_nullfunc(__le16 fc) 477static inline int ieee80211_is_nullfunc(__le16 fc)
@@ -481,6 +480,16 @@ static inline int ieee80211_is_nullfunc(__le16 fc)
481 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC); 480 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
482} 481}
483 482
483/**
484 * ieee80211_is_qos_nullfunc - check if frame is a QoS nullfunc frame
485 * @fc: frame control bytes in little-endian byteorder
486 */
487static inline int ieee80211_is_qos_nullfunc(__le16 fc)
488{
489 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
490 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
491}
492
484struct ieee80211s_hdr { 493struct ieee80211s_hdr {
485 u8 flags; 494 u8 flags;
486 u8 ttl; 495 u8 ttl;
@@ -544,6 +553,35 @@ struct ieee80211_tim_ie {
544 u8 virtual_map[1]; 553 u8 virtual_map[1];
545} __attribute__ ((packed)); 554} __attribute__ ((packed));
546 555
556/**
557 * struct ieee80211_meshconf_ie
558 *
559 * This structure refers to "Mesh Configuration information element"
560 */
561struct ieee80211_meshconf_ie {
562 u8 meshconf_psel;
563 u8 meshconf_pmetric;
564 u8 meshconf_congest;
565 u8 meshconf_synch;
566 u8 meshconf_auth;
567 u8 meshconf_form;
568 u8 meshconf_cap;
569} __attribute__ ((packed));
570
571/**
572 * struct ieee80211_rann_ie
573 *
574 * This structure refers to "Root Announcement information element"
575 */
576struct ieee80211_rann_ie {
577 u8 rann_flags;
578 u8 rann_hopcount;
579 u8 rann_ttl;
580 u8 rann_addr[6];
581 u32 rann_seq;
582 u32 rann_metric;
583} __attribute__ ((packed));
584
547#define WLAN_SA_QUERY_TR_ID_LEN 2 585#define WLAN_SA_QUERY_TR_ID_LEN 2
548 586
549struct ieee80211_mgmt { 587struct ieee80211_mgmt {
@@ -1060,6 +1098,7 @@ enum ieee80211_eid {
1060 WLAN_EID_PREQ = 68, 1098 WLAN_EID_PREQ = 68,
1061 WLAN_EID_PREP = 69, 1099 WLAN_EID_PREP = 69,
1062 WLAN_EID_PERR = 70, 1100 WLAN_EID_PERR = 70,
1101 WLAN_EID_RANN = 49, /* compatible with FreeBSD */
1063 /* 802.11h */ 1102 /* 802.11h */
1064 WLAN_EID_PWR_CONSTRAINT = 32, 1103 WLAN_EID_PWR_CONSTRAINT = 32,
1065 WLAN_EID_PWR_CAPABILITY = 33, 1104 WLAN_EID_PWR_CAPABILITY = 33,
@@ -1227,6 +1266,8 @@ enum ieee80211_sa_query_action {
1227 1266
1228#define WLAN_MAX_KEY_LEN 32 1267#define WLAN_MAX_KEY_LEN 32
1229 1268
1269#define WLAN_PMKID_LEN 16
1270
1230/** 1271/**
1231 * ieee80211_get_qos_ctl - get pointer to qos control bytes 1272 * ieee80211_get_qos_ctl - get pointer to qos control bytes
1232 * @hdr: the frame 1273 * @hdr: the frame
diff --git a/include/linux/if.h b/include/linux/if.h
index b9a6229f3be7..3a9f410a296b 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -70,6 +70,7 @@
70#define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to 70#define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to
71 * release skb->dst 71 * release skb->dst
72 */ 72 */
73#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
73 74
74#define IF_GET_IFACE 0x0001 /* for querying only */ 75#define IF_GET_IFACE 0x0001 /* for querying only */
75#define IF_GET_PROTO 0x0002 76#define IF_GET_PROTO 0x0002
@@ -125,8 +126,7 @@ enum {
125 * being very small might be worth keeping for clean configuration. 126 * being very small might be worth keeping for clean configuration.
126 */ 127 */
127 128
128struct ifmap 129struct ifmap {
129{
130 unsigned long mem_start; 130 unsigned long mem_start;
131 unsigned long mem_end; 131 unsigned long mem_end;
132 unsigned short base_addr; 132 unsigned short base_addr;
@@ -136,8 +136,7 @@ struct ifmap
136 /* 3 bytes spare */ 136 /* 3 bytes spare */
137}; 137};
138 138
139struct if_settings 139struct if_settings {
140{
141 unsigned int type; /* Type of physical device or protocol */ 140 unsigned int type; /* Type of physical device or protocol */
142 unsigned int size; /* Size of the data allocated by the caller */ 141 unsigned int size; /* Size of the data allocated by the caller */
143 union { 142 union {
@@ -161,8 +160,7 @@ struct if_settings
161 * remainder may be interface specific. 160 * remainder may be interface specific.
162 */ 161 */
163 162
164struct ifreq 163struct ifreq {
165{
166#define IFHWADDRLEN 6 164#define IFHWADDRLEN 6
167 union 165 union
168 { 166 {
@@ -211,11 +209,9 @@ struct ifreq
211 * must know all networks accessible). 209 * must know all networks accessible).
212 */ 210 */
213 211
214struct ifconf 212struct ifconf {
215{
216 int ifc_len; /* size of buffer */ 213 int ifc_len; /* size of buffer */
217 union 214 union {
218 {
219 char __user *ifcu_buf; 215 char __user *ifcu_buf;
220 struct ifreq __user *ifcu_req; 216 struct ifreq __user *ifcu_req;
221 } ifc_ifcu; 217 } ifc_ifcu;
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index fd9740466757..23357ab81a77 100644
--- a/include/linux/if_addr.h
+++ b/include/linux/if_addr.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/netlink.h> 5#include <linux/netlink.h>
6 6
7struct ifaddrmsg 7struct ifaddrmsg {
8{
9 __u8 ifa_family; 8 __u8 ifa_family;
10 __u8 ifa_prefixlen; /* The prefix length */ 9 __u8 ifa_prefixlen; /* The prefix length */
11 __u8 ifa_flags; /* Flags */ 10 __u8 ifa_flags; /* Flags */
@@ -20,8 +19,7 @@ struct ifaddrmsg
20 * but for point-to-point IFA_ADDRESS is DESTINATION address, 19 * but for point-to-point IFA_ADDRESS is DESTINATION address,
21 * local address is supplied in IFA_LOCAL attribute. 20 * local address is supplied in IFA_LOCAL attribute.
22 */ 21 */
23enum 22enum {
24{
25 IFA_UNSPEC, 23 IFA_UNSPEC,
26 IFA_ADDRESS, 24 IFA_ADDRESS,
27 IFA_LOCAL, 25 IFA_LOCAL,
@@ -47,8 +45,7 @@ enum
47#define IFA_F_TENTATIVE 0x40 45#define IFA_F_TENTATIVE 0x40
48#define IFA_F_PERMANENT 0x80 46#define IFA_F_PERMANENT 0x80
49 47
50struct ifa_cacheinfo 48struct ifa_cacheinfo {
51{
52 __u32 ifa_prefered; 49 __u32 ifa_prefered;
53 __u32 ifa_valid; 50 __u32 ifa_valid;
54 __u32 cstamp; /* created timestamp, hundredths of seconds */ 51 __u32 cstamp; /* created timestamp, hundredths of seconds */
diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h
index 89571f65d6de..54580c298187 100644
--- a/include/linux/if_addrlabel.h
+++ b/include/linux/if_addrlabel.h
@@ -12,8 +12,7 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15struct ifaddrlblmsg 15struct ifaddrlblmsg {
16{
17 __u8 ifal_family; /* Address family */ 16 __u8 ifal_family; /* Address family */
18 __u8 __ifal_reserved; /* Reserved */ 17 __u8 __ifal_reserved; /* Reserved */
19 __u8 ifal_prefixlen; /* Prefix length */ 18 __u8 ifal_prefixlen; /* Prefix length */
@@ -22,8 +21,7 @@ struct ifaddrlblmsg
22 __u32 ifal_seq; /* sequence number */ 21 __u32 ifal_seq; /* sequence number */
23}; 22};
24 23
25enum 24enum {
26{
27 IFAL_ADDRESS = 1, 25 IFAL_ADDRESS = 1,
28 IFAL_LABEL = 2, 26 IFAL_LABEL = 2,
29 __IFAL_MAX 27 __IFAL_MAX
diff --git a/include/linux/if_arcnet.h b/include/linux/if_arcnet.h
index 0835debab115..46e34bd0e783 100644
--- a/include/linux/if_arcnet.h
+++ b/include/linux/if_arcnet.h
@@ -56,8 +56,7 @@
56/* 56/*
57 * The RFC1201-specific components of an arcnet packet header. 57 * The RFC1201-specific components of an arcnet packet header.
58 */ 58 */
59struct arc_rfc1201 59struct arc_rfc1201 {
60{
61 __u8 proto; /* protocol ID field - varies */ 60 __u8 proto; /* protocol ID field - varies */
62 __u8 split_flag; /* for use with split packets */ 61 __u8 split_flag; /* for use with split packets */
63 __be16 sequence; /* sequence number */ 62 __be16 sequence; /* sequence number */
@@ -69,8 +68,7 @@ struct arc_rfc1201
69/* 68/*
70 * The RFC1051-specific components. 69 * The RFC1051-specific components.
71 */ 70 */
72struct arc_rfc1051 71struct arc_rfc1051 {
73{
74 __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ 72 __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */
75 __u8 payload[0]; /* 507 bytes */ 73 __u8 payload[0]; /* 507 bytes */
76}; 74};
@@ -81,8 +79,7 @@ struct arc_rfc1051
81 * The ethernet-encap-specific components. We have a real ethernet header 79 * The ethernet-encap-specific components. We have a real ethernet header
82 * and some data. 80 * and some data.
83 */ 81 */
84struct arc_eth_encap 82struct arc_eth_encap {
85{
86 __u8 proto; /* Always ARC_P_ETHER */ 83 __u8 proto; /* Always ARC_P_ETHER */
87 struct ethhdr eth; /* standard ethernet header (yuck!) */ 84 struct ethhdr eth; /* standard ethernet header (yuck!) */
88 __u8 payload[0]; /* 493 bytes */ 85 __u8 payload[0]; /* 493 bytes */
@@ -90,8 +87,7 @@ struct arc_eth_encap
90#define ETH_ENCAP_HDR_SIZE 14 87#define ETH_ENCAP_HDR_SIZE 14
91 88
92 89
93struct arc_cap 90struct arc_cap {
94{
95 __u8 proto; 91 __u8 proto;
96 __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */ 92 __u8 cookie[sizeof(int)]; /* Actually NOT sent over the network */
97 union { 93 union {
@@ -108,8 +104,7 @@ struct arc_cap
108 * the _end_ of the 512-byte buffer. We hide this complexity inside the 104 * the _end_ of the 512-byte buffer. We hide this complexity inside the
109 * driver. 105 * driver.
110 */ 106 */
111struct arc_hardware 107struct arc_hardware {
112{
113 __u8 source, /* source ARCnet - filled in automagically */ 108 __u8 source, /* source ARCnet - filled in automagically */
114 dest, /* destination ARCnet - 0 for broadcast */ 109 dest, /* destination ARCnet - 0 for broadcast */
115 offset[2]; /* offset bytes (some weird semantics) */ 110 offset[2]; /* offset bytes (some weird semantics) */
@@ -120,8 +115,7 @@ struct arc_hardware
120 * This is an ARCnet frame header, as seen by the kernel (and userspace, 115 * This is an ARCnet frame header, as seen by the kernel (and userspace,
121 * when you do a raw packet capture). 116 * when you do a raw packet capture).
122 */ 117 */
123struct archdr 118struct archdr {
124{
125 /* hardware requirements */ 119 /* hardware requirements */
126 struct arc_hardware hard; 120 struct arc_hardware hard;
127 121
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 282eb37e2dec..e80b7f88f7c6 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -133,8 +133,7 @@ struct arpreq_old {
133 * This structure defines an ethernet arp header. 133 * This structure defines an ethernet arp header.
134 */ 134 */
135 135
136struct arphdr 136struct arphdr {
137{
138 __be16 ar_hrd; /* format of hardware address */ 137 __be16 ar_hrd; /* format of hardware address */
139 __be16 ar_pro; /* format of protocol address */ 138 __be16 ar_pro; /* format of protocol address */
140 unsigned char ar_hln; /* length of hardware address */ 139 unsigned char ar_hln; /* length of hardware address */
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h
index 65c2d247068b..cd525fae3c98 100644
--- a/include/linux/if_bonding.h
+++ b/include/linux/if_bonding.h
@@ -94,8 +94,7 @@ typedef struct ifbond {
94 __s32 miimon; 94 __s32 miimon;
95} ifbond; 95} ifbond;
96 96
97typedef struct ifslave 97typedef struct ifslave {
98{
99 __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */ 98 __s32 slave_id; /* Used as an IN param to the BOND_SLAVE_INFO_QUERY ioctl */
100 char slave_name[IFNAMSIZ]; 99 char slave_name[IFNAMSIZ];
101 __s8 link; 100 __s8 link;
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 6badb3e2c4e4..938b7e81df95 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -49,8 +49,7 @@
49#define BR_STATE_FORWARDING 3 49#define BR_STATE_FORWARDING 3
50#define BR_STATE_BLOCKING 4 50#define BR_STATE_BLOCKING 4
51 51
52struct __bridge_info 52struct __bridge_info {
53{
54 __u64 designated_root; 53 __u64 designated_root;
55 __u64 bridge_id; 54 __u64 bridge_id;
56 __u32 root_path_cost; 55 __u32 root_path_cost;
@@ -72,8 +71,7 @@ struct __bridge_info
72 __u32 gc_timer_value; 71 __u32 gc_timer_value;
73}; 72};
74 73
75struct __port_info 74struct __port_info {
76{
77 __u64 designated_root; 75 __u64 designated_root;
78 __u64 designated_bridge; 76 __u64 designated_bridge;
79 __u16 port_id; 77 __u16 port_id;
@@ -89,8 +87,7 @@ struct __port_info
89 __u32 hold_timer_value; 87 __u32 hold_timer_value;
90}; 88};
91 89
92struct __fdb_entry 90struct __fdb_entry {
93{
94 __u8 mac_addr[6]; 91 __u8 mac_addr[6];
95 __u8 port_no; 92 __u8 port_no;
96 __u8 is_local; 93 __u8 is_local;
diff --git a/include/linux/if_ec.h b/include/linux/if_ec.h
index e7499aa79783..d85f9f48129f 100644
--- a/include/linux/if_ec.h
+++ b/include/linux/if_ec.h
@@ -5,14 +5,12 @@
5 5
6/* User visible stuff. Glibc provides its own but libc5 folk will use these */ 6/* User visible stuff. Glibc provides its own but libc5 folk will use these */
7 7
8struct ec_addr 8struct ec_addr {
9{
10 unsigned char station; /* Station number. */ 9 unsigned char station; /* Station number. */
11 unsigned char net; /* Network number. */ 10 unsigned char net; /* Network number. */
12}; 11};
13 12
14struct sockaddr_ec 13struct sockaddr_ec {
15{
16 unsigned short sec_family; 14 unsigned short sec_family;
17 unsigned char port; /* Port number. */ 15 unsigned char port; /* Port number. */
18 unsigned char cb; /* Control/flag byte. */ 16 unsigned char cb; /* Control/flag byte. */
@@ -37,8 +35,7 @@ struct sockaddr_ec
37#define EC_HLEN 6 35#define EC_HLEN 6
38 36
39/* This is what an Econet frame looks like on the wire. */ 37/* This is what an Econet frame looks like on the wire. */
40struct ec_framehdr 38struct ec_framehdr {
41{
42 unsigned char dst_stn; 39 unsigned char dst_stn;
43 unsigned char dst_net; 40 unsigned char dst_net;
44 unsigned char src_stn; 41 unsigned char src_stn;
@@ -62,8 +59,7 @@ static inline struct econet_sock *ec_sk(const struct sock *sk)
62 return (struct econet_sock *)sk; 59 return (struct econet_sock *)sk;
63} 60}
64 61
65struct ec_device 62struct ec_device {
66{
67 unsigned char station, net; /* Econet protocol address */ 63 unsigned char station, net; /* Econet protocol address */
68}; 64};
69 65
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 580b6004d00e..005e1525ab86 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -136,10 +136,6 @@ extern struct ctl_table ether_table[];
136 136
137extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); 137extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
138 138
139/*
140 * Display a 6 byte device address (MAC) in a readable format.
141 */
142extern char *print_mac(char *buf, const unsigned char *addr) __deprecated;
143#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" 139#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
144#define MAC_BUF_SIZE 18 140#define MAC_BUF_SIZE 18
145#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] 141#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE]
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h
index 45de1046dbbf..5459c5c09930 100644
--- a/include/linux/if_fddi.h
+++ b/include/linux/if_fddi.h
@@ -63,36 +63,32 @@
63#define FDDI_UI_CMD 0x03 63#define FDDI_UI_CMD 0x03
64 64
65/* Define 802.2 Type 1 header */ 65/* Define 802.2 Type 1 header */
66struct fddi_8022_1_hdr 66struct fddi_8022_1_hdr {
67 {
68 __u8 dsap; /* destination service access point */ 67 __u8 dsap; /* destination service access point */
69 __u8 ssap; /* source service access point */ 68 __u8 ssap; /* source service access point */
70 __u8 ctrl; /* control byte #1 */ 69 __u8 ctrl; /* control byte #1 */
71 } __attribute__ ((packed)); 70} __attribute__ ((packed));
72 71
73/* Define 802.2 Type 2 header */ 72/* Define 802.2 Type 2 header */
74struct fddi_8022_2_hdr 73struct fddi_8022_2_hdr {
75 {
76 __u8 dsap; /* destination service access point */ 74 __u8 dsap; /* destination service access point */
77 __u8 ssap; /* source service access point */ 75 __u8 ssap; /* source service access point */
78 __u8 ctrl_1; /* control byte #1 */ 76 __u8 ctrl_1; /* control byte #1 */
79 __u8 ctrl_2; /* control byte #2 */ 77 __u8 ctrl_2; /* control byte #2 */
80 } __attribute__ ((packed)); 78} __attribute__ ((packed));
81 79
82/* Define 802.2 SNAP header */ 80/* Define 802.2 SNAP header */
83#define FDDI_K_OUI_LEN 3 81#define FDDI_K_OUI_LEN 3
84struct fddi_snap_hdr 82struct fddi_snap_hdr {
85 {
86 __u8 dsap; /* always 0xAA */ 83 __u8 dsap; /* always 0xAA */
87 __u8 ssap; /* always 0xAA */ 84 __u8 ssap; /* always 0xAA */
88 __u8 ctrl; /* always 0x03 */ 85 __u8 ctrl; /* always 0x03 */
89 __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ 86 __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */
90 __be16 ethertype; /* packet type ID field */ 87 __be16 ethertype; /* packet type ID field */
91 } __attribute__ ((packed)); 88} __attribute__ ((packed));
92 89
93/* Define FDDI LLC frame header */ 90/* Define FDDI LLC frame header */
94struct fddihdr 91struct fddihdr {
95 {
96 __u8 fc; /* frame control */ 92 __u8 fc; /* frame control */
97 __u8 daddr[FDDI_K_ALEN]; /* destination address */ 93 __u8 daddr[FDDI_K_ALEN]; /* destination address */
98 __u8 saddr[FDDI_K_ALEN]; /* source address */ 94 __u8 saddr[FDDI_K_ALEN]; /* source address */
@@ -102,7 +98,7 @@ struct fddihdr
102 struct fddi_8022_2_hdr llc_8022_2; 98 struct fddi_8022_2_hdr llc_8022_2;
103 struct fddi_snap_hdr llc_snap; 99 struct fddi_snap_hdr llc_snap;
104 } hdr; 100 } hdr;
105 } __attribute__ ((packed)); 101} __attribute__ ((packed));
106 102
107#ifdef __KERNEL__ 103#ifdef __KERNEL__
108#include <linux/netdevice.h> 104#include <linux/netdevice.h>
@@ -197,7 +193,7 @@ struct fddi_statistics {
197 __u32 port_pc_withhold[2]; 193 __u32 port_pc_withhold[2];
198 __u32 port_ler_flag[2]; 194 __u32 port_ler_flag[2];
199 __u32 port_hardware_present[2]; 195 __u32 port_hardware_present[2];
200 }; 196};
201#endif /* __KERNEL__ */ 197#endif /* __KERNEL__ */
202 198
203#endif /* _LINUX_IF_FDDI_H */ 199#endif /* _LINUX_IF_FDDI_H */
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h
index 4a7c9940b080..8d038eb8db5c 100644
--- a/include/linux/if_hippi.h
+++ b/include/linux/if_hippi.h
@@ -51,8 +51,7 @@
51 * HIPPI statistics collection data. 51 * HIPPI statistics collection data.
52 */ 52 */
53 53
54struct hipnet_statistics 54struct hipnet_statistics {
55{
56 int rx_packets; /* total packets received */ 55 int rx_packets; /* total packets received */
57 int tx_packets; /* total packets transmitted */ 56 int tx_packets; /* total packets transmitted */
58 int rx_errors; /* bad packets received */ 57 int rx_errors; /* bad packets received */
@@ -77,8 +76,7 @@ struct hipnet_statistics
77}; 76};
78 77
79 78
80struct hippi_fp_hdr 79struct hippi_fp_hdr {
81{
82#if 0 80#if 0
83 __u8 ulp; /* must contain 4 */ 81 __u8 ulp; /* must contain 4 */
84#if defined (__BIG_ENDIAN_BITFIELD) 82#if defined (__BIG_ENDIAN_BITFIELD)
@@ -108,8 +106,7 @@ struct hippi_fp_hdr
108 __be32 d2_size; 106 __be32 d2_size;
109} __attribute__ ((packed)); 107} __attribute__ ((packed));
110 108
111struct hippi_le_hdr 109struct hippi_le_hdr {
112{
113#if defined (__BIG_ENDIAN_BITFIELD) 110#if defined (__BIG_ENDIAN_BITFIELD)
114 __u8 fc:3; 111 __u8 fc:3;
115 __u8 double_wide:1; 112 __u8 double_wide:1;
@@ -139,8 +136,7 @@ struct hippi_le_hdr
139 * Looks like the dsap and ssap fields have been swapped by mistake in 136 * Looks like the dsap and ssap fields have been swapped by mistake in
140 * RFC 2067 "IP over HIPPI". 137 * RFC 2067 "IP over HIPPI".
141 */ 138 */
142struct hippi_snap_hdr 139struct hippi_snap_hdr {
143{
144 __u8 dsap; /* always 0xAA */ 140 __u8 dsap; /* always 0xAA */
145 __u8 ssap; /* always 0xAA */ 141 __u8 ssap; /* always 0xAA */
146 __u8 ctrl; /* always 0x03 */ 142 __u8 ctrl; /* always 0x03 */
@@ -148,8 +144,7 @@ struct hippi_snap_hdr
148 __be16 ethertype; /* packet type ID field */ 144 __be16 ethertype; /* packet type ID field */
149} __attribute__ ((packed)); 145} __attribute__ ((packed));
150 146
151struct hippi_hdr 147struct hippi_hdr {
152{
153 struct hippi_fp_hdr fp; 148 struct hippi_fp_hdr fp;
154 struct hippi_le_hdr le; 149 struct hippi_le_hdr le;
155 struct hippi_snap_hdr snap; 150 struct hippi_snap_hdr snap;
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index 176c5182c515..6674791622ca 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -5,8 +5,7 @@
5#include <linux/netlink.h> 5#include <linux/netlink.h>
6 6
7/* The struct should be in sync with struct net_device_stats */ 7/* The struct should be in sync with struct net_device_stats */
8struct rtnl_link_stats 8struct rtnl_link_stats {
9{
10 __u32 rx_packets; /* total packets received */ 9 __u32 rx_packets; /* total packets received */
11 __u32 tx_packets; /* total packets transmitted */ 10 __u32 tx_packets; /* total packets transmitted */
12 __u32 rx_bytes; /* total bytes received */ 11 __u32 rx_bytes; /* total bytes received */
@@ -39,8 +38,7 @@ struct rtnl_link_stats
39}; 38};
40 39
41/* The struct should be in sync with struct ifmap */ 40/* The struct should be in sync with struct ifmap */
42struct rtnl_link_ifmap 41struct rtnl_link_ifmap {
43{
44 __u64 mem_start; 42 __u64 mem_start;
45 __u64 mem_end; 43 __u64 mem_end;
46 __u64 base_addr; 44 __u64 base_addr;
@@ -49,8 +47,7 @@ struct rtnl_link_ifmap
49 __u8 port; 47 __u8 port;
50}; 48};
51 49
52enum 50enum {
53{
54 IFLA_UNSPEC, 51 IFLA_UNSPEC,
55 IFLA_ADDRESS, 52 IFLA_ADDRESS,
56 IFLA_BROADCAST, 53 IFLA_BROADCAST,
@@ -123,8 +120,7 @@ enum
123 */ 120 */
124 121
125/* Subtype attributes for IFLA_PROTINFO */ 122/* Subtype attributes for IFLA_PROTINFO */
126enum 123enum {
127{
128 IFLA_INET6_UNSPEC, 124 IFLA_INET6_UNSPEC,
129 IFLA_INET6_FLAGS, /* link flags */ 125 IFLA_INET6_FLAGS, /* link flags */
130 IFLA_INET6_CONF, /* sysctl parameters */ 126 IFLA_INET6_CONF, /* sysctl parameters */
@@ -137,16 +133,14 @@ enum
137 133
138#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1) 134#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
139 135
140struct ifla_cacheinfo 136struct ifla_cacheinfo {
141{
142 __u32 max_reasm_len; 137 __u32 max_reasm_len;
143 __u32 tstamp; /* ipv6InterfaceTable updated timestamp */ 138 __u32 tstamp; /* ipv6InterfaceTable updated timestamp */
144 __u32 reachable_time; 139 __u32 reachable_time;
145 __u32 retrans_time; 140 __u32 retrans_time;
146}; 141};
147 142
148enum 143enum {
149{
150 IFLA_INFO_UNSPEC, 144 IFLA_INFO_UNSPEC,
151 IFLA_INFO_KIND, 145 IFLA_INFO_KIND,
152 IFLA_INFO_DATA, 146 IFLA_INFO_DATA,
@@ -158,8 +152,7 @@ enum
158 152
159/* VLAN section */ 153/* VLAN section */
160 154
161enum 155enum {
162{
163 IFLA_VLAN_UNSPEC, 156 IFLA_VLAN_UNSPEC,
164 IFLA_VLAN_ID, 157 IFLA_VLAN_ID,
165 IFLA_VLAN_FLAGS, 158 IFLA_VLAN_FLAGS,
@@ -175,8 +168,7 @@ struct ifla_vlan_flags {
175 __u32 mask; 168 __u32 mask;
176}; 169};
177 170
178enum 171enum {
179{
180 IFLA_VLAN_QOS_UNSPEC, 172 IFLA_VLAN_QOS_UNSPEC,
181 IFLA_VLAN_QOS_MAPPING, 173 IFLA_VLAN_QOS_MAPPING,
182 __IFLA_VLAN_QOS_MAX 174 __IFLA_VLAN_QOS_MAX
@@ -184,10 +176,24 @@ enum
184 176
185#define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1) 177#define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
186 178
187struct ifla_vlan_qos_mapping 179struct ifla_vlan_qos_mapping {
188{
189 __u32 from; 180 __u32 from;
190 __u32 to; 181 __u32 to;
191}; 182};
192 183
184/* MACVLAN section */
185enum {
186 IFLA_MACVLAN_UNSPEC,
187 IFLA_MACVLAN_MODE,
188 __IFLA_MACVLAN_MAX,
189};
190
191#define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
192
193enum macvlan_mode {
194 MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
195 MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
196 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
197};
198
193#endif /* _LINUX_IF_LINK_H */ 199#endif /* _LINUX_IF_LINK_H */
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index dea7d6b7cf98..4021d47cc437 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -3,15 +3,13 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6struct sockaddr_pkt 6struct sockaddr_pkt {
7{
8 unsigned short spkt_family; 7 unsigned short spkt_family;
9 unsigned char spkt_device[14]; 8 unsigned char spkt_device[14];
10 __be16 spkt_protocol; 9 __be16 spkt_protocol;
11}; 10};
12 11
13struct sockaddr_ll 12struct sockaddr_ll {
14{
15 unsigned short sll_family; 13 unsigned short sll_family;
16 __be16 sll_protocol; 14 __be16 sll_protocol;
17 int sll_ifindex; 15 int sll_ifindex;
@@ -49,14 +47,12 @@ struct sockaddr_ll
49#define PACKET_TX_RING 13 47#define PACKET_TX_RING 13
50#define PACKET_LOSS 14 48#define PACKET_LOSS 14
51 49
52struct tpacket_stats 50struct tpacket_stats {
53{
54 unsigned int tp_packets; 51 unsigned int tp_packets;
55 unsigned int tp_drops; 52 unsigned int tp_drops;
56}; 53};
57 54
58struct tpacket_auxdata 55struct tpacket_auxdata {
59{
60 __u32 tp_status; 56 __u32 tp_status;
61 __u32 tp_len; 57 __u32 tp_len;
62 __u32 tp_snaplen; 58 __u32 tp_snaplen;
@@ -78,8 +74,7 @@ struct tpacket_auxdata
78#define TP_STATUS_SENDING 0x2 74#define TP_STATUS_SENDING 0x2
79#define TP_STATUS_WRONG_FORMAT 0x4 75#define TP_STATUS_WRONG_FORMAT 0x4
80 76
81struct tpacket_hdr 77struct tpacket_hdr {
82{
83 unsigned long tp_status; 78 unsigned long tp_status;
84 unsigned int tp_len; 79 unsigned int tp_len;
85 unsigned int tp_snaplen; 80 unsigned int tp_snaplen;
@@ -93,8 +88,7 @@ struct tpacket_hdr
93#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) 88#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
94#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) 89#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
95 90
96struct tpacket2_hdr 91struct tpacket2_hdr {
97{
98 __u32 tp_status; 92 __u32 tp_status;
99 __u32 tp_len; 93 __u32 tp_len;
100 __u32 tp_snaplen; 94 __u32 tp_snaplen;
@@ -107,8 +101,7 @@ struct tpacket2_hdr
107 101
108#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) 102#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
109 103
110enum tpacket_versions 104enum tpacket_versions {
111{
112 TPACKET_V1, 105 TPACKET_V1,
113 TPACKET_V2, 106 TPACKET_V2,
114}; 107};
@@ -126,16 +119,14 @@ enum tpacket_versions
126 - Pad to align to TPACKET_ALIGNMENT=16 119 - Pad to align to TPACKET_ALIGNMENT=16
127 */ 120 */
128 121
129struct tpacket_req 122struct tpacket_req {
130{
131 unsigned int tp_block_size; /* Minimal size of contiguous block */ 123 unsigned int tp_block_size; /* Minimal size of contiguous block */
132 unsigned int tp_block_nr; /* Number of blocks */ 124 unsigned int tp_block_nr; /* Number of blocks */
133 unsigned int tp_frame_size; /* Size of frame */ 125 unsigned int tp_frame_size; /* Size of frame */
134 unsigned int tp_frame_nr; /* Total number of frames */ 126 unsigned int tp_frame_nr; /* Total number of frames */
135}; 127};
136 128
137struct packet_mreq 129struct packet_mreq {
138{
139 int mr_ifindex; 130 int mr_ifindex;
140 unsigned short mr_type; 131 unsigned short mr_type;
141 unsigned short mr_alen; 132 unsigned short mr_alen;
diff --git a/include/linux/if_plip.h b/include/linux/if_plip.h
index 153a649915a2..6298c7e88b2b 100644
--- a/include/linux/if_plip.h
+++ b/include/linux/if_plip.h
@@ -15,8 +15,7 @@
15 15
16#define SIOCDEVPLIP SIOCDEVPRIVATE 16#define SIOCDEVPLIP SIOCDEVPRIVATE
17 17
18struct plipconf 18struct plipconf {
19{
20 unsigned short pcmd; 19 unsigned short pcmd;
21 unsigned long nibble; 20 unsigned long nibble;
22 unsigned long trigger; 21 unsigned long trigger;
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h
index 3a14b088c8ec..c58baea4a25b 100644
--- a/include/linux/if_pppol2tp.h
+++ b/include/linux/if_pppol2tp.h
@@ -24,8 +24,7 @@
24/* Structure used to connect() the socket to a particular tunnel UDP 24/* Structure used to connect() the socket to a particular tunnel UDP
25 * socket. 25 * socket.
26 */ 26 */
27struct pppol2tp_addr 27struct pppol2tp_addr {
28{
29 __kernel_pid_t pid; /* pid that owns the fd. 28 __kernel_pid_t pid; /* pid that owns the fd.
30 * 0 => current */ 29 * 0 => current */
31 int fd; /* FD of UDP socket to use */ 30 int fd; /* FD of UDP socket to use */
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index 5a9aae4adb44..1822d635be6b 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -5,6 +5,7 @@
5 5
6#ifdef __KERNEL__ 6#ifdef __KERNEL__
7#include <linux/ip.h> 7#include <linux/ip.h>
8#include <linux/in6.h>
8#endif 9#endif
9 10
10#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) 11#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
@@ -15,6 +16,10 @@
15#define SIOCADDPRL (SIOCDEVPRIVATE + 5) 16#define SIOCADDPRL (SIOCDEVPRIVATE + 5)
16#define SIOCDELPRL (SIOCDEVPRIVATE + 6) 17#define SIOCDELPRL (SIOCDEVPRIVATE + 6)
17#define SIOCCHGPRL (SIOCDEVPRIVATE + 7) 18#define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
19#define SIOCGET6RD (SIOCDEVPRIVATE + 8)
20#define SIOCADD6RD (SIOCDEVPRIVATE + 9)
21#define SIOCDEL6RD (SIOCDEVPRIVATE + 10)
22#define SIOCCHG6RD (SIOCDEVPRIVATE + 11)
18 23
19#define GRE_CSUM __cpu_to_be16(0x8000) 24#define GRE_CSUM __cpu_to_be16(0x8000)
20#define GRE_ROUTING __cpu_to_be16(0x4000) 25#define GRE_ROUTING __cpu_to_be16(0x4000)
@@ -25,8 +30,7 @@
25#define GRE_FLAGS __cpu_to_be16(0x00F8) 30#define GRE_FLAGS __cpu_to_be16(0x00F8)
26#define GRE_VERSION __cpu_to_be16(0x0007) 31#define GRE_VERSION __cpu_to_be16(0x0007)
27 32
28struct ip_tunnel_parm 33struct ip_tunnel_parm {
29{
30 char name[IFNAMSIZ]; 34 char name[IFNAMSIZ];
31 int link; 35 int link;
32 __be16 i_flags; 36 __be16 i_flags;
@@ -51,8 +55,14 @@ struct ip_tunnel_prl {
51/* PRL flags */ 55/* PRL flags */
52#define PRL_DEFAULT 0x0001 56#define PRL_DEFAULT 0x0001
53 57
54enum 58struct ip_tunnel_6rd {
55{ 59 struct in6_addr prefix;
60 __be32 relay_prefix;
61 __u16 prefixlen;
62 __u16 relay_prefixlen;
63};
64
65enum {
56 IFLA_GRE_UNSPEC, 66 IFLA_GRE_UNSPEC,
57 IFLA_GRE_LINK, 67 IFLA_GRE_LINK,
58 IFLA_GRE_IFLAGS, 68 IFLA_GRE_IFLAGS,
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 7ff9af1d0f05..3d870fda8c4f 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -63,7 +63,11 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
63 return (struct vlan_ethhdr *)skb_mac_header(skb); 63 return (struct vlan_ethhdr *)skb_mac_header(skb);
64} 64}
65 65
66#define VLAN_VID_MASK 0xfff 66#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
67#define VLAN_PRIO_SHIFT 13
68#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */
69#define VLAN_TAG_PRESENT VLAN_CFI_MASK
70#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */
67 71
68/* found in socket.c */ 72/* found in socket.c */
69extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); 73extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
@@ -81,6 +85,7 @@ struct vlan_group {
81 * the vlan is attached to. 85 * the vlan is attached to.
82 */ 86 */
83 unsigned int nr_vlans; 87 unsigned int nr_vlans;
88 int killall;
84 struct hlist_node hlist; /* linked list */ 89 struct hlist_node hlist; /* linked list */
85 struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; 90 struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS];
86 struct rcu_head rcu; 91 struct rcu_head rcu;
@@ -105,8 +110,8 @@ static inline void vlan_group_set_device(struct vlan_group *vg,
105 array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; 110 array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev;
106} 111}
107 112
108#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci) 113#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
109#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci) 114#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
110 115
111#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) 116#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
112extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); 117extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
@@ -115,10 +120,12 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev);
115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 120extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
116 u16 vlan_tci, int polling); 121 u16 vlan_tci, int polling);
117extern int vlan_hwaccel_do_receive(struct sk_buff *skb); 122extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
118extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, 123extern gro_result_t
119 unsigned int vlan_tci, struct sk_buff *skb); 124vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
120extern int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, 125 unsigned int vlan_tci, struct sk_buff *skb);
121 unsigned int vlan_tci); 126extern gro_result_t
127vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
128 unsigned int vlan_tci);
122 129
123#else 130#else
124static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) 131static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
@@ -145,17 +152,18 @@ static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
145 return 0; 152 return 0;
146} 153}
147 154
148static inline int vlan_gro_receive(struct napi_struct *napi, 155static inline gro_result_t
149 struct vlan_group *grp, 156vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp,
150 unsigned int vlan_tci, struct sk_buff *skb) 157 unsigned int vlan_tci, struct sk_buff *skb)
151{ 158{
152 return NET_RX_DROP; 159 return GRO_DROP;
153} 160}
154 161
155static inline int vlan_gro_frags(struct napi_struct *napi, 162static inline gro_result_t
156 struct vlan_group *grp, unsigned int vlan_tci) 163vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
164 unsigned int vlan_tci)
157{ 165{
158 return NET_RX_DROP; 166 return GRO_DROP;
159} 167}
160#endif 168#endif
161 169
@@ -231,7 +239,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
231static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, 239static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
232 u16 vlan_tci) 240 u16 vlan_tci)
233{ 241{
234 skb->vlan_tci = vlan_tci; 242 skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci;
235 return skb; 243 return skb;
236} 244}
237 245
@@ -284,7 +292,7 @@ static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb,
284 u16 *vlan_tci) 292 u16 *vlan_tci)
285{ 293{
286 if (vlan_tx_tag_present(skb)) { 294 if (vlan_tx_tag_present(skb)) {
287 *vlan_tci = skb->vlan_tci; 295 *vlan_tci = vlan_tx_tag_get(skb);
288 return 0; 296 return 0;
289 } else { 297 } else {
290 *vlan_tci = 0; 298 *vlan_tci = 0;
@@ -331,6 +339,7 @@ enum vlan_ioctl_cmds {
331enum vlan_flags { 339enum vlan_flags {
332 VLAN_FLAG_REORDER_HDR = 0x1, 340 VLAN_FLAG_REORDER_HDR = 0x1,
333 VLAN_FLAG_GVRP = 0x2, 341 VLAN_FLAG_GVRP = 0x2,
342 VLAN_FLAG_LOOSE_BINDING = 0x4,
334}; 343};
335 344
336enum vlan_name_types { 345enum vlan_name_types {
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index fe158e0e20e6..724c27e5d173 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -27,8 +27,7 @@
27 * Header in on cable format 27 * Header in on cable format
28 */ 28 */
29 29
30struct igmphdr 30struct igmphdr {
31{
32 __u8 type; 31 __u8 type;
33 __u8 code; /* For newer IGMP */ 32 __u8 code; /* For newer IGMP */
34 __sum16 csum; 33 __sum16 csum;
@@ -151,8 +150,7 @@ static inline struct igmpv3_query *
151extern int sysctl_igmp_max_memberships; 150extern int sysctl_igmp_max_memberships;
152extern int sysctl_igmp_max_msf; 151extern int sysctl_igmp_max_msf;
153 152
154struct ip_sf_socklist 153struct ip_sf_socklist {
155{
156 unsigned int sl_max; 154 unsigned int sl_max;
157 unsigned int sl_count; 155 unsigned int sl_count;
158 __be32 sl_addr[0]; 156 __be32 sl_addr[0];
@@ -167,16 +165,14 @@ struct ip_sf_socklist
167 this list never used in fast path code 165 this list never used in fast path code
168 */ 166 */
169 167
170struct ip_mc_socklist 168struct ip_mc_socklist {
171{
172 struct ip_mc_socklist *next; 169 struct ip_mc_socklist *next;
173 struct ip_mreqn multi; 170 struct ip_mreqn multi;
174 unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ 171 unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */
175 struct ip_sf_socklist *sflist; 172 struct ip_sf_socklist *sflist;
176}; 173};
177 174
178struct ip_sf_list 175struct ip_sf_list {
179{
180 struct ip_sf_list *sf_next; 176 struct ip_sf_list *sf_next;
181 __be32 sf_inaddr; 177 __be32 sf_inaddr;
182 unsigned long sf_count[2]; /* include/exclude counts */ 178 unsigned long sf_count[2]; /* include/exclude counts */
@@ -185,8 +181,7 @@ struct ip_sf_list
185 unsigned char sf_crcount; /* retrans. left to send */ 181 unsigned char sf_crcount; /* retrans. left to send */
186}; 182};
187 183
188struct ip_mc_list 184struct ip_mc_list {
189{
190 struct in_device *interface; 185 struct in_device *interface;
191 __be32 multiaddr; 186 __be32 multiaddr;
192 struct ip_sf_list *sources; 187 struct ip_sf_list *sources;
diff --git a/include/linux/in.h b/include/linux/in.h
index cf196da04ec9..b615649db129 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -118,14 +118,12 @@ struct in_addr {
118 118
119/* Request struct for multicast socket ops */ 119/* Request struct for multicast socket ops */
120 120
121struct ip_mreq 121struct ip_mreq {
122{
123 struct in_addr imr_multiaddr; /* IP multicast address of group */ 122 struct in_addr imr_multiaddr; /* IP multicast address of group */
124 struct in_addr imr_interface; /* local IP address of interface */ 123 struct in_addr imr_interface; /* local IP address of interface */
125}; 124};
126 125
127struct ip_mreqn 126struct ip_mreqn {
128{
129 struct in_addr imr_multiaddr; /* IP multicast address of group */ 127 struct in_addr imr_multiaddr; /* IP multicast address of group */
130 struct in_addr imr_address; /* local IP address of interface */ 128 struct in_addr imr_address; /* local IP address of interface */
131 int imr_ifindex; /* Interface index */ 129 int imr_ifindex; /* Interface index */
@@ -149,21 +147,18 @@ struct ip_msfilter {
149 (sizeof(struct ip_msfilter) - sizeof(__u32) \ 147 (sizeof(struct ip_msfilter) - sizeof(__u32) \
150 + (numsrc) * sizeof(__u32)) 148 + (numsrc) * sizeof(__u32))
151 149
152struct group_req 150struct group_req {
153{
154 __u32 gr_interface; /* interface index */ 151 __u32 gr_interface; /* interface index */
155 struct __kernel_sockaddr_storage gr_group; /* group address */ 152 struct __kernel_sockaddr_storage gr_group; /* group address */
156}; 153};
157 154
158struct group_source_req 155struct group_source_req {
159{
160 __u32 gsr_interface; /* interface index */ 156 __u32 gsr_interface; /* interface index */
161 struct __kernel_sockaddr_storage gsr_group; /* group address */ 157 struct __kernel_sockaddr_storage gsr_group; /* group address */
162 struct __kernel_sockaddr_storage gsr_source; /* source address */ 158 struct __kernel_sockaddr_storage gsr_source; /* source address */
163}; 159};
164 160
165struct group_filter 161struct group_filter {
166{
167 __u32 gf_interface; /* interface index */ 162 __u32 gf_interface; /* interface index */
168 struct __kernel_sockaddr_storage gf_group; /* multicast address */ 163 struct __kernel_sockaddr_storage gf_group; /* multicast address */
169 __u32 gf_fmode; /* filter mode */ 164 __u32 gf_fmode; /* filter mode */
@@ -175,8 +170,7 @@ struct group_filter
175 (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \ 170 (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
176 + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) 171 + (numsrc) * sizeof(struct __kernel_sockaddr_storage))
177 172
178struct in_pktinfo 173struct in_pktinfo {
179{
180 int ipi_ifindex; 174 int ipi_ifindex;
181 struct in_addr ipi_spec_dst; 175 struct in_addr ipi_spec_dst;
182 struct in_addr ipi_addr; 176 struct in_addr ipi_addr;
diff --git a/include/linux/in6.h b/include/linux/in6.h
index 718bf21c5754..dfa29168e6ab 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -27,10 +27,8 @@
27 * IPv6 address structure 27 * IPv6 address structure
28 */ 28 */
29 29
30struct in6_addr 30struct in6_addr {
31{ 31 union {
32 union
33 {
34 __u8 u6_addr8[16]; 32 __u8 u6_addr8[16];
35 __be16 u6_addr16[8]; 33 __be16 u6_addr16[8];
36 __be32 u6_addr32[4]; 34 __be32 u6_addr32[4];
@@ -75,8 +73,7 @@ struct ipv6_mreq {
75 73
76#define ipv6mr_acaddr ipv6mr_multiaddr 74#define ipv6mr_acaddr ipv6mr_multiaddr
77 75
78struct in6_flowlabel_req 76struct in6_flowlabel_req {
79{
80 struct in6_addr flr_dst; 77 struct in6_addr flr_dst;
81 __be32 flr_label; 78 __be32 flr_label;
82 __u8 flr_action; 79 __u8 flr_action;
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h
index ad27c7da8798..699e85c01a4d 100644
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -10,15 +10,13 @@
10#include <linux/timer.h> 10#include <linux/timer.h>
11#include <linux/sysctl.h> 11#include <linux/sysctl.h>
12 12
13struct ipv4_devconf 13struct ipv4_devconf {
14{
15 void *sysctl; 14 void *sysctl;
16 int data[__NET_IPV4_CONF_MAX - 1]; 15 int data[__NET_IPV4_CONF_MAX - 1];
17 DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1); 16 DECLARE_BITMAP(state, __NET_IPV4_CONF_MAX - 1);
18}; 17};
19 18
20struct in_device 19struct in_device {
21{
22 struct net_device *dev; 20 struct net_device *dev;
23 atomic_t refcnt; 21 atomic_t refcnt;
24 int dead; 22 int dead;
@@ -85,6 +83,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
85#define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) 83#define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER)
86#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ 84#define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \
87 ACCEPT_SOURCE_ROUTE) 85 ACCEPT_SOURCE_ROUTE)
86#define IN_DEV_ACCEPT_LOCAL(in_dev) IN_DEV_ORCONF((in_dev), ACCEPT_LOCAL)
88#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) 87#define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY)
89 88
90#define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) 89#define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS)
@@ -110,8 +109,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev)
110#define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) 109#define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE)
111#define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) 110#define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY)
112 111
113struct in_ifaddr 112struct in_ifaddr {
114{
115 struct in_ifaddr *ifa_next; 113 struct in_ifaddr *ifa_next;
116 struct in_device *ifa_dev; 114 struct in_device *ifa_dev;
117 struct rcu_head rcu_head; 115 struct rcu_head rcu_head;
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h
index 148265e63e8d..dfc170362842 100644
--- a/include/linux/ip_vs.h
+++ b/include/linux/ip_vs.h
@@ -127,8 +127,7 @@ struct ip_vs_dest_user {
127/* 127/*
128 * IPVS statistics object (for user space) 128 * IPVS statistics object (for user space)
129 */ 129 */
130struct ip_vs_stats_user 130struct ip_vs_stats_user {
131{
132 __u32 conns; /* connections scheduled */ 131 __u32 conns; /* connections scheduled */
133 __u32 inpkts; /* incoming packets */ 132 __u32 inpkts; /* incoming packets */
134 __u32 outpkts; /* outgoing packets */ 133 __u32 outpkts; /* outgoing packets */
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index c662efa68289..e0cc9a7db2b5 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -167,6 +167,7 @@ struct ipv6_devconf {
167#endif 167#endif
168 __s32 disable_ipv6; 168 __s32 disable_ipv6;
169 __s32 accept_dad; 169 __s32 accept_dad;
170 __s32 force_tllao;
170 void *sysctl; 171 void *sysctl;
171}; 172};
172 173
@@ -207,6 +208,7 @@ enum {
207 DEVCONF_MC_FORWARDING, 208 DEVCONF_MC_FORWARDING,
208 DEVCONF_DISABLE_IPV6, 209 DEVCONF_DISABLE_IPV6,
209 DEVCONF_ACCEPT_DAD, 210 DEVCONF_ACCEPT_DAD,
211 DEVCONF_FORCE_TLLAO,
210 DEVCONF_MAX 212 DEVCONF_MAX
211}; 213};
212 214
@@ -503,7 +505,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
503 505
504#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\ 506#define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\
505 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ 507 (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \
506 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 508 ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
507 ((__sk)->sk_family == AF_INET6) && \ 509 ((__sk)->sk_family == AF_INET6) && \
508 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ 510 ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \
509 ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \ 511 ipv6_addr_equal(&inet6_sk(__sk)->rcv_saddr, (__daddr)) && \
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 2dbfb5a05994..33b2ea09a4ad 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -28,6 +28,7 @@
28#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 28#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404
29#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 29#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405
30#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 30#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406
31#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX_2G5 0x1407
31 32
32#define SDIO_VENDOR_ID_MARVELL 0x02df 33#define SDIO_VENDOR_ID_MARVELL 0x02df
33#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 34#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 08bc776d05e2..c5f3d53548e2 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -59,20 +59,24 @@ struct vifctl {
59 unsigned char vifc_flags; /* VIFF_ flags */ 59 unsigned char vifc_flags; /* VIFF_ flags */
60 unsigned char vifc_threshold; /* ttl limit */ 60 unsigned char vifc_threshold; /* ttl limit */
61 unsigned int vifc_rate_limit; /* Rate limiter values (NI) */ 61 unsigned int vifc_rate_limit; /* Rate limiter values (NI) */
62 struct in_addr vifc_lcl_addr; /* Our address */ 62 union {
63 struct in_addr vifc_lcl_addr; /* Local interface address */
64 int vifc_lcl_ifindex; /* Local interface index */
65 };
63 struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */ 66 struct in_addr vifc_rmt_addr; /* IPIP tunnel addr */
64}; 67};
65 68
66#define VIFF_TUNNEL 0x1 /* IPIP tunnel */ 69#define VIFF_TUNNEL 0x1 /* IPIP tunnel */
67#define VIFF_SRCRT 0x2 /* NI */ 70#define VIFF_SRCRT 0x2 /* NI */
68#define VIFF_REGISTER 0x4 /* register vif */ 71#define VIFF_REGISTER 0x4 /* register vif */
72#define VIFF_USE_IFINDEX 0x8 /* use vifc_lcl_ifindex instead of
73 vifc_lcl_addr to find an interface */
69 74
70/* 75/*
71 * Cache manipulation structures for mrouted and PIMd 76 * Cache manipulation structures for mrouted and PIMd
72 */ 77 */
73 78
74struct mfcctl 79struct mfcctl {
75{
76 struct in_addr mfcc_origin; /* Origin of mcast */ 80 struct in_addr mfcc_origin; /* Origin of mcast */
77 struct in_addr mfcc_mcastgrp; /* Group in question */ 81 struct in_addr mfcc_mcastgrp; /* Group in question */
78 vifi_t mfcc_parent; /* Where it arrived */ 82 vifi_t mfcc_parent; /* Where it arrived */
@@ -87,8 +91,7 @@ struct mfcctl
87 * Group count retrieval for mrouted 91 * Group count retrieval for mrouted
88 */ 92 */
89 93
90struct sioc_sg_req 94struct sioc_sg_req {
91{
92 struct in_addr src; 95 struct in_addr src;
93 struct in_addr grp; 96 struct in_addr grp;
94 unsigned long pktcnt; 97 unsigned long pktcnt;
@@ -100,8 +103,7 @@ struct sioc_sg_req
100 * To get vif packet counts 103 * To get vif packet counts
101 */ 104 */
102 105
103struct sioc_vif_req 106struct sioc_vif_req {
104{
105 vifi_t vifi; /* Which iface */ 107 vifi_t vifi; /* Which iface */
106 unsigned long icount; /* In packets */ 108 unsigned long icount; /* In packets */
107 unsigned long ocount; /* Out packets */ 109 unsigned long ocount; /* Out packets */
@@ -114,8 +116,7 @@ struct sioc_vif_req
114 * data. Magically happens to be like an IP packet as per the original 116 * data. Magically happens to be like an IP packet as per the original
115 */ 117 */
116 118
117struct igmpmsg 119struct igmpmsg {
118{
119 __u32 unused1,unused2; 120 __u32 unused1,unused2;
120 unsigned char im_msgtype; /* What is this */ 121 unsigned char im_msgtype; /* What is this */
121 unsigned char im_mbz; /* Must be zero */ 122 unsigned char im_mbz; /* Must be zero */
@@ -176,8 +177,7 @@ static inline int ip_mr_init(void)
176} 177}
177#endif 178#endif
178 179
179struct vif_device 180struct vif_device {
180{
181 struct net_device *dev; /* Device we are using */ 181 struct net_device *dev; /* Device we are using */
182 unsigned long bytes_in,bytes_out; 182 unsigned long bytes_in,bytes_out;
183 unsigned long pkt_in,pkt_out; /* Statistics */ 183 unsigned long pkt_in,pkt_out; /* Statistics */
@@ -190,8 +190,7 @@ struct vif_device
190 190
191#define VIFF_STATIC 0x8000 191#define VIFF_STATIC 0x8000
192 192
193struct mfc_cache 193struct mfc_cache {
194{
195 struct mfc_cache *next; /* Next entry on cache line */ 194 struct mfc_cache *next; /* Next entry on cache line */
196#ifdef CONFIG_NET_NS 195#ifdef CONFIG_NET_NS
197 struct net *mfc_net; 196 struct net *mfc_net;
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index b191865a6ca3..2caa1a8e525d 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -75,8 +75,7 @@ struct mif6ctl {
75 * Cache manipulation structures for mrouted and PIMd 75 * Cache manipulation structures for mrouted and PIMd
76 */ 76 */
77 77
78struct mf6cctl 78struct mf6cctl {
79{
80 struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */ 79 struct sockaddr_in6 mf6cc_origin; /* Origin of mcast */
81 struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */ 80 struct sockaddr_in6 mf6cc_mcastgrp; /* Group in question */
82 mifi_t mf6cc_parent; /* Where it arrived */ 81 mifi_t mf6cc_parent; /* Where it arrived */
@@ -87,8 +86,7 @@ struct mf6cctl
87 * Group count retrieval for pim6sd 86 * Group count retrieval for pim6sd
88 */ 87 */
89 88
90struct sioc_sg_req6 89struct sioc_sg_req6 {
91{
92 struct sockaddr_in6 src; 90 struct sockaddr_in6 src;
93 struct sockaddr_in6 grp; 91 struct sockaddr_in6 grp;
94 unsigned long pktcnt; 92 unsigned long pktcnt;
@@ -100,8 +98,7 @@ struct sioc_sg_req6
100 * To get vif packet counts 98 * To get vif packet counts
101 */ 99 */
102 100
103struct sioc_mif_req6 101struct sioc_mif_req6 {
104{
105 mifi_t mifi; /* Which iface */ 102 mifi_t mifi; /* Which iface */
106 unsigned long icount; /* In packets */ 103 unsigned long icount; /* In packets */
107 unsigned long ocount; /* Out packets */ 104 unsigned long ocount; /* Out packets */
@@ -172,8 +169,7 @@ static inline void ip6_mr_cleanup(void)
172} 169}
173#endif 170#endif
174 171
175struct mif_device 172struct mif_device {
176{
177 struct net_device *dev; /* Device we are using */ 173 struct net_device *dev; /* Device we are using */
178 unsigned long bytes_in,bytes_out; 174 unsigned long bytes_in,bytes_out;
179 unsigned long pkt_in,pkt_out; /* Statistics */ 175 unsigned long pkt_in,pkt_out; /* Statistics */
@@ -185,8 +181,7 @@ struct mif_device
185 181
186#define VIFF_STATIC 0x8000 182#define VIFF_STATIC 0x8000
187 183
188struct mfc6_cache 184struct mfc6_cache {
189{
190 struct mfc6_cache *next; /* Next entry on cache line */ 185 struct mfc6_cache *next; /* Next entry on cache line */
191#ifdef CONFIG_NET_NS 186#ifdef CONFIG_NET_NS
192 struct net *mfc6_net; 187 struct net *mfc6_net;
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
index 12c9de138451..a7003b7a695d 100644
--- a/include/linux/neighbour.h
+++ b/include/linux/neighbour.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/netlink.h> 5#include <linux/netlink.h>
6 6
7struct ndmsg 7struct ndmsg {
8{
9 __u8 ndm_family; 8 __u8 ndm_family;
10 __u8 ndm_pad1; 9 __u8 ndm_pad1;
11 __u16 ndm_pad2; 10 __u16 ndm_pad2;
@@ -15,8 +14,7 @@ struct ndmsg
15 __u8 ndm_type; 14 __u8 ndm_type;
16}; 15};
17 16
18enum 17enum {
19{
20 NDA_UNSPEC, 18 NDA_UNSPEC,
21 NDA_DST, 19 NDA_DST,
22 NDA_LLADDR, 20 NDA_LLADDR,
@@ -56,8 +54,7 @@ enum
56 NUD_PERMANENT is also cannot be deleted by garbage collectors. 54 NUD_PERMANENT is also cannot be deleted by garbage collectors.
57 */ 55 */
58 56
59struct nda_cacheinfo 57struct nda_cacheinfo {
60{
61 __u32 ndm_confirmed; 58 __u32 ndm_confirmed;
62 __u32 ndm_used; 59 __u32 ndm_used;
63 __u32 ndm_updated; 60 __u32 ndm_updated;
@@ -89,8 +86,7 @@ struct nda_cacheinfo
89 * device. 86 * device.
90 ****/ 87 ****/
91 88
92struct ndt_stats 89struct ndt_stats {
93{
94 __u64 ndts_allocs; 90 __u64 ndts_allocs;
95 __u64 ndts_destroys; 91 __u64 ndts_destroys;
96 __u64 ndts_hash_grows; 92 __u64 ndts_hash_grows;
@@ -124,15 +120,13 @@ enum {
124}; 120};
125#define NDTPA_MAX (__NDTPA_MAX - 1) 121#define NDTPA_MAX (__NDTPA_MAX - 1)
126 122
127struct ndtmsg 123struct ndtmsg {
128{
129 __u8 ndtm_family; 124 __u8 ndtm_family;
130 __u8 ndtm_pad1; 125 __u8 ndtm_pad1;
131 __u16 ndtm_pad2; 126 __u16 ndtm_pad2;
132}; 127};
133 128
134struct ndt_config 129struct ndt_config {
135{
136 __u16 ndtc_key_len; 130 __u16 ndtc_key_len;
137 __u16 ndtc_entry_size; 131 __u16 ndtc_entry_size;
138 __u32 ndtc_entries; 132 __u32 ndtc_entries;
diff --git a/include/linux/net.h b/include/linux/net.h
index d7e26e30c8c2..5e8083cacc8b 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -41,6 +41,7 @@
41#define SYS_SENDMSG 16 /* sys_sendmsg(2) */ 41#define SYS_SENDMSG 16 /* sys_sendmsg(2) */
42#define SYS_RECVMSG 17 /* sys_recvmsg(2) */ 42#define SYS_RECVMSG 17 /* sys_recvmsg(2) */
43#define SYS_ACCEPT4 18 /* sys_accept4(2) */ 43#define SYS_ACCEPT4 18 /* sys_accept4(2) */
44#define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */
44 45
45typedef enum { 46typedef enum {
46 SS_FREE = 0, /* not allocated */ 47 SS_FREE = 0, /* not allocated */
@@ -198,9 +199,13 @@ struct proto_ops {
198 struct pipe_inode_info *pipe, size_t len, unsigned int flags); 199 struct pipe_inode_info *pipe, size_t len, unsigned int flags);
199}; 200};
200 201
202#define DECLARE_SOCKADDR(type, dst, src) \
203 type dst = ({ __sockaddr_check_size(sizeof(*dst)); (type) src; })
204
201struct net_proto_family { 205struct net_proto_family {
202 int family; 206 int family;
203 int (*create)(struct net *net, struct socket *sock, int protocol); 207 int (*create)(struct net *net, struct socket *sock,
208 int protocol, int kern);
204 struct module *owner; 209 struct module *owner;
205}; 210};
206 211
@@ -263,89 +268,6 @@ extern int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg);
263extern int kernel_sock_shutdown(struct socket *sock, 268extern int kernel_sock_shutdown(struct socket *sock,
264 enum sock_shutdown_cmd how); 269 enum sock_shutdown_cmd how);
265 270
266#ifndef CONFIG_SMP
267#define SOCKOPS_WRAPPED(name) name
268#define SOCKOPS_WRAP(name, fam)
269#else
270
271#define SOCKOPS_WRAPPED(name) __unlocked_##name
272
273#define SOCKCALL_WRAP(name, call, parms, args) \
274static int __lock_##name##_##call parms \
275{ \
276 int ret; \
277 lock_kernel(); \
278 ret = __unlocked_##name##_ops.call args ;\
279 unlock_kernel(); \
280 return ret; \
281}
282
283#define SOCKCALL_UWRAP(name, call, parms, args) \
284static unsigned int __lock_##name##_##call parms \
285{ \
286 int ret; \
287 lock_kernel(); \
288 ret = __unlocked_##name##_ops.call args ;\
289 unlock_kernel(); \
290 return ret; \
291}
292
293
294#define SOCKOPS_WRAP(name, fam) \
295SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \
296SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \
297 (sock, uaddr, addr_len)) \
298SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \
299 int addr_len, int flags), \
300 (sock, uaddr, addr_len, flags)) \
301SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \
302 (sock1, sock2)) \
303SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \
304 int flags), (sock, newsock, flags)) \
305SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \
306 int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \
307SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \
308 (file, sock, wait)) \
309SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \
310 unsigned long arg), (sock, cmd, arg)) \
311SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \
312 unsigned long arg), (sock, cmd, arg)) \
313SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \
314SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \
315SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \
316 char __user *optval, unsigned int optlen), (sock, level, optname, optval, optlen)) \
317SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \
318 char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \
319SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \
320 (iocb, sock, m, len)) \
321SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \
322 (iocb, sock, m, len, flags)) \
323SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \
324 (file, sock, vma)) \
325 \
326static const struct proto_ops name##_ops = { \
327 .family = fam, \
328 .owner = THIS_MODULE, \
329 .release = __lock_##name##_release, \
330 .bind = __lock_##name##_bind, \
331 .connect = __lock_##name##_connect, \
332 .socketpair = __lock_##name##_socketpair, \
333 .accept = __lock_##name##_accept, \
334 .getname = __lock_##name##_getname, \
335 .poll = __lock_##name##_poll, \
336 .ioctl = __lock_##name##_ioctl, \
337 .compat_ioctl = __lock_##name##_compat_ioctl, \
338 .listen = __lock_##name##_listen, \
339 .shutdown = __lock_##name##_shutdown, \
340 .setsockopt = __lock_##name##_setsockopt, \
341 .getsockopt = __lock_##name##_getsockopt, \
342 .sendmsg = __lock_##name##_sendmsg, \
343 .recvmsg = __lock_##name##_recvmsg, \
344 .mmap = __lock_##name##_mmap, \
345};
346
347#endif
348
349#define MODULE_ALIAS_NETPROTO(proto) \ 271#define MODULE_ALIAS_NETPROTO(proto) \
350 MODULE_ALIAS("net-pf-" __stringify(proto)) 272 MODULE_ALIAS("net-pf-" __stringify(proto))
351 273
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 812a5f3c2abe..a3fccc85b1a0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -63,30 +63,69 @@ struct wireless_dev;
63#define HAVE_FREE_NETDEV /* free_netdev() */ 63#define HAVE_FREE_NETDEV /* free_netdev() */
64#define HAVE_NETDEV_PRIV /* netdev_priv() */ 64#define HAVE_NETDEV_PRIV /* netdev_priv() */
65 65
66#define NET_XMIT_SUCCESS 0
67#define NET_XMIT_DROP 1 /* skb dropped */
68#define NET_XMIT_CN 2 /* congestion notification */
69#define NET_XMIT_POLICED 3 /* skb is shot by police */
70#define NET_XMIT_MASK 0xFFFF /* qdisc flags in net/sch_generic.h */
71
72/* Backlog congestion levels */ 66/* Backlog congestion levels */
73#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ 67#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
74#define NET_RX_DROP 1 /* packet dropped */ 68#define NET_RX_DROP 1 /* packet dropped */
69
70/*
71 * Transmit return codes: transmit return codes originate from three different
72 * namespaces:
73 *
74 * - qdisc return codes
75 * - driver transmit return codes
76 * - errno values
77 *
78 * Drivers are allowed to return any one of those in their hard_start_xmit()
79 * function. Real network devices commonly used with qdiscs should only return
80 * the driver transmit return codes though - when qdiscs are used, the actual
81 * transmission happens asynchronously, so the value is not propagated to
82 * higher layers. Virtual network devices transmit synchronously, in this case
83 * the driver transmit return codes are consumed by dev_queue_xmit(), all
84 * others are propagated to higher layers.
85 */
86
87/* qdisc ->enqueue() return codes. */
88#define NET_XMIT_SUCCESS 0x00
89#define NET_XMIT_DROP 0x01 /* skb dropped */
90#define NET_XMIT_CN 0x02 /* congestion notification */
91#define NET_XMIT_POLICED 0x03 /* skb is shot by police */
92#define NET_XMIT_MASK 0x0f /* qdisc flags in net/sch_generic.h */
75 93
76/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It 94/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
77 * indicates that the device will soon be dropping packets, or already drops 95 * indicates that the device will soon be dropping packets, or already drops
78 * some packets of the same priority; prompting us to send less aggressively. */ 96 * some packets of the same priority; prompting us to send less aggressively. */
79#define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) 97#define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e))
80#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) 98#define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0)
81 99
82/* Driver transmit return codes */ 100/* Driver transmit return codes */
101#define NETDEV_TX_MASK 0xf0
102
83enum netdev_tx { 103enum netdev_tx {
84 NETDEV_TX_OK = 0, /* driver took care of packet */ 104 __NETDEV_TX_MIN = INT_MIN, /* make sure enum is signed */
85 NETDEV_TX_BUSY, /* driver tx path was busy*/ 105 NETDEV_TX_OK = 0x00, /* driver took care of packet */
86 NETDEV_TX_LOCKED = -1, /* driver tx lock was already taken */ 106 NETDEV_TX_BUSY = 0x10, /* driver tx path was busy*/
107 NETDEV_TX_LOCKED = 0x20, /* driver tx lock was already taken */
87}; 108};
88typedef enum netdev_tx netdev_tx_t; 109typedef enum netdev_tx netdev_tx_t;
89 110
111/*
112 * Current order: NETDEV_TX_MASK > NET_XMIT_MASK >= 0 is significant;
113 * hard_start_xmit() return < NET_XMIT_MASK means skb was consumed.
114 */
115static inline bool dev_xmit_complete(int rc)
116{
117 /*
118 * Positive cases with an skb consumed by a driver:
119 * - successful transmission (rc == NETDEV_TX_OK)
120 * - error while transmitting (rc < 0)
121 * - error while queueing to a different device (rc & NET_XMIT_MASK)
122 */
123 if (likely(rc < NET_XMIT_MASK))
124 return true;
125
126 return false;
127}
128
90#endif 129#endif
91 130
92#define MAX_ADDR_LEN 32 /* Largest hardware address length */ 131#define MAX_ADDR_LEN 32 /* Largest hardware address length */
@@ -125,8 +164,7 @@ typedef enum netdev_tx netdev_tx_t;
125 * with byte counters. 164 * with byte counters.
126 */ 165 */
127 166
128struct net_device_stats 167struct net_device_stats {
129{
130 unsigned long rx_packets; /* total packets received */ 168 unsigned long rx_packets; /* total packets received */
131 unsigned long tx_packets; /* total packets transmitted */ 169 unsigned long tx_packets; /* total packets transmitted */
132 unsigned long rx_bytes; /* total bytes received */ 170 unsigned long rx_bytes; /* total bytes received */
@@ -179,8 +217,7 @@ struct neighbour;
179struct neigh_parms; 217struct neigh_parms;
180struct sk_buff; 218struct sk_buff;
181 219
182struct netif_rx_stats 220struct netif_rx_stats {
183{
184 unsigned total; 221 unsigned total;
185 unsigned dropped; 222 unsigned dropped;
186 unsigned time_squeeze; 223 unsigned time_squeeze;
@@ -189,8 +226,7 @@ struct netif_rx_stats
189 226
190DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); 227DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat);
191 228
192struct dev_addr_list 229struct dev_addr_list {
193{
194 struct dev_addr_list *next; 230 struct dev_addr_list *next;
195 u8 da_addr[MAX_ADDR_LEN]; 231 u8 da_addr[MAX_ADDR_LEN];
196 u8 da_addrlen; 232 u8 da_addrlen;
@@ -227,8 +263,7 @@ struct netdev_hw_addr_list {
227 int count; 263 int count;
228}; 264};
229 265
230struct hh_cache 266struct hh_cache {
231{
232 struct hh_cache *hh_next; /* Next entry */ 267 struct hh_cache *hh_next; /* Next entry */
233 atomic_t hh_refcnt; /* number of users */ 268 atomic_t hh_refcnt; /* number of users */
234/* 269/*
@@ -291,8 +326,7 @@ struct header_ops {
291 * code. 326 * code.
292 */ 327 */
293 328
294enum netdev_state_t 329enum netdev_state_t {
295{
296 __LINK_STATE_START, 330 __LINK_STATE_START,
297 __LINK_STATE_PRESENT, 331 __LINK_STATE_PRESENT,
298 __LINK_STATE_NOCARRIER, 332 __LINK_STATE_NOCARRIER,
@@ -341,20 +375,20 @@ struct napi_struct {
341 struct sk_buff *skb; 375 struct sk_buff *skb;
342}; 376};
343 377
344enum 378enum {
345{
346 NAPI_STATE_SCHED, /* Poll is scheduled */ 379 NAPI_STATE_SCHED, /* Poll is scheduled */
347 NAPI_STATE_DISABLE, /* Disable pending */ 380 NAPI_STATE_DISABLE, /* Disable pending */
348 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ 381 NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */
349}; 382};
350 383
351enum { 384enum gro_result {
352 GRO_MERGED, 385 GRO_MERGED,
353 GRO_MERGED_FREE, 386 GRO_MERGED_FREE,
354 GRO_HELD, 387 GRO_HELD,
355 GRO_NORMAL, 388 GRO_NORMAL,
356 GRO_DROP, 389 GRO_DROP,
357}; 390};
391typedef enum gro_result gro_result_t;
358 392
359extern void __napi_schedule(struct napi_struct *n); 393extern void __napi_schedule(struct napi_struct *n);
360 394
@@ -457,8 +491,7 @@ static inline void napi_synchronize(const struct napi_struct *n)
457# define napi_synchronize(n) barrier() 491# define napi_synchronize(n) barrier()
458#endif 492#endif
459 493
460enum netdev_queue_state_t 494enum netdev_queue_state_t {
461{
462 __QUEUE_STATE_XOFF, 495 __QUEUE_STATE_XOFF,
463 __QUEUE_STATE_FROZEN, 496 __QUEUE_STATE_FROZEN,
464}; 497};
@@ -635,6 +668,10 @@ struct net_device_ops {
635 unsigned int sgc); 668 unsigned int sgc);
636 int (*ndo_fcoe_ddp_done)(struct net_device *dev, 669 int (*ndo_fcoe_ddp_done)(struct net_device *dev,
637 u16 xid); 670 u16 xid);
671#define NETDEV_FCOE_WWNN 0
672#define NETDEV_FCOE_WWPN 1
673 int (*ndo_fcoe_get_wwn)(struct net_device *dev,
674 u64 *wwn, int type);
638#endif 675#endif
639}; 676};
640 677
@@ -648,8 +685,7 @@ struct net_device_ops {
648 * moves out. 685 * moves out.
649 */ 686 */
650 687
651struct net_device 688struct net_device {
652{
653 689
654 /* 690 /*
655 * This is the first field of the "visible" part of this structure 691 * This is the first field of the "visible" part of this structure
@@ -683,6 +719,7 @@ struct net_device
683 719
684 struct list_head dev_list; 720 struct list_head dev_list;
685 struct list_head napi_list; 721 struct list_head napi_list;
722 struct list_head unreg_list;
686 723
687 /* Net device features */ 724 /* Net device features */
688 unsigned long features; 725 unsigned long features;
@@ -859,7 +896,7 @@ struct net_device
859 /* device index hash chain */ 896 /* device index hash chain */
860 struct hlist_node index_hlist; 897 struct hlist_node index_hlist;
861 898
862 struct net_device *link_watch_next; 899 struct list_head link_watch_list;
863 900
864 /* register/unregister state machine */ 901 /* register/unregister state machine */
865 enum { NETREG_UNINITIALIZED=0, 902 enum { NETREG_UNINITIALIZED=0,
@@ -894,8 +931,8 @@ struct net_device
894 931
895 /* class/net/name entry */ 932 /* class/net/name entry */
896 struct device dev; 933 struct device dev;
897 /* space for optional statistics and wireless sysfs groups */ 934 /* space for optional device, statistics, and wireless sysfs groups */
898 const struct attribute_group *sysfs_groups[3]; 935 const struct attribute_group *sysfs_groups[4];
899 936
900 /* rtnetlink link ops */ 937 /* rtnetlink link ops */
901 const struct rtnl_link_ops *rtnl_link_ops; 938 const struct rtnl_link_ops *rtnl_link_ops;
@@ -909,7 +946,7 @@ struct net_device
909 946
910#ifdef CONFIG_DCB 947#ifdef CONFIG_DCB
911 /* Data Center Bridging netlink ops */ 948 /* Data Center Bridging netlink ops */
912 struct dcbnl_rtnl_ops *dcbnl_ops; 949 const struct dcbnl_rtnl_ops *dcbnl_ops;
913#endif 950#endif
914 951
915#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) 952#if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE)
@@ -1075,10 +1112,16 @@ extern rwlock_t dev_base_lock; /* Device list lock */
1075 1112
1076#define for_each_netdev(net, d) \ 1113#define for_each_netdev(net, d) \
1077 list_for_each_entry(d, &(net)->dev_base_head, dev_list) 1114 list_for_each_entry(d, &(net)->dev_base_head, dev_list)
1115#define for_each_netdev_reverse(net, d) \
1116 list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list)
1117#define for_each_netdev_rcu(net, d) \
1118 list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
1078#define for_each_netdev_safe(net, d, n) \ 1119#define for_each_netdev_safe(net, d, n) \
1079 list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list) 1120 list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list)
1080#define for_each_netdev_continue(net, d) \ 1121#define for_each_netdev_continue(net, d) \
1081 list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list) 1122 list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list)
1123#define for_each_netdev_continue_rcu(net, d) \
1124 list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list)
1082#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list) 1125#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
1083 1126
1084static inline struct net_device *next_net_device(struct net_device *dev) 1127static inline struct net_device *next_net_device(struct net_device *dev)
@@ -1091,6 +1134,16 @@ static inline struct net_device *next_net_device(struct net_device *dev)
1091 return lh == &net->dev_base_head ? NULL : net_device_entry(lh); 1134 return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
1092} 1135}
1093 1136
1137static inline struct net_device *next_net_device_rcu(struct net_device *dev)
1138{
1139 struct list_head *lh;
1140 struct net *net;
1141
1142 net = dev_net(dev);
1143 lh = rcu_dereference(dev->dev_list.next);
1144 return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
1145}
1146
1094static inline struct net_device *first_net_device(struct net *net) 1147static inline struct net_device *first_net_device(struct net *net)
1095{ 1148{
1096 return list_empty(&net->dev_base_head) ? NULL : 1149 return list_empty(&net->dev_base_head) ? NULL :
@@ -1109,6 +1162,7 @@ extern void __dev_remove_pack(struct packet_type *pt);
1109extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags, 1162extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags,
1110 unsigned short mask); 1163 unsigned short mask);
1111extern struct net_device *dev_get_by_name(struct net *net, const char *name); 1164extern struct net_device *dev_get_by_name(struct net *net, const char *name);
1165extern struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
1112extern struct net_device *__dev_get_by_name(struct net *net, const char *name); 1166extern struct net_device *__dev_get_by_name(struct net *net, const char *name);
1113extern int dev_alloc_name(struct net_device *dev, const char *name); 1167extern int dev_alloc_name(struct net_device *dev, const char *name);
1114extern int dev_open(struct net_device *dev); 1168extern int dev_open(struct net_device *dev);
@@ -1116,7 +1170,14 @@ extern int dev_close(struct net_device *dev);
1116extern void dev_disable_lro(struct net_device *dev); 1170extern void dev_disable_lro(struct net_device *dev);
1117extern int dev_queue_xmit(struct sk_buff *skb); 1171extern int dev_queue_xmit(struct sk_buff *skb);
1118extern int register_netdevice(struct net_device *dev); 1172extern int register_netdevice(struct net_device *dev);
1119extern void unregister_netdevice(struct net_device *dev); 1173extern void unregister_netdevice_queue(struct net_device *dev,
1174 struct list_head *head);
1175extern void unregister_netdevice_many(struct list_head *head);
1176static inline void unregister_netdevice(struct net_device *dev)
1177{
1178 unregister_netdevice_queue(dev, NULL);
1179}
1180
1120extern void free_netdev(struct net_device *dev); 1181extern void free_netdev(struct net_device *dev);
1121extern void synchronize_net(void); 1182extern void synchronize_net(void);
1122extern int register_netdevice_notifier(struct notifier_block *nb); 1183extern int register_netdevice_notifier(struct notifier_block *nb);
@@ -1127,6 +1188,7 @@ extern void netdev_resync_ops(struct net_device *dev);
1127extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1188extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1128extern struct net_device *dev_get_by_index(struct net *net, int ifindex); 1189extern struct net_device *dev_get_by_index(struct net *net, int ifindex);
1129extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); 1190extern struct net_device *__dev_get_by_index(struct net *net, int ifindex);
1191extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
1130extern int dev_restart(struct net_device *dev); 1192extern int dev_restart(struct net_device *dev);
1131#ifdef CONFIG_NETPOLL_TRAP 1193#ifdef CONFIG_NETPOLL_TRAP
1132extern int netpoll_trap(void); 1194extern int netpoll_trap(void);
@@ -1212,8 +1274,7 @@ static inline int unregister_gifconf(unsigned int family)
1212 * Incoming packets are placed on per-cpu queues so that 1274 * Incoming packets are placed on per-cpu queues so that
1213 * no locking is needed. 1275 * no locking is needed.
1214 */ 1276 */
1215struct softnet_data 1277struct softnet_data {
1216{
1217 struct Qdisc *output_queue; 1278 struct Qdisc *output_queue;
1218 struct sk_buff_head input_pkt_queue; 1279 struct sk_buff_head input_pkt_queue;
1219 struct list_head poll_list; 1280 struct list_head poll_list;
@@ -1467,18 +1528,19 @@ extern int netif_rx_ni(struct sk_buff *skb);
1467#define HAVE_NETIF_RECEIVE_SKB 1 1528#define HAVE_NETIF_RECEIVE_SKB 1
1468extern int netif_receive_skb(struct sk_buff *skb); 1529extern int netif_receive_skb(struct sk_buff *skb);
1469extern void napi_gro_flush(struct napi_struct *napi); 1530extern void napi_gro_flush(struct napi_struct *napi);
1470extern int dev_gro_receive(struct napi_struct *napi, 1531extern gro_result_t dev_gro_receive(struct napi_struct *napi,
1471 struct sk_buff *skb); 1532 struct sk_buff *skb);
1472extern int napi_skb_finish(int ret, struct sk_buff *skb); 1533extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
1473extern int napi_gro_receive(struct napi_struct *napi, 1534extern gro_result_t napi_gro_receive(struct napi_struct *napi,
1474 struct sk_buff *skb); 1535 struct sk_buff *skb);
1475extern void napi_reuse_skb(struct napi_struct *napi, 1536extern void napi_reuse_skb(struct napi_struct *napi,
1476 struct sk_buff *skb); 1537 struct sk_buff *skb);
1477extern struct sk_buff * napi_get_frags(struct napi_struct *napi); 1538extern struct sk_buff * napi_get_frags(struct napi_struct *napi);
1478extern int napi_frags_finish(struct napi_struct *napi, 1539extern gro_result_t napi_frags_finish(struct napi_struct *napi,
1479 struct sk_buff *skb, int ret); 1540 struct sk_buff *skb,
1541 gro_result_t ret);
1480extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); 1542extern struct sk_buff * napi_frags_skb(struct napi_struct *napi);
1481extern int napi_gro_frags(struct napi_struct *napi); 1543extern gro_result_t napi_gro_frags(struct napi_struct *napi);
1482 1544
1483static inline void napi_free_frags(struct napi_struct *napi) 1545static inline void napi_free_frags(struct napi_struct *napi)
1484{ 1546{
@@ -1502,6 +1564,8 @@ extern int dev_set_mac_address(struct net_device *,
1502extern int dev_hard_start_xmit(struct sk_buff *skb, 1564extern int dev_hard_start_xmit(struct sk_buff *skb,
1503 struct net_device *dev, 1565 struct net_device *dev,
1504 struct netdev_queue *txq); 1566 struct netdev_queue *txq);
1567extern int dev_forward_skb(struct net_device *dev,
1568 struct sk_buff *skb);
1505 1569
1506extern int netdev_budget; 1570extern int netdev_budget;
1507 1571
@@ -1540,6 +1604,7 @@ static inline void dev_hold(struct net_device *dev)
1540 */ 1604 */
1541 1605
1542extern void linkwatch_fire_event(struct net_device *dev); 1606extern void linkwatch_fire_event(struct net_device *dev);
1607extern void linkwatch_forget_dev(struct net_device *dev);
1543 1608
1544/** 1609/**
1545 * netif_carrier_ok - test if carrier present 1610 * netif_carrier_ok - test if carrier present
@@ -1609,7 +1674,8 @@ static inline int netif_dormant(const struct net_device *dev)
1609 * 1674 *
1610 * Check if carrier is operational 1675 * Check if carrier is operational
1611 */ 1676 */
1612static inline int netif_oper_up(const struct net_device *dev) { 1677static inline int netif_oper_up(const struct net_device *dev)
1678{
1613 return (dev->operstate == IF_OPER_UP || 1679 return (dev->operstate == IF_OPER_UP ||
1614 dev->operstate == IF_OPER_UNKNOWN /* backward compat */); 1680 dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
1615} 1681}
@@ -1880,6 +1946,7 @@ extern void netdev_features_change(struct net_device *dev);
1880extern void dev_load(struct net *net, const char *name); 1946extern void dev_load(struct net *net, const char *name);
1881extern void dev_mcast_init(void); 1947extern void dev_mcast_init(void);
1882extern const struct net_device_stats *dev_get_stats(struct net_device *dev); 1948extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
1949extern void dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats);
1883 1950
1884extern int netdev_max_backlog; 1951extern int netdev_max_backlog;
1885extern int weight_p; 1952extern int weight_p;
@@ -1914,6 +1981,9 @@ unsigned long netdev_increment_features(unsigned long all, unsigned long one,
1914 unsigned long mask); 1981 unsigned long mask);
1915unsigned long netdev_fix_features(unsigned long features, const char *name); 1982unsigned long netdev_fix_features(unsigned long features, const char *name);
1916 1983
1984void netif_stacked_transfer_operstate(const struct net_device *rootdev,
1985 struct net_device *dev);
1986
1917static inline int net_gso_ok(int features, int gso_type) 1987static inline int net_gso_ok(int features, int gso_type)
1918{ 1988{
1919 int feature = gso_type << NETIF_F_GSO_SHIFT; 1989 int feature = gso_type << NETIF_F_GSO_SHIFT;
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 6132b5e6d9d3..48c54960773c 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -93,8 +93,7 @@ typedef unsigned int nf_hookfn(unsigned int hooknum,
93 const struct net_device *out, 93 const struct net_device *out,
94 int (*okfn)(struct sk_buff *)); 94 int (*okfn)(struct sk_buff *));
95 95
96struct nf_hook_ops 96struct nf_hook_ops {
97{
98 struct list_head list; 97 struct list_head list;
99 98
100 /* User fills in from here down. */ 99 /* User fills in from here down. */
@@ -106,8 +105,7 @@ struct nf_hook_ops
106 int priority; 105 int priority;
107}; 106};
108 107
109struct nf_sockopt_ops 108struct nf_sockopt_ops {
110{
111 struct list_head list; 109 struct list_head list;
112 110
113 u_int8_t pf; 111 u_int8_t pf;
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h
index a8248ee422b7..a374787ed9b0 100644
--- a/include/linux/netfilter/nf_conntrack_common.h
+++ b/include/linux/netfilter/nf_conntrack_common.h
@@ -3,8 +3,7 @@
3/* Connection state tracking for netfilter. This is separated from, 3/* Connection state tracking for netfilter. This is separated from,
4 but required by, the NAT layer; it can also be used by an iptables 4 but required by, the NAT layer; it can also be used by an iptables
5 extension. */ 5 extension. */
6enum ip_conntrack_info 6enum ip_conntrack_info {
7{
8 /* Part of an established connection (either direction). */ 7 /* Part of an established connection (either direction). */
9 IP_CT_ESTABLISHED, 8 IP_CT_ESTABLISHED,
10 9
@@ -76,8 +75,7 @@ enum ip_conntrack_status {
76}; 75};
77 76
78#ifdef __KERNEL__ 77#ifdef __KERNEL__
79struct ip_conntrack_stat 78struct ip_conntrack_stat {
80{
81 unsigned int searched; 79 unsigned int searched;
82 unsigned int found; 80 unsigned int found;
83 unsigned int new; 81 unsigned int new;
diff --git a/include/linux/netfilter/nf_conntrack_ftp.h b/include/linux/netfilter/nf_conntrack_ftp.h
index 47727d7546ea..3e3aa08980c3 100644
--- a/include/linux/netfilter/nf_conntrack_ftp.h
+++ b/include/linux/netfilter/nf_conntrack_ftp.h
@@ -3,8 +3,7 @@
3/* FTP tracking. */ 3/* FTP tracking. */
4 4
5/* This enum is exposed to userspace */ 5/* This enum is exposed to userspace */
6enum nf_ct_ftp_type 6enum nf_ct_ftp_type {
7{
8 /* PORT command from client */ 7 /* PORT command from client */
9 NF_CT_FTP_PORT, 8 NF_CT_FTP_PORT,
10 /* PASV response from server */ 9 /* PASV response from server */
diff --git a/include/linux/netfilter/nf_conntrack_sctp.h b/include/linux/netfilter/nf_conntrack_sctp.h
index 768f78c4ac53..ceeefe6681b5 100644
--- a/include/linux/netfilter/nf_conntrack_sctp.h
+++ b/include/linux/netfilter/nf_conntrack_sctp.h
@@ -16,8 +16,7 @@ enum sctp_conntrack {
16 SCTP_CONNTRACK_MAX 16 SCTP_CONNTRACK_MAX
17}; 17};
18 18
19struct ip_ct_sctp 19struct ip_ct_sctp {
20{
21 enum sctp_conntrack state; 20 enum sctp_conntrack state;
22 21
23 __be32 vtag[IP_CT_DIR_MAX]; 22 __be32 vtag[IP_CT_DIR_MAX];
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h
index 4352feed2377..6e135f97e59a 100644
--- a/include/linux/netfilter/nf_conntrack_tcp.h
+++ b/include/linux/netfilter/nf_conntrack_tcp.h
@@ -55,8 +55,7 @@ struct ip_ct_tcp_state {
55 u_int8_t flags; /* per direction options */ 55 u_int8_t flags; /* per direction options */
56}; 56};
57 57
58struct ip_ct_tcp 58struct ip_ct_tcp {
59{
60 struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ 59 struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */
61 u_int8_t state; /* state of the connection (enum tcp_conntrack) */ 60 u_int8_t state; /* state of the connection (enum tcp_conntrack) */
62 /* For detecting stale connections */ 61 /* For detecting stale connections */
@@ -67,6 +66,9 @@ struct ip_ct_tcp
67 u_int32_t last_ack; /* Last sequence number seen in opposite dir */ 66 u_int32_t last_ack; /* Last sequence number seen in opposite dir */
68 u_int32_t last_end; /* Last seq + len */ 67 u_int32_t last_end; /* Last seq + len */
69 u_int16_t last_win; /* Last window advertisement seen in dir */ 68 u_int16_t last_win; /* Last window advertisement seen in dir */
69 /* For SYN packets while we may be out-of-sync */
70 u_int8_t last_wscale; /* Last window scaling factor seen */
71 u_int8_t last_flags; /* Last flags set */
70}; 72};
71 73
72#endif /* __KERNEL__ */ 74#endif /* __KERNEL__ */
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 9f00da287f2c..49d321f3ccd2 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -55,8 +55,7 @@ struct nfgenmsg {
55#include <linux/capability.h> 55#include <linux/capability.h>
56#include <net/netlink.h> 56#include <net/netlink.h>
57 57
58struct nfnl_callback 58struct nfnl_callback {
59{
60 int (*call)(struct sock *nl, struct sk_buff *skb, 59 int (*call)(struct sock *nl, struct sk_buff *skb,
61 const struct nlmsghdr *nlh, 60 const struct nlmsghdr *nlh,
62 const struct nlattr * const cda[]); 61 const struct nlattr * const cda[]);
@@ -64,8 +63,7 @@ struct nfnl_callback
64 const u_int16_t attr_count; /* number of nlattr's */ 63 const u_int16_t attr_count; /* number of nlattr's */
65}; 64};
66 65
67struct nfnetlink_subsystem 66struct nfnetlink_subsystem {
68{
69 const char *name; 67 const char *name;
70 __u8 subsys_id; /* nfnetlink subsystem ID */ 68 __u8 subsys_id; /* nfnetlink subsystem ID */
71 __u8 cb_count; /* number of callbacks */ 69 __u8 cb_count; /* number of callbacks */
diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h
index eda55cabceec..ffb95036bbd4 100644
--- a/include/linux/netfilter/nfnetlink_compat.h
+++ b/include/linux/netfilter/nfnetlink_compat.h
@@ -21,8 +21,7 @@
21 * ! nfnetlink use the same attributes methods. - J. Schulist. 21 * ! nfnetlink use the same attributes methods. - J. Schulist.
22 */ 22 */
23 23
24struct nfattr 24struct nfattr {
25{
26 __u16 nfa_len; 25 __u16 nfa_len;
27 __u16 nfa_type; /* we use 15 bits for the type, and the highest 26 __u16 nfa_type; /* we use 15 bits for the type, and the highest
28 * bit to indicate whether the payload is nested */ 27 * bit to indicate whether the payload is nested */
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 812cb153cabb..378f27ae7772 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -6,8 +6,7 @@
6#define XT_FUNCTION_MAXNAMELEN 30 6#define XT_FUNCTION_MAXNAMELEN 30
7#define XT_TABLE_MAXNAMELEN 32 7#define XT_TABLE_MAXNAMELEN 32
8 8
9struct xt_entry_match 9struct xt_entry_match {
10{
11 union { 10 union {
12 struct { 11 struct {
13 __u16 match_size; 12 __u16 match_size;
@@ -31,8 +30,7 @@ struct xt_entry_match
31 unsigned char data[0]; 30 unsigned char data[0];
32}; 31};
33 32
34struct xt_entry_target 33struct xt_entry_target {
35{
36 union { 34 union {
37 struct { 35 struct {
38 __u16 target_size; 36 __u16 target_size;
@@ -64,16 +62,14 @@ struct xt_entry_target
64 }, \ 62 }, \
65} 63}
66 64
67struct xt_standard_target 65struct xt_standard_target {
68{
69 struct xt_entry_target target; 66 struct xt_entry_target target;
70 int verdict; 67 int verdict;
71}; 68};
72 69
73/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision 70/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision
74 * kernel supports, if >= revision. */ 71 * kernel supports, if >= revision. */
75struct xt_get_revision 72struct xt_get_revision {
76{
77 char name[XT_FUNCTION_MAXNAMELEN-1]; 73 char name[XT_FUNCTION_MAXNAMELEN-1];
78 74
79 __u8 revision; 75 __u8 revision;
@@ -90,8 +86,7 @@ struct xt_get_revision
90 * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my 86 * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my
91 * personal pleasure to remove it -HW 87 * personal pleasure to remove it -HW
92 */ 88 */
93struct _xt_align 89struct _xt_align {
94{
95 __u8 u8; 90 __u8 u8;
96 __u16 u16; 91 __u16 u16;
97 __u32 u32; 92 __u32 u32;
@@ -109,14 +104,12 @@ struct _xt_align
109#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0) 104#define SET_COUNTER(c,b,p) do { (c).bcnt = (b); (c).pcnt = (p); } while(0)
110#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0) 105#define ADD_COUNTER(c,b,p) do { (c).bcnt += (b); (c).pcnt += (p); } while(0)
111 106
112struct xt_counters 107struct xt_counters {
113{
114 __u64 pcnt, bcnt; /* Packet and byte counters */ 108 __u64 pcnt, bcnt; /* Packet and byte counters */
115}; 109};
116 110
117/* The argument to IPT_SO_ADD_COUNTERS. */ 111/* The argument to IPT_SO_ADD_COUNTERS. */
118struct xt_counters_info 112struct xt_counters_info {
119{
120 /* Which table. */ 113 /* Which table. */
121 char name[XT_TABLE_MAXNAMELEN]; 114 char name[XT_TABLE_MAXNAMELEN];
122 115
@@ -269,8 +262,7 @@ struct xt_tgdtor_param {
269 u_int8_t family; 262 u_int8_t family;
270}; 263};
271 264
272struct xt_match 265struct xt_match {
273{
274 struct list_head list; 266 struct list_head list;
275 267
276 const char name[XT_FUNCTION_MAXNAMELEN-1]; 268 const char name[XT_FUNCTION_MAXNAMELEN-1];
@@ -310,8 +302,7 @@ struct xt_match
310}; 302};
311 303
312/* Registration hooks for targets. */ 304/* Registration hooks for targets. */
313struct xt_target 305struct xt_target {
314{
315 struct list_head list; 306 struct list_head list;
316 307
317 const char name[XT_FUNCTION_MAXNAMELEN-1]; 308 const char name[XT_FUNCTION_MAXNAMELEN-1];
@@ -349,8 +340,7 @@ struct xt_target
349}; 340};
350 341
351/* Furniture shopping... */ 342/* Furniture shopping... */
352struct xt_table 343struct xt_table {
353{
354 struct list_head list; 344 struct list_head list;
355 345
356 /* What hooks you will enter on */ 346 /* What hooks you will enter on */
@@ -371,8 +361,7 @@ struct xt_table
371#include <linux/netfilter_ipv4.h> 361#include <linux/netfilter_ipv4.h>
372 362
373/* The table itself */ 363/* The table itself */
374struct xt_table_info 364struct xt_table_info {
375{
376 /* Size per table */ 365 /* Size per table */
377 unsigned int size; 366 unsigned int size;
378 /* Number of entries: FIXME. --RR */ 367 /* Number of entries: FIXME. --RR */
@@ -528,8 +517,7 @@ static inline unsigned long ifname_compare_aligned(const char *_a,
528#ifdef CONFIG_COMPAT 517#ifdef CONFIG_COMPAT
529#include <net/compat.h> 518#include <net/compat.h>
530 519
531struct compat_xt_entry_match 520struct compat_xt_entry_match {
532{
533 union { 521 union {
534 struct { 522 struct {
535 u_int16_t match_size; 523 u_int16_t match_size;
@@ -545,8 +533,7 @@ struct compat_xt_entry_match
545 unsigned char data[0]; 533 unsigned char data[0];
546}; 534};
547 535
548struct compat_xt_entry_target 536struct compat_xt_entry_target {
549{
550 union { 537 union {
551 struct { 538 struct {
552 u_int16_t target_size; 539 u_int16_t target_size;
@@ -566,8 +553,7 @@ struct compat_xt_entry_target
566 * need to change whole approach in order to calculate align as function of 553 * need to change whole approach in order to calculate align as function of
567 * current task alignment */ 554 * current task alignment */
568 555
569struct compat_xt_counters 556struct compat_xt_counters {
570{
571#if defined(CONFIG_X86_64) || defined(CONFIG_IA64) 557#if defined(CONFIG_X86_64) || defined(CONFIG_IA64)
572 u_int32_t cnt[4]; 558 u_int32_t cnt[4];
573#else 559#else
@@ -575,8 +561,7 @@ struct compat_xt_counters
575#endif 561#endif
576}; 562};
577 563
578struct compat_xt_counters_info 564struct compat_xt_counters_info {
579{
580 char name[XT_TABLE_MAXNAMELEN]; 565 char name[XT_TABLE_MAXNAMELEN];
581 compat_uint_t num_counters; 566 compat_uint_t num_counters;
582 struct compat_xt_counters counters[0]; 567 struct compat_xt_counters counters[0];
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h
index 52bd6153b996..92fcbb0d193e 100644
--- a/include/linux/netfilter/xt_connbytes.h
+++ b/include/linux/netfilter/xt_connbytes.h
@@ -15,8 +15,7 @@ enum xt_connbytes_direction {
15 XT_CONNBYTES_DIR_BOTH, 15 XT_CONNBYTES_DIR_BOTH,
16}; 16};
17 17
18struct xt_connbytes_info 18struct xt_connbytes_info {
19{
20 struct { 19 struct {
21 aligned_u64 from; /* count to be matched */ 20 aligned_u64 from; /* count to be matched */
22 aligned_u64 to; /* count to be matched */ 21 aligned_u64 to; /* count to be matched */
diff --git a/include/linux/netfilter/xt_esp.h b/include/linux/netfilter/xt_esp.h
index ef6fa4747d0a..ee6882408000 100644
--- a/include/linux/netfilter/xt_esp.h
+++ b/include/linux/netfilter/xt_esp.h
@@ -3,8 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6struct xt_esp 6struct xt_esp {
7{
8 __u32 spis[2]; /* Security Parameter Index */ 7 __u32 spis[2]; /* Security Parameter Index */
9 __u8 invflags; /* Inverse flags */ 8 __u8 invflags; /* Inverse flags */
10}; 9};
diff --git a/include/linux/netfilter/xt_multiport.h b/include/linux/netfilter/xt_multiport.h
index 185db499fcbc..5b7e72dfffc5 100644
--- a/include/linux/netfilter/xt_multiport.h
+++ b/include/linux/netfilter/xt_multiport.h
@@ -3,8 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6enum xt_multiport_flags 6enum xt_multiport_flags {
7{
8 XT_MULTIPORT_SOURCE, 7 XT_MULTIPORT_SOURCE,
9 XT_MULTIPORT_DESTINATION, 8 XT_MULTIPORT_DESTINATION,
10 XT_MULTIPORT_EITHER 9 XT_MULTIPORT_EITHER
@@ -13,15 +12,13 @@ enum xt_multiport_flags
13#define XT_MULTI_PORTS 15 12#define XT_MULTI_PORTS 15
14 13
15/* Must fit inside union xt_matchinfo: 16 bytes */ 14/* Must fit inside union xt_matchinfo: 16 bytes */
16struct xt_multiport 15struct xt_multiport {
17{
18 __u8 flags; /* Type of comparison */ 16 __u8 flags; /* Type of comparison */
19 __u8 count; /* Number of ports */ 17 __u8 count; /* Number of ports */
20 __u16 ports[XT_MULTI_PORTS]; /* Ports */ 18 __u16 ports[XT_MULTI_PORTS]; /* Ports */
21}; 19};
22 20
23struct xt_multiport_v1 21struct xt_multiport_v1 {
24{
25 __u8 flags; /* Type of comparison */ 22 __u8 flags; /* Type of comparison */
26 __u8 count; /* Number of ports */ 23 __u8 count; /* Number of ports */
27 __u16 ports[XT_MULTI_PORTS]; /* Ports */ 24 __u16 ports[XT_MULTI_PORTS]; /* Ports */
diff --git a/include/linux/netfilter/xt_policy.h b/include/linux/netfilter/xt_policy.h
index 7bb64e7c853d..be8ead05c316 100644
--- a/include/linux/netfilter/xt_policy.h
+++ b/include/linux/netfilter/xt_policy.h
@@ -5,22 +5,19 @@
5 5
6#define XT_POLICY_MAX_ELEM 4 6#define XT_POLICY_MAX_ELEM 4
7 7
8enum xt_policy_flags 8enum xt_policy_flags {
9{
10 XT_POLICY_MATCH_IN = 0x1, 9 XT_POLICY_MATCH_IN = 0x1,
11 XT_POLICY_MATCH_OUT = 0x2, 10 XT_POLICY_MATCH_OUT = 0x2,
12 XT_POLICY_MATCH_NONE = 0x4, 11 XT_POLICY_MATCH_NONE = 0x4,
13 XT_POLICY_MATCH_STRICT = 0x8, 12 XT_POLICY_MATCH_STRICT = 0x8,
14}; 13};
15 14
16enum xt_policy_modes 15enum xt_policy_modes {
17{
18 XT_POLICY_MODE_TRANSPORT, 16 XT_POLICY_MODE_TRANSPORT,
19 XT_POLICY_MODE_TUNNEL 17 XT_POLICY_MODE_TUNNEL
20}; 18};
21 19
22struct xt_policy_spec 20struct xt_policy_spec {
23{
24 __u8 saddr:1, 21 __u8 saddr:1,
25 daddr:1, 22 daddr:1,
26 proto:1, 23 proto:1,
@@ -30,15 +27,13 @@ struct xt_policy_spec
30}; 27};
31 28
32#ifndef __KERNEL__ 29#ifndef __KERNEL__
33union xt_policy_addr 30union xt_policy_addr {
34{
35 struct in_addr a4; 31 struct in_addr a4;
36 struct in6_addr a6; 32 struct in6_addr a6;
37}; 33};
38#endif 34#endif
39 35
40struct xt_policy_elem 36struct xt_policy_elem {
41{
42 union { 37 union {
43#ifdef __KERNEL__ 38#ifdef __KERNEL__
44 struct { 39 struct {
@@ -65,8 +60,7 @@ struct xt_policy_elem
65 struct xt_policy_spec invert; 60 struct xt_policy_spec invert;
66}; 61};
67 62
68struct xt_policy_info 63struct xt_policy_info {
69{
70 struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; 64 struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
71 __u16 flags; 65 __u16 flags;
72 __u16 len; 66 __u16 len;
diff --git a/include/linux/netfilter/xt_state.h b/include/linux/netfilter/xt_state.h
index c06f32edee07..7b32de886613 100644
--- a/include/linux/netfilter/xt_state.h
+++ b/include/linux/netfilter/xt_state.h
@@ -6,8 +6,7 @@
6 6
7#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1)) 7#define XT_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 1))
8 8
9struct xt_state_info 9struct xt_state_info {
10{
11 unsigned int statemask; 10 unsigned int statemask;
12}; 11};
13#endif /*_XT_STATE_H*/ 12#endif /*_XT_STATE_H*/
diff --git a/include/linux/netfilter/xt_string.h b/include/linux/netfilter/xt_string.h
index ecbb95fc89ed..235347c02eab 100644
--- a/include/linux/netfilter/xt_string.h
+++ b/include/linux/netfilter/xt_string.h
@@ -11,8 +11,7 @@ enum {
11 XT_STRING_FLAG_IGNORECASE = 0x02 11 XT_STRING_FLAG_IGNORECASE = 0x02
12}; 12};
13 13
14struct xt_string_info 14struct xt_string_info {
15{
16 __u16 from_offset; 15 __u16 from_offset;
17 __u16 to_offset; 16 __u16 to_offset;
18 char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; 17 char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
diff --git a/include/linux/netfilter/xt_tcpudp.h b/include/linux/netfilter/xt_tcpudp.h
index a490a0bc1d29..38aa7b399021 100644
--- a/include/linux/netfilter/xt_tcpudp.h
+++ b/include/linux/netfilter/xt_tcpudp.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6/* TCP matching stuff */ 6/* TCP matching stuff */
7struct xt_tcp 7struct xt_tcp {
8{
9 __u16 spts[2]; /* Source port range. */ 8 __u16 spts[2]; /* Source port range. */
10 __u16 dpts[2]; /* Destination port range. */ 9 __u16 dpts[2]; /* Destination port range. */
11 __u8 option; /* TCP Option iff non-zero*/ 10 __u8 option; /* TCP Option iff non-zero*/
@@ -22,8 +21,7 @@ struct xt_tcp
22#define XT_TCP_INV_MASK 0x0F /* All possible flags. */ 21#define XT_TCP_INV_MASK 0x0F /* All possible flags. */
23 22
24/* UDP matching stuff */ 23/* UDP matching stuff */
25struct xt_udp 24struct xt_udp {
26{
27 __u16 spts[2]; /* Source port range. */ 25 __u16 spts[2]; /* Source port range. */
28 __u16 dpts[2]; /* Destination port range. */ 26 __u16 dpts[2]; /* Destination port range. */
29 __u8 invflags; /* Inverse flags */ 27 __u8 invflags; /* Inverse flags */
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index 6fe3e6aa10db..f2336523a9df 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -132,8 +132,7 @@ struct arpt_entry
132#define ARPT_RETURN XT_RETURN 132#define ARPT_RETURN XT_RETURN
133 133
134/* The argument to ARPT_SO_GET_INFO */ 134/* The argument to ARPT_SO_GET_INFO */
135struct arpt_getinfo 135struct arpt_getinfo {
136{
137 /* Which table: caller fills this in. */ 136 /* Which table: caller fills this in. */
138 char name[ARPT_TABLE_MAXNAMELEN]; 137 char name[ARPT_TABLE_MAXNAMELEN];
139 138
@@ -155,8 +154,7 @@ struct arpt_getinfo
155}; 154};
156 155
157/* The argument to ARPT_SO_SET_REPLACE. */ 156/* The argument to ARPT_SO_SET_REPLACE. */
158struct arpt_replace 157struct arpt_replace {
159{
160 /* Which table. */ 158 /* Which table. */
161 char name[ARPT_TABLE_MAXNAMELEN]; 159 char name[ARPT_TABLE_MAXNAMELEN];
162 160
@@ -191,8 +189,7 @@ struct arpt_replace
191#define arpt_counters xt_counters 189#define arpt_counters xt_counters
192 190
193/* The argument to ARPT_SO_GET_ENTRIES. */ 191/* The argument to ARPT_SO_GET_ENTRIES. */
194struct arpt_get_entries 192struct arpt_get_entries {
195{
196 /* Which table: user fills this in. */ 193 /* Which table: user fills this in. */
197 char name[ARPT_TABLE_MAXNAMELEN]; 194 char name[ARPT_TABLE_MAXNAMELEN];
198 195
@@ -224,20 +221,17 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
224#ifdef __KERNEL__ 221#ifdef __KERNEL__
225 222
226/* Standard entry. */ 223/* Standard entry. */
227struct arpt_standard 224struct arpt_standard {
228{
229 struct arpt_entry entry; 225 struct arpt_entry entry;
230 struct arpt_standard_target target; 226 struct arpt_standard_target target;
231}; 227};
232 228
233struct arpt_error_target 229struct arpt_error_target {
234{
235 struct arpt_entry_target target; 230 struct arpt_entry_target target;
236 char errorname[ARPT_FUNCTION_MAXNAMELEN]; 231 char errorname[ARPT_FUNCTION_MAXNAMELEN];
237}; 232};
238 233
239struct arpt_error 234struct arpt_error {
240{
241 struct arpt_entry entry; 235 struct arpt_entry entry;
242 struct arpt_error_target target; 236 struct arpt_error_target target;
243}; 237};
@@ -279,8 +273,7 @@ extern unsigned int arpt_do_table(struct sk_buff *skb,
279#ifdef CONFIG_COMPAT 273#ifdef CONFIG_COMPAT
280#include <net/compat.h> 274#include <net/compat.h>
281 275
282struct compat_arpt_entry 276struct compat_arpt_entry {
283{
284 struct arpt_arp arp; 277 struct arpt_arp arp;
285 u_int16_t target_offset; 278 u_int16_t target_offset;
286 u_int16_t next_offset; 279 u_int16_t next_offset;
diff --git a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h
index a11b0c2017fd..c73ef0b18bdc 100644
--- a/include/linux/netfilter_bridge/ebt_802_3.h
+++ b/include/linux/netfilter_bridge/ebt_802_3.h
@@ -58,8 +58,7 @@ static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb)
58} 58}
59#endif 59#endif
60 60
61struct ebt_802_3_info 61struct ebt_802_3_info {
62{
63 uint8_t sap; 62 uint8_t sap;
64 __be16 type; 63 __be16 type;
65 uint8_t bitmask; 64 uint8_t bitmask;
diff --git a/include/linux/netfilter_bridge/ebt_among.h b/include/linux/netfilter_bridge/ebt_among.h
index 7654069233ca..0009558609a7 100644
--- a/include/linux/netfilter_bridge/ebt_among.h
+++ b/include/linux/netfilter_bridge/ebt_among.h
@@ -29,14 +29,12 @@
29 * Yes, it is a memory overhead, but in 2003 AD, who cares? 29 * Yes, it is a memory overhead, but in 2003 AD, who cares?
30 */ 30 */
31 31
32struct ebt_mac_wormhash_tuple 32struct ebt_mac_wormhash_tuple {
33{
34 uint32_t cmp[2]; 33 uint32_t cmp[2];
35 __be32 ip; 34 __be32 ip;
36}; 35};
37 36
38struct ebt_mac_wormhash 37struct ebt_mac_wormhash {
39{
40 int table[257]; 38 int table[257];
41 int poolsize; 39 int poolsize;
42 struct ebt_mac_wormhash_tuple pool[0]; 40 struct ebt_mac_wormhash_tuple pool[0];
@@ -45,8 +43,7 @@ struct ebt_mac_wormhash
45#define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \ 43#define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \
46 + (x)->poolsize * sizeof(struct ebt_mac_wormhash_tuple) : 0) 44 + (x)->poolsize * sizeof(struct ebt_mac_wormhash_tuple) : 0)
47 45
48struct ebt_among_info 46struct ebt_among_info {
49{
50 int wh_dst_ofs; 47 int wh_dst_ofs;
51 int wh_src_ofs; 48 int wh_src_ofs;
52 int bitmask; 49 int bitmask;
diff --git a/include/linux/netfilter_bridge/ebt_arpreply.h b/include/linux/netfilter_bridge/ebt_arpreply.h
index 96a8339960e0..7e77896e1fbf 100644
--- a/include/linux/netfilter_bridge/ebt_arpreply.h
+++ b/include/linux/netfilter_bridge/ebt_arpreply.h
@@ -1,8 +1,7 @@
1#ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H 1#ifndef __LINUX_BRIDGE_EBT_ARPREPLY_H
2#define __LINUX_BRIDGE_EBT_ARPREPLY_H 2#define __LINUX_BRIDGE_EBT_ARPREPLY_H
3 3
4struct ebt_arpreply_info 4struct ebt_arpreply_info {
5{
6 unsigned char mac[ETH_ALEN]; 5 unsigned char mac[ETH_ALEN];
7 int target; 6 int target;
8}; 7};
diff --git a/include/linux/netfilter_bridge/ebt_ip.h b/include/linux/netfilter_bridge/ebt_ip.h
index d6847475bf2e..6a708fb92241 100644
--- a/include/linux/netfilter_bridge/ebt_ip.h
+++ b/include/linux/netfilter_bridge/ebt_ip.h
@@ -26,8 +26,7 @@
26#define EBT_IP_MATCH "ip" 26#define EBT_IP_MATCH "ip"
27 27
28/* the same values are used for the invflags */ 28/* the same values are used for the invflags */
29struct ebt_ip_info 29struct ebt_ip_info {
30{
31 __be32 saddr; 30 __be32 saddr;
32 __be32 daddr; 31 __be32 daddr;
33 __be32 smsk; 32 __be32 smsk;
diff --git a/include/linux/netfilter_bridge/ebt_ip6.h b/include/linux/netfilter_bridge/ebt_ip6.h
index 2273c3ae33ca..e5de98701519 100644
--- a/include/linux/netfilter_bridge/ebt_ip6.h
+++ b/include/linux/netfilter_bridge/ebt_ip6.h
@@ -23,8 +23,7 @@
23#define EBT_IP6_MATCH "ip6" 23#define EBT_IP6_MATCH "ip6"
24 24
25/* the same values are used for the invflags */ 25/* the same values are used for the invflags */
26struct ebt_ip6_info 26struct ebt_ip6_info {
27{
28 struct in6_addr saddr; 27 struct in6_addr saddr;
29 struct in6_addr daddr; 28 struct in6_addr daddr;
30 struct in6_addr smsk; 29 struct in6_addr smsk;
diff --git a/include/linux/netfilter_bridge/ebt_limit.h b/include/linux/netfilter_bridge/ebt_limit.h
index d8b65000afe4..4bf76b751676 100644
--- a/include/linux/netfilter_bridge/ebt_limit.h
+++ b/include/linux/netfilter_bridge/ebt_limit.h
@@ -9,8 +9,7 @@
9/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490 9/* 1/10,000 sec period => max of 10,000/sec. Min rate is then 429490
10 seconds, or one every 59 hours. */ 10 seconds, or one every 59 hours. */
11 11
12struct ebt_limit_info 12struct ebt_limit_info {
13{
14 u_int32_t avg; /* Average secs between packets * scale */ 13 u_int32_t avg; /* Average secs between packets * scale */
15 u_int32_t burst; /* Period multiplier for upper limit. */ 14 u_int32_t burst; /* Period multiplier for upper limit. */
16 15
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h
index b76e653157e5..cc2cdfb764bc 100644
--- a/include/linux/netfilter_bridge/ebt_log.h
+++ b/include/linux/netfilter_bridge/ebt_log.h
@@ -9,8 +9,7 @@
9#define EBT_LOG_PREFIX_SIZE 30 9#define EBT_LOG_PREFIX_SIZE 30
10#define EBT_LOG_WATCHER "log" 10#define EBT_LOG_WATCHER "log"
11 11
12struct ebt_log_info 12struct ebt_log_info {
13{
14 uint8_t loglevel; 13 uint8_t loglevel;
15 uint8_t prefix[EBT_LOG_PREFIX_SIZE]; 14 uint8_t prefix[EBT_LOG_PREFIX_SIZE];
16 uint32_t bitmask; 15 uint32_t bitmask;
diff --git a/include/linux/netfilter_bridge/ebt_mark_m.h b/include/linux/netfilter_bridge/ebt_mark_m.h
index 301524ff1065..9ceb10ec0ed6 100644
--- a/include/linux/netfilter_bridge/ebt_mark_m.h
+++ b/include/linux/netfilter_bridge/ebt_mark_m.h
@@ -4,8 +4,7 @@
4#define EBT_MARK_AND 0x01 4#define EBT_MARK_AND 0x01
5#define EBT_MARK_OR 0x02 5#define EBT_MARK_OR 0x02
6#define EBT_MARK_MASK (EBT_MARK_AND | EBT_MARK_OR) 6#define EBT_MARK_MASK (EBT_MARK_AND | EBT_MARK_OR)
7struct ebt_mark_m_info 7struct ebt_mark_m_info {
8{
9 unsigned long mark, mask; 8 unsigned long mark, mask;
10 uint8_t invert; 9 uint8_t invert;
11 uint8_t bitmask; 10 uint8_t bitmask;
diff --git a/include/linux/netfilter_bridge/ebt_mark_t.h b/include/linux/netfilter_bridge/ebt_mark_t.h
index 6270f6f33693..7d5a268a4311 100644
--- a/include/linux/netfilter_bridge/ebt_mark_t.h
+++ b/include/linux/netfilter_bridge/ebt_mark_t.h
@@ -13,8 +13,7 @@
13#define MARK_AND_VALUE (0xffffffd0) 13#define MARK_AND_VALUE (0xffffffd0)
14#define MARK_XOR_VALUE (0xffffffc0) 14#define MARK_XOR_VALUE (0xffffffc0)
15 15
16struct ebt_mark_t_info 16struct ebt_mark_t_info {
17{
18 unsigned long mark; 17 unsigned long mark;
19 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ 18 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
20 int target; 19 int target;
diff --git a/include/linux/netfilter_bridge/ebt_nat.h b/include/linux/netfilter_bridge/ebt_nat.h
index 435b886a51aa..5e74e3b03bd6 100644
--- a/include/linux/netfilter_bridge/ebt_nat.h
+++ b/include/linux/netfilter_bridge/ebt_nat.h
@@ -2,8 +2,7 @@
2#define __LINUX_BRIDGE_EBT_NAT_H 2#define __LINUX_BRIDGE_EBT_NAT_H
3 3
4#define NAT_ARP_BIT (0x00000010) 4#define NAT_ARP_BIT (0x00000010)
5struct ebt_nat_info 5struct ebt_nat_info {
6{
7 unsigned char mac[ETH_ALEN]; 6 unsigned char mac[ETH_ALEN];
8 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ 7 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
9 int target; 8 int target;
diff --git a/include/linux/netfilter_bridge/ebt_pkttype.h b/include/linux/netfilter_bridge/ebt_pkttype.h
index 0d64bbb29c66..51a799840931 100644
--- a/include/linux/netfilter_bridge/ebt_pkttype.h
+++ b/include/linux/netfilter_bridge/ebt_pkttype.h
@@ -1,8 +1,7 @@
1#ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H 1#ifndef __LINUX_BRIDGE_EBT_PKTTYPE_H
2#define __LINUX_BRIDGE_EBT_PKTTYPE_H 2#define __LINUX_BRIDGE_EBT_PKTTYPE_H
3 3
4struct ebt_pkttype_info 4struct ebt_pkttype_info {
5{
6 uint8_t pkt_type; 5 uint8_t pkt_type;
7 uint8_t invert; 6 uint8_t invert;
8}; 7};
diff --git a/include/linux/netfilter_bridge/ebt_redirect.h b/include/linux/netfilter_bridge/ebt_redirect.h
index 5c67990fce39..dd9622ce8488 100644
--- a/include/linux/netfilter_bridge/ebt_redirect.h
+++ b/include/linux/netfilter_bridge/ebt_redirect.h
@@ -1,8 +1,7 @@
1#ifndef __LINUX_BRIDGE_EBT_REDIRECT_H 1#ifndef __LINUX_BRIDGE_EBT_REDIRECT_H
2#define __LINUX_BRIDGE_EBT_REDIRECT_H 2#define __LINUX_BRIDGE_EBT_REDIRECT_H
3 3
4struct ebt_redirect_info 4struct ebt_redirect_info {
5{
6 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */ 5 /* EBT_ACCEPT, EBT_DROP, EBT_CONTINUE or EBT_RETURN */
7 int target; 6 int target;
8}; 7};
diff --git a/include/linux/netfilter_bridge/ebt_stp.h b/include/linux/netfilter_bridge/ebt_stp.h
index e5fd67850f4d..e503a0aa2728 100644
--- a/include/linux/netfilter_bridge/ebt_stp.h
+++ b/include/linux/netfilter_bridge/ebt_stp.h
@@ -20,8 +20,7 @@
20 20
21#define EBT_STP_MATCH "stp" 21#define EBT_STP_MATCH "stp"
22 22
23struct ebt_stp_config_info 23struct ebt_stp_config_info {
24{
25 uint8_t flags; 24 uint8_t flags;
26 uint16_t root_priol, root_priou; 25 uint16_t root_priol, root_priou;
27 char root_addr[6], root_addrmsk[6]; 26 char root_addr[6], root_addrmsk[6];
@@ -35,8 +34,7 @@ struct ebt_stp_config_info
35 uint16_t forward_delayl, forward_delayu; 34 uint16_t forward_delayl, forward_delayu;
36}; 35};
37 36
38struct ebt_stp_info 37struct ebt_stp_info {
39{
40 uint8_t type; 38 uint8_t type;
41 struct ebt_stp_config_info config; 39 struct ebt_stp_config_info config;
42 uint16_t bitmask; 40 uint16_t bitmask;
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h
index ea281e6a2048..3cc40c131cc3 100644
--- a/include/linux/netfilter_bridge/ebtables.h
+++ b/include/linux/netfilter_bridge/ebtables.h
@@ -34,14 +34,12 @@
34struct xt_match; 34struct xt_match;
35struct xt_target; 35struct xt_target;
36 36
37struct ebt_counter 37struct ebt_counter {
38{
39 uint64_t pcnt; 38 uint64_t pcnt;
40 uint64_t bcnt; 39 uint64_t bcnt;
41}; 40};
42 41
43struct ebt_replace 42struct ebt_replace {
44{
45 char name[EBT_TABLE_MAXNAMELEN]; 43 char name[EBT_TABLE_MAXNAMELEN];
46 unsigned int valid_hooks; 44 unsigned int valid_hooks;
47 /* nr of rules in the table */ 45 /* nr of rules in the table */
@@ -57,8 +55,7 @@ struct ebt_replace
57 char __user *entries; 55 char __user *entries;
58}; 56};
59 57
60struct ebt_replace_kernel 58struct ebt_replace_kernel {
61{
62 char name[EBT_TABLE_MAXNAMELEN]; 59 char name[EBT_TABLE_MAXNAMELEN];
63 unsigned int valid_hooks; 60 unsigned int valid_hooks;
64 /* nr of rules in the table */ 61 /* nr of rules in the table */
@@ -120,8 +117,7 @@ struct ebt_entries {
120#define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN \ 117#define EBT_INV_MASK (EBT_IPROTO | EBT_IIN | EBT_IOUT | EBT_ILOGICALIN \
121 | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST) 118 | EBT_ILOGICALOUT | EBT_ISOURCE | EBT_IDEST)
122 119
123struct ebt_entry_match 120struct ebt_entry_match {
124{
125 union { 121 union {
126 char name[EBT_FUNCTION_MAXNAMELEN]; 122 char name[EBT_FUNCTION_MAXNAMELEN];
127 struct xt_match *match; 123 struct xt_match *match;
@@ -131,8 +127,7 @@ struct ebt_entry_match
131 unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); 127 unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
132}; 128};
133 129
134struct ebt_entry_watcher 130struct ebt_entry_watcher {
135{
136 union { 131 union {
137 char name[EBT_FUNCTION_MAXNAMELEN]; 132 char name[EBT_FUNCTION_MAXNAMELEN];
138 struct xt_target *watcher; 133 struct xt_target *watcher;
@@ -142,8 +137,7 @@ struct ebt_entry_watcher
142 unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace)))); 137 unsigned char data[0] __attribute__ ((aligned (__alignof__(struct ebt_replace))));
143}; 138};
144 139
145struct ebt_entry_target 140struct ebt_entry_target {
146{
147 union { 141 union {
148 char name[EBT_FUNCTION_MAXNAMELEN]; 142 char name[EBT_FUNCTION_MAXNAMELEN];
149 struct xt_target *target; 143 struct xt_target *target;
@@ -154,8 +148,7 @@ struct ebt_entry_target
154}; 148};
155 149
156#define EBT_STANDARD_TARGET "standard" 150#define EBT_STANDARD_TARGET "standard"
157struct ebt_standard_target 151struct ebt_standard_target {
158{
159 struct ebt_entry_target target; 152 struct ebt_entry_target target;
160 int verdict; 153 int verdict;
161}; 154};
@@ -206,8 +199,7 @@ struct ebt_entry {
206#define EBT_MATCH 0 199#define EBT_MATCH 0
207#define EBT_NOMATCH 1 200#define EBT_NOMATCH 1
208 201
209struct ebt_match 202struct ebt_match {
210{
211 struct list_head list; 203 struct list_head list;
212 const char name[EBT_FUNCTION_MAXNAMELEN]; 204 const char name[EBT_FUNCTION_MAXNAMELEN];
213 bool (*match)(const struct sk_buff *skb, const struct net_device *in, 205 bool (*match)(const struct sk_buff *skb, const struct net_device *in,
@@ -224,8 +216,7 @@ struct ebt_match
224 struct module *me; 216 struct module *me;
225}; 217};
226 218
227struct ebt_watcher 219struct ebt_watcher {
228{
229 struct list_head list; 220 struct list_head list;
230 const char name[EBT_FUNCTION_MAXNAMELEN]; 221 const char name[EBT_FUNCTION_MAXNAMELEN];
231 unsigned int (*target)(struct sk_buff *skb, 222 unsigned int (*target)(struct sk_buff *skb,
@@ -242,8 +233,7 @@ struct ebt_watcher
242 struct module *me; 233 struct module *me;
243}; 234};
244 235
245struct ebt_target 236struct ebt_target {
246{
247 struct list_head list; 237 struct list_head list;
248 const char name[EBT_FUNCTION_MAXNAMELEN]; 238 const char name[EBT_FUNCTION_MAXNAMELEN];
249 /* returns one of the standard EBT_* verdicts */ 239 /* returns one of the standard EBT_* verdicts */
@@ -262,15 +252,13 @@ struct ebt_target
262}; 252};
263 253
264/* used for jumping from and into user defined chains (udc) */ 254/* used for jumping from and into user defined chains (udc) */
265struct ebt_chainstack 255struct ebt_chainstack {
266{
267 struct ebt_entries *chaininfo; /* pointer to chain data */ 256 struct ebt_entries *chaininfo; /* pointer to chain data */
268 struct ebt_entry *e; /* pointer to entry data */ 257 struct ebt_entry *e; /* pointer to entry data */
269 unsigned int n; /* n'th entry */ 258 unsigned int n; /* n'th entry */
270}; 259};
271 260
272struct ebt_table_info 261struct ebt_table_info {
273{
274 /* total size of the entries */ 262 /* total size of the entries */
275 unsigned int entries_size; 263 unsigned int entries_size;
276 unsigned int nentries; 264 unsigned int nentries;
@@ -282,8 +270,7 @@ struct ebt_table_info
282 struct ebt_counter counters[0] ____cacheline_aligned; 270 struct ebt_counter counters[0] ____cacheline_aligned;
283}; 271};
284 272
285struct ebt_table 273struct ebt_table {
286{
287 struct list_head list; 274 struct list_head list;
288 char name[EBT_TABLE_MAXNAMELEN]; 275 char name[EBT_TABLE_MAXNAMELEN];
289 struct ebt_replace_kernel *table; 276 struct ebt_replace_kernel *table;
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 61fafc868a7b..27b3f5807305 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -76,8 +76,7 @@ struct ipt_ip {
76/* This structure defines each of the firewall rules. Consists of 3 76/* This structure defines each of the firewall rules. Consists of 3
77 parts which are 1) general IP header stuff 2) match specific 77 parts which are 1) general IP header stuff 2) match specific
78 stuff 3) the target to perform if the rule matches */ 78 stuff 3) the target to perform if the rule matches */
79struct ipt_entry 79struct ipt_entry {
80{
81 struct ipt_ip ip; 80 struct ipt_ip ip;
82 81
83 /* Mark with fields that we care about. */ 82 /* Mark with fields that we care about. */
@@ -135,8 +134,7 @@ struct ipt_entry
135#define IPT_UDP_INV_MASK XT_UDP_INV_MASK 134#define IPT_UDP_INV_MASK XT_UDP_INV_MASK
136 135
137/* ICMP matching stuff */ 136/* ICMP matching stuff */
138struct ipt_icmp 137struct ipt_icmp {
139{
140 u_int8_t type; /* type to match */ 138 u_int8_t type; /* type to match */
141 u_int8_t code[2]; /* range of code */ 139 u_int8_t code[2]; /* range of code */
142 u_int8_t invflags; /* Inverse flags */ 140 u_int8_t invflags; /* Inverse flags */
@@ -146,8 +144,7 @@ struct ipt_icmp
146#define IPT_ICMP_INV 0x01 /* Invert the sense of type/code test */ 144#define IPT_ICMP_INV 0x01 /* Invert the sense of type/code test */
147 145
148/* The argument to IPT_SO_GET_INFO */ 146/* The argument to IPT_SO_GET_INFO */
149struct ipt_getinfo 147struct ipt_getinfo {
150{
151 /* Which table: caller fills this in. */ 148 /* Which table: caller fills this in. */
152 char name[IPT_TABLE_MAXNAMELEN]; 149 char name[IPT_TABLE_MAXNAMELEN];
153 150
@@ -169,8 +166,7 @@ struct ipt_getinfo
169}; 166};
170 167
171/* The argument to IPT_SO_SET_REPLACE. */ 168/* The argument to IPT_SO_SET_REPLACE. */
172struct ipt_replace 169struct ipt_replace {
173{
174 /* Which table. */ 170 /* Which table. */
175 char name[IPT_TABLE_MAXNAMELEN]; 171 char name[IPT_TABLE_MAXNAMELEN];
176 172
@@ -204,8 +200,7 @@ struct ipt_replace
204#define ipt_counters_info xt_counters_info 200#define ipt_counters_info xt_counters_info
205 201
206/* The argument to IPT_SO_GET_ENTRIES. */ 202/* The argument to IPT_SO_GET_ENTRIES. */
207struct ipt_get_entries 203struct ipt_get_entries {
208{
209 /* Which table: user fills this in. */ 204 /* Which table: user fills this in. */
210 char name[IPT_TABLE_MAXNAMELEN]; 205 char name[IPT_TABLE_MAXNAMELEN];
211 206
@@ -250,20 +245,17 @@ extern struct xt_table *ipt_register_table(struct net *net,
250extern void ipt_unregister_table(struct xt_table *table); 245extern void ipt_unregister_table(struct xt_table *table);
251 246
252/* Standard entry. */ 247/* Standard entry. */
253struct ipt_standard 248struct ipt_standard {
254{
255 struct ipt_entry entry; 249 struct ipt_entry entry;
256 struct ipt_standard_target target; 250 struct ipt_standard_target target;
257}; 251};
258 252
259struct ipt_error_target 253struct ipt_error_target {
260{
261 struct ipt_entry_target target; 254 struct ipt_entry_target target;
262 char errorname[IPT_FUNCTION_MAXNAMELEN]; 255 char errorname[IPT_FUNCTION_MAXNAMELEN];
263}; 256};
264 257
265struct ipt_error 258struct ipt_error {
266{
267 struct ipt_entry entry; 259 struct ipt_entry entry;
268 struct ipt_error_target target; 260 struct ipt_error_target target;
269}; 261};
@@ -301,8 +293,7 @@ extern unsigned int ipt_do_table(struct sk_buff *skb,
301#ifdef CONFIG_COMPAT 293#ifdef CONFIG_COMPAT
302#include <net/compat.h> 294#include <net/compat.h>
303 295
304struct compat_ipt_entry 296struct compat_ipt_entry {
305{
306 struct ipt_ip ip; 297 struct ipt_ip ip;
307 compat_uint_t nfcache; 298 compat_uint_t nfcache;
308 u_int16_t target_offset; 299 u_int16_t target_offset;
diff --git a/include/linux/netfilter_ipv4/ipt_SAME.h b/include/linux/netfilter_ipv4/ipt_SAME.h
index be6e682a85ec..2529660c5b38 100644
--- a/include/linux/netfilter_ipv4/ipt_SAME.h
+++ b/include/linux/netfilter_ipv4/ipt_SAME.h
@@ -5,8 +5,7 @@
5 5
6#define IPT_SAME_NODST 0x01 6#define IPT_SAME_NODST 0x01
7 7
8struct ipt_same_info 8struct ipt_same_info {
9{
10 unsigned char info; 9 unsigned char info;
11 u_int32_t rangesize; 10 u_int32_t rangesize;
12 u_int32_t ipnum; 11 u_int32_t ipnum;
diff --git a/include/linux/netfilter_ipv4/ipt_ah.h b/include/linux/netfilter_ipv4/ipt_ah.h
index 7b9a2ac7adb9..2e555b4d05e3 100644
--- a/include/linux/netfilter_ipv4/ipt_ah.h
+++ b/include/linux/netfilter_ipv4/ipt_ah.h
@@ -1,8 +1,7 @@
1#ifndef _IPT_AH_H 1#ifndef _IPT_AH_H
2#define _IPT_AH_H 2#define _IPT_AH_H
3 3
4struct ipt_ah 4struct ipt_ah {
5{
6 u_int32_t spis[2]; /* Security Parameter Index */ 5 u_int32_t spis[2]; /* Security Parameter Index */
7 u_int8_t invflags; /* Inverse flags */ 6 u_int8_t invflags; /* Inverse flags */
8}; 7};
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index a64e1451ac38..b31050d20ae4 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -88,8 +88,7 @@ struct ip6t_ip6 {
88/* This structure defines each of the firewall rules. Consists of 3 88/* This structure defines each of the firewall rules. Consists of 3
89 parts which are 1) general IP header stuff 2) match specific 89 parts which are 1) general IP header stuff 2) match specific
90 stuff 3) the target to perform if the rule matches */ 90 stuff 3) the target to perform if the rule matches */
91struct ip6t_entry 91struct ip6t_entry {
92{
93 struct ip6t_ip6 ipv6; 92 struct ip6t_ip6 ipv6;
94 93
95 /* Mark with fields that we care about. */ 94 /* Mark with fields that we care about. */
@@ -111,20 +110,17 @@ struct ip6t_entry
111}; 110};
112 111
113/* Standard entry */ 112/* Standard entry */
114struct ip6t_standard 113struct ip6t_standard {
115{
116 struct ip6t_entry entry; 114 struct ip6t_entry entry;
117 struct ip6t_standard_target target; 115 struct ip6t_standard_target target;
118}; 116};
119 117
120struct ip6t_error_target 118struct ip6t_error_target {
121{
122 struct ip6t_entry_target target; 119 struct ip6t_entry_target target;
123 char errorname[IP6T_FUNCTION_MAXNAMELEN]; 120 char errorname[IP6T_FUNCTION_MAXNAMELEN];
124}; 121};
125 122
126struct ip6t_error 123struct ip6t_error {
127{
128 struct ip6t_entry entry; 124 struct ip6t_entry entry;
129 struct ip6t_error_target target; 125 struct ip6t_error_target target;
130}; 126};
@@ -195,8 +191,7 @@ struct ip6t_error
195#define IP6T_UDP_INV_MASK XT_UDP_INV_MASK 191#define IP6T_UDP_INV_MASK XT_UDP_INV_MASK
196 192
197/* ICMP matching stuff */ 193/* ICMP matching stuff */
198struct ip6t_icmp 194struct ip6t_icmp {
199{
200 u_int8_t type; /* type to match */ 195 u_int8_t type; /* type to match */
201 u_int8_t code[2]; /* range of code */ 196 u_int8_t code[2]; /* range of code */
202 u_int8_t invflags; /* Inverse flags */ 197 u_int8_t invflags; /* Inverse flags */
@@ -206,8 +201,7 @@ struct ip6t_icmp
206#define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */ 201#define IP6T_ICMP_INV 0x01 /* Invert the sense of type/code test */
207 202
208/* The argument to IP6T_SO_GET_INFO */ 203/* The argument to IP6T_SO_GET_INFO */
209struct ip6t_getinfo 204struct ip6t_getinfo {
210{
211 /* Which table: caller fills this in. */ 205 /* Which table: caller fills this in. */
212 char name[IP6T_TABLE_MAXNAMELEN]; 206 char name[IP6T_TABLE_MAXNAMELEN];
213 207
@@ -229,8 +223,7 @@ struct ip6t_getinfo
229}; 223};
230 224
231/* The argument to IP6T_SO_SET_REPLACE. */ 225/* The argument to IP6T_SO_SET_REPLACE. */
232struct ip6t_replace 226struct ip6t_replace {
233{
234 /* Which table. */ 227 /* Which table. */
235 char name[IP6T_TABLE_MAXNAMELEN]; 228 char name[IP6T_TABLE_MAXNAMELEN];
236 229
@@ -264,8 +257,7 @@ struct ip6t_replace
264#define ip6t_counters_info xt_counters_info 257#define ip6t_counters_info xt_counters_info
265 258
266/* The argument to IP6T_SO_GET_ENTRIES. */ 259/* The argument to IP6T_SO_GET_ENTRIES. */
267struct ip6t_get_entries 260struct ip6t_get_entries {
268{
269 /* Which table: user fills this in. */ 261 /* Which table: user fills this in. */
270 char name[IP6T_TABLE_MAXNAMELEN]; 262 char name[IP6T_TABLE_MAXNAMELEN];
271 263
@@ -330,8 +322,7 @@ extern int ip6_masked_addrcmp(const struct in6_addr *addr1,
330#ifdef CONFIG_COMPAT 322#ifdef CONFIG_COMPAT
331#include <net/compat.h> 323#include <net/compat.h>
332 324
333struct compat_ip6t_entry 325struct compat_ip6t_entry {
334{
335 struct ip6t_ip6 ipv6; 326 struct ip6t_ip6 ipv6;
336 compat_uint_t nfcache; 327 compat_uint_t nfcache;
337 u_int16_t target_offset; 328 u_int16_t target_offset;
diff --git a/include/linux/netfilter_ipv6/ip6t_ah.h b/include/linux/netfilter_ipv6/ip6t_ah.h
index 8531879eb464..17a745cfb2c7 100644
--- a/include/linux/netfilter_ipv6/ip6t_ah.h
+++ b/include/linux/netfilter_ipv6/ip6t_ah.h
@@ -1,8 +1,7 @@
1#ifndef _IP6T_AH_H 1#ifndef _IP6T_AH_H
2#define _IP6T_AH_H 2#define _IP6T_AH_H
3 3
4struct ip6t_ah 4struct ip6t_ah {
5{
6 u_int32_t spis[2]; /* Security Parameter Index */ 5 u_int32_t spis[2]; /* Security Parameter Index */
7 u_int32_t hdrlen; /* Header Length */ 6 u_int32_t hdrlen; /* Header Length */
8 u_int8_t hdrres; /* Test of the Reserved Filed */ 7 u_int8_t hdrres; /* Test of the Reserved Filed */
diff --git a/include/linux/netfilter_ipv6/ip6t_frag.h b/include/linux/netfilter_ipv6/ip6t_frag.h
index 66070a0d6dfc..3724d0850920 100644
--- a/include/linux/netfilter_ipv6/ip6t_frag.h
+++ b/include/linux/netfilter_ipv6/ip6t_frag.h
@@ -1,8 +1,7 @@
1#ifndef _IP6T_FRAG_H 1#ifndef _IP6T_FRAG_H
2#define _IP6T_FRAG_H 2#define _IP6T_FRAG_H
3 3
4struct ip6t_frag 4struct ip6t_frag {
5{
6 u_int32_t ids[2]; /* Security Parameter Index */ 5 u_int32_t ids[2]; /* Security Parameter Index */
7 u_int32_t hdrlen; /* Header Length */ 6 u_int32_t hdrlen; /* Header Length */
8 u_int8_t flags; /* */ 7 u_int8_t flags; /* */
diff --git a/include/linux/netfilter_ipv6/ip6t_ipv6header.h b/include/linux/netfilter_ipv6/ip6t_ipv6header.h
index 51c53fc9c44a..01dfd445596a 100644
--- a/include/linux/netfilter_ipv6/ip6t_ipv6header.h
+++ b/include/linux/netfilter_ipv6/ip6t_ipv6header.h
@@ -8,8 +8,7 @@ on whether they contain certain headers */
8#ifndef __IPV6HEADER_H 8#ifndef __IPV6HEADER_H
9#define __IPV6HEADER_H 9#define __IPV6HEADER_H
10 10
11struct ip6t_ipv6header_info 11struct ip6t_ipv6header_info {
12{
13 u_int8_t matchflags; 12 u_int8_t matchflags;
14 u_int8_t invflags; 13 u_int8_t invflags;
15 u_int8_t modeflag; 14 u_int8_t modeflag;
diff --git a/include/linux/netfilter_ipv6/ip6t_mh.h b/include/linux/netfilter_ipv6/ip6t_mh.h
index b9ca9a5f74d0..18549bca2d1f 100644
--- a/include/linux/netfilter_ipv6/ip6t_mh.h
+++ b/include/linux/netfilter_ipv6/ip6t_mh.h
@@ -2,8 +2,7 @@
2#define _IP6T_MH_H 2#define _IP6T_MH_H
3 3
4/* MH matching stuff */ 4/* MH matching stuff */
5struct ip6t_mh 5struct ip6t_mh {
6{
7 u_int8_t types[2]; /* MH type range */ 6 u_int8_t types[2]; /* MH type range */
8 u_int8_t invflags; /* Inverse flags */ 7 u_int8_t invflags; /* Inverse flags */
9}; 8};
diff --git a/include/linux/netfilter_ipv6/ip6t_opts.h b/include/linux/netfilter_ipv6/ip6t_opts.h
index a07e36380ae8..62d89bcd9f9c 100644
--- a/include/linux/netfilter_ipv6/ip6t_opts.h
+++ b/include/linux/netfilter_ipv6/ip6t_opts.h
@@ -3,8 +3,7 @@
3 3
4#define IP6T_OPTS_OPTSNR 16 4#define IP6T_OPTS_OPTSNR 16
5 5
6struct ip6t_opts 6struct ip6t_opts {
7{
8 u_int32_t hdrlen; /* Header Length */ 7 u_int32_t hdrlen; /* Header Length */
9 u_int8_t flags; /* */ 8 u_int8_t flags; /* */
10 u_int8_t invflags; /* Inverse flags */ 9 u_int8_t invflags; /* Inverse flags */
diff --git a/include/linux/netfilter_ipv6/ip6t_rt.h b/include/linux/netfilter_ipv6/ip6t_rt.h
index 52156023e8db..ab91bfd2cd00 100644
--- a/include/linux/netfilter_ipv6/ip6t_rt.h
+++ b/include/linux/netfilter_ipv6/ip6t_rt.h
@@ -5,8 +5,7 @@
5 5
6#define IP6T_RT_HOPS 16 6#define IP6T_RT_HOPS 16
7 7
8struct ip6t_rt 8struct ip6t_rt {
9{
10 u_int32_t rt_type; /* Routing Type */ 9 u_int32_t rt_type; /* Routing Type */
11 u_int32_t segsleft[2]; /* Segments Left */ 10 u_int32_t segsleft[2]; /* Segments Left */
12 u_int32_t hdrlen; /* Header Length */ 11 u_int32_t hdrlen; /* Header Length */
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index ab5d3126831f..fde27c017326 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -29,16 +29,14 @@
29 29
30struct net; 30struct net;
31 31
32struct sockaddr_nl 32struct sockaddr_nl {
33{
34 sa_family_t nl_family; /* AF_NETLINK */ 33 sa_family_t nl_family; /* AF_NETLINK */
35 unsigned short nl_pad; /* zero */ 34 unsigned short nl_pad; /* zero */
36 __u32 nl_pid; /* port ID */ 35 __u32 nl_pid; /* port ID */
37 __u32 nl_groups; /* multicast groups mask */ 36 __u32 nl_groups; /* multicast groups mask */
38}; 37};
39 38
40struct nlmsghdr 39struct nlmsghdr {
41{
42 __u32 nlmsg_len; /* Length of message including header */ 40 __u32 nlmsg_len; /* Length of message including header */
43 __u16 nlmsg_type; /* Message content */ 41 __u16 nlmsg_type; /* Message content */
44 __u16 nlmsg_flags; /* Additional flags */ 42 __u16 nlmsg_flags; /* Additional flags */
@@ -94,8 +92,7 @@ struct nlmsghdr
94 92
95#define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */ 93#define NLMSG_MIN_TYPE 0x10 /* < 0x10: reserved control messages */
96 94
97struct nlmsgerr 95struct nlmsgerr {
98{
99 int error; 96 int error;
100 struct nlmsghdr msg; 97 struct nlmsghdr msg;
101}; 98};
@@ -106,8 +103,7 @@ struct nlmsgerr
106#define NETLINK_BROADCAST_ERROR 4 103#define NETLINK_BROADCAST_ERROR 4
107#define NETLINK_NO_ENOBUFS 5 104#define NETLINK_NO_ENOBUFS 5
108 105
109struct nl_pktinfo 106struct nl_pktinfo {
110{
111 __u32 group; 107 __u32 group;
112}; 108};
113 109
@@ -127,8 +123,7 @@ enum {
127 * <-------------- nlattr->nla_len --------------> 123 * <-------------- nlattr->nla_len -------------->
128 */ 124 */
129 125
130struct nlattr 126struct nlattr {
131{
132 __u16 nla_len; 127 __u16 nla_len;
133 __u16 nla_type; 128 __u16 nla_type;
134}; 129};
@@ -161,8 +156,7 @@ static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb)
161 return (struct nlmsghdr *)skb->data; 156 return (struct nlmsghdr *)skb->data;
162} 157}
163 158
164struct netlink_skb_parms 159struct netlink_skb_parms {
165{
166 struct ucred creds; /* Skb credentials */ 160 struct ucred creds; /* Skb credentials */
167 __u32 pid; 161 __u32 pid;
168 __u32 dst_group; 162 __u32 dst_group;
@@ -220,8 +214,7 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
220#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) 214#define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN)
221 215
222 216
223struct netlink_callback 217struct netlink_callback {
224{
225 struct sk_buff *skb; 218 struct sk_buff *skb;
226 const struct nlmsghdr *nlh; 219 const struct nlmsghdr *nlh;
227 int (*dump)(struct sk_buff * skb, 220 int (*dump)(struct sk_buff * skb,
@@ -231,8 +224,7 @@ struct netlink_callback
231 long args[6]; 224 long args[6];
232}; 225};
233 226
234struct netlink_notify 227struct netlink_notify {
235{
236 struct net *net; 228 struct net *net;
237 int pid; 229 int pid;
238 int protocol; 230 int protocol;
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index a8d71ed43a0e..da8ea2e19273 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -160,6 +160,11 @@
160 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, 160 * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
161 * partial scan results may be available 161 * partial scan results may be available
162 * 162 *
163 * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation
164 * or noise level
165 * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to
166 * NL80211_CMD_GET_SURVEY and on the "scan" multicast group)
167 *
163 * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain 168 * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
164 * has been changed and provides details of the request information 169 * has been changed and provides details of the request information
165 * that caused the change such as who initiated the regulatory request 170 * that caused the change such as who initiated the regulatory request
@@ -341,6 +346,13 @@ enum nl80211_commands {
341 346
342 NL80211_CMD_SET_WIPHY_NETNS, 347 NL80211_CMD_SET_WIPHY_NETNS,
343 348
349 NL80211_CMD_GET_SURVEY,
350 NL80211_CMD_NEW_SURVEY_RESULTS,
351
352 NL80211_CMD_SET_PMKSA,
353 NL80211_CMD_DEL_PMKSA,
354 NL80211_CMD_FLUSH_PMKSA,
355
344 /* add new commands above here */ 356 /* add new commands above here */
345 357
346 /* used to define NL80211_CMD_MAX below */ 358 /* used to define NL80211_CMD_MAX below */
@@ -584,6 +596,16 @@ enum nl80211_commands {
584 * changed then the list changed and the dump should be repeated 596 * changed then the list changed and the dump should be repeated
585 * completely from scratch. 597 * completely from scratch.
586 * 598 *
599 * @NL80211_ATTR_4ADDR: Use 4-address frames on a virtual interface
600 *
601 * @NL80211_ATTR_SURVEY_INFO: survey information about a channel, part of
602 * the survey response for %NL80211_CMD_GET_SURVEY, nested attribute
603 * containing info as possible, see &enum survey_info.
604 *
605 * @NL80211_ATTR_PMKID: PMK material for PMKSA caching.
606 * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can
607 * cache, a wiphy attribute.
608 *
587 * @NL80211_ATTR_MAX: highest attribute number currently defined 609 * @NL80211_ATTR_MAX: highest attribute number currently defined
588 * @__NL80211_ATTR_AFTER_LAST: internal use 610 * @__NL80211_ATTR_AFTER_LAST: internal use
589 */ 611 */
@@ -714,6 +736,13 @@ enum nl80211_attrs {
714 736
715 NL80211_ATTR_PID, 737 NL80211_ATTR_PID,
716 738
739 NL80211_ATTR_4ADDR,
740
741 NL80211_ATTR_SURVEY_INFO,
742
743 NL80211_ATTR_PMKID,
744 NL80211_ATTR_MAX_NUM_PMKIDS,
745
717 /* add attributes here, update the policy in nl80211.c */ 746 /* add attributes here, update the policy in nl80211.c */
718 747
719 __NL80211_ATTR_AFTER_LAST, 748 __NL80211_ATTR_AFTER_LAST,
@@ -895,14 +924,14 @@ enum nl80211_sta_info {
895 * 924 *
896 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active 925 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active
897 * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running 926 * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running
898 * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN 927 * @NL80211_MPATH_FLAG_SN_VALID: the mesh path contains a valid SN
899 * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set 928 * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set
900 * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded 929 * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded
901 */ 930 */
902enum nl80211_mpath_flags { 931enum nl80211_mpath_flags {
903 NL80211_MPATH_FLAG_ACTIVE = 1<<0, 932 NL80211_MPATH_FLAG_ACTIVE = 1<<0,
904 NL80211_MPATH_FLAG_RESOLVING = 1<<1, 933 NL80211_MPATH_FLAG_RESOLVING = 1<<1,
905 NL80211_MPATH_FLAG_DSN_VALID = 1<<2, 934 NL80211_MPATH_FLAG_SN_VALID = 1<<2,
906 NL80211_MPATH_FLAG_FIXED = 1<<3, 935 NL80211_MPATH_FLAG_FIXED = 1<<3,
907 NL80211_MPATH_FLAG_RESOLVED = 1<<4, 936 NL80211_MPATH_FLAG_RESOLVED = 1<<4,
908}; 937};
@@ -915,7 +944,7 @@ enum nl80211_mpath_flags {
915 * 944 *
916 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved 945 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved
917 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination 946 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination
918 * @NL80211_ATTR_MPATH_DSN: destination sequence number 947 * @NL80211_ATTR_MPATH_SN: destination sequence number
919 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path 948 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path
920 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now 949 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now
921 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in 950 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in
@@ -926,7 +955,7 @@ enum nl80211_mpath_flags {
926enum nl80211_mpath_info { 955enum nl80211_mpath_info {
927 __NL80211_MPATH_INFO_INVALID, 956 __NL80211_MPATH_INFO_INVALID,
928 NL80211_MPATH_INFO_FRAME_QLEN, 957 NL80211_MPATH_INFO_FRAME_QLEN,
929 NL80211_MPATH_INFO_DSN, 958 NL80211_MPATH_INFO_SN,
930 NL80211_MPATH_INFO_METRIC, 959 NL80211_MPATH_INFO_METRIC,
931 NL80211_MPATH_INFO_EXPTIME, 960 NL80211_MPATH_INFO_EXPTIME,
932 NL80211_MPATH_INFO_FLAGS, 961 NL80211_MPATH_INFO_FLAGS,
@@ -1117,6 +1146,26 @@ enum nl80211_reg_rule_flags {
1117}; 1146};
1118 1147
1119/** 1148/**
1149 * enum nl80211_survey_info - survey information
1150 *
1151 * These attribute types are used with %NL80211_ATTR_SURVEY_INFO
1152 * when getting information about a survey.
1153 *
1154 * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
1155 * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
1156 * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
1157 */
1158enum nl80211_survey_info {
1159 __NL80211_SURVEY_INFO_INVALID,
1160 NL80211_SURVEY_INFO_FREQUENCY,
1161 NL80211_SURVEY_INFO_NOISE,
1162
1163 /* keep last */
1164 __NL80211_SURVEY_INFO_AFTER_LAST,
1165 NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1
1166};
1167
1168/**
1120 * enum nl80211_mntr_flags - monitor configuration flags 1169 * enum nl80211_mntr_flags - monitor configuration flags
1121 * 1170 *
1122 * Monitor configuration flags. 1171 * Monitor configuration flags.
@@ -1196,6 +1245,8 @@ enum nl80211_mntr_flags {
1196 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) 1245 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs)
1197 * that it takes for an HWMP information element to propagate across the mesh 1246 * that it takes for an HWMP information element to propagate across the mesh
1198 * 1247 *
1248 * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not
1249 *
1199 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute 1250 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
1200 * 1251 *
1201 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 1252 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
@@ -1215,6 +1266,7 @@ enum nl80211_meshconf_params {
1215 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, 1266 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
1216 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, 1267 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
1217 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, 1268 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
1269 NL80211_MESHCONF_HWMP_ROOTMODE,
1218 1270
1219 /* keep last */ 1271 /* keep last */
1220 __NL80211_MESHCONF_ATTR_AFTER_LAST, 1272 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -1277,6 +1329,7 @@ enum nl80211_channel_type {
1277 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1329 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1278 * in unspecified units, scaled to 0..100 (u8) 1330 * in unspecified units, scaled to 0..100 (u8)
1279 * @NL80211_BSS_STATUS: status, if this BSS is "used" 1331 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1332 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms
1280 * @__NL80211_BSS_AFTER_LAST: internal 1333 * @__NL80211_BSS_AFTER_LAST: internal
1281 * @NL80211_BSS_MAX: highest BSS attribute 1334 * @NL80211_BSS_MAX: highest BSS attribute
1282 */ 1335 */
@@ -1291,6 +1344,7 @@ enum nl80211_bss {
1291 NL80211_BSS_SIGNAL_MBM, 1344 NL80211_BSS_SIGNAL_MBM,
1292 NL80211_BSS_SIGNAL_UNSPEC, 1345 NL80211_BSS_SIGNAL_UNSPEC,
1293 NL80211_BSS_STATUS, 1346 NL80211_BSS_STATUS,
1347 NL80211_BSS_SEEN_MS_AGO,
1294 1348
1295 /* keep last */ 1349 /* keep last */
1296 __NL80211_BSS_AFTER_LAST, 1350 __NL80211_BSS_AFTER_LAST,
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h
index b7d9435d5a9f..33d9f5175109 100644
--- a/include/linux/nl802154.h
+++ b/include/linux/nl802154.h
@@ -65,6 +65,9 @@ enum {
65 IEEE802154_ATTR_SEC, 65 IEEE802154_ATTR_SEC,
66 66
67 IEEE802154_ATTR_PAGE, 67 IEEE802154_ATTR_PAGE,
68 IEEE802154_ATTR_CHANNEL_PAGE_LIST,
69
70 IEEE802154_ATTR_PHY_NAME,
68 71
69 __IEEE802154_ATTR_MAX, 72 __IEEE802154_ATTR_MAX,
70}; 73};
@@ -114,6 +117,9 @@ enum {
114 IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ 117 IEEE802154_RX_ENABLE_CONF, /* Not supported yet */
115 118
116 IEEE802154_LIST_IFACE, 119 IEEE802154_LIST_IFACE,
120 IEEE802154_LIST_PHY,
121 IEEE802154_ADD_IFACE,
122 IEEE802154_DEL_IFACE,
117 123
118 __IEEE802154_CMD_MAX, 124 __IEEE802154_CMD_MAX,
119}; 125};
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 44428d247dbe..fee6c2f68075 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -201,6 +201,8 @@ static inline int notifier_to_errno(int ret)
201#define NETDEV_PRE_UP 0x000D 201#define NETDEV_PRE_UP 0x000D
202#define NETDEV_BONDING_OLDTYPE 0x000E 202#define NETDEV_BONDING_OLDTYPE 0x000E
203#define NETDEV_BONDING_NEWTYPE 0x000F 203#define NETDEV_BONDING_NEWTYPE 0x000F
204#define NETDEV_POST_INIT 0x0010
205#define NETDEV_UNREGISTER_BATCH 0x0011
204 206
205#define SYS_DOWN 0x0001 /* Notify of system down */ 207#define SYS_DOWN 0x0001 /* Notify of system down */
206#define SYS_RESTART SYS_DOWN 208#define SYS_RESTART SYS_DOWN
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 3c842edff388..7f6ba8658abe 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -75,8 +75,7 @@ bits 9,10,11: redirect counter - redirect TTL. Loop avoidance
75#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) 75#define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT))
76 76
77/* Action attributes */ 77/* Action attributes */
78enum 78enum {
79{
80 TCA_ACT_UNSPEC, 79 TCA_ACT_UNSPEC,
81 TCA_ACT_KIND, 80 TCA_ACT_KIND,
82 TCA_ACT_OPTIONS, 81 TCA_ACT_OPTIONS,
@@ -108,8 +107,7 @@ enum
108#define TC_ACT_JUMP 0x10000000 107#define TC_ACT_JUMP 0x10000000
109 108
110/* Action type identifiers*/ 109/* Action type identifiers*/
111enum 110enum {
112{
113 TCA_ID_UNSPEC=0, 111 TCA_ID_UNSPEC=0,
114 TCA_ID_POLICE=1, 112 TCA_ID_POLICE=1,
115 /* other actions go here */ 113 /* other actions go here */
@@ -118,8 +116,7 @@ enum
118 116
119#define TCA_ID_MAX __TCA_ID_MAX 117#define TCA_ID_MAX __TCA_ID_MAX
120 118
121struct tc_police 119struct tc_police {
122{
123 __u32 index; 120 __u32 index;
124 int action; 121 int action;
125#define TC_POLICE_UNSPEC TC_ACT_UNSPEC 122#define TC_POLICE_UNSPEC TC_ACT_UNSPEC
@@ -138,15 +135,13 @@ struct tc_police
138 __u32 capab; 135 __u32 capab;
139}; 136};
140 137
141struct tcf_t 138struct tcf_t {
142{
143 __u64 install; 139 __u64 install;
144 __u64 lastuse; 140 __u64 lastuse;
145 __u64 expires; 141 __u64 expires;
146}; 142};
147 143
148struct tc_cnt 144struct tc_cnt {
149{
150 int refcnt; 145 int refcnt;
151 int bindcnt; 146 int bindcnt;
152}; 147};
@@ -158,8 +153,7 @@ struct tc_cnt
158 int refcnt; \ 153 int refcnt; \
159 int bindcnt 154 int bindcnt
160 155
161enum 156enum {
162{
163 TCA_POLICE_UNSPEC, 157 TCA_POLICE_UNSPEC,
164 TCA_POLICE_TBF, 158 TCA_POLICE_TBF,
165 TCA_POLICE_RATE, 159 TCA_POLICE_RATE,
@@ -182,8 +176,7 @@ enum
182#define TC_U32_UNSPEC 0 176#define TC_U32_UNSPEC 0
183#define TC_U32_ROOT (0xFFF00000) 177#define TC_U32_ROOT (0xFFF00000)
184 178
185enum 179enum {
186{
187 TCA_U32_UNSPEC, 180 TCA_U32_UNSPEC,
188 TCA_U32_CLASSID, 181 TCA_U32_CLASSID,
189 TCA_U32_HASH, 182 TCA_U32_HASH,
@@ -200,16 +193,14 @@ enum
200 193
201#define TCA_U32_MAX (__TCA_U32_MAX - 1) 194#define TCA_U32_MAX (__TCA_U32_MAX - 1)
202 195
203struct tc_u32_key 196struct tc_u32_key {
204{
205 __be32 mask; 197 __be32 mask;
206 __be32 val; 198 __be32 val;
207 int off; 199 int off;
208 int offmask; 200 int offmask;
209}; 201};
210 202
211struct tc_u32_sel 203struct tc_u32_sel {
212{
213 unsigned char flags; 204 unsigned char flags;
214 unsigned char offshift; 205 unsigned char offshift;
215 unsigned char nkeys; 206 unsigned char nkeys;
@@ -223,15 +214,13 @@ struct tc_u32_sel
223 struct tc_u32_key keys[0]; 214 struct tc_u32_key keys[0];
224}; 215};
225 216
226struct tc_u32_mark 217struct tc_u32_mark {
227{
228 __u32 val; 218 __u32 val;
229 __u32 mask; 219 __u32 mask;
230 __u32 success; 220 __u32 success;
231}; 221};
232 222
233struct tc_u32_pcnt 223struct tc_u32_pcnt {
234{
235 __u64 rcnt; 224 __u64 rcnt;
236 __u64 rhit; 225 __u64 rhit;
237 __u64 kcnts[0]; 226 __u64 kcnts[0];
@@ -249,8 +238,7 @@ struct tc_u32_pcnt
249 238
250/* RSVP filter */ 239/* RSVP filter */
251 240
252enum 241enum {
253{
254 TCA_RSVP_UNSPEC, 242 TCA_RSVP_UNSPEC,
255 TCA_RSVP_CLASSID, 243 TCA_RSVP_CLASSID,
256 TCA_RSVP_DST, 244 TCA_RSVP_DST,
@@ -263,15 +251,13 @@ enum
263 251
264#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) 252#define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 )
265 253
266struct tc_rsvp_gpi 254struct tc_rsvp_gpi {
267{
268 __u32 key; 255 __u32 key;
269 __u32 mask; 256 __u32 mask;
270 int offset; 257 int offset;
271}; 258};
272 259
273struct tc_rsvp_pinfo 260struct tc_rsvp_pinfo {
274{
275 struct tc_rsvp_gpi dpi; 261 struct tc_rsvp_gpi dpi;
276 struct tc_rsvp_gpi spi; 262 struct tc_rsvp_gpi spi;
277 __u8 protocol; 263 __u8 protocol;
@@ -282,8 +268,7 @@ struct tc_rsvp_pinfo
282 268
283/* ROUTE filter */ 269/* ROUTE filter */
284 270
285enum 271enum {
286{
287 TCA_ROUTE4_UNSPEC, 272 TCA_ROUTE4_UNSPEC,
288 TCA_ROUTE4_CLASSID, 273 TCA_ROUTE4_CLASSID,
289 TCA_ROUTE4_TO, 274 TCA_ROUTE4_TO,
@@ -299,8 +284,7 @@ enum
299 284
300/* FW filter */ 285/* FW filter */
301 286
302enum 287enum {
303{
304 TCA_FW_UNSPEC, 288 TCA_FW_UNSPEC,
305 TCA_FW_CLASSID, 289 TCA_FW_CLASSID,
306 TCA_FW_POLICE, 290 TCA_FW_POLICE,
@@ -314,8 +298,7 @@ enum
314 298
315/* TC index filter */ 299/* TC index filter */
316 300
317enum 301enum {
318{
319 TCA_TCINDEX_UNSPEC, 302 TCA_TCINDEX_UNSPEC,
320 TCA_TCINDEX_HASH, 303 TCA_TCINDEX_HASH,
321 TCA_TCINDEX_MASK, 304 TCA_TCINDEX_MASK,
@@ -331,8 +314,7 @@ enum
331 314
332/* Flow filter */ 315/* Flow filter */
333 316
334enum 317enum {
335{
336 FLOW_KEY_SRC, 318 FLOW_KEY_SRC,
337 FLOW_KEY_DST, 319 FLOW_KEY_DST,
338 FLOW_KEY_PROTO, 320 FLOW_KEY_PROTO,
@@ -355,14 +337,12 @@ enum
355 337
356#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1) 338#define FLOW_KEY_MAX (__FLOW_KEY_MAX - 1)
357 339
358enum 340enum {
359{
360 FLOW_MODE_MAP, 341 FLOW_MODE_MAP,
361 FLOW_MODE_HASH, 342 FLOW_MODE_HASH,
362}; 343};
363 344
364enum 345enum {
365{
366 TCA_FLOW_UNSPEC, 346 TCA_FLOW_UNSPEC,
367 TCA_FLOW_KEYS, 347 TCA_FLOW_KEYS,
368 TCA_FLOW_MODE, 348 TCA_FLOW_MODE,
@@ -383,8 +363,7 @@ enum
383 363
384/* Basic filter */ 364/* Basic filter */
385 365
386enum 366enum {
387{
388 TCA_BASIC_UNSPEC, 367 TCA_BASIC_UNSPEC,
389 TCA_BASIC_CLASSID, 368 TCA_BASIC_CLASSID,
390 TCA_BASIC_EMATCHES, 369 TCA_BASIC_EMATCHES,
@@ -398,8 +377,7 @@ enum
398 377
399/* Cgroup classifier */ 378/* Cgroup classifier */
400 379
401enum 380enum {
402{
403 TCA_CGROUP_UNSPEC, 381 TCA_CGROUP_UNSPEC,
404 TCA_CGROUP_ACT, 382 TCA_CGROUP_ACT,
405 TCA_CGROUP_POLICE, 383 TCA_CGROUP_POLICE,
@@ -411,14 +389,12 @@ enum
411 389
412/* Extended Matches */ 390/* Extended Matches */
413 391
414struct tcf_ematch_tree_hdr 392struct tcf_ematch_tree_hdr {
415{
416 __u16 nmatches; 393 __u16 nmatches;
417 __u16 progid; 394 __u16 progid;
418}; 395};
419 396
420enum 397enum {
421{
422 TCA_EMATCH_TREE_UNSPEC, 398 TCA_EMATCH_TREE_UNSPEC,
423 TCA_EMATCH_TREE_HDR, 399 TCA_EMATCH_TREE_HDR,
424 TCA_EMATCH_TREE_LIST, 400 TCA_EMATCH_TREE_LIST,
@@ -426,8 +402,7 @@ enum
426}; 402};
427#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1) 403#define TCA_EMATCH_TREE_MAX (__TCA_EMATCH_TREE_MAX - 1)
428 404
429struct tcf_ematch_hdr 405struct tcf_ematch_hdr {
430{
431 __u16 matchid; 406 __u16 matchid;
432 __u16 kind; 407 __u16 kind;
433 __u16 flags; 408 __u16 flags;
@@ -457,8 +432,7 @@ struct tcf_ematch_hdr
457#define TCF_EM_REL_MASK 3 432#define TCF_EM_REL_MASK 3
458#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK) 433#define TCF_EM_REL_VALID(v) (((v) & TCF_EM_REL_MASK) != TCF_EM_REL_MASK)
459 434
460enum 435enum {
461{
462 TCF_LAYER_LINK, 436 TCF_LAYER_LINK,
463 TCF_LAYER_NETWORK, 437 TCF_LAYER_NETWORK,
464 TCF_LAYER_TRANSPORT, 438 TCF_LAYER_TRANSPORT,
@@ -479,13 +453,11 @@ enum
479#define TCF_EM_VLAN 6 453#define TCF_EM_VLAN 6
480#define TCF_EM_MAX 6 454#define TCF_EM_MAX 6
481 455
482enum 456enum {
483{
484 TCF_EM_PROG_TC 457 TCF_EM_PROG_TC
485}; 458};
486 459
487enum 460enum {
488{
489 TCF_EM_OPND_EQ, 461 TCF_EM_OPND_EQ,
490 TCF_EM_OPND_GT, 462 TCF_EM_OPND_GT,
491 TCF_EM_OPND_LT 463 TCF_EM_OPND_LT
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index d51a2b3e221e..2cfa4bc8dea6 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -29,8 +29,7 @@
29 Particular schedulers may have also their private records. 29 Particular schedulers may have also their private records.
30 */ 30 */
31 31
32struct tc_stats 32struct tc_stats {
33{
34 __u64 bytes; /* NUmber of enqueues bytes */ 33 __u64 bytes; /* NUmber of enqueues bytes */
35 __u32 packets; /* Number of enqueued packets */ 34 __u32 packets; /* Number of enqueued packets */
36 __u32 drops; /* Packets dropped because of lack of resources */ 35 __u32 drops; /* Packets dropped because of lack of resources */
@@ -42,8 +41,7 @@ struct tc_stats
42 __u32 backlog; 41 __u32 backlog;
43}; 42};
44 43
45struct tc_estimator 44struct tc_estimator {
46{
47 signed char interval; 45 signed char interval;
48 unsigned char ewma_log; 46 unsigned char ewma_log;
49}; 47};
@@ -75,8 +73,7 @@ struct tc_estimator
75#define TC_H_ROOT (0xFFFFFFFFU) 73#define TC_H_ROOT (0xFFFFFFFFU)
76#define TC_H_INGRESS (0xFFFFFFF1U) 74#define TC_H_INGRESS (0xFFFFFFF1U)
77 75
78struct tc_ratespec 76struct tc_ratespec {
79{
80 unsigned char cell_log; 77 unsigned char cell_log;
81 unsigned char __reserved; 78 unsigned char __reserved;
82 unsigned short overhead; 79 unsigned short overhead;
@@ -109,8 +106,7 @@ enum {
109 106
110/* FIFO section */ 107/* FIFO section */
111 108
112struct tc_fifo_qopt 109struct tc_fifo_qopt {
113{
114 __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */ 110 __u32 limit; /* Queue length: bytes for bfifo, packets for pfifo */
115}; 111};
116 112
@@ -119,8 +115,7 @@ struct tc_fifo_qopt
119#define TCQ_PRIO_BANDS 16 115#define TCQ_PRIO_BANDS 16
120#define TCQ_MIN_PRIO_BANDS 2 116#define TCQ_MIN_PRIO_BANDS 2
121 117
122struct tc_prio_qopt 118struct tc_prio_qopt {
123{
124 int bands; /* Number of bands */ 119 int bands; /* Number of bands */
125 __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */ 120 __u8 priomap[TC_PRIO_MAX+1]; /* Map: logical priority -> PRIO band */
126}; 121};
@@ -134,8 +129,7 @@ struct tc_multiq_qopt {
134 129
135/* TBF section */ 130/* TBF section */
136 131
137struct tc_tbf_qopt 132struct tc_tbf_qopt {
138{
139 struct tc_ratespec rate; 133 struct tc_ratespec rate;
140 struct tc_ratespec peakrate; 134 struct tc_ratespec peakrate;
141 __u32 limit; 135 __u32 limit;
@@ -143,8 +137,7 @@ struct tc_tbf_qopt
143 __u32 mtu; 137 __u32 mtu;
144}; 138};
145 139
146enum 140enum {
147{
148 TCA_TBF_UNSPEC, 141 TCA_TBF_UNSPEC,
149 TCA_TBF_PARMS, 142 TCA_TBF_PARMS,
150 TCA_TBF_RTAB, 143 TCA_TBF_RTAB,
@@ -161,8 +154,7 @@ enum
161 154
162/* SFQ section */ 155/* SFQ section */
163 156
164struct tc_sfq_qopt 157struct tc_sfq_qopt {
165{
166 unsigned quantum; /* Bytes per round allocated to flow */ 158 unsigned quantum; /* Bytes per round allocated to flow */
167 int perturb_period; /* Period of hash perturbation */ 159 int perturb_period; /* Period of hash perturbation */
168 __u32 limit; /* Maximal packets in queue */ 160 __u32 limit; /* Maximal packets in queue */
@@ -170,8 +162,7 @@ struct tc_sfq_qopt
170 unsigned flows; /* Maximal number of flows */ 162 unsigned flows; /* Maximal number of flows */
171}; 163};
172 164
173struct tc_sfq_xstats 165struct tc_sfq_xstats {
174{
175 __s32 allot; 166 __s32 allot;
176}; 167};
177 168
@@ -186,8 +177,7 @@ struct tc_sfq_xstats
186 177
187/* RED section */ 178/* RED section */
188 179
189enum 180enum {
190{
191 TCA_RED_UNSPEC, 181 TCA_RED_UNSPEC,
192 TCA_RED_PARMS, 182 TCA_RED_PARMS,
193 TCA_RED_STAB, 183 TCA_RED_STAB,
@@ -196,8 +186,7 @@ enum
196 186
197#define TCA_RED_MAX (__TCA_RED_MAX - 1) 187#define TCA_RED_MAX (__TCA_RED_MAX - 1)
198 188
199struct tc_red_qopt 189struct tc_red_qopt {
200{
201 __u32 limit; /* HARD maximal queue length (bytes) */ 190 __u32 limit; /* HARD maximal queue length (bytes) */
202 __u32 qth_min; /* Min average length threshold (bytes) */ 191 __u32 qth_min; /* Min average length threshold (bytes) */
203 __u32 qth_max; /* Max average length threshold (bytes) */ 192 __u32 qth_max; /* Max average length threshold (bytes) */
@@ -209,8 +198,7 @@ struct tc_red_qopt
209#define TC_RED_HARDDROP 2 198#define TC_RED_HARDDROP 2
210}; 199};
211 200
212struct tc_red_xstats 201struct tc_red_xstats {
213{
214 __u32 early; /* Early drops */ 202 __u32 early; /* Early drops */
215 __u32 pdrop; /* Drops due to queue limits */ 203 __u32 pdrop; /* Drops due to queue limits */
216 __u32 other; /* Drops due to drop() calls */ 204 __u32 other; /* Drops due to drop() calls */
@@ -221,8 +209,7 @@ struct tc_red_xstats
221 209
222#define MAX_DPs 16 210#define MAX_DPs 16
223 211
224enum 212enum {
225{
226 TCA_GRED_UNSPEC, 213 TCA_GRED_UNSPEC,
227 TCA_GRED_PARMS, 214 TCA_GRED_PARMS,
228 TCA_GRED_STAB, 215 TCA_GRED_STAB,
@@ -232,8 +219,7 @@ enum
232 219
233#define TCA_GRED_MAX (__TCA_GRED_MAX - 1) 220#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
234 221
235struct tc_gred_qopt 222struct tc_gred_qopt {
236{
237 __u32 limit; /* HARD maximal queue length (bytes) */ 223 __u32 limit; /* HARD maximal queue length (bytes) */
238 __u32 qth_min; /* Min average length threshold (bytes) */ 224 __u32 qth_min; /* Min average length threshold (bytes) */
239 __u32 qth_max; /* Max average length threshold (bytes) */ 225 __u32 qth_max; /* Max average length threshold (bytes) */
@@ -253,8 +239,7 @@ struct tc_gred_qopt
253}; 239};
254 240
255/* gred setup */ 241/* gred setup */
256struct tc_gred_sopt 242struct tc_gred_sopt {
257{
258 __u32 DPs; 243 __u32 DPs;
259 __u32 def_DP; 244 __u32 def_DP;
260 __u8 grio; 245 __u8 grio;
@@ -267,8 +252,7 @@ struct tc_gred_sopt
267#define TC_HTB_MAXDEPTH 8 252#define TC_HTB_MAXDEPTH 8
268#define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */ 253#define TC_HTB_PROTOVER 3 /* the same as HTB and TC's major */
269 254
270struct tc_htb_opt 255struct tc_htb_opt {
271{
272 struct tc_ratespec rate; 256 struct tc_ratespec rate;
273 struct tc_ratespec ceil; 257 struct tc_ratespec ceil;
274 __u32 buffer; 258 __u32 buffer;
@@ -277,8 +261,7 @@ struct tc_htb_opt
277 __u32 level; /* out only */ 261 __u32 level; /* out only */
278 __u32 prio; 262 __u32 prio;
279}; 263};
280struct tc_htb_glob 264struct tc_htb_glob {
281{
282 __u32 version; /* to match HTB/TC */ 265 __u32 version; /* to match HTB/TC */
283 __u32 rate2quantum; /* bps->quantum divisor */ 266 __u32 rate2quantum; /* bps->quantum divisor */
284 __u32 defcls; /* default class number */ 267 __u32 defcls; /* default class number */
@@ -287,8 +270,7 @@ struct tc_htb_glob
287 /* stats */ 270 /* stats */
288 __u32 direct_pkts; /* count of non shapped packets */ 271 __u32 direct_pkts; /* count of non shapped packets */
289}; 272};
290enum 273enum {
291{
292 TCA_HTB_UNSPEC, 274 TCA_HTB_UNSPEC,
293 TCA_HTB_PARMS, 275 TCA_HTB_PARMS,
294 TCA_HTB_INIT, 276 TCA_HTB_INIT,
@@ -299,8 +281,7 @@ enum
299 281
300#define TCA_HTB_MAX (__TCA_HTB_MAX - 1) 282#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
301 283
302struct tc_htb_xstats 284struct tc_htb_xstats {
303{
304 __u32 lends; 285 __u32 lends;
305 __u32 borrows; 286 __u32 borrows;
306 __u32 giants; /* too big packets (rate will not be accurate) */ 287 __u32 giants; /* too big packets (rate will not be accurate) */
@@ -310,28 +291,24 @@ struct tc_htb_xstats
310 291
311/* HFSC section */ 292/* HFSC section */
312 293
313struct tc_hfsc_qopt 294struct tc_hfsc_qopt {
314{
315 __u16 defcls; /* default class */ 295 __u16 defcls; /* default class */
316}; 296};
317 297
318struct tc_service_curve 298struct tc_service_curve {
319{
320 __u32 m1; /* slope of the first segment in bps */ 299 __u32 m1; /* slope of the first segment in bps */
321 __u32 d; /* x-projection of the first segment in us */ 300 __u32 d; /* x-projection of the first segment in us */
322 __u32 m2; /* slope of the second segment in bps */ 301 __u32 m2; /* slope of the second segment in bps */
323}; 302};
324 303
325struct tc_hfsc_stats 304struct tc_hfsc_stats {
326{
327 __u64 work; /* total work done */ 305 __u64 work; /* total work done */
328 __u64 rtwork; /* work done by real-time criteria */ 306 __u64 rtwork; /* work done by real-time criteria */
329 __u32 period; /* current period */ 307 __u32 period; /* current period */
330 __u32 level; /* class level in hierarchy */ 308 __u32 level; /* class level in hierarchy */
331}; 309};
332 310
333enum 311enum {
334{
335 TCA_HFSC_UNSPEC, 312 TCA_HFSC_UNSPEC,
336 TCA_HFSC_RSC, 313 TCA_HFSC_RSC,
337 TCA_HFSC_FSC, 314 TCA_HFSC_FSC,
@@ -348,8 +325,7 @@ enum
348#define TC_CBQ_MAXLEVEL 8 325#define TC_CBQ_MAXLEVEL 8
349#define TC_CBQ_DEF_EWMA 5 326#define TC_CBQ_DEF_EWMA 5
350 327
351struct tc_cbq_lssopt 328struct tc_cbq_lssopt {
352{
353 unsigned char change; 329 unsigned char change;
354 unsigned char flags; 330 unsigned char flags;
355#define TCF_CBQ_LSS_BOUNDED 1 331#define TCF_CBQ_LSS_BOUNDED 1
@@ -368,8 +344,7 @@ struct tc_cbq_lssopt
368 __u32 avpkt; 344 __u32 avpkt;
369}; 345};
370 346
371struct tc_cbq_wrropt 347struct tc_cbq_wrropt {
372{
373 unsigned char flags; 348 unsigned char flags;
374 unsigned char priority; 349 unsigned char priority;
375 unsigned char cpriority; 350 unsigned char cpriority;
@@ -378,8 +353,7 @@ struct tc_cbq_wrropt
378 __u32 weight; 353 __u32 weight;
379}; 354};
380 355
381struct tc_cbq_ovl 356struct tc_cbq_ovl {
382{
383 unsigned char strategy; 357 unsigned char strategy;
384#define TC_CBQ_OVL_CLASSIC 0 358#define TC_CBQ_OVL_CLASSIC 0
385#define TC_CBQ_OVL_DELAY 1 359#define TC_CBQ_OVL_DELAY 1
@@ -391,30 +365,26 @@ struct tc_cbq_ovl
391 __u32 penalty; 365 __u32 penalty;
392}; 366};
393 367
394struct tc_cbq_police 368struct tc_cbq_police {
395{
396 unsigned char police; 369 unsigned char police;
397 unsigned char __res1; 370 unsigned char __res1;
398 unsigned short __res2; 371 unsigned short __res2;
399}; 372};
400 373
401struct tc_cbq_fopt 374struct tc_cbq_fopt {
402{
403 __u32 split; 375 __u32 split;
404 __u32 defmap; 376 __u32 defmap;
405 __u32 defchange; 377 __u32 defchange;
406}; 378};
407 379
408struct tc_cbq_xstats 380struct tc_cbq_xstats {
409{
410 __u32 borrows; 381 __u32 borrows;
411 __u32 overactions; 382 __u32 overactions;
412 __s32 avgidle; 383 __s32 avgidle;
413 __s32 undertime; 384 __s32 undertime;
414}; 385};
415 386
416enum 387enum {
417{
418 TCA_CBQ_UNSPEC, 388 TCA_CBQ_UNSPEC,
419 TCA_CBQ_LSSOPT, 389 TCA_CBQ_LSSOPT,
420 TCA_CBQ_WRROPT, 390 TCA_CBQ_WRROPT,
@@ -459,8 +429,7 @@ enum {
459 429
460/* Network emulator */ 430/* Network emulator */
461 431
462enum 432enum {
463{
464 TCA_NETEM_UNSPEC, 433 TCA_NETEM_UNSPEC,
465 TCA_NETEM_CORR, 434 TCA_NETEM_CORR,
466 TCA_NETEM_DELAY_DIST, 435 TCA_NETEM_DELAY_DIST,
@@ -471,8 +440,7 @@ enum
471 440
472#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) 441#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
473 442
474struct tc_netem_qopt 443struct tc_netem_qopt {
475{
476 __u32 latency; /* added delay (us) */ 444 __u32 latency; /* added delay (us) */
477 __u32 limit; /* fifo limit (packets) */ 445 __u32 limit; /* fifo limit (packets) */
478 __u32 loss; /* random packet loss (0=none ~0=100%) */ 446 __u32 loss; /* random packet loss (0=none ~0=100%) */
@@ -481,21 +449,18 @@ struct tc_netem_qopt
481 __u32 jitter; /* random jitter in latency (us) */ 449 __u32 jitter; /* random jitter in latency (us) */
482}; 450};
483 451
484struct tc_netem_corr 452struct tc_netem_corr {
485{
486 __u32 delay_corr; /* delay correlation */ 453 __u32 delay_corr; /* delay correlation */
487 __u32 loss_corr; /* packet loss correlation */ 454 __u32 loss_corr; /* packet loss correlation */
488 __u32 dup_corr; /* duplicate correlation */ 455 __u32 dup_corr; /* duplicate correlation */
489}; 456};
490 457
491struct tc_netem_reorder 458struct tc_netem_reorder {
492{
493 __u32 probability; 459 __u32 probability;
494 __u32 correlation; 460 __u32 correlation;
495}; 461};
496 462
497struct tc_netem_corrupt 463struct tc_netem_corrupt {
498{
499 __u32 probability; 464 __u32 probability;
500 __u32 correlation; 465 __u32 correlation;
501}; 466};
@@ -504,8 +469,7 @@ struct tc_netem_corrupt
504 469
505/* DRR */ 470/* DRR */
506 471
507enum 472enum {
508{
509 TCA_DRR_UNSPEC, 473 TCA_DRR_UNSPEC,
510 TCA_DRR_QUANTUM, 474 TCA_DRR_QUANTUM,
511 __TCA_DRR_MAX 475 __TCA_DRR_MAX
@@ -513,8 +477,7 @@ enum
513 477
514#define TCA_DRR_MAX (__TCA_DRR_MAX - 1) 478#define TCA_DRR_MAX (__TCA_DRR_MAX - 1)
515 479
516struct tc_drr_stats 480struct tc_drr_stats {
517{
518 __u32 deficit; 481 __u32 deficit;
519}; 482};
520 483
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 5710f43bbc9e..1bf0f708c4fc 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -262,6 +262,20 @@ static inline void list_splice_init_rcu(struct list_head *list,
262 (pos) = rcu_dereference((pos)->next)) 262 (pos) = rcu_dereference((pos)->next))
263 263
264/** 264/**
265 * list_for_each_entry_continue_rcu - continue iteration over list of given type
266 * @pos: the type * to use as a loop cursor.
267 * @head: the head for your list.
268 * @member: the name of the list_struct within the struct.
269 *
270 * Continue to iterate over list of given type, continuing after
271 * the current position.
272 */
273#define list_for_each_entry_continue_rcu(pos, head, member) \
274 for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
275 prefetch(pos->member.next), &pos->member != (head); \
276 pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
277
278/**
265 * hlist_del_rcu - deletes entry from hash list without re-initialization 279 * hlist_del_rcu - deletes entry from hash list without re-initialization
266 * @n: the element to delete from the hash list. 280 * @n: the element to delete from the hash list.
267 * 281 *
diff --git a/include/linux/rds.h b/include/linux/rds.h
index 89d46e1afbb1..cab4994c2f63 100644
--- a/include/linux/rds.h
+++ b/include/linux/rds.h
@@ -56,6 +56,7 @@
56/* deprecated: RDS_BARRIER 4 */ 56/* deprecated: RDS_BARRIER 4 */
57#define RDS_RECVERR 5 57#define RDS_RECVERR 5
58#define RDS_CONG_MONITOR 6 58#define RDS_CONG_MONITOR 6
59#define RDS_GET_MR_FOR_DEST 7
59 60
60/* 61/*
61 * Control message types for SOL_RDS. 62 * Control message types for SOL_RDS.
@@ -224,6 +225,13 @@ struct rds_get_mr_args {
224 uint64_t flags; 225 uint64_t flags;
225}; 226};
226 227
228struct rds_get_mr_for_dest_args {
229 struct sockaddr_storage dest_addr;
230 struct rds_iovec vec;
231 u_int64_t cookie_addr;
232 uint64_t flags;
233};
234
227struct rds_free_mr_args { 235struct rds_free_mr_args {
228 rds_rdma_cookie_t cookie; 236 rds_rdma_cookie_t cookie;
229 u_int64_t flags; 237 u_int64_t flags;
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 3392c59d2706..97059d08a626 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -35,6 +35,8 @@
35 * @RFKILL_TYPE_UWB: switch is on a ultra wideband device. 35 * @RFKILL_TYPE_UWB: switch is on a ultra wideband device.
36 * @RFKILL_TYPE_WIMAX: switch is on a WiMAX device. 36 * @RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device. 37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
38 * @RFKILL_TYPE_GPS: switch is on a GPS device.
39 * @RFKILL_TYPE_FM: switch is on a FM radio device.
38 * @NUM_RFKILL_TYPES: number of defined rfkill types 40 * @NUM_RFKILL_TYPES: number of defined rfkill types
39 */ 41 */
40enum rfkill_type { 42enum rfkill_type {
@@ -45,6 +47,7 @@ enum rfkill_type {
45 RFKILL_TYPE_WIMAX, 47 RFKILL_TYPE_WIMAX,
46 RFKILL_TYPE_WWAN, 48 RFKILL_TYPE_WWAN,
47 RFKILL_TYPE_GPS, 49 RFKILL_TYPE_GPS,
50 RFKILL_TYPE_FM,
48 NUM_RFKILL_TYPES, 51 NUM_RFKILL_TYPES,
49}; 52};
50 53
diff --git a/include/linux/route.h b/include/linux/route.h
index f7ed35d5e653..6600708311c8 100644
--- a/include/linux/route.h
+++ b/include/linux/route.h
@@ -27,8 +27,7 @@
27#include <linux/compiler.h> 27#include <linux/compiler.h>
28 28
29/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ 29/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
30struct rtentry 30struct rtentry {
31{
32 unsigned long rt_pad1; 31 unsigned long rt_pad1;
33 struct sockaddr rt_dst; /* target address */ 32 struct sockaddr rt_dst; /* target address */
34 struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ 33 struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index adf2068d12b5..14fc906ed602 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -127,8 +127,7 @@ enum {
127 with attribute type. 127 with attribute type.
128 */ 128 */
129 129
130struct rtattr 130struct rtattr {
131{
132 unsigned short rta_len; 131 unsigned short rta_len;
133 unsigned short rta_type; 132 unsigned short rta_type;
134}; 133};
@@ -154,8 +153,7 @@ struct rtattr
154 * Definitions used in routing table administration. 153 * Definitions used in routing table administration.
155 ****/ 154 ****/
156 155
157struct rtmsg 156struct rtmsg {
158{
159 unsigned char rtm_family; 157 unsigned char rtm_family;
160 unsigned char rtm_dst_len; 158 unsigned char rtm_dst_len;
161 unsigned char rtm_src_len; 159 unsigned char rtm_src_len;
@@ -171,8 +169,7 @@ struct rtmsg
171 169
172/* rtm_type */ 170/* rtm_type */
173 171
174enum 172enum {
175{
176 RTN_UNSPEC, 173 RTN_UNSPEC,
177 RTN_UNICAST, /* Gateway or direct route */ 174 RTN_UNICAST, /* Gateway or direct route */
178 RTN_LOCAL, /* Accept locally */ 175 RTN_LOCAL, /* Accept locally */
@@ -230,8 +227,7 @@ enum
230 could be assigned a value between UNIVERSE and LINK. 227 could be assigned a value between UNIVERSE and LINK.
231*/ 228*/
232 229
233enum rt_scope_t 230enum rt_scope_t {
234{
235 RT_SCOPE_UNIVERSE=0, 231 RT_SCOPE_UNIVERSE=0,
236/* User defined values */ 232/* User defined values */
237 RT_SCOPE_SITE=200, 233 RT_SCOPE_SITE=200,
@@ -249,8 +245,7 @@ enum rt_scope_t
249 245
250/* Reserved table identifiers */ 246/* Reserved table identifiers */
251 247
252enum rt_class_t 248enum rt_class_t {
253{
254 RT_TABLE_UNSPEC=0, 249 RT_TABLE_UNSPEC=0,
255/* User defined values */ 250/* User defined values */
256 RT_TABLE_COMPAT=252, 251 RT_TABLE_COMPAT=252,
@@ -263,8 +258,7 @@ enum rt_class_t
263 258
264/* Routing message attributes */ 259/* Routing message attributes */
265 260
266enum rtattr_type_t 261enum rtattr_type_t {
267{
268 RTA_UNSPEC, 262 RTA_UNSPEC,
269 RTA_DST, 263 RTA_DST,
270 RTA_SRC, 264 RTA_SRC,
@@ -298,8 +292,7 @@ enum rtattr_type_t
298 * and rtt for different paths from multipath. 292 * and rtt for different paths from multipath.
299 */ 293 */
300 294
301struct rtnexthop 295struct rtnexthop {
302{
303 unsigned short rtnh_len; 296 unsigned short rtnh_len;
304 unsigned char rtnh_flags; 297 unsigned char rtnh_flags;
305 unsigned char rtnh_hops; 298 unsigned char rtnh_hops;
@@ -325,8 +318,7 @@ struct rtnexthop
325 318
326/* RTM_CACHEINFO */ 319/* RTM_CACHEINFO */
327 320
328struct rta_cacheinfo 321struct rta_cacheinfo {
329{
330 __u32 rta_clntref; 322 __u32 rta_clntref;
331 __u32 rta_lastuse; 323 __u32 rta_lastuse;
332 __s32 rta_expires; 324 __s32 rta_expires;
@@ -341,8 +333,7 @@ struct rta_cacheinfo
341 333
342/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */ 334/* RTM_METRICS --- array of struct rtattr with types of RTAX_* */
343 335
344enum 336enum {
345{
346 RTAX_UNSPEC, 337 RTAX_UNSPEC,
347#define RTAX_UNSPEC RTAX_UNSPEC 338#define RTAX_UNSPEC RTAX_UNSPEC
348 RTAX_LOCK, 339 RTAX_LOCK,
@@ -377,12 +368,13 @@ enum
377#define RTAX_MAX (__RTAX_MAX - 1) 368#define RTAX_MAX (__RTAX_MAX - 1)
378 369
379#define RTAX_FEATURE_ECN 0x00000001 370#define RTAX_FEATURE_ECN 0x00000001
380#define RTAX_FEATURE_SACK 0x00000002 371#define RTAX_FEATURE_NO_SACK 0x00000002
381#define RTAX_FEATURE_TIMESTAMP 0x00000004 372#define RTAX_FEATURE_NO_TSTAMP 0x00000004
382#define RTAX_FEATURE_ALLFRAG 0x00000008 373#define RTAX_FEATURE_ALLFRAG 0x00000008
374#define RTAX_FEATURE_NO_WSCALE 0x00000010
375#define RTAX_FEATURE_NO_DSACK 0x00000020
383 376
384struct rta_session 377struct rta_session {
385{
386 __u8 proto; 378 __u8 proto;
387 __u8 pad1; 379 __u8 pad1;
388 __u16 pad2; 380 __u16 pad2;
@@ -407,8 +399,7 @@ struct rta_session
407 * General form of address family dependent message. 399 * General form of address family dependent message.
408 ****/ 400 ****/
409 401
410struct rtgenmsg 402struct rtgenmsg {
411{
412 unsigned char rtgen_family; 403 unsigned char rtgen_family;
413}; 404};
414 405
@@ -421,8 +412,7 @@ struct rtgenmsg
421 * on network protocol. 412 * on network protocol.
422 */ 413 */
423 414
424struct ifinfomsg 415struct ifinfomsg {
425{
426 unsigned char ifi_family; 416 unsigned char ifi_family;
427 unsigned char __ifi_pad; 417 unsigned char __ifi_pad;
428 unsigned short ifi_type; /* ARPHRD_* */ 418 unsigned short ifi_type; /* ARPHRD_* */
@@ -435,8 +425,7 @@ struct ifinfomsg
435 * prefix information 425 * prefix information
436 ****/ 426 ****/
437 427
438struct prefixmsg 428struct prefixmsg {
439{
440 unsigned char prefix_family; 429 unsigned char prefix_family;
441 unsigned char prefix_pad1; 430 unsigned char prefix_pad1;
442 unsigned short prefix_pad2; 431 unsigned short prefix_pad2;
@@ -457,8 +446,7 @@ enum
457 446
458#define PREFIX_MAX (__PREFIX_MAX - 1) 447#define PREFIX_MAX (__PREFIX_MAX - 1)
459 448
460struct prefix_cacheinfo 449struct prefix_cacheinfo {
461{
462 __u32 preferred_time; 450 __u32 preferred_time;
463 __u32 valid_time; 451 __u32 valid_time;
464}; 452};
@@ -468,8 +456,7 @@ struct prefix_cacheinfo
468 * Traffic control messages. 456 * Traffic control messages.
469 ****/ 457 ****/
470 458
471struct tcmsg 459struct tcmsg {
472{
473 unsigned char tcm_family; 460 unsigned char tcm_family;
474 unsigned char tcm__pad1; 461 unsigned char tcm__pad1;
475 unsigned short tcm__pad2; 462 unsigned short tcm__pad2;
@@ -479,8 +466,7 @@ struct tcmsg
479 __u32 tcm_info; 466 __u32 tcm_info;
480}; 467};
481 468
482enum 469enum {
483{
484 TCA_UNSPEC, 470 TCA_UNSPEC,
485 TCA_KIND, 471 TCA_KIND,
486 TCA_OPTIONS, 472 TCA_OPTIONS,
@@ -502,8 +488,7 @@ enum
502 * Neighbor Discovery userland options 488 * Neighbor Discovery userland options
503 ****/ 489 ****/
504 490
505struct nduseroptmsg 491struct nduseroptmsg {
506{
507 unsigned char nduseropt_family; 492 unsigned char nduseropt_family;
508 unsigned char nduseropt_pad1; 493 unsigned char nduseropt_pad1;
509 unsigned short nduseropt_opts_len; /* Total length of options */ 494 unsigned short nduseropt_opts_len; /* Total length of options */
@@ -515,8 +500,7 @@ struct nduseroptmsg
515 /* Followed by one or more ND options */ 500 /* Followed by one or more ND options */
516}; 501};
517 502
518enum 503enum {
519{
520 NDUSEROPT_UNSPEC, 504 NDUSEROPT_UNSPEC,
521 NDUSEROPT_SRCADDR, 505 NDUSEROPT_SRCADDR,
522 __NDUSEROPT_MAX 506 __NDUSEROPT_MAX
@@ -598,8 +582,7 @@ enum rtnetlink_groups {
598#define RTNLGRP_MAX (__RTNLGRP_MAX - 1) 582#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
599 583
600/* TC action piece */ 584/* TC action piece */
601struct tcamsg 585struct tcamsg {
602{
603 unsigned char tca_family; 586 unsigned char tca_family;
604 unsigned char tca__pad1; 587 unsigned char tca__pad1;
605 unsigned short tca__pad2; 588 unsigned short tca__pad2;
diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index b464b9d3d242..c20d3ce673c0 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -242,6 +242,7 @@ enum {
242 SCTP_DATA_FIRST_FRAG = 0x02, 242 SCTP_DATA_FIRST_FRAG = 0x02,
243 SCTP_DATA_NOT_FRAG = 0x03, 243 SCTP_DATA_NOT_FRAG = 0x03,
244 SCTP_DATA_UNORDERED = 0x04, 244 SCTP_DATA_UNORDERED = 0x04,
245 SCTP_DATA_SACK_IMM = 0x08,
245}; 246};
246enum { SCTP_DATA_FRAG_MASK = 0x03, }; 247enum { SCTP_DATA_FRAG_MASK = 0x03, };
247 248
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index bcdd6606f468..ae836fded530 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -299,7 +299,7 @@ typedef unsigned char *sk_buff_data_t;
299 * @nfctinfo: Relationship of this skb to the connection 299 * @nfctinfo: Relationship of this skb to the connection
300 * @nfct_reasm: netfilter conntrack re-assembly pointer 300 * @nfct_reasm: netfilter conntrack re-assembly pointer
301 * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c 301 * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
302 * @iif: ifindex of device we arrived on 302 * @skb_iif: ifindex of device we arrived on
303 * @queue_mapping: Queue mapping for multiqueue devices 303 * @queue_mapping: Queue mapping for multiqueue devices
304 * @tc_index: Traffic control index 304 * @tc_index: Traffic control index
305 * @tc_verd: traffic control verdict 305 * @tc_verd: traffic control verdict
@@ -366,7 +366,7 @@ struct sk_buff {
366 struct nf_bridge_info *nf_bridge; 366 struct nf_bridge_info *nf_bridge;
367#endif 367#endif
368 368
369 int iif; 369 int skb_iif;
370#ifdef CONFIG_NET_SCHED 370#ifdef CONFIG_NET_SCHED
371 __u16 tc_index; /* traffic control index */ 371 __u16 tc_index; /* traffic control index */
372#ifdef CONFIG_NET_CLS_ACT 372#ifdef CONFIG_NET_CLS_ACT
@@ -389,8 +389,10 @@ struct sk_buff {
389#ifdef CONFIG_NETWORK_SECMARK 389#ifdef CONFIG_NETWORK_SECMARK
390 __u32 secmark; 390 __u32 secmark;
391#endif 391#endif
392 392 union {
393 __u32 mark; 393 __u32 mark;
394 __u32 dropcount;
395 };
394 396
395 __u16 vlan_tci; 397 __u16 vlan_tci;
396 398
@@ -414,14 +416,6 @@ struct sk_buff {
414 416
415#include <asm/system.h> 417#include <asm/system.h>
416 418
417#ifdef CONFIG_HAS_DMA
418#include <linux/dma-mapping.h>
419extern int skb_dma_map(struct device *dev, struct sk_buff *skb,
420 enum dma_data_direction dir);
421extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb,
422 enum dma_data_direction dir);
423#endif
424
425static inline struct dst_entry *skb_dst(const struct sk_buff *skb) 419static inline struct dst_entry *skb_dst(const struct sk_buff *skb)
426{ 420{
427 return (struct dst_entry *)skb->_skb_dst; 421 return (struct dst_entry *)skb->_skb_dst;
@@ -489,8 +483,7 @@ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
489 int len,int odd, struct sk_buff *skb), 483 int len,int odd, struct sk_buff *skb),
490 void *from, int length); 484 void *from, int length);
491 485
492struct skb_seq_state 486struct skb_seq_state {
493{
494 __u32 lower_offset; 487 __u32 lower_offset;
495 __u32 upper_offset; 488 __u32 upper_offset;
496 __u32 frag_idx; 489 __u32 frag_idx;
@@ -1489,6 +1482,16 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
1489 return __netdev_alloc_skb(dev, length, GFP_ATOMIC); 1482 return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
1490} 1483}
1491 1484
1485static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
1486 unsigned int length)
1487{
1488 struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
1489
1490 if (NET_IP_ALIGN && skb)
1491 skb_reserve(skb, NET_IP_ALIGN);
1492 return skb;
1493}
1494
1492extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask); 1495extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
1493 1496
1494/** 1497/**
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h
index 5241e4fb4eca..7144e8aa1e41 100644
--- a/include/linux/smsc911x.h
+++ b/include/linux/smsc911x.h
@@ -30,6 +30,7 @@ struct smsc911x_platform_config {
30 unsigned int irq_type; 30 unsigned int irq_type;
31 unsigned int flags; 31 unsigned int flags;
32 phy_interface_t phy_interface; 32 phy_interface_t phy_interface;
33 unsigned char mac[6];
33}; 34};
34 35
35/* Constants for platform_device irq polarity configuration */ 36/* Constants for platform_device irq polarity configuration */
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 3273a0c5043b..7b3aae2052a6 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -24,6 +24,9 @@ struct __kernel_sockaddr_storage {
24#include <linux/types.h> /* pid_t */ 24#include <linux/types.h> /* pid_t */
25#include <linux/compiler.h> /* __user */ 25#include <linux/compiler.h> /* __user */
26 26
27#define __sockaddr_check_size(size) \
28 BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
29
27#ifdef __KERNEL__ 30#ifdef __KERNEL__
28# ifdef CONFIG_PROC_FS 31# ifdef CONFIG_PROC_FS
29struct seq_file; 32struct seq_file;
@@ -65,6 +68,12 @@ struct msghdr {
65 unsigned msg_flags; 68 unsigned msg_flags;
66}; 69};
67 70
71/* For recvmmsg/sendmmsg */
72struct mmsghdr {
73 struct msghdr msg_hdr;
74 unsigned msg_len;
75};
76
68/* 77/*
69 * POSIX 1003.1g - ancillary data object information 78 * POSIX 1003.1g - ancillary data object information
70 * Ancillary data consits of a sequence of pairs of 79 * Ancillary data consits of a sequence of pairs of
@@ -312,6 +321,10 @@ extern int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uadd
312extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); 321extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr);
313extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); 322extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data);
314 323
324struct timespec;
325
326extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
327 unsigned int flags, struct timespec *timeout);
315#endif 328#endif
316#endif /* not kernel and not glibc */ 329#endif /* not kernel and not glibc */
317#endif /* _LINUX_SOCKET_H */ 330#endif /* _LINUX_SOCKET_H */
diff --git a/include/linux/spi/wl12xx.h b/include/linux/spi/wl12xx.h
index 11430cab2aad..aed64ed3dc8a 100644
--- a/include/linux/spi/wl12xx.h
+++ b/include/linux/spi/wl12xx.h
@@ -26,6 +26,7 @@
26 26
27struct wl12xx_platform_data { 27struct wl12xx_platform_data {
28 void (*set_power)(bool enable); 28 void (*set_power)(bool enable);
29 bool use_eeprom;
29}; 30};
30 31
31#endif 32#endif
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 3d0a9ff24f01..24f988547361 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -269,7 +269,8 @@ struct ssb_bus {
269 269
270 const struct ssb_bus_ops *ops; 270 const struct ssb_bus_ops *ops;
271 271
272 /* The core in the basic address register window. (PCI bus only) */ 272 /* The core currently mapped into the MMIO window.
273 * Not valid on all host-buses. So don't use outside of SSB. */
273 struct ssb_device *mapped_device; 274 struct ssb_device *mapped_device;
274 union { 275 union {
275 /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ 276 /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */
@@ -281,14 +282,17 @@ struct ssb_bus {
281 * On PCMCIA-host busses this is used to protect the whole MMIO access. */ 282 * On PCMCIA-host busses this is used to protect the whole MMIO access. */
282 spinlock_t bar_lock; 283 spinlock_t bar_lock;
283 284
284 /* The bus this backplane is running on. */ 285 /* The host-bus this backplane is running on. */
285 enum ssb_bustype bustype; 286 enum ssb_bustype bustype;
286 /* Pointer to the PCI bus (only valid if bustype == SSB_BUSTYPE_PCI). */ 287 /* Pointers to the host-bus. Check bustype before using any of these pointers. */
287 struct pci_dev *host_pci; 288 union {
288 /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ 289 /* Pointer to the PCI bus (only valid if bustype == SSB_BUSTYPE_PCI). */
289 struct pcmcia_device *host_pcmcia; 290 struct pci_dev *host_pci;
290 /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */ 291 /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */
291 struct sdio_func *host_sdio; 292 struct pcmcia_device *host_pcmcia;
293 /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */
294 struct sdio_func *host_sdio;
295 };
292 296
293 /* See enum ssb_quirks */ 297 /* See enum ssb_quirks */
294 unsigned int quirks; 298 unsigned int quirks;
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index e79e2f3ccc51..bc70c5810fec 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -25,6 +25,7 @@ struct linux_dirent64;
25struct list_head; 25struct list_head;
26struct msgbuf; 26struct msgbuf;
27struct msghdr; 27struct msghdr;
28struct mmsghdr;
28struct msqid_ds; 29struct msqid_ds;
29struct new_utsname; 30struct new_utsname;
30struct nfsctl_arg; 31struct nfsctl_arg;
@@ -628,6 +629,9 @@ asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
628asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, 629asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned,
629 struct sockaddr __user *, int __user *); 630 struct sockaddr __user *, int __user *);
630asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags); 631asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
632asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg,
633 unsigned int vlen, unsigned flags,
634 struct timespec __user *timeout);
631asmlinkage long sys_socket(int, int, int); 635asmlinkage long sys_socket(int, int, int);
632asmlinkage long sys_socketpair(int, int, int, int __user *); 636asmlinkage long sys_socketpair(int, int, int, int __user *);
633asmlinkage long sys_socketcall(int call, unsigned long __user *args); 637asmlinkage long sys_socketcall(int call, unsigned long __user *args);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index c83a86a22381..56af3ca75e24 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -481,6 +481,7 @@ enum
481 NET_IPV4_CONF_PROMOTE_SECONDARIES=20, 481 NET_IPV4_CONF_PROMOTE_SECONDARIES=20,
482 NET_IPV4_CONF_ARP_ACCEPT=21, 482 NET_IPV4_CONF_ARP_ACCEPT=21,
483 NET_IPV4_CONF_ARP_NOTIFY=22, 483 NET_IPV4_CONF_ARP_NOTIFY=22,
484 NET_IPV4_CONF_ACCEPT_LOCAL=23,
484 __NET_IPV4_CONF_MAX 485 __NET_IPV4_CONF_MAX
485}; 486};
486 487
diff --git a/include/linux/tc_act/tc_defact.h b/include/linux/tc_act/tc_defact.h
index 964f473af0f0..6f65d07c7ce2 100644
--- a/include/linux/tc_act/tc_defact.h
+++ b/include/linux/tc_act/tc_defact.h
@@ -3,13 +3,11 @@
3 3
4#include <linux/pkt_cls.h> 4#include <linux/pkt_cls.h>
5 5
6struct tc_defact 6struct tc_defact {
7{
8 tc_gen; 7 tc_gen;
9}; 8};
10 9
11enum 10enum {
12{
13 TCA_DEF_UNSPEC, 11 TCA_DEF_UNSPEC,
14 TCA_DEF_TM, 12 TCA_DEF_TM,
15 TCA_DEF_PARMS, 13 TCA_DEF_PARMS,
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h
index e895c0a39629..f7bf94eed510 100644
--- a/include/linux/tc_act/tc_gact.h
+++ b/include/linux/tc_act/tc_gact.h
@@ -5,14 +5,12 @@
5#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
6 6
7#define TCA_ACT_GACT 5 7#define TCA_ACT_GACT 5
8struct tc_gact 8struct tc_gact {
9{
10 tc_gen; 9 tc_gen;
11 10
12}; 11};
13 12
14struct tc_gact_p 13struct tc_gact_p {
15{
16#define PGACT_NONE 0 14#define PGACT_NONE 0
17#define PGACT_NETRAND 1 15#define PGACT_NETRAND 1
18#define PGACT_DETERM 2 16#define PGACT_DETERM 2
@@ -22,8 +20,7 @@ struct tc_gact_p
22 int paction; 20 int paction;
23}; 21};
24 22
25enum 23enum {
26{
27 TCA_GACT_UNSPEC, 24 TCA_GACT_UNSPEC,
28 TCA_GACT_TM, 25 TCA_GACT_TM,
29 TCA_GACT_PARMS, 26 TCA_GACT_PARMS,
diff --git a/include/linux/tc_act/tc_ipt.h b/include/linux/tc_act/tc_ipt.h
index 4b6f7b6c7a79..a2335563d21f 100644
--- a/include/linux/tc_act/tc_ipt.h
+++ b/include/linux/tc_act/tc_ipt.h
@@ -5,8 +5,7 @@
5 5
6#define TCA_ACT_IPT 6 6#define TCA_ACT_IPT 6
7 7
8enum 8enum {
9{
10 TCA_IPT_UNSPEC, 9 TCA_IPT_UNSPEC,
11 TCA_IPT_TABLE, 10 TCA_IPT_TABLE,
12 TCA_IPT_HOOK, 11 TCA_IPT_HOOK,
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h
index 0a99ab60d610..7561750e8fd6 100644
--- a/include/linux/tc_act/tc_mirred.h
+++ b/include/linux/tc_act/tc_mirred.h
@@ -10,15 +10,13 @@
10#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ 10#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/
11#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ 11#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */
12 12
13struct tc_mirred 13struct tc_mirred {
14{
15 tc_gen; 14 tc_gen;
16 int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ 15 int eaction; /* one of IN/EGRESS_MIRROR/REDIR */
17 __u32 ifindex; /* ifindex of egress port */ 16 __u32 ifindex; /* ifindex of egress port */
18}; 17};
19 18
20enum 19enum {
21{
22 TCA_MIRRED_UNSPEC, 20 TCA_MIRRED_UNSPEC,
23 TCA_MIRRED_TM, 21 TCA_MIRRED_TM,
24 TCA_MIRRED_PARMS, 22 TCA_MIRRED_PARMS,
diff --git a/include/linux/tc_act/tc_nat.h b/include/linux/tc_act/tc_nat.h
index e7cf31e8ba79..6663aeba0b9a 100644
--- a/include/linux/tc_act/tc_nat.h
+++ b/include/linux/tc_act/tc_nat.h
@@ -6,8 +6,7 @@
6 6
7#define TCA_ACT_NAT 9 7#define TCA_ACT_NAT 9
8 8
9enum 9enum {
10{
11 TCA_NAT_UNSPEC, 10 TCA_NAT_UNSPEC,
12 TCA_NAT_PARMS, 11 TCA_NAT_PARMS,
13 TCA_NAT_TM, 12 TCA_NAT_TM,
@@ -17,8 +16,7 @@ enum
17 16
18#define TCA_NAT_FLAG_EGRESS 1 17#define TCA_NAT_FLAG_EGRESS 1
19 18
20struct tc_nat 19struct tc_nat {
21{
22 tc_gen; 20 tc_gen;
23 __be32 old_addr; 21 __be32 old_addr;
24 __be32 new_addr; 22 __be32 new_addr;
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h
index 54ce9064115a..716cfabcd5b2 100644
--- a/include/linux/tc_act/tc_pedit.h
+++ b/include/linux/tc_act/tc_pedit.h
@@ -6,8 +6,7 @@
6 6
7#define TCA_ACT_PEDIT 7 7#define TCA_ACT_PEDIT 7
8 8
9enum 9enum {
10{
11 TCA_PEDIT_UNSPEC, 10 TCA_PEDIT_UNSPEC,
12 TCA_PEDIT_TM, 11 TCA_PEDIT_TM,
13 TCA_PEDIT_PARMS, 12 TCA_PEDIT_PARMS,
@@ -15,8 +14,7 @@ enum
15}; 14};
16#define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1) 15#define TCA_PEDIT_MAX (__TCA_PEDIT_MAX - 1)
17 16
18struct tc_pedit_key 17struct tc_pedit_key {
19{
20 __u32 mask; /* AND */ 18 __u32 mask; /* AND */
21 __u32 val; /*XOR */ 19 __u32 val; /*XOR */
22 __u32 off; /*offset */ 20 __u32 off; /*offset */
@@ -25,8 +23,7 @@ struct tc_pedit_key
25 __u32 shift; 23 __u32 shift;
26}; 24};
27 25
28struct tc_pedit_sel 26struct tc_pedit_sel {
29{
30 tc_gen; 27 tc_gen;
31 unsigned char nkeys; 28 unsigned char nkeys;
32 unsigned char flags; 29 unsigned char flags;
diff --git a/include/linux/tc_act/tc_skbedit.h b/include/linux/tc_act/tc_skbedit.h
index a14e461a7af7..7a2e910a5f08 100644
--- a/include/linux/tc_act/tc_skbedit.h
+++ b/include/linux/tc_act/tc_skbedit.h
@@ -26,6 +26,7 @@
26 26
27#define SKBEDIT_F_PRIORITY 0x1 27#define SKBEDIT_F_PRIORITY 0x1
28#define SKBEDIT_F_QUEUE_MAPPING 0x2 28#define SKBEDIT_F_QUEUE_MAPPING 0x2
29#define SKBEDIT_F_MARK 0x4
29 30
30struct tc_skbedit { 31struct tc_skbedit {
31 tc_gen; 32 tc_gen;
@@ -37,6 +38,7 @@ enum {
37 TCA_SKBEDIT_PARMS, 38 TCA_SKBEDIT_PARMS,
38 TCA_SKBEDIT_PRIORITY, 39 TCA_SKBEDIT_PRIORITY,
39 TCA_SKBEDIT_QUEUE_MAPPING, 40 TCA_SKBEDIT_QUEUE_MAPPING,
41 TCA_SKBEDIT_MARK,
40 __TCA_SKBEDIT_MAX 42 __TCA_SKBEDIT_MAX
41}; 43};
42#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1) 44#define TCA_SKBEDIT_MAX (__TCA_SKBEDIT_MAX - 1)
diff --git a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h
index 38e7f7b25ec2..f34bb1bae083 100644
--- a/include/linux/tc_ematch/tc_em_cmp.h
+++ b/include/linux/tc_ematch/tc_em_cmp.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
6 6
7struct tcf_em_cmp 7struct tcf_em_cmp {
8{
9 __u32 val; 8 __u32 val;
10 __u32 mask; 9 __u32 mask;
11 __u16 off; 10 __u16 off;
@@ -15,8 +14,7 @@ struct tcf_em_cmp
15 __u8 opnd:4; 14 __u8 opnd:4;
16}; 15};
17 16
18enum 17enum {
19{
20 TCF_EM_ALIGN_U8 = 1, 18 TCF_EM_ALIGN_U8 = 1,
21 TCF_EM_ALIGN_U16 = 2, 19 TCF_EM_ALIGN_U16 = 2,
22 TCF_EM_ALIGN_U32 = 4 20 TCF_EM_ALIGN_U32 = 4
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h
index dcfb733fa1f6..0864206ec1a3 100644
--- a/include/linux/tc_ematch/tc_em_meta.h
+++ b/include/linux/tc_ematch/tc_em_meta.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
6 6
7enum 7enum {
8{
9 TCA_EM_META_UNSPEC, 8 TCA_EM_META_UNSPEC,
10 TCA_EM_META_HDR, 9 TCA_EM_META_HDR,
11 TCA_EM_META_LVALUE, 10 TCA_EM_META_LVALUE,
@@ -14,8 +13,7 @@ enum
14}; 13};
15#define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1) 14#define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
16 15
17struct tcf_meta_val 16struct tcf_meta_val {
18{
19 __u16 kind; 17 __u16 kind;
20 __u8 shift; 18 __u8 shift;
21 __u8 op; 19 __u8 op;
@@ -26,16 +24,14 @@ struct tcf_meta_val
26#define TCF_META_ID_MASK 0x7ff 24#define TCF_META_ID_MASK 0x7ff
27#define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK) 25#define TCF_META_ID(kind) ((kind) & TCF_META_ID_MASK)
28 26
29enum 27enum {
30{
31 TCF_META_TYPE_VAR, 28 TCF_META_TYPE_VAR,
32 TCF_META_TYPE_INT, 29 TCF_META_TYPE_INT,
33 __TCF_META_TYPE_MAX 30 __TCF_META_TYPE_MAX
34}; 31};
35#define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1) 32#define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
36 33
37enum 34enum {
38{
39 TCF_META_ID_VALUE, 35 TCF_META_ID_VALUE,
40 TCF_META_ID_RANDOM, 36 TCF_META_ID_RANDOM,
41 TCF_META_ID_LOADAVG_0, 37 TCF_META_ID_LOADAVG_0,
@@ -87,8 +83,7 @@ enum
87}; 83};
88#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) 84#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
89 85
90struct tcf_meta_hdr 86struct tcf_meta_hdr {
91{
92 struct tcf_meta_val left; 87 struct tcf_meta_val left;
93 struct tcf_meta_val right; 88 struct tcf_meta_val right;
94}; 89};
diff --git a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h
index 9ed8c2e58488..7172cfb999c1 100644
--- a/include/linux/tc_ematch/tc_em_nbyte.h
+++ b/include/linux/tc_ematch/tc_em_nbyte.h
@@ -4,8 +4,7 @@
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/pkt_cls.h> 5#include <linux/pkt_cls.h>
6 6
7struct tcf_em_nbyte 7struct tcf_em_nbyte {
8{
9 __u16 off; 8 __u16 off;
10 __u16 len:12; 9 __u16 len:12;
11 __u8 layer:4; 10 __u8 layer:4;
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h
index d12a73a225fc..5aac4045ba88 100644
--- a/include/linux/tc_ematch/tc_em_text.h
+++ b/include/linux/tc_ematch/tc_em_text.h
@@ -6,8 +6,7 @@
6 6
7#define TC_EM_TEXT_ALGOSIZ 16 7#define TC_EM_TEXT_ALGOSIZ 16
8 8
9struct tcf_em_text 9struct tcf_em_text {
10{
11 char algo[TC_EM_TEXT_ALGOSIZ]; 10 char algo[TC_EM_TEXT_ALGOSIZ];
12 __u16 from_offset; 11 __u16 from_offset;
13 __u16 to_offset; 12 __u16 to_offset;
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 61723a7c21fe..7fee8a4df931 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -81,6 +81,12 @@ enum {
81 TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) 81 TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000)
82}; 82};
83 83
84/*
85 * TCP general constants
86 */
87#define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */
88#define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */
89
84/* TCP socket options */ 90/* TCP socket options */
85#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */ 91#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
86#define TCP_MAXSEG 2 /* Limit MSS */ 92#define TCP_MAXSEG 2 /* Limit MSS */
@@ -96,14 +102,15 @@ enum {
96#define TCP_QUICKACK 12 /* Block/reenable quick acks */ 102#define TCP_QUICKACK 12 /* Block/reenable quick acks */
97#define TCP_CONGESTION 13 /* Congestion control algorithm */ 103#define TCP_CONGESTION 13 /* Congestion control algorithm */
98#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ 104#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
105#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
99 106
107/* for TCP_INFO socket option */
100#define TCPI_OPT_TIMESTAMPS 1 108#define TCPI_OPT_TIMESTAMPS 1
101#define TCPI_OPT_SACK 2 109#define TCPI_OPT_SACK 2
102#define TCPI_OPT_WSCALE 4 110#define TCPI_OPT_WSCALE 4
103#define TCPI_OPT_ECN 8 111#define TCPI_OPT_ECN 8
104 112
105enum tcp_ca_state 113enum tcp_ca_state {
106{
107 TCP_CA_Open = 0, 114 TCP_CA_Open = 0,
108#define TCPF_CA_Open (1<<TCP_CA_Open) 115#define TCPF_CA_Open (1<<TCP_CA_Open)
109 TCP_CA_Disorder = 1, 116 TCP_CA_Disorder = 1,
@@ -116,8 +123,7 @@ enum tcp_ca_state
116#define TCPF_CA_Loss (1<<TCP_CA_Loss) 123#define TCPF_CA_Loss (1<<TCP_CA_Loss)
117}; 124};
118 125
119struct tcp_info 126struct tcp_info {
120{
121 __u8 tcpi_state; 127 __u8 tcpi_state;
122 __u8 tcpi_ca_state; 128 __u8 tcpi_ca_state;
123 __u8 tcpi_retransmits; 129 __u8 tcpi_retransmits;
@@ -170,6 +176,30 @@ struct tcp_md5sig {
170 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ 176 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
171}; 177};
172 178
179/* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */
180#define TCP_COOKIE_MIN 8 /* 64-bits */
181#define TCP_COOKIE_MAX 16 /* 128-bits */
182#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
183
184/* Flags for both getsockopt and setsockopt */
185#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
186#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
187 * supercedes everything. */
188
189/* Flags for getsockopt */
190#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
191#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
192
193/* TCP_COOKIE_TRANSACTIONS data */
194struct tcp_cookie_transactions {
195 __u16 tcpct_flags; /* see above */
196 __u8 __tcpct_pad1; /* zero */
197 __u8 tcpct_cookie_desired; /* bytes */
198 __u16 tcpct_s_data_desired; /* bytes of variable data */
199 __u16 tcpct_used; /* bytes in value */
200 __u8 tcpct_value[TCP_MSS_DEFAULT];
201};
202
173#ifdef __KERNEL__ 203#ifdef __KERNEL__
174 204
175#include <linux/skbuff.h> 205#include <linux/skbuff.h>
@@ -217,26 +247,38 @@ struct tcp_options_received {
217 sack_ok : 4, /* SACK seen on SYN packet */ 247 sack_ok : 4, /* SACK seen on SYN packet */
218 snd_wscale : 4, /* Window scaling received from sender */ 248 snd_wscale : 4, /* Window scaling received from sender */
219 rcv_wscale : 4; /* Window scaling to send to receiver */ 249 rcv_wscale : 4; /* Window scaling to send to receiver */
220/* SACKs data */ 250 u8 cookie_plus:6, /* bytes in authenticator/cookie option */
251 cookie_out_never:1,
252 cookie_in_always:1;
221 u8 num_sacks; /* Number of SACK blocks */ 253 u8 num_sacks; /* Number of SACK blocks */
222 u16 user_mss; /* mss requested by user in ioctl */ 254 u16 user_mss; /* mss requested by user in ioctl */
223 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ 255 u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
224}; 256};
225 257
258static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
259{
260 rx_opt->tstamp_ok = rx_opt->sack_ok = 0;
261 rx_opt->wscale_ok = rx_opt->snd_wscale = 0;
262 rx_opt->cookie_plus = 0;
263}
264
226/* This is the max number of SACKS that we'll generate and process. It's safe 265/* This is the max number of SACKS that we'll generate and process. It's safe
227 * to increse this, although since: 266 * to increase this, although since:
228 * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8) 267 * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
229 * only four options will fit in a standard TCP header */ 268 * only four options will fit in a standard TCP header */
230#define TCP_NUM_SACKS 4 269#define TCP_NUM_SACKS 4
231 270
271struct tcp_cookie_values;
272struct tcp_request_sock_ops;
273
232struct tcp_request_sock { 274struct tcp_request_sock {
233 struct inet_request_sock req; 275 struct inet_request_sock req;
234#ifdef CONFIG_TCP_MD5SIG 276#ifdef CONFIG_TCP_MD5SIG
235 /* Only used by TCP MD5 Signature so far. */ 277 /* Only used by TCP MD5 Signature so far. */
236 const struct tcp_request_sock_ops *af_specific; 278 const struct tcp_request_sock_ops *af_specific;
237#endif 279#endif
238 u32 rcv_isn; 280 u32 rcv_isn;
239 u32 snt_isn; 281 u32 snt_isn;
240}; 282};
241 283
242static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) 284static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
@@ -406,6 +448,12 @@ struct tcp_sock {
406/* TCP MD5 Signature Option information */ 448/* TCP MD5 Signature Option information */
407 struct tcp_md5sig_info *md5sig_info; 449 struct tcp_md5sig_info *md5sig_info;
408#endif 450#endif
451
452 /* When the cookie options are generated and exchanged, then this
453 * object holds a reference to them (cookie_values->kref). Also
454 * contains related tcp_cookie_transactions fields.
455 */
456 struct tcp_cookie_values *cookie_values;
409}; 457};
410 458
411static inline struct tcp_sock *tcp_sk(const struct sock *sk) 459static inline struct tcp_sock *tcp_sk(const struct sock *sk)
@@ -424,6 +472,10 @@ struct tcp_timewait_sock {
424 u16 tw_md5_keylen; 472 u16 tw_md5_keylen;
425 u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN]; 473 u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN];
426#endif 474#endif
475 /* Few sockets in timewait have cookies; in that case, then this
476 * object holds a reference to them (tw_cookie_values->kref).
477 */
478 struct tcp_cookie_values *tw_cookie_values;
427}; 479};
428 480
429static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) 481static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
@@ -431,6 +483,6 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
431 return (struct tcp_timewait_sock *)sk; 483 return (struct tcp_timewait_sock *)sk;
432} 484}
433 485
434#endif 486#endif /* __KERNEL__ */
435 487
436#endif /* _LINUX_TCP_H */ 488#endif /* _LINUX_TCP_H */
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 0cf5c4c0ec81..03f72a2ba028 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -45,16 +45,19 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
45 return (struct udphdr *)skb_transport_header(skb); 45 return (struct udphdr *)skb_transport_header(skb);
46} 46}
47 47
48#define UDP_HTABLE_SIZE 128 48#define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SMALL ? 128 : 256)
49 49
50static inline int udp_hashfn(struct net *net, const unsigned num) 50static inline int udp_hashfn(struct net *net, unsigned num, unsigned mask)
51{ 51{
52 return (num + net_hash_mix(net)) & (UDP_HTABLE_SIZE - 1); 52 return (num + net_hash_mix(net)) & mask;
53} 53}
54 54
55struct udp_sock { 55struct udp_sock {
56 /* inet_sock has to be the first member */ 56 /* inet_sock has to be the first member */
57 struct inet_sock inet; 57 struct inet_sock inet;
58#define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0]
59#define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1]
60#define udp_portaddr_node inet.sk.__sk_common.skc_portaddr_node
58 int pending; /* Any pending frames ? */ 61 int pending; /* Any pending frames ? */
59 unsigned int corkflag; /* Cork is required */ 62 unsigned int corkflag; /* Cork is required */
60 __u16 encap_type; /* Is this an Encapsulation socket? */ 63 __u16 encap_type; /* Is this an Encapsulation socket? */
@@ -85,6 +88,12 @@ static inline struct udp_sock *udp_sk(const struct sock *sk)
85 return (struct udp_sock *)sk; 88 return (struct udp_sock *)sk;
86} 89}
87 90
91#define udp_portaddr_for_each_entry(__sk, node, list) \
92 hlist_nulls_for_each_entry(__sk, node, list, __sk_common.skc_portaddr_node)
93
94#define udp_portaddr_for_each_entry_rcu(__sk, node, list) \
95 hlist_nulls_for_each_entry_rcu(__sk, node, list, __sk_common.skc_portaddr_node)
96
88#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) 97#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag)
89 98
90#endif 99#endif
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index f81473052059..8ce61359bf73 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -55,6 +55,7 @@ struct usbnet {
55 struct sk_buff_head done; 55 struct sk_buff_head done;
56 struct sk_buff_head rxq_pause; 56 struct sk_buff_head rxq_pause;
57 struct urb *interrupt; 57 struct urb *interrupt;
58 struct usb_anchor deferred;
58 struct tasklet_struct bh; 59 struct tasklet_struct bh;
59 60
60 struct work_struct kevent; 61 struct work_struct kevent;
@@ -65,6 +66,8 @@ struct usbnet {
65# define EVENT_STS_SPLIT 3 66# define EVENT_STS_SPLIT 3
66# define EVENT_LINK_RESET 4 67# define EVENT_LINK_RESET 4
67# define EVENT_RX_PAUSED 5 68# define EVENT_RX_PAUSED 5
69# define EVENT_DEV_WAKING 6
70# define EVENT_DEV_ASLEEP 7
68}; 71};
69 72
70static inline struct usb_driver *driver_of(struct usb_interface *intf) 73static inline struct usb_driver *driver_of(struct usb_interface *intf)
@@ -90,7 +93,9 @@ struct driver_info {
90#define FLAG_WLAN 0x0080 /* use "wlan%d" names */ 93#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
91#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ 94#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */
92#define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ 95#define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */
96#define FLAG_WWAN 0x0400 /* use "wwan%d" names */
93 97
98#define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */
94 99
95 /* init device ... can sleep, or cause probe() failure */ 100 /* init device ... can sleep, or cause probe() failure */
96 int (*bind)(struct usbnet *, struct usb_interface *); 101 int (*bind)(struct usbnet *, struct usb_interface *);
@@ -107,6 +112,9 @@ struct driver_info {
107 /* see if peer is connected ... can sleep */ 112 /* see if peer is connected ... can sleep */
108 int (*check_connect)(struct usbnet *); 113 int (*check_connect)(struct usbnet *);
109 114
115 /* (dis)activate runtime power management */
116 int (*manage_power)(struct usbnet *, int);
117
110 /* for status polling */ 118 /* for status polling */
111 void (*status)(struct usbnet *, struct urb *); 119 void (*status)(struct usbnet *, struct urb *);
112 120
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h
index c703e0340423..db8096e88533 100644
--- a/include/linux/wimax/debug.h
+++ b/include/linux/wimax/debug.h
@@ -450,4 +450,76 @@ do { \
450}) 450})
451 451
452 452
453static inline
454void d_submodule_set(struct d_level *d_level, size_t d_level_size,
455 const char *submodule, u8 level, const char *tag)
456{
457 struct d_level *itr, *top;
458 int index = -1;
459
460 for (itr = d_level, top = itr + d_level_size; itr < top; itr++) {
461 index++;
462 if (itr->name == NULL) {
463 printk(KERN_ERR "%s: itr->name NULL?? (%p, #%d)\n",
464 tag, itr, index);
465 continue;
466 }
467 if (!strcmp(itr->name, submodule)) {
468 itr->level = level;
469 return;
470 }
471 }
472 printk(KERN_ERR "%s: unknown submodule %s\n", tag, submodule);
473}
474
475
476/**
477 * d_parse_params - Parse a string with debug parameters from the
478 * command line
479 *
480 * @d_level: level structure (D_LEVEL)
481 * @d_level_size: number of items in the level structure
482 * (D_LEVEL_SIZE).
483 * @_params: string with the parameters; this is a space (not tab!)
484 * separated list of NAME:VALUE, where value is the debug level
485 * and NAME is the name of the submodule.
486 * @tag: string for error messages (example: MODULE.ARGNAME).
487 */
488static inline
489void d_parse_params(struct d_level *d_level, size_t d_level_size,
490 const char *_params, const char *tag)
491{
492 char submodule[130], *params, *params_orig, *token, *colon;
493 unsigned level, tokens;
494
495 if (_params == NULL)
496 return;
497 params_orig = kstrdup(_params, GFP_KERNEL);
498 params = params_orig;
499 while (1) {
500 token = strsep(&params, " ");
501 if (token == NULL)
502 break;
503 if (*token == '\0') /* eat joint spaces */
504 continue;
505 /* kernel's sscanf %s eats until whitespace, so we
506 * replace : by \n so it doesn't get eaten later by
507 * strsep */
508 colon = strchr(token, ':');
509 if (colon != NULL)
510 *colon = '\n';
511 tokens = sscanf(token, "%s\n%u", submodule, &level);
512 if (colon != NULL)
513 *colon = ':'; /* set back, for error messages */
514 if (tokens == 2)
515 d_submodule_set(d_level, d_level_size,
516 submodule, level, tag);
517 else
518 printk(KERN_ERR "%s: can't parse '%s' as a "
519 "SUBMODULE:LEVEL (%d tokens)\n",
520 tag, token, tokens);
521 }
522 kfree(params_orig);
523}
524
453#endif /* #ifndef __debug__h__ */ 525#endif /* #ifndef __debug__h__ */
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h
index 433693ef2bb0..62d356153565 100644
--- a/include/linux/wimax/i2400m.h
+++ b/include/linux/wimax/i2400m.h
@@ -138,7 +138,7 @@ struct i2400m_bcf_hdr {
138 __le32 module_id; 138 __le32 module_id;
139 __le32 module_vendor; 139 __le32 module_vendor;
140 __le32 date; /* BCD YYYMMDD */ 140 __le32 date; /* BCD YYYMMDD */
141 __le32 size; 141 __le32 size; /* in dwords */
142 __le32 key_size; /* in dwords */ 142 __le32 key_size; /* in dwords */
143 __le32 modulus_size; /* in dwords */ 143 __le32 modulus_size; /* in dwords */
144 __le32 exponent_size; /* in dwords */ 144 __le32 exponent_size; /* in dwords */
@@ -168,16 +168,6 @@ enum i2400m_brh {
168}; 168};
169 169
170 170
171/* Constants for bcf->module_id */
172enum i2400m_bcf_mod_id {
173 /* Firmware file carries its own pokes -- pokes are a set of
174 * magical values that have to be written in certain memory
175 * addresses to get the device up and ready for firmware
176 * download when it is in non-signed boot mode. */
177 I2400M_BCF_MOD_ID_POKES = 0x000000001,
178};
179
180
181/** 171/**
182 * i2400m_bootrom_header - Header for a boot-mode command 172 * i2400m_bootrom_header - Header for a boot-mode command
183 * 173 *
@@ -276,6 +266,7 @@ enum {
276 I2400M_WARM_RESET_BARKER = 0x50f750f7, 266 I2400M_WARM_RESET_BARKER = 0x50f750f7,
277 I2400M_NBOOT_BARKER = 0xdeadbeef, 267 I2400M_NBOOT_BARKER = 0xdeadbeef,
278 I2400M_SBOOT_BARKER = 0x0ff1c1a1, 268 I2400M_SBOOT_BARKER = 0x0ff1c1a1,
269 I2400M_SBOOT_BARKER_6050 = 0x80000001,
279 I2400M_ACK_BARKER = 0xfeedbabe, 270 I2400M_ACK_BARKER = 0xfeedbabe,
280 I2400M_D2H_MSG_BARKER = 0xbeefbabe, 271 I2400M_D2H_MSG_BARKER = 0xbeefbabe,
281}; 272};
diff --git a/include/linux/x25.h b/include/linux/x25.h
index d035e4e87d07..6450a7f12074 100644
--- a/include/linux/x25.h
+++ b/include/linux/x25.h
@@ -25,6 +25,7 @@
25#define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9) 25#define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9)
26#define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10) 26#define SIOCX25GDTEFACILITIES (SIOCPROTOPRIVATE + 10)
27#define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11) 27#define SIOCX25SDTEFACILITIES (SIOCPROTOPRIVATE + 11)
28#define SIOCX25SCAUSEDIAG (SIOCPROTOPRIVATE + 12)
28 29
29/* 30/*
30 * Values for {get,set}sockopt. 31 * Values for {get,set}sockopt.
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 2d4ec15abaca..29e04beb1fc9 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -10,8 +10,7 @@
10/* Structure to encapsulate addresses. I do not want to use 10/* Structure to encapsulate addresses. I do not want to use
11 * "standard" structure. My apologies. 11 * "standard" structure. My apologies.
12 */ 12 */
13typedef union 13typedef union {
14{
15 __be32 a4; 14 __be32 a4;
16 __be32 a6[4]; 15 __be32 a6[4];
17} xfrm_address_t; 16} xfrm_address_t;
@@ -20,8 +19,7 @@ typedef union
20 * the state by (spi,daddr,ah/esp) or to store information about 19 * the state by (spi,daddr,ah/esp) or to store information about
21 * spi, protocol and tunnel address on output. 20 * spi, protocol and tunnel address on output.
22 */ 21 */
23struct xfrm_id 22struct xfrm_id {
24{
25 xfrm_address_t daddr; 23 xfrm_address_t daddr;
26 __be32 spi; 24 __be32 spi;
27 __u8 proto; 25 __u8 proto;
@@ -45,8 +43,7 @@ struct xfrm_sec_ctx {
45 43
46/* Selector, used as selector both on policy rules (SPD) and SAs. */ 44/* Selector, used as selector both on policy rules (SPD) and SAs. */
47 45
48struct xfrm_selector 46struct xfrm_selector {
49{
50 xfrm_address_t daddr; 47 xfrm_address_t daddr;
51 xfrm_address_t saddr; 48 xfrm_address_t saddr;
52 __be16 dport; 49 __be16 dport;
@@ -63,8 +60,7 @@ struct xfrm_selector
63 60
64#define XFRM_INF (~(__u64)0) 61#define XFRM_INF (~(__u64)0)
65 62
66struct xfrm_lifetime_cfg 63struct xfrm_lifetime_cfg {
67{
68 __u64 soft_byte_limit; 64 __u64 soft_byte_limit;
69 __u64 hard_byte_limit; 65 __u64 hard_byte_limit;
70 __u64 soft_packet_limit; 66 __u64 soft_packet_limit;
@@ -75,16 +71,14 @@ struct xfrm_lifetime_cfg
75 __u64 hard_use_expires_seconds; 71 __u64 hard_use_expires_seconds;
76}; 72};
77 73
78struct xfrm_lifetime_cur 74struct xfrm_lifetime_cur {
79{
80 __u64 bytes; 75 __u64 bytes;
81 __u64 packets; 76 __u64 packets;
82 __u64 add_time; 77 __u64 add_time;
83 __u64 use_time; 78 __u64 use_time;
84}; 79};
85 80
86struct xfrm_replay_state 81struct xfrm_replay_state {
87{
88 __u32 oseq; 82 __u32 oseq;
89 __u32 seq; 83 __u32 seq;
90 __u32 bitmap; 84 __u32 bitmap;
@@ -96,6 +90,13 @@ struct xfrm_algo {
96 char alg_key[0]; 90 char alg_key[0];
97}; 91};
98 92
93struct xfrm_algo_auth {
94 char alg_name[64];
95 unsigned int alg_key_len; /* in bits */
96 unsigned int alg_trunc_len; /* in bits */
97 char alg_key[0];
98};
99
99struct xfrm_algo_aead { 100struct xfrm_algo_aead {
100 char alg_name[64]; 101 char alg_name[64];
101 unsigned int alg_key_len; /* in bits */ 102 unsigned int alg_key_len; /* in bits */
@@ -109,16 +110,14 @@ struct xfrm_stats {
109 __u32 integrity_failed; 110 __u32 integrity_failed;
110}; 111};
111 112
112enum 113enum {
113{
114 XFRM_POLICY_TYPE_MAIN = 0, 114 XFRM_POLICY_TYPE_MAIN = 0,
115 XFRM_POLICY_TYPE_SUB = 1, 115 XFRM_POLICY_TYPE_SUB = 1,
116 XFRM_POLICY_TYPE_MAX = 2, 116 XFRM_POLICY_TYPE_MAX = 2,
117 XFRM_POLICY_TYPE_ANY = 255 117 XFRM_POLICY_TYPE_ANY = 255
118}; 118};
119 119
120enum 120enum {
121{
122 XFRM_POLICY_IN = 0, 121 XFRM_POLICY_IN = 0,
123 XFRM_POLICY_OUT = 1, 122 XFRM_POLICY_OUT = 1,
124 XFRM_POLICY_FWD = 2, 123 XFRM_POLICY_FWD = 2,
@@ -126,8 +125,7 @@ enum
126 XFRM_POLICY_MAX = 3 125 XFRM_POLICY_MAX = 3
127}; 126};
128 127
129enum 128enum {
130{
131 XFRM_SHARE_ANY, /* No limitations */ 129 XFRM_SHARE_ANY, /* No limitations */
132 XFRM_SHARE_SESSION, /* For this session only */ 130 XFRM_SHARE_SESSION, /* For this session only */
133 XFRM_SHARE_USER, /* For this user only */ 131 XFRM_SHARE_USER, /* For this user only */
@@ -283,6 +281,7 @@ enum xfrm_attr_type_t {
283 XFRMA_MIGRATE, 281 XFRMA_MIGRATE,
284 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */ 282 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
285 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ 283 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
284 XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */
286 __XFRMA_MAX 285 __XFRMA_MAX
287 286
288#define XFRMA_MAX (__XFRMA_MAX - 1) 287#define XFRMA_MAX (__XFRMA_MAX - 1)