aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/socket.h1
-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/dn.h9
-rw-r--r--include/linux/errqueue.h6
-rw-r--r--include/linux/ethtool.h40
-rw-r--r--include/linux/fib_rules.h9
-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.h43
-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.h9
-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.h151
-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.h3
-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.h51
-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.h23
-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/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.h12
-rw-r--r--include/linux/udp.h15
-rw-r--r--include/linux/usb/usbnet.h2
-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
-rw-r--r--include/net/ah.h33
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/cfg80211.h170
-rw-r--r--include/net/compat.h14
-rw-r--r--include/net/dn_dev.h12
-rw-r--r--include/net/dn_fib.h3
-rw-r--r--include/net/dn_nsp.h24
-rw-r--r--include/net/dst.h23
-rw-r--r--include/net/fib_rules.h9
-rw-r--r--include/net/gen_stats.h4
-rw-r--r--include/net/genetlink.h12
-rw-r--r--include/net/ieee80211_radiotap.h2
-rw-r--r--include/net/ieee802154_netdev.h16
-rw-r--r--include/net/if_inet6.h24
-rw-r--r--include/net/inet6_hashtables.h4
-rw-r--r--include/net/inet_hashtables.h20
-rw-r--r--include/net/inet_sock.h36
-rw-r--r--include/net/inet_timewait_sock.h2
-rw-r--r--include/net/inetpeer.h19
-rw-r--r--include/net/ip.h27
-rw-r--r--include/net/ip6_fib.h15
-rw-r--r--include/net/ip6_route.h3
-rw-r--r--include/net/ip_fib.h25
-rw-r--r--include/net/ip_vs.h6
-rw-r--r--include/net/ipip.h25
-rw-r--r--include/net/ipv6.h12
-rw-r--r--include/net/iw_handler.h26
-rw-r--r--include/net/mac80211.h199
-rw-r--r--include/net/neighbour.h18
-rw-r--r--include/net/net_namespace.h6
-rw-r--r--include/net/netfilter/nf_conntrack_ecache.h3
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h6
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h6
-rw-r--r--include/net/netfilter/nf_conntrack_helper.h3
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h3
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h3
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h12
-rw-r--r--include/net/netfilter/nf_nat.h15
-rw-r--r--include/net/netfilter/nf_nat_protocol.h3
-rw-r--r--include/net/phonet/phonet.h2
-rw-r--r--include/net/phonet/pn_dev.h8
-rw-r--r--include/net/pkt_cls.h28
-rw-r--r--include/net/pkt_sched.h3
-rw-r--r--include/net/protocol.h7
-rw-r--r--include/net/red.h6
-rw-r--r--include/net/route.h12
-rw-r--r--include/net/rtnetlink.h11
-rw-r--r--include/net/sch_generic.h30
-rw-r--r--include/net/scm.h9
-rw-r--r--include/net/sctp/constants.h4
-rw-r--r--include/net/sctp/sctp.h3
-rw-r--r--include/net/sctp/sm.h3
-rw-r--r--include/net/sctp/structs.h16
-rw-r--r--include/net/sctp/user.h134
-rw-r--r--include/net/sock.h46
-rw-r--r--include/net/tc_act/tc_skbedit.h2
-rw-r--r--include/net/tcp.h9
-rw-r--r--include/net/udp.h42
-rw-r--r--include/net/wext.h49
-rw-r--r--include/net/wimax.h6
-rw-r--r--include/net/wpan-phy.h22
-rw-r--r--include/net/x25.h6
-rw-r--r--include/net/xfrm.h47
183 files changed, 1994 insertions, 1450 deletions
diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h
index 538991cef6f0..9a6115e7cf63 100644
--- a/include/asm-generic/socket.h
+++ b/include/asm-generic/socket.h
@@ -63,4 +63,5 @@
63#define SO_PROTOCOL 38 63#define SO_PROTOCOL 38
64#define SO_DOMAIN 39 64#define SO_DOMAIN 39
65 65
66#define SO_RXQ_OVFL 40
66#endif /* __ASM_GENERIC_SOCKET_H */ 67#endif /* __ASM_GENERIC_SOCKET_H */
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/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..bcaa0e0a54d3 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -495,13 +495,10 @@ struct ethtool_ops {
495 u32 (*get_priv_flags)(struct net_device *); 495 u32 (*get_priv_flags)(struct net_device *);
496 int (*set_priv_flags)(struct net_device *, u32); 496 int (*set_priv_flags)(struct net_device *, u32);
497 int (*get_sset_count)(struct net_device *, int); 497 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 *); 498 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *);
503 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 499 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
504 int (*flash_device)(struct net_device *, struct ethtool_flash *); 500 int (*flash_device)(struct net_device *, struct ethtool_flash *);
501 int (*reset)(struct net_device *, u32 *);
505}; 502};
506#endif /* __KERNEL__ */ 503#endif /* __KERNEL__ */
507 504
@@ -559,6 +556,7 @@ struct ethtool_ops {
559#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ 556#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
560#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ 557#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
561#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ 558#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
559#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
562 560
563/* compatibility with older code */ 561/* compatibility with older code */
564#define SPARC_ETH_GSET ETHTOOL_GSET 562#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -633,6 +631,8 @@ struct ethtool_ops {
633#define PORT_MII 0x02 631#define PORT_MII 0x02
634#define PORT_FIBRE 0x03 632#define PORT_FIBRE 0x03
635#define PORT_BNC 0x04 633#define PORT_BNC 0x04
634#define PORT_DA 0x05
635#define PORT_NONE 0xef
636#define PORT_OTHER 0xff 636#define PORT_OTHER 0xff
637 637
638/* Which transceiver to use. */ 638/* Which transceiver to use. */
@@ -676,6 +676,8 @@ struct ethtool_ops {
676#define AH_V6_FLOW 0x0b 676#define AH_V6_FLOW 0x0b
677#define ESP_V6_FLOW 0x0c 677#define ESP_V6_FLOW 0x0c
678#define IP_USER_FLOW 0x0d 678#define IP_USER_FLOW 0x0d
679#define IPV4_FLOW 0x10
680#define IPV6_FLOW 0x11
679 681
680/* L3-L4 network traffic flow hash options */ 682/* L3-L4 network traffic flow hash options */
681#define RXH_L2DA (1 << 1) 683#define RXH_L2DA (1 << 1)
@@ -689,4 +691,34 @@ struct ethtool_ops {
689 691
690#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL 692#define RX_CLS_FLOW_DISC 0xffffffffffffffffULL
691 693
694/* Reset flags */
695/* The reset() operation must clear the flags for the components which
696 * were actually reset. On successful return, the flags indicate the
697 * components which were not reset, either because they do not exist
698 * in the hardware or because they cannot be reset independently. The
699 * driver must never reset any components that were not requested.
700 */
701enum ethtool_reset_flags {
702 /* These flags represent components dedicated to the interface
703 * the command is addressed to. Shift any flag left by
704 * ETH_RESET_SHARED_SHIFT to reset a shared component of the
705 * same type.
706 */
707 ETH_RESET_MGMT = 1 << 0, /* Management processor */
708 ETH_RESET_IRQ = 1 << 1, /* Interrupt requester */
709 ETH_RESET_DMA = 1 << 2, /* DMA engine */
710 ETH_RESET_FILTER = 1 << 3, /* Filtering/flow direction */
711 ETH_RESET_OFFLOAD = 1 << 4, /* Protocol offload */
712 ETH_RESET_MAC = 1 << 5, /* Media access controller */
713 ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */
714 ETH_RESET_RAM = 1 << 7, /* RAM shared between
715 * multiple components */
716
717 ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to
718 * this interface */
719 ETH_RESET_ALL = 0xffffffff, /* All components used by this
720 * interface, even if shared */
721};
722#define ETH_RESET_SHARED_SHIFT 16
723
692#endif /* _LINUX_ETHTOOL_H */ 724#endif /* _LINUX_ETHTOOL_H */
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
index 87b606b63f1e..c7e5b700bb91 100644
--- a/include/linux/fib_rules.h
+++ b/include/linux/fib_rules.h
@@ -13,8 +13,7 @@
13/* try to find source address in routing lookups */ 13/* try to find source address in routing lookups */
14#define FIB_RULE_FIND_SADDR 0x00010000 14#define FIB_RULE_FIND_SADDR 0x00010000
15 15
16struct fib_rule_hdr 16struct fib_rule_hdr {
17{
18 __u8 family; 17 __u8 family;
19 __u8 dst_len; 18 __u8 dst_len;
20 __u8 src_len; 19 __u8 src_len;
@@ -28,8 +27,7 @@ struct fib_rule_hdr
28 __u32 flags; 27 __u32 flags;
29}; 28};
30 29
31enum 30enum {
32{
33 FRA_UNSPEC, 31 FRA_UNSPEC,
34 FRA_DST, /* destination address */ 32 FRA_DST, /* destination address */
35 FRA_SRC, /* source address */ 33 FRA_SRC, /* source address */
@@ -52,8 +50,7 @@ enum
52 50
53#define FRA_MAX (__FRA_MAX - 1) 51#define FRA_MAX (__FRA_MAX - 1)
54 52
55enum 53enum {
56{
57 FR_ACT_UNSPEC, 54 FR_ACT_UNSPEC,
58 FR_ACT_TO_TBL, /* Pass to fixed table */ 55 FR_ACT_TO_TBL, /* Pass to fixed table */
59 FR_ACT_GOTO, /* Jump to another rule */ 56 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..afa8e0ac27a7 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,
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..eecfa559bfb4 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;
@@ -110,8 +108,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) 108#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) 109#define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY)
112 110
113struct in_ifaddr 111struct in_ifaddr {
114{
115 struct in_ifaddr *ifa_next; 112 struct in_ifaddr *ifa_next;
116 struct in_device *ifa_dev; 113 struct in_device *ifa_dev;
117 struct rcu_head rcu_head; 114 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 529a0931711d..6ce87663551c 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..9428793775a0 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,14 @@ 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_rcu(net, d) \
1116 list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list)
1078#define for_each_netdev_safe(net, d, n) \ 1117#define for_each_netdev_safe(net, d, n) \
1079 list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list) 1118 list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list)
1080#define for_each_netdev_continue(net, d) \ 1119#define for_each_netdev_continue(net, d) \
1081 list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list) 1120 list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list)
1121#define for_each_netdev_continue_rcu(net, d) \
1122 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) 1123#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
1083 1124
1084static inline struct net_device *next_net_device(struct net_device *dev) 1125static inline struct net_device *next_net_device(struct net_device *dev)
@@ -1091,6 +1132,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); 1132 return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
1092} 1133}
1093 1134
1135static inline struct net_device *next_net_device_rcu(struct net_device *dev)
1136{
1137 struct list_head *lh;
1138 struct net *net;
1139
1140 net = dev_net(dev);
1141 lh = rcu_dereference(dev->dev_list.next);
1142 return lh == &net->dev_base_head ? NULL : net_device_entry(lh);
1143}
1144
1094static inline struct net_device *first_net_device(struct net *net) 1145static inline struct net_device *first_net_device(struct net *net)
1095{ 1146{
1096 return list_empty(&net->dev_base_head) ? NULL : 1147 return list_empty(&net->dev_base_head) ? NULL :
@@ -1109,6 +1160,7 @@ extern void __dev_remove_pack(struct packet_type *pt);
1109extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags, 1160extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags,
1110 unsigned short mask); 1161 unsigned short mask);
1111extern struct net_device *dev_get_by_name(struct net *net, const char *name); 1162extern struct net_device *dev_get_by_name(struct net *net, const char *name);
1163extern 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); 1164extern 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); 1165extern int dev_alloc_name(struct net_device *dev, const char *name);
1114extern int dev_open(struct net_device *dev); 1166extern int dev_open(struct net_device *dev);
@@ -1116,7 +1168,14 @@ extern int dev_close(struct net_device *dev);
1116extern void dev_disable_lro(struct net_device *dev); 1168extern void dev_disable_lro(struct net_device *dev);
1117extern int dev_queue_xmit(struct sk_buff *skb); 1169extern int dev_queue_xmit(struct sk_buff *skb);
1118extern int register_netdevice(struct net_device *dev); 1170extern int register_netdevice(struct net_device *dev);
1119extern void unregister_netdevice(struct net_device *dev); 1171extern void unregister_netdevice_queue(struct net_device *dev,
1172 struct list_head *head);
1173extern void unregister_netdevice_many(struct list_head *head);
1174static inline void unregister_netdevice(struct net_device *dev)
1175{
1176 unregister_netdevice_queue(dev, NULL);
1177}
1178
1120extern void free_netdev(struct net_device *dev); 1179extern void free_netdev(struct net_device *dev);
1121extern void synchronize_net(void); 1180extern void synchronize_net(void);
1122extern int register_netdevice_notifier(struct notifier_block *nb); 1181extern int register_netdevice_notifier(struct notifier_block *nb);
@@ -1127,6 +1186,7 @@ extern void netdev_resync_ops(struct net_device *dev);
1127extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1186extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1128extern struct net_device *dev_get_by_index(struct net *net, int ifindex); 1187extern 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); 1188extern struct net_device *__dev_get_by_index(struct net *net, int ifindex);
1189extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
1130extern int dev_restart(struct net_device *dev); 1190extern int dev_restart(struct net_device *dev);
1131#ifdef CONFIG_NETPOLL_TRAP 1191#ifdef CONFIG_NETPOLL_TRAP
1132extern int netpoll_trap(void); 1192extern int netpoll_trap(void);
@@ -1212,8 +1272,7 @@ static inline int unregister_gifconf(unsigned int family)
1212 * Incoming packets are placed on per-cpu queues so that 1272 * Incoming packets are placed on per-cpu queues so that
1213 * no locking is needed. 1273 * no locking is needed.
1214 */ 1274 */
1215struct softnet_data 1275struct softnet_data {
1216{
1217 struct Qdisc *output_queue; 1276 struct Qdisc *output_queue;
1218 struct sk_buff_head input_pkt_queue; 1277 struct sk_buff_head input_pkt_queue;
1219 struct list_head poll_list; 1278 struct list_head poll_list;
@@ -1467,18 +1526,19 @@ extern int netif_rx_ni(struct sk_buff *skb);
1467#define HAVE_NETIF_RECEIVE_SKB 1 1526#define HAVE_NETIF_RECEIVE_SKB 1
1468extern int netif_receive_skb(struct sk_buff *skb); 1527extern int netif_receive_skb(struct sk_buff *skb);
1469extern void napi_gro_flush(struct napi_struct *napi); 1528extern void napi_gro_flush(struct napi_struct *napi);
1470extern int dev_gro_receive(struct napi_struct *napi, 1529extern gro_result_t dev_gro_receive(struct napi_struct *napi,
1471 struct sk_buff *skb); 1530 struct sk_buff *skb);
1472extern int napi_skb_finish(int ret, struct sk_buff *skb); 1531extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb);
1473extern int napi_gro_receive(struct napi_struct *napi, 1532extern gro_result_t napi_gro_receive(struct napi_struct *napi,
1474 struct sk_buff *skb); 1533 struct sk_buff *skb);
1475extern void napi_reuse_skb(struct napi_struct *napi, 1534extern void napi_reuse_skb(struct napi_struct *napi,
1476 struct sk_buff *skb); 1535 struct sk_buff *skb);
1477extern struct sk_buff * napi_get_frags(struct napi_struct *napi); 1536extern struct sk_buff * napi_get_frags(struct napi_struct *napi);
1478extern int napi_frags_finish(struct napi_struct *napi, 1537extern gro_result_t napi_frags_finish(struct napi_struct *napi,
1479 struct sk_buff *skb, int ret); 1538 struct sk_buff *skb,
1539 gro_result_t ret);
1480extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); 1540extern struct sk_buff * napi_frags_skb(struct napi_struct *napi);
1481extern int napi_gro_frags(struct napi_struct *napi); 1541extern gro_result_t napi_gro_frags(struct napi_struct *napi);
1482 1542
1483static inline void napi_free_frags(struct napi_struct *napi) 1543static inline void napi_free_frags(struct napi_struct *napi)
1484{ 1544{
@@ -1502,6 +1562,8 @@ extern int dev_set_mac_address(struct net_device *,
1502extern int dev_hard_start_xmit(struct sk_buff *skb, 1562extern int dev_hard_start_xmit(struct sk_buff *skb,
1503 struct net_device *dev, 1563 struct net_device *dev,
1504 struct netdev_queue *txq); 1564 struct netdev_queue *txq);
1565extern int dev_forward_skb(struct net_device *dev,
1566 struct sk_buff *skb);
1505 1567
1506extern int netdev_budget; 1568extern int netdev_budget;
1507 1569
@@ -1540,6 +1602,7 @@ static inline void dev_hold(struct net_device *dev)
1540 */ 1602 */
1541 1603
1542extern void linkwatch_fire_event(struct net_device *dev); 1604extern void linkwatch_fire_event(struct net_device *dev);
1605extern void linkwatch_forget_dev(struct net_device *dev);
1543 1606
1544/** 1607/**
1545 * netif_carrier_ok - test if carrier present 1608 * netif_carrier_ok - test if carrier present
@@ -1609,7 +1672,8 @@ static inline int netif_dormant(const struct net_device *dev)
1609 * 1672 *
1610 * Check if carrier is operational 1673 * Check if carrier is operational
1611 */ 1674 */
1612static inline int netif_oper_up(const struct net_device *dev) { 1675static inline int netif_oper_up(const struct net_device *dev)
1676{
1613 return (dev->operstate == IF_OPER_UP || 1677 return (dev->operstate == IF_OPER_UP ||
1614 dev->operstate == IF_OPER_UNKNOWN /* backward compat */); 1678 dev->operstate == IF_OPER_UNKNOWN /* backward compat */);
1615} 1679}
@@ -1880,6 +1944,7 @@ extern void netdev_features_change(struct net_device *dev);
1880extern void dev_load(struct net *net, const char *name); 1944extern void dev_load(struct net *net, const char *name);
1881extern void dev_mcast_init(void); 1945extern void dev_mcast_init(void);
1882extern const struct net_device_stats *dev_get_stats(struct net_device *dev); 1946extern const struct net_device_stats *dev_get_stats(struct net_device *dev);
1947extern void dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats);
1883 1948
1884extern int netdev_max_backlog; 1949extern int netdev_max_backlog;
1885extern int weight_p; 1950extern int weight_p;
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..f6d97f64d7a0 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 */
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..45db17f81aa3 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,9 @@ 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
344 /* add new commands above here */ 352 /* add new commands above here */
345 353
346 /* used to define NL80211_CMD_MAX below */ 354 /* used to define NL80211_CMD_MAX below */
@@ -584,6 +592,12 @@ enum nl80211_commands {
584 * changed then the list changed and the dump should be repeated 592 * changed then the list changed and the dump should be repeated
585 * completely from scratch. 593 * completely from scratch.
586 * 594 *
595 * @NL80211_ATTR_4ADDR: Use 4-address frames on a virtual interface
596 *
597 * @NL80211_ATTR_SURVEY_INFO: survey information about a channel, part of
598 * the survey response for %NL80211_CMD_GET_SURVEY, nested attribute
599 * containing info as possible, see &enum survey_info.
600 *
587 * @NL80211_ATTR_MAX: highest attribute number currently defined 601 * @NL80211_ATTR_MAX: highest attribute number currently defined
588 * @__NL80211_ATTR_AFTER_LAST: internal use 602 * @__NL80211_ATTR_AFTER_LAST: internal use
589 */ 603 */
@@ -714,6 +728,10 @@ enum nl80211_attrs {
714 728
715 NL80211_ATTR_PID, 729 NL80211_ATTR_PID,
716 730
731 NL80211_ATTR_4ADDR,
732
733 NL80211_ATTR_SURVEY_INFO,
734
717 /* add attributes here, update the policy in nl80211.c */ 735 /* add attributes here, update the policy in nl80211.c */
718 736
719 __NL80211_ATTR_AFTER_LAST, 737 __NL80211_ATTR_AFTER_LAST,
@@ -895,14 +913,14 @@ enum nl80211_sta_info {
895 * 913 *
896 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active 914 * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active
897 * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running 915 * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running
898 * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN 916 * @NL80211_MPATH_FLAG_SN_VALID: the mesh path contains a valid SN
899 * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set 917 * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set
900 * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded 918 * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded
901 */ 919 */
902enum nl80211_mpath_flags { 920enum nl80211_mpath_flags {
903 NL80211_MPATH_FLAG_ACTIVE = 1<<0, 921 NL80211_MPATH_FLAG_ACTIVE = 1<<0,
904 NL80211_MPATH_FLAG_RESOLVING = 1<<1, 922 NL80211_MPATH_FLAG_RESOLVING = 1<<1,
905 NL80211_MPATH_FLAG_DSN_VALID = 1<<2, 923 NL80211_MPATH_FLAG_SN_VALID = 1<<2,
906 NL80211_MPATH_FLAG_FIXED = 1<<3, 924 NL80211_MPATH_FLAG_FIXED = 1<<3,
907 NL80211_MPATH_FLAG_RESOLVED = 1<<4, 925 NL80211_MPATH_FLAG_RESOLVED = 1<<4,
908}; 926};
@@ -915,7 +933,7 @@ enum nl80211_mpath_flags {
915 * 933 *
916 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved 934 * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved
917 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination 935 * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination
918 * @NL80211_ATTR_MPATH_DSN: destination sequence number 936 * @NL80211_ATTR_MPATH_SN: destination sequence number
919 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path 937 * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path
920 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now 938 * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now
921 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in 939 * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in
@@ -926,7 +944,7 @@ enum nl80211_mpath_flags {
926enum nl80211_mpath_info { 944enum nl80211_mpath_info {
927 __NL80211_MPATH_INFO_INVALID, 945 __NL80211_MPATH_INFO_INVALID,
928 NL80211_MPATH_INFO_FRAME_QLEN, 946 NL80211_MPATH_INFO_FRAME_QLEN,
929 NL80211_MPATH_INFO_DSN, 947 NL80211_MPATH_INFO_SN,
930 NL80211_MPATH_INFO_METRIC, 948 NL80211_MPATH_INFO_METRIC,
931 NL80211_MPATH_INFO_EXPTIME, 949 NL80211_MPATH_INFO_EXPTIME,
932 NL80211_MPATH_INFO_FLAGS, 950 NL80211_MPATH_INFO_FLAGS,
@@ -1117,6 +1135,26 @@ enum nl80211_reg_rule_flags {
1117}; 1135};
1118 1136
1119/** 1137/**
1138 * enum nl80211_survey_info - survey information
1139 *
1140 * These attribute types are used with %NL80211_ATTR_SURVEY_INFO
1141 * when getting information about a survey.
1142 *
1143 * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
1144 * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
1145 * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
1146 */
1147enum nl80211_survey_info {
1148 __NL80211_SURVEY_INFO_INVALID,
1149 NL80211_SURVEY_INFO_FREQUENCY,
1150 NL80211_SURVEY_INFO_NOISE,
1151
1152 /* keep last */
1153 __NL80211_SURVEY_INFO_AFTER_LAST,
1154 NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1
1155};
1156
1157/**
1120 * enum nl80211_mntr_flags - monitor configuration flags 1158 * enum nl80211_mntr_flags - monitor configuration flags
1121 * 1159 *
1122 * Monitor configuration flags. 1160 * Monitor configuration flags.
@@ -1196,6 +1234,8 @@ enum nl80211_mntr_flags {
1196 * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) 1234 * @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 1235 * that it takes for an HWMP information element to propagate across the mesh
1198 * 1236 *
1237 * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not
1238 *
1199 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute 1239 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
1200 * 1240 *
1201 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use 1241 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
@@ -1215,6 +1255,7 @@ enum nl80211_meshconf_params {
1215 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, 1255 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
1216 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, 1256 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
1217 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, 1257 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
1258 NL80211_MESHCONF_HWMP_ROOTMODE,
1218 1259
1219 /* keep last */ 1260 /* keep last */
1220 __NL80211_MESHCONF_ATTR_AFTER_LAST, 1261 __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -1277,6 +1318,7 @@ enum nl80211_channel_type {
1277 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1318 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1278 * in unspecified units, scaled to 0..100 (u8) 1319 * in unspecified units, scaled to 0..100 (u8)
1279 * @NL80211_BSS_STATUS: status, if this BSS is "used" 1320 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1321 * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms
1280 * @__NL80211_BSS_AFTER_LAST: internal 1322 * @__NL80211_BSS_AFTER_LAST: internal
1281 * @NL80211_BSS_MAX: highest BSS attribute 1323 * @NL80211_BSS_MAX: highest BSS attribute
1282 */ 1324 */
@@ -1291,6 +1333,7 @@ enum nl80211_bss {
1291 NL80211_BSS_SIGNAL_MBM, 1333 NL80211_BSS_SIGNAL_MBM,
1292 NL80211_BSS_SIGNAL_UNSPEC, 1334 NL80211_BSS_SIGNAL_UNSPEC,
1293 NL80211_BSS_STATUS, 1335 NL80211_BSS_STATUS,
1336 NL80211_BSS_SEEN_MS_AGO,
1294 1337
1295 /* keep last */ 1338 /* keep last */
1296 __NL80211_BSS_AFTER_LAST, 1339 __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..b0c3671d463c 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_PERNET 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..89eed8cdd318 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
@@ -489,8 +491,7 @@ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb,
489 int len,int odd, struct sk_buff *skb), 491 int len,int odd, struct sk_buff *skb),
490 void *from, int length); 492 void *from, int length);
491 493
492struct skb_seq_state 494struct skb_seq_state {
493{
494 __u32 lower_offset; 495 __u32 lower_offset;
495 __u32 upper_offset; 496 __u32 upper_offset;
496 __u32 frag_idx; 497 __u32 frag_idx;
@@ -1489,6 +1490,16 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
1489 return __netdev_alloc_skb(dev, length, GFP_ATOMIC); 1490 return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
1490} 1491}
1491 1492
1493static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
1494 unsigned int length)
1495{
1496 struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN);
1497
1498 if (NET_IP_ALIGN && skb)
1499 skb_reserve(skb, NET_IP_ALIGN);
1500 return skb;
1501}
1502
1492extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask); 1503extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);
1493 1504
1494/** 1505/**
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 a990ace1a838..714f063a3e6d 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;
@@ -677,6 +678,9 @@ asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
677asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, 678asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned,
678 struct sockaddr __user *, int __user *); 679 struct sockaddr __user *, int __user *);
679asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags); 680asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
681asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg,
682 unsigned int vlen, unsigned flags,
683 struct timespec __user *timeout);
680asmlinkage long sys_socket(int, int, int); 684asmlinkage long sys_socket(int, int, int);
681asmlinkage long sys_socketpair(int, int, int, int __user *); 685asmlinkage long sys_socketpair(int, int, int, int __user *);
682asmlinkage long sys_socketcall(int call, unsigned long __user *args); 686asmlinkage long sys_socketcall(int call, unsigned long __user *args);
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..32d7d77b4a01 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 */
@@ -102,8 +108,7 @@ enum {
102#define TCPI_OPT_WSCALE 4 108#define TCPI_OPT_WSCALE 4
103#define TCPI_OPT_ECN 8 109#define TCPI_OPT_ECN 8
104 110
105enum tcp_ca_state 111enum tcp_ca_state {
106{
107 TCP_CA_Open = 0, 112 TCP_CA_Open = 0,
108#define TCPF_CA_Open (1<<TCP_CA_Open) 113#define TCPF_CA_Open (1<<TCP_CA_Open)
109 TCP_CA_Disorder = 1, 114 TCP_CA_Disorder = 1,
@@ -116,8 +121,7 @@ enum tcp_ca_state
116#define TCPF_CA_Loss (1<<TCP_CA_Loss) 121#define TCPF_CA_Loss (1<<TCP_CA_Loss)
117}; 122};
118 123
119struct tcp_info 124struct tcp_info {
120{
121 __u8 tcpi_state; 125 __u8 tcpi_state;
122 __u8 tcpi_ca_state; 126 __u8 tcpi_ca_state;
123 __u8 tcpi_retransmits; 127 __u8 tcpi_retransmits;
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..8c84881f8478 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -90,7 +90,9 @@ struct driver_info {
90#define FLAG_WLAN 0x0080 /* use "wlan%d" names */ 90#define FLAG_WLAN 0x0080 /* use "wlan%d" names */
91#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ 91#define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */
92#define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ 92#define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */
93#define FLAG_WWAN 0x0400 /* use "wwan%d" names */
93 94
95#define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */
94 96
95 /* init device ... can sleep, or cause probe() failure */ 97 /* init device ... can sleep, or cause probe() failure */
96 int (*bind)(struct usbnet *, struct usb_interface *); 98 int (*bind)(struct usbnet *, struct usb_interface *);
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)
diff --git a/include/net/ah.h b/include/net/ah.h
index ae1c322f4242..f0129f79a31a 100644
--- a/include/net/ah.h
+++ b/include/net/ah.h
@@ -1,43 +1,20 @@
1#ifndef _NET_AH_H 1#ifndef _NET_AH_H
2#define _NET_AH_H 2#define _NET_AH_H
3 3
4#include <linux/crypto.h> 4#include <linux/skbuff.h>
5#include <net/xfrm.h>
6 5
7/* This is the maximum truncated ICV length that we know of. */ 6/* This is the maximum truncated ICV length that we know of. */
8#define MAX_AH_AUTH_LEN 12 7#define MAX_AH_AUTH_LEN 12
9 8
10struct ah_data 9struct crypto_ahash;
11{ 10
12 u8 *work_icv; 11struct ah_data {
13 int icv_full_len; 12 int icv_full_len;
14 int icv_trunc_len; 13 int icv_trunc_len;
15 14
16 struct crypto_hash *tfm; 15 struct crypto_ahash *ahash;
17}; 16};
18 17
19static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
20 u8 *auth_data)
21{
22 struct hash_desc desc;
23 int err;
24
25 desc.tfm = ahp->tfm;
26 desc.flags = 0;
27
28 memset(auth_data, 0, ahp->icv_trunc_len);
29 err = crypto_hash_init(&desc);
30 if (unlikely(err))
31 goto out;
32 err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
33 if (unlikely(err))
34 goto out;
35 err = crypto_hash_final(&desc, ahp->work_icv);
36
37out:
38 return err;
39}
40
41struct ip_auth_hdr; 18struct ip_auth_hdr;
42 19
43static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb) 20static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 718394e2c01e..04a6908e38d2 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -121,7 +121,7 @@ struct bt_sock_list {
121 rwlock_t lock; 121 rwlock_t lock;
122}; 122};
123 123
124int bt_sock_register(int proto, struct net_proto_family *ops); 124int bt_sock_register(int proto, const struct net_proto_family *ops);
125int bt_sock_unregister(int proto); 125int bt_sock_unregister(int proto);
126void bt_sock_link(struct bt_sock_list *l, struct sock *s); 126void bt_sock_link(struct bt_sock_list *l, struct sock *s);
127void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 127void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3d874c620219..a6492e9bca97 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -206,10 +206,12 @@ struct ieee80211_supported_band {
206 * struct vif_params - describes virtual interface parameters 206 * struct vif_params - describes virtual interface parameters
207 * @mesh_id: mesh ID to use 207 * @mesh_id: mesh ID to use
208 * @mesh_id_len: length of the mesh ID 208 * @mesh_id_len: length of the mesh ID
209 * @use_4addr: use 4-address frames
209 */ 210 */
210struct vif_params { 211struct vif_params {
211 u8 *mesh_id; 212 u8 *mesh_id;
212 int mesh_id_len; 213 int mesh_id_len;
214 int use_4addr;
213}; 215};
214 216
215/** 217/**
@@ -233,6 +235,35 @@ struct key_params {
233}; 235};
234 236
235/** 237/**
238 * enum survey_info_flags - survey information flags
239 *
240 * Used by the driver to indicate which info in &struct survey_info
241 * it has filled in during the get_survey().
242 */
243enum survey_info_flags {
244 SURVEY_INFO_NOISE_DBM = 1<<0,
245};
246
247/**
248 * struct survey_info - channel survey response
249 *
250 * Used by dump_survey() to report back per-channel survey information.
251 *
252 * @channel: the channel this survey record reports, mandatory
253 * @filled: bitflag of flags from &enum survey_info_flags
254 * @noise: channel noise in dBm. This and all following fields are
255 * optional
256 *
257 * This structure can later be expanded with things like
258 * channel duty cycle etc.
259 */
260struct survey_info {
261 struct ieee80211_channel *channel;
262 u32 filled;
263 s8 noise;
264};
265
266/**
236 * struct beacon_parameters - beacon parameters 267 * struct beacon_parameters - beacon parameters
237 * 268 *
238 * Used to configure the beacon for an interface. 269 * Used to configure the beacon for an interface.
@@ -418,7 +449,7 @@ enum monitor_flags {
418 * in during get_station() or dump_station(). 449 * in during get_station() or dump_station().
419 * 450 *
420 * MPATH_INFO_FRAME_QLEN: @frame_qlen filled 451 * MPATH_INFO_FRAME_QLEN: @frame_qlen filled
421 * MPATH_INFO_DSN: @dsn filled 452 * MPATH_INFO_SN: @sn filled
422 * MPATH_INFO_METRIC: @metric filled 453 * MPATH_INFO_METRIC: @metric filled
423 * MPATH_INFO_EXPTIME: @exptime filled 454 * MPATH_INFO_EXPTIME: @exptime filled
424 * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled 455 * MPATH_INFO_DISCOVERY_TIMEOUT: @discovery_timeout filled
@@ -427,7 +458,7 @@ enum monitor_flags {
427 */ 458 */
428enum mpath_info_flags { 459enum mpath_info_flags {
429 MPATH_INFO_FRAME_QLEN = BIT(0), 460 MPATH_INFO_FRAME_QLEN = BIT(0),
430 MPATH_INFO_DSN = BIT(1), 461 MPATH_INFO_SN = BIT(1),
431 MPATH_INFO_METRIC = BIT(2), 462 MPATH_INFO_METRIC = BIT(2),
432 MPATH_INFO_EXPTIME = BIT(3), 463 MPATH_INFO_EXPTIME = BIT(3),
433 MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4), 464 MPATH_INFO_DISCOVERY_TIMEOUT = BIT(4),
@@ -442,7 +473,7 @@ enum mpath_info_flags {
442 * 473 *
443 * @filled: bitfield of flags from &enum mpath_info_flags 474 * @filled: bitfield of flags from &enum mpath_info_flags
444 * @frame_qlen: number of queued frames for this destination 475 * @frame_qlen: number of queued frames for this destination
445 * @dsn: destination sequence number 476 * @sn: target sequence number
446 * @metric: metric (cost) of this mesh path 477 * @metric: metric (cost) of this mesh path
447 * @exptime: expiration time for the mesh path from now, in msecs 478 * @exptime: expiration time for the mesh path from now, in msecs
448 * @flags: mesh path flags 479 * @flags: mesh path flags
@@ -456,7 +487,7 @@ enum mpath_info_flags {
456struct mpath_info { 487struct mpath_info {
457 u32 filled; 488 u32 filled;
458 u32 frame_qlen; 489 u32 frame_qlen;
459 u32 dsn; 490 u32 sn;
460 u32 metric; 491 u32 metric;
461 u32 exptime; 492 u32 exptime;
462 u32 discovery_timeout; 493 u32 discovery_timeout;
@@ -506,6 +537,7 @@ struct mesh_config {
506 u32 dot11MeshHWMPactivePathTimeout; 537 u32 dot11MeshHWMPactivePathTimeout;
507 u16 dot11MeshHWMPpreqMinInterval; 538 u16 dot11MeshHWMPpreqMinInterval;
508 u16 dot11MeshHWMPnetDiameterTraversalTime; 539 u16 dot11MeshHWMPnetDiameterTraversalTime;
540 u8 dot11MeshHWMPRootMode;
509}; 541};
510 542
511/** 543/**
@@ -941,6 +973,8 @@ struct cfg80211_bitrate_mask {
941 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting 973 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
942 * functions to adjust rfkill hw state 974 * functions to adjust rfkill hw state
943 * 975 *
976 * @dump_survey: get site survey information.
977 *
944 * @testmode_cmd: run a test mode command 978 * @testmode_cmd: run a test mode command
945 */ 979 */
946struct cfg80211_ops { 980struct cfg80211_ops {
@@ -1060,6 +1094,9 @@ struct cfg80211_ops {
1060 const u8 *peer, 1094 const u8 *peer,
1061 const struct cfg80211_bitrate_mask *mask); 1095 const struct cfg80211_bitrate_mask *mask);
1062 1096
1097 int (*dump_survey)(struct wiphy *wiphy, struct net_device *netdev,
1098 int idx, struct survey_info *info);
1099
1063 /* some temporary stuff to finish wext */ 1100 /* some temporary stuff to finish wext */
1064 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, 1101 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
1065 bool enabled, int timeout); 1102 bool enabled, int timeout);
@@ -1071,27 +1108,50 @@ struct cfg80211_ops {
1071 */ 1108 */
1072 1109
1073/** 1110/**
1074 * struct wiphy - wireless hardware description 1111 * enum wiphy_flags - wiphy capability flags
1075 * @idx: the wiphy index assigned to this item 1112 *
1076 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> 1113 * @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device
1077 * @custom_regulatory: tells us the driver for this device
1078 * has its own custom regulatory domain and cannot identify the 1114 * has its own custom regulatory domain and cannot identify the
1079 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled 1115 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled
1080 * we will disregard the first regulatory hint (when the 1116 * we will disregard the first regulatory hint (when the
1081 * initiator is %REGDOM_SET_BY_CORE). 1117 * initiator is %REGDOM_SET_BY_CORE).
1082 * @strict_regulatory: tells us the driver for this device will ignore 1118 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
1083 * regulatory domain settings until it gets its own regulatory domain 1119 * ignore regulatory domain settings until it gets its own regulatory
1084 * via its regulatory_hint(). After its gets its own regulatory domain 1120 * domain via its regulatory_hint(). After its gets its own regulatory
1085 * it will only allow further regulatory domain settings to further 1121 * domain it will only allow further regulatory domain settings to
1086 * enhance compliance. For example if channel 13 and 14 are disabled 1122 * further enhance compliance. For example if channel 13 and 14 are
1087 * by this regulatory domain no user regulatory domain can enable these 1123 * disabled by this regulatory domain no user regulatory domain can
1088 * channels at a later time. This can be used for devices which do not 1124 * enable these channels at a later time. This can be used for devices
1089 * have calibration information gauranteed for frequencies or settings 1125 * which do not have calibration information gauranteed for frequencies
1090 * outside of its regulatory domain. 1126 * or settings outside of its regulatory domain.
1091 * @disable_beacon_hints: enable this if your driver needs to ensure that 1127 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
1092 * passive scan flags and beaconing flags may not be lifted by cfg80211 1128 * that passive scan flags and beaconing flags may not be lifted by
1093 * due to regulatory beacon hints. For more information on beacon 1129 * cfg80211 due to regulatory beacon hints. For more information on beacon
1094 * hints read the documenation for regulatory_hint_found_beacon() 1130 * hints read the documenation for regulatory_hint_found_beacon()
1131 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
1132 * wiphy at all
1133 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
1134 * by default -- this flag will be set depending on the kernel's default
1135 * on wiphy_new(), but can be changed by the driver if it has a good
1136 * reason to override the default
1137 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station
1138 * on a VLAN interface)
1139 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station
1140 */
1141enum wiphy_flags {
1142 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
1143 WIPHY_FLAG_STRICT_REGULATORY = BIT(1),
1144 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
1145 WIPHY_FLAG_NETNS_OK = BIT(3),
1146 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
1147 WIPHY_FLAG_4ADDR_AP = BIT(5),
1148 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1149};
1150
1151/**
1152 * struct wiphy - wireless hardware description
1153 * @idx: the wiphy index assigned to this item
1154 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
1095 * @reg_notifier: the driver's regulatory notification callback 1155 * @reg_notifier: the driver's regulatory notification callback
1096 * @regd: the driver's regulatory domain, if one was requested via 1156 * @regd: the driver's regulatory domain, if one was requested via
1097 * the regulatory_hint() API. This can be used by the driver 1157 * the regulatory_hint() API. This can be used by the driver
@@ -1106,11 +1166,6 @@ struct cfg80211_ops {
1106 * -1 = fragmentation disabled, only odd values >= 256 used 1166 * -1 = fragmentation disabled, only odd values >= 256 used
1107 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled 1167 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
1108 * @net: the network namespace this wiphy currently lives in 1168 * @net: the network namespace this wiphy currently lives in
1109 * @netnsok: if set to false, do not allow changing the netns of this
1110 * wiphy at all
1111 * @ps_default: default for powersave, will be set depending on the
1112 * kernel's default on wiphy_new(), but can be changed by the
1113 * driver if it has a good reason to override the default
1114 */ 1169 */
1115struct wiphy { 1170struct wiphy {
1116 /* assign these fields before you register the wiphy */ 1171 /* assign these fields before you register the wiphy */
@@ -1121,12 +1176,7 @@ struct wiphy {
1121 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ 1176 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
1122 u16 interface_modes; 1177 u16 interface_modes;
1123 1178
1124 bool custom_regulatory; 1179 u32 flags;
1125 bool strict_regulatory;
1126 bool disable_beacon_hints;
1127
1128 bool netnsok;
1129 bool ps_default;
1130 1180
1131 enum cfg80211_signal_type signal_type; 1181 enum cfg80211_signal_type signal_type;
1132 1182
@@ -1142,6 +1192,9 @@ struct wiphy {
1142 u32 frag_threshold; 1192 u32 frag_threshold;
1143 u32 rts_threshold; 1193 u32 rts_threshold;
1144 1194
1195 char fw_version[ETHTOOL_BUSINFO_LEN];
1196 u32 hw_version;
1197
1145 /* If multiple wiphys are registered and you're handed e.g. 1198 /* If multiple wiphys are registered and you're handed e.g.
1146 * a regular netdev with assigned ieee80211_ptr, you won't 1199 * a regular netdev with assigned ieee80211_ptr, you won't
1147 * know whether it points to a wiphy your driver has registered 1200 * know whether it points to a wiphy your driver has registered
@@ -1171,6 +1224,10 @@ struct wiphy {
1171 struct net *_net; 1224 struct net *_net;
1172#endif 1225#endif
1173 1226
1227#ifdef CONFIG_CFG80211_WEXT
1228 const struct iw_handler_def *wext;
1229#endif
1230
1174 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); 1231 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
1175}; 1232};
1176 1233
@@ -1314,6 +1371,10 @@ struct cfg80211_cached_keys;
1314 * @ssid_len: (private) Used by the internal configuration code 1371 * @ssid_len: (private) Used by the internal configuration code
1315 * @wext: (private) Used by the internal wireless extensions compat code 1372 * @wext: (private) Used by the internal wireless extensions compat code
1316 * @wext_bssid: (private) Used by the internal wireless extensions compat code 1373 * @wext_bssid: (private) Used by the internal wireless extensions compat code
1374 * @use_4addr: indicates 4addr mode is used on this interface, must be
1375 * set by driver (if supported) on add_interface BEFORE registering the
1376 * netdev and may otherwise be used by driver read-only, will be update
1377 * by cfg80211 on change_interface
1317 */ 1378 */
1318struct wireless_dev { 1379struct wireless_dev {
1319 struct wiphy *wiphy; 1380 struct wiphy *wiphy;
@@ -1327,6 +1388,8 @@ struct wireless_dev {
1327 1388
1328 struct work_struct cleanup_work; 1389 struct work_struct cleanup_work;
1329 1390
1391 bool use_4addr;
1392
1330 /* currently used for IBSS and SME - might be rearranged later */ 1393 /* currently used for IBSS and SME - might be rearranged later */
1331 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1394 u8 ssid[IEEE80211_MAX_SSID_LEN];
1332 u8 ssid_len; 1395 u8 ssid_len;
@@ -1345,7 +1408,7 @@ struct wireless_dev {
1345 struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; 1408 struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES];
1346 struct cfg80211_internal_bss *current_bss; /* associated / joined */ 1409 struct cfg80211_internal_bss *current_bss; /* associated / joined */
1347 1410
1348#ifdef CONFIG_WIRELESS_EXT 1411#ifdef CONFIG_CFG80211_WEXT
1349 /* wext data */ 1412 /* wext data */
1350 struct { 1413 struct {
1351 struct cfg80211_ibss_params ibss; 1414 struct cfg80211_ibss_params ibss;
@@ -1776,6 +1839,18 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
1776void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 1839void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
1777 1840
1778/** 1841/**
1842 * __cfg80211_auth_canceled - notify cfg80211 that authentication was canceled
1843 * @dev: network device
1844 * @addr: The MAC address of the device with which the authentication timed out
1845 *
1846 * When a pending authentication had no action yet, the driver may decide
1847 * to not send a deauth frame, but in that case must calls this function
1848 * to tell cfg80211 about this decision. It is only valid to call this
1849 * function within the deauth() callback.
1850 */
1851void __cfg80211_auth_canceled(struct net_device *dev, const u8 *addr);
1852
1853/**
1779 * cfg80211_send_rx_assoc - notification of processed association 1854 * cfg80211_send_rx_assoc - notification of processed association
1780 * @dev: network device 1855 * @dev: network device
1781 * @buf: (re)association response frame (header + body) 1856 * @buf: (re)association response frame (header + body)
@@ -1802,30 +1877,45 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
1802 * @dev: network device 1877 * @dev: network device
1803 * @buf: deauthentication frame (header + body) 1878 * @buf: deauthentication frame (header + body)
1804 * @len: length of the frame data 1879 * @len: length of the frame data
1805 * @cookie: cookie from ->deauth if called within that callback,
1806 * %NULL otherwise
1807 * 1880 *
1808 * This function is called whenever deauthentication has been processed in 1881 * This function is called whenever deauthentication has been processed in
1809 * station mode. This includes both received deauthentication frames and 1882 * station mode. This includes both received deauthentication frames and
1810 * locally generated ones. This function may sleep. 1883 * locally generated ones. This function may sleep.
1811 */ 1884 */
1812void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, 1885void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
1813 void *cookie); 1886
1887/**
1888 * __cfg80211_send_deauth - notification of processed deauthentication
1889 * @dev: network device
1890 * @buf: deauthentication frame (header + body)
1891 * @len: length of the frame data
1892 *
1893 * Like cfg80211_send_deauth(), but doesn't take the wdev lock.
1894 */
1895void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
1814 1896
1815/** 1897/**
1816 * cfg80211_send_disassoc - notification of processed disassociation 1898 * cfg80211_send_disassoc - notification of processed disassociation
1817 * @dev: network device 1899 * @dev: network device
1818 * @buf: disassociation response frame (header + body) 1900 * @buf: disassociation response frame (header + body)
1819 * @len: length of the frame data 1901 * @len: length of the frame data
1820 * @cookie: cookie from ->disassoc if called within that callback,
1821 * %NULL otherwise
1822 * 1902 *
1823 * This function is called whenever disassociation has been processed in 1903 * This function is called whenever disassociation has been processed in
1824 * station mode. This includes both received disassociation frames and locally 1904 * station mode. This includes both received disassociation frames and locally
1825 * generated ones. This function may sleep. 1905 * generated ones. This function may sleep.
1826 */ 1906 */
1827void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, 1907void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
1828 void *cookie); 1908
1909/**
1910 * __cfg80211_send_disassoc - notification of processed disassociation
1911 * @dev: network device
1912 * @buf: disassociation response frame (header + body)
1913 * @len: length of the frame data
1914 *
1915 * Like cfg80211_send_disassoc(), but doesn't take the wdev lock.
1916 */
1917void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf,
1918 size_t len);
1829 1919
1830/** 1920/**
1831 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) 1921 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP)
diff --git a/include/net/compat.h b/include/net/compat.h
index 7c3002832d05..3c7d4e38fa1d 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -18,6 +18,11 @@ struct compat_msghdr {
18 compat_uint_t msg_flags; 18 compat_uint_t msg_flags;
19}; 19};
20 20
21struct compat_mmsghdr {
22 struct compat_msghdr msg_hdr;
23 compat_uint_t msg_len;
24};
25
21struct compat_cmsghdr { 26struct compat_cmsghdr {
22 compat_size_t cmsg_len; 27 compat_size_t cmsg_len;
23 compat_int_t cmsg_level; 28 compat_int_t cmsg_level;
@@ -28,13 +33,20 @@ extern int compat_sock_get_timestamp(struct sock *, struct timeval __user *);
28extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *); 33extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *);
29 34
30#else /* defined(CONFIG_COMPAT) */ 35#else /* defined(CONFIG_COMPAT) */
31#define compat_msghdr msghdr /* to avoid compiler warnings */ 36/*
37 * To avoid compiler warnings:
38 */
39#define compat_msghdr msghdr
40#define compat_mmsghdr mmsghdr
32#endif /* defined(CONFIG_COMPAT) */ 41#endif /* defined(CONFIG_COMPAT) */
33 42
34extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); 43extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *);
35extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int); 44extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int);
36extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned); 45extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned);
37extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); 46extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned);
47extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *,
48 unsigned, unsigned,
49 struct timespec __user *);
38extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); 50extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *);
39extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); 51extern int put_cmsg_compat(struct msghdr*, int, int, int, void *);
40 52
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h
index cee46821dc53..28966cae3fd7 100644
--- a/include/net/dn_dev.h
+++ b/include/net/dn_dev.h
@@ -97,16 +97,14 @@ struct dn_dev {
97 unsigned long uptime; /* Time device went up in jiffies */ 97 unsigned long uptime; /* Time device went up in jiffies */
98}; 98};
99 99
100struct dn_short_packet 100struct dn_short_packet {
101{
102 __u8 msgflg; 101 __u8 msgflg;
103 __le16 dstnode; 102 __le16 dstnode;
104 __le16 srcnode; 103 __le16 srcnode;
105 __u8 forward; 104 __u8 forward;
106} __attribute__((packed)); 105} __attribute__((packed));
107 106
108struct dn_long_packet 107struct dn_long_packet {
109{
110 __u8 msgflg; 108 __u8 msgflg;
111 __u8 d_area; 109 __u8 d_area;
112 __u8 d_subarea; 110 __u8 d_subarea;
@@ -122,8 +120,7 @@ struct dn_long_packet
122 120
123/*------------------------- DRP - Routing messages ---------------------*/ 121/*------------------------- DRP - Routing messages ---------------------*/
124 122
125struct endnode_hello_message 123struct endnode_hello_message {
126{
127 __u8 msgflg; 124 __u8 msgflg;
128 __u8 tiver[3]; 125 __u8 tiver[3];
129 __u8 id[6]; 126 __u8 id[6];
@@ -138,8 +135,7 @@ struct endnode_hello_message
138 __u8 data[2]; 135 __u8 data[2];
139} __attribute__((packed)); 136} __attribute__((packed));
140 137
141struct rtnode_hello_message 138struct rtnode_hello_message {
142{
143 __u8 msgflg; 139 __u8 msgflg;
144 __u8 tiver[3]; 140 __u8 tiver[3];
145 __u8 id[6]; 141 __u8 id[6];
diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
index c378be7bf960..52da6c3dd50d 100644
--- a/include/net/dn_fib.h
+++ b/include/net/dn_fib.h
@@ -4,8 +4,7 @@
4/* WARNING: The ordering of these elements must match ordering 4/* WARNING: The ordering of these elements must match ordering
5 * of RTA_* rtnetlink attribute numbers. 5 * of RTA_* rtnetlink attribute numbers.
6 */ 6 */
7struct dn_kern_rta 7struct dn_kern_rta {
8{
9 void *rta_dst; 8 void *rta_dst;
10 void *rta_src; 9 void *rta_src;
11 int *rta_iif; 10 int *rta_iif;
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h
index 96e816b6974d..17d43d2db5ec 100644
--- a/include/net/dn_nsp.h
+++ b/include/net/dn_nsp.h
@@ -70,30 +70,26 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl
70 70
71/* Data Messages (data segment/interrupt/link service) */ 71/* Data Messages (data segment/interrupt/link service) */
72 72
73struct nsp_data_seg_msg 73struct nsp_data_seg_msg {
74{
75 __u8 msgflg; 74 __u8 msgflg;
76 __le16 dstaddr; 75 __le16 dstaddr;
77 __le16 srcaddr; 76 __le16 srcaddr;
78} __attribute__((packed)); 77} __attribute__((packed));
79 78
80struct nsp_data_opt_msg 79struct nsp_data_opt_msg {
81{
82 __le16 acknum; 80 __le16 acknum;
83 __le16 segnum; 81 __le16 segnum;
84 __le16 lsflgs; 82 __le16 lsflgs;
85} __attribute__((packed)); 83} __attribute__((packed));
86 84
87struct nsp_data_opt_msg1 85struct nsp_data_opt_msg1 {
88{
89 __le16 acknum; 86 __le16 acknum;
90 __le16 segnum; 87 __le16 segnum;
91} __attribute__((packed)); 88} __attribute__((packed));
92 89
93 90
94/* Acknowledgment Message (data/other data) */ 91/* Acknowledgment Message (data/other data) */
95struct nsp_data_ack_msg 92struct nsp_data_ack_msg {
96{
97 __u8 msgflg; 93 __u8 msgflg;
98 __le16 dstaddr; 94 __le16 dstaddr;
99 __le16 srcaddr; 95 __le16 srcaddr;
@@ -101,16 +97,14 @@ struct nsp_data_ack_msg
101} __attribute__((packed)); 97} __attribute__((packed));
102 98
103/* Connect Acknowledgment Message */ 99/* Connect Acknowledgment Message */
104struct nsp_conn_ack_msg 100struct nsp_conn_ack_msg {
105{
106 __u8 msgflg; 101 __u8 msgflg;
107 __le16 dstaddr; 102 __le16 dstaddr;
108} __attribute__((packed)); 103} __attribute__((packed));
109 104
110 105
111/* Connect Initiate/Retransmit Initiate/Connect Confirm */ 106/* Connect Initiate/Retransmit Initiate/Connect Confirm */
112struct nsp_conn_init_msg 107struct nsp_conn_init_msg {
113{
114 __u8 msgflg; 108 __u8 msgflg;
115#define NSP_CI 0x18 /* Connect Initiate */ 109#define NSP_CI 0x18 /* Connect Initiate */
116#define NSP_RCI 0x68 /* Retrans. Conn Init */ 110#define NSP_RCI 0x68 /* Retrans. Conn Init */
@@ -126,8 +120,7 @@ struct nsp_conn_init_msg
126} __attribute__((packed)); 120} __attribute__((packed));
127 121
128/* Disconnect Initiate/Disconnect Confirm */ 122/* Disconnect Initiate/Disconnect Confirm */
129struct nsp_disconn_init_msg 123struct nsp_disconn_init_msg {
130{
131 __u8 msgflg; 124 __u8 msgflg;
132 __le16 dstaddr; 125 __le16 dstaddr;
133 __le16 srcaddr; 126 __le16 srcaddr;
@@ -136,8 +129,7 @@ struct nsp_disconn_init_msg
136 129
137 130
138 131
139struct srcobj_fmt 132struct srcobj_fmt {
140{
141 __u8 format; 133 __u8 format;
142 __u8 task; 134 __u8 task;
143 __le16 grpcode; 135 __le16 grpcode;
diff --git a/include/net/dst.h b/include/net/dst.h
index 5a900ddcf10d..387cb3cfde7e 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -36,8 +36,7 @@
36 36
37struct sk_buff; 37struct sk_buff;
38 38
39struct dst_entry 39struct dst_entry {
40{
41 struct rcu_head rcu_head; 40 struct rcu_head rcu_head;
42 struct dst_entry *child; 41 struct dst_entry *child;
43 struct net_device *dev; 42 struct net_device *dev;
@@ -111,6 +110,12 @@ dst_metric(const struct dst_entry *dst, int metric)
111 return dst->metrics[metric-1]; 110 return dst->metrics[metric-1];
112} 111}
113 112
113static inline u32
114dst_feature(const struct dst_entry *dst, u32 feature)
115{
116 return (dst ? dst_metric(dst, RTAX_FEATURES) & feature : 0);
117}
118
114static inline u32 dst_mtu(const struct dst_entry *dst) 119static inline u32 dst_mtu(const struct dst_entry *dst)
115{ 120{
116 u32 mtu = dst_metric(dst, RTAX_MTU); 121 u32 mtu = dst_metric(dst, RTAX_MTU);
@@ -136,7 +141,7 @@ static inline void set_dst_metric_rtt(struct dst_entry *dst, int metric,
136static inline u32 141static inline u32
137dst_allfrag(const struct dst_entry *dst) 142dst_allfrag(const struct dst_entry *dst)
138{ 143{
139 int ret = dst_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG; 144 int ret = dst_feature(dst, RTAX_FEATURE_ALLFRAG);
140 /* Yes, _exactly_. This is paranoia. */ 145 /* Yes, _exactly_. This is paranoia. */
141 barrier(); 146 barrier();
142 return ret; 147 return ret;
@@ -222,11 +227,19 @@ static inline void dst_confirm(struct dst_entry *dst)
222 neigh_confirm(dst->neighbour); 227 neigh_confirm(dst->neighbour);
223} 228}
224 229
225static inline void dst_negative_advice(struct dst_entry **dst_p) 230static inline void dst_negative_advice(struct dst_entry **dst_p,
231 struct sock *sk)
226{ 232{
227 struct dst_entry * dst = *dst_p; 233 struct dst_entry * dst = *dst_p;
228 if (dst && dst->ops->negative_advice) 234 if (dst && dst->ops->negative_advice) {
229 *dst_p = dst->ops->negative_advice(dst); 235 *dst_p = dst->ops->negative_advice(dst);
236
237 if (dst != *dst_p) {
238 extern void sk_reset_txq(struct sock *sk);
239
240 sk_reset_txq(sk);
241 }
242 }
230} 243}
231 244
232static inline void dst_link_failure(struct sk_buff *skb) 245static inline void dst_link_failure(struct sk_buff *skb)
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index ca4b2e840078..2cd707b15d59 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -7,8 +7,7 @@
7#include <net/flow.h> 7#include <net/flow.h>
8#include <net/rtnetlink.h> 8#include <net/rtnetlink.h>
9 9
10struct fib_rule 10struct fib_rule {
11{
12 struct list_head list; 11 struct list_head list;
13 atomic_t refcnt; 12 atomic_t refcnt;
14 int ifindex; 13 int ifindex;
@@ -25,15 +24,13 @@ struct fib_rule
25 struct net * fr_net; 24 struct net * fr_net;
26}; 25};
27 26
28struct fib_lookup_arg 27struct fib_lookup_arg {
29{
30 void *lookup_ptr; 28 void *lookup_ptr;
31 void *result; 29 void *result;
32 struct fib_rule *rule; 30 struct fib_rule *rule;
33}; 31};
34 32
35struct fib_rules_ops 33struct fib_rules_ops {
36{
37 int family; 34 int family;
38 struct list_head list; 35 struct list_head list;
39 int rule_size; 36 int rule_size;
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h
index c1488553e349..fa157712e982 100644
--- a/include/net/gen_stats.h
+++ b/include/net/gen_stats.h
@@ -6,8 +6,7 @@
6#include <linux/rtnetlink.h> 6#include <linux/rtnetlink.h>
7#include <linux/pkt_sched.h> 7#include <linux/pkt_sched.h>
8 8
9struct gnet_dump 9struct gnet_dump {
10{
11 spinlock_t * lock; 10 spinlock_t * lock;
12 struct sk_buff * skb; 11 struct sk_buff * skb;
13 struct nlattr * tail; 12 struct nlattr * tail;
@@ -30,6 +29,7 @@ extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type,
30extern int gnet_stats_copy_basic(struct gnet_dump *d, 29extern int gnet_stats_copy_basic(struct gnet_dump *d,
31 struct gnet_stats_basic_packed *b); 30 struct gnet_stats_basic_packed *b);
32extern int gnet_stats_copy_rate_est(struct gnet_dump *d, 31extern int gnet_stats_copy_rate_est(struct gnet_dump *d,
32 const struct gnet_stats_basic_packed *b,
33 struct gnet_stats_rate_est *r); 33 struct gnet_stats_rate_est *r);
34extern int gnet_stats_copy_queue(struct gnet_dump *d, 34extern int gnet_stats_copy_queue(struct gnet_dump *d,
35 struct gnet_stats_queue *q); 35 struct gnet_stats_queue *q);
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 2a1c06874c42..eb551baafc04 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -13,8 +13,7 @@
13 * @list: list entry for linking 13 * @list: list entry for linking
14 * @family: pointer to family, need not be set before registering 14 * @family: pointer to family, need not be set before registering
15 */ 15 */
16struct genl_multicast_group 16struct genl_multicast_group {
17{
18 struct genl_family *family; /* private */ 17 struct genl_family *family; /* private */
19 struct list_head list; /* private */ 18 struct list_head list; /* private */
20 char name[GENL_NAMSIZ]; 19 char name[GENL_NAMSIZ];
@@ -35,8 +34,7 @@ struct genl_multicast_group
35 * @family_list: family list 34 * @family_list: family list
36 * @mcast_groups: multicast groups list 35 * @mcast_groups: multicast groups list
37 */ 36 */
38struct genl_family 37struct genl_family {
39{
40 unsigned int id; 38 unsigned int id;
41 unsigned int hdrsize; 39 unsigned int hdrsize;
42 char name[GENL_NAMSIZ]; 40 char name[GENL_NAMSIZ];
@@ -58,8 +56,7 @@ struct genl_family
58 * @userhdr: user specific header 56 * @userhdr: user specific header
59 * @attrs: netlink attributes 57 * @attrs: netlink attributes
60 */ 58 */
61struct genl_info 59struct genl_info {
62{
63 u32 snd_seq; 60 u32 snd_seq;
64 u32 snd_pid; 61 u32 snd_pid;
65 struct nlmsghdr * nlhdr; 62 struct nlmsghdr * nlhdr;
@@ -102,8 +99,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net)
102 * @done: completion callback for dumps 99 * @done: completion callback for dumps
103 * @ops_list: operations list 100 * @ops_list: operations list
104 */ 101 */
105struct genl_ops 102struct genl_ops {
106{
107 u8 cmd; 103 u8 cmd;
108 unsigned int flags; 104 unsigned int flags;
109 const struct nla_policy *policy; 105 const struct nla_policy *policy;
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h
index 23c3f3d97779..9d3d86aaccbb 100644
--- a/include/net/ieee80211_radiotap.h
+++ b/include/net/ieee80211_radiotap.h
@@ -80,7 +80,7 @@ struct ieee80211_radiotap_header {
80 * Additional extensions are made 80 * Additional extensions are made
81 * by setting bit 31. 81 * by setting bit 31.
82 */ 82 */
83}; 83} __packed;
84 84
85/* Name Data type Units 85/* Name Data type Units
86 * ---- --------- ----- 86 * ---- --------- -----
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index 5dc6a61952de..57430555487a 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -74,8 +74,12 @@ static inline int mac_cb_type(struct sk_buff *skb)
74#define IEEE802154_MAC_SCAN_PASSIVE 2 74#define IEEE802154_MAC_SCAN_PASSIVE 2
75#define IEEE802154_MAC_SCAN_ORPHAN 3 75#define IEEE802154_MAC_SCAN_ORPHAN 3
76 76
77struct wpan_phy;
77/* 78/*
78 * This should be located at net_device->ml_priv 79 * This should be located at net_device->ml_priv
80 *
81 * get_phy should increment the reference counting on returned phy.
82 * Use wpan_wpy_put to put that reference.
79 */ 83 */
80struct ieee802154_mlme_ops { 84struct ieee802154_mlme_ops {
81 int (*assoc_req)(struct net_device *dev, 85 int (*assoc_req)(struct net_device *dev,
@@ -94,18 +98,20 @@ struct ieee802154_mlme_ops {
94 int (*scan_req)(struct net_device *dev, 98 int (*scan_req)(struct net_device *dev,
95 u8 type, u32 channels, u8 page, u8 duration); 99 u8 type, u32 channels, u8 page, u8 duration);
96 100
101 struct wpan_phy *(*get_phy)(const struct net_device *dev);
102
97 /* 103 /*
98 * FIXME: these should become the part of PIB/MIB interface. 104 * FIXME: these should become the part of PIB/MIB interface.
99 * However we still don't have IB interface of any kind 105 * However we still don't have IB interface of any kind
100 */ 106 */
101 u16 (*get_pan_id)(struct net_device *dev); 107 u16 (*get_pan_id)(const struct net_device *dev);
102 u16 (*get_short_addr)(struct net_device *dev); 108 u16 (*get_short_addr)(const struct net_device *dev);
103 u8 (*get_dsn)(struct net_device *dev); 109 u8 (*get_dsn)(const struct net_device *dev);
104 u8 (*get_bsn)(struct net_device *dev); 110 u8 (*get_bsn)(const struct net_device *dev);
105}; 111};
106 112
107static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops( 113static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops(
108 struct net_device *dev) 114 const struct net_device *dev)
109{ 115{
110 return dev->ml_priv; 116 return dev->ml_priv;
111} 117}
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 38b78132019b..e9d69d198495 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -32,8 +32,7 @@
32 32
33#ifdef __KERNEL__ 33#ifdef __KERNEL__
34 34
35struct inet6_ifaddr 35struct inet6_ifaddr {
36{
37 struct in6_addr addr; 36 struct in6_addr addr;
38 __u32 prefix_len; 37 __u32 prefix_len;
39 38
@@ -67,8 +66,7 @@ struct inet6_ifaddr
67 int dead; 66 int dead;
68}; 67};
69 68
70struct ip6_sf_socklist 69struct ip6_sf_socklist {
71{
72 unsigned int sl_max; 70 unsigned int sl_max;
73 unsigned int sl_count; 71 unsigned int sl_count;
74 struct in6_addr sl_addr[0]; 72 struct in6_addr sl_addr[0];
@@ -79,8 +77,7 @@ struct ip6_sf_socklist
79 77
80#define IP6_SFBLOCK 10 /* allocate this many at once */ 78#define IP6_SFBLOCK 10 /* allocate this many at once */
81 79
82struct ipv6_mc_socklist 80struct ipv6_mc_socklist {
83{
84 struct in6_addr addr; 81 struct in6_addr addr;
85 int ifindex; 82 int ifindex;
86 struct ipv6_mc_socklist *next; 83 struct ipv6_mc_socklist *next;
@@ -89,8 +86,7 @@ struct ipv6_mc_socklist
89 struct ip6_sf_socklist *sflist; 86 struct ip6_sf_socklist *sflist;
90}; 87};
91 88
92struct ip6_sf_list 89struct ip6_sf_list {
93{
94 struct ip6_sf_list *sf_next; 90 struct ip6_sf_list *sf_next;
95 struct in6_addr sf_addr; 91 struct in6_addr sf_addr;
96 unsigned long sf_count[2]; /* include/exclude counts */ 92 unsigned long sf_count[2]; /* include/exclude counts */
@@ -105,8 +101,7 @@ struct ip6_sf_list
105#define MAF_NOREPORT 0x08 101#define MAF_NOREPORT 0x08
106#define MAF_GSQUERY 0x10 102#define MAF_GSQUERY 0x10
107 103
108struct ifmcaddr6 104struct ifmcaddr6 {
109{
110 struct in6_addr mca_addr; 105 struct in6_addr mca_addr;
111 struct inet6_dev *idev; 106 struct inet6_dev *idev;
112 struct ifmcaddr6 *next; 107 struct ifmcaddr6 *next;
@@ -126,15 +121,13 @@ struct ifmcaddr6
126 121
127/* Anycast stuff */ 122/* Anycast stuff */
128 123
129struct ipv6_ac_socklist 124struct ipv6_ac_socklist {
130{
131 struct in6_addr acl_addr; 125 struct in6_addr acl_addr;
132 int acl_ifindex; 126 int acl_ifindex;
133 struct ipv6_ac_socklist *acl_next; 127 struct ipv6_ac_socklist *acl_next;
134}; 128};
135 129
136struct ifacaddr6 130struct ifacaddr6 {
137{
138 struct in6_addr aca_addr; 131 struct in6_addr aca_addr;
139 struct inet6_dev *aca_idev; 132 struct inet6_dev *aca_idev;
140 struct rt6_info *aca_rt; 133 struct rt6_info *aca_rt;
@@ -157,8 +150,7 @@ struct ipv6_devstat {
157 DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg); 150 DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg);
158}; 151};
159 152
160struct inet6_dev 153struct inet6_dev {
161{
162 struct net_device *dev; 154 struct net_device *dev;
163 155
164 struct inet6_ifaddr *addr_list; 156 struct inet6_ifaddr *addr_list;
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 22c73a77cd99..92838d3a1ab7 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -46,8 +46,8 @@ static inline int inet6_sk_ehashfn(const struct sock *sk)
46 const struct ipv6_pinfo *np = inet6_sk(sk); 46 const struct ipv6_pinfo *np = inet6_sk(sk);
47 const struct in6_addr *laddr = &np->rcv_saddr; 47 const struct in6_addr *laddr = &np->rcv_saddr;
48 const struct in6_addr *faddr = &np->daddr; 48 const struct in6_addr *faddr = &np->daddr;
49 const __u16 lport = inet->num; 49 const __u16 lport = inet->inet_num;
50 const __be16 fport = inet->dport; 50 const __be16 fport = inet->inet_dport;
51 struct net *net = sock_net(sk); 51 struct net *net = sock_net(sk);
52 52
53 return inet6_ehashfn(net, laddr, lport, faddr, fport); 53 return inet6_ehashfn(net, laddr, lport, faddr, fport);
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index d522dcf3031a..41cbddd25b70 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -92,8 +92,8 @@ static inline struct net *ib_net(struct inet_bind_bucket *ib)
92 return read_pnet(&ib->ib_net); 92 return read_pnet(&ib->ib_net);
93} 93}
94 94
95#define inet_bind_bucket_for_each(tb, node, head) \ 95#define inet_bind_bucket_for_each(tb, pos, head) \
96 hlist_for_each_entry(tb, node, head, node) 96 hlist_for_each_entry(tb, pos, head, node)
97 97
98struct inet_bind_hashbucket { 98struct inet_bind_hashbucket {
99 spinlock_t lock; 99 spinlock_t lock;
@@ -125,7 +125,7 @@ struct inet_hashinfo {
125 */ 125 */
126 struct inet_ehash_bucket *ehash; 126 struct inet_ehash_bucket *ehash;
127 spinlock_t *ehash_locks; 127 spinlock_t *ehash_locks;
128 unsigned int ehash_size; 128 unsigned int ehash_mask;
129 unsigned int ehash_locks_mask; 129 unsigned int ehash_locks_mask;
130 130
131 /* Ok, let's try this, I give up, we do need a local binding 131 /* Ok, let's try this, I give up, we do need a local binding
@@ -158,7 +158,7 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket(
158 struct inet_hashinfo *hashinfo, 158 struct inet_hashinfo *hashinfo,
159 unsigned int hash) 159 unsigned int hash)
160{ 160{
161 return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; 161 return &hashinfo->ehash[hash & hashinfo->ehash_mask];
162} 162}
163 163
164static inline spinlock_t *inet_ehash_lockp( 164static inline spinlock_t *inet_ehash_lockp(
@@ -241,7 +241,7 @@ static inline int inet_lhashfn(struct net *net, const unsigned short num)
241 241
242static inline int inet_sk_listen_hashfn(const struct sock *sk) 242static inline int inet_sk_listen_hashfn(const struct sock *sk)
243{ 243{
244 return inet_lhashfn(sock_net(sk), inet_sk(sk)->num); 244 return inet_lhashfn(sock_net(sk), inet_sk(sk)->inet_num);
245} 245}
246 246
247/* Caller must disable local BH processing. */ 247/* Caller must disable local BH processing. */
@@ -301,8 +301,8 @@ typedef __u64 __bitwise __addrpair;
301#endif /* __BIG_ENDIAN */ 301#endif /* __BIG_ENDIAN */
302#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 302#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
303 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \ 303 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
304 ((*((__addrpair *)&(inet_sk(__sk)->daddr))) == (__cookie)) && \ 304 ((*((__addrpair *)&(inet_sk(__sk)->inet_daddr))) == (__cookie)) && \
305 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 305 ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
306 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 306 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
307#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\ 307#define INET_TW_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
308 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \ 308 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
@@ -313,9 +313,9 @@ typedef __u64 __bitwise __addrpair;
313#define INET_ADDR_COOKIE(__name, __saddr, __daddr) 313#define INET_ADDR_COOKIE(__name, __saddr, __daddr)
314#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \ 314#define INET_MATCH(__sk, __net, __hash, __cookie, __saddr, __daddr, __ports, __dif) \
315 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \ 315 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
316 (inet_sk(__sk)->daddr == (__saddr)) && \ 316 (inet_sk(__sk)->inet_daddr == (__saddr)) && \
317 (inet_sk(__sk)->rcv_saddr == (__daddr)) && \ 317 (inet_sk(__sk)->inet_rcv_saddr == (__daddr)) && \
318 ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ 318 ((*((__portpair *)&(inet_sk(__sk)->inet_dport))) == (__ports)) && \
319 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) 319 (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
320#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \ 320#define INET_TW_MATCH(__sk, __net, __hash,__cookie, __saddr, __daddr, __ports, __dif) \
321 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \ 321 (((__sk)->sk_hash == (__hash)) && net_eq(sock_net(__sk), (__net)) && \
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 47004f35cc7e..bd4c53f75ac0 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -93,14 +93,14 @@ struct rtable;
93 * 93 *
94 * @sk - ancestor class 94 * @sk - ancestor class
95 * @pinet6 - pointer to IPv6 control block 95 * @pinet6 - pointer to IPv6 control block
96 * @daddr - Foreign IPv4 addr 96 * @inet_daddr - Foreign IPv4 addr
97 * @rcv_saddr - Bound local IPv4 addr 97 * @inet_rcv_saddr - Bound local IPv4 addr
98 * @dport - Destination port 98 * @inet_dport - Destination port
99 * @num - Local port 99 * @inet_num - Local port
100 * @saddr - Sending source 100 * @inet_saddr - Sending source
101 * @uc_ttl - Unicast TTL 101 * @uc_ttl - Unicast TTL
102 * @sport - Source port 102 * @inet_sport - Source port
103 * @id - ID counter for DF pkts 103 * @inet_id - ID counter for DF pkts
104 * @tos - TOS 104 * @tos - TOS
105 * @mc_ttl - Multicasting TTL 105 * @mc_ttl - Multicasting TTL
106 * @is_icsk - is this an inet_connection_sock? 106 * @is_icsk - is this an inet_connection_sock?
@@ -115,16 +115,16 @@ struct inet_sock {
115 struct ipv6_pinfo *pinet6; 115 struct ipv6_pinfo *pinet6;
116#endif 116#endif
117 /* Socket demultiplex comparisons on incoming packets. */ 117 /* Socket demultiplex comparisons on incoming packets. */
118 __be32 daddr; 118 __be32 inet_daddr;
119 __be32 rcv_saddr; 119 __be32 inet_rcv_saddr;
120 __be16 dport; 120 __be16 inet_dport;
121 __u16 num; 121 __u16 inet_num;
122 __be32 saddr; 122 __be32 inet_saddr;
123 __s16 uc_ttl; 123 __s16 uc_ttl;
124 __u16 cmsg_flags; 124 __u16 cmsg_flags;
125 struct ip_options *opt; 125 struct ip_options *opt;
126 __be16 sport; 126 __be16 inet_sport;
127 __u16 id; 127 __u16 inet_id;
128 __u8 tos; 128 __u8 tos;
129 __u8 mc_ttl; 129 __u8 mc_ttl;
130 __u8 pmtudisc; 130 __u8 pmtudisc;
@@ -190,10 +190,10 @@ static inline unsigned int inet_ehashfn(struct net *net,
190static inline int inet_sk_ehashfn(const struct sock *sk) 190static inline int inet_sk_ehashfn(const struct sock *sk)
191{ 191{
192 const struct inet_sock *inet = inet_sk(sk); 192 const struct inet_sock *inet = inet_sk(sk);
193 const __be32 laddr = inet->rcv_saddr; 193 const __be32 laddr = inet->inet_rcv_saddr;
194 const __u16 lport = inet->num; 194 const __u16 lport = inet->inet_num;
195 const __be32 faddr = inet->daddr; 195 const __be32 faddr = inet->inet_daddr;
196 const __be16 fport = inet->dport; 196 const __be16 fport = inet->inet_dport;
197 struct net *net = sock_net(sk); 197 struct net *net = sock_net(sk);
198 198
199 return inet_ehashfn(net, laddr, lport, faddr, fport); 199 return inet_ehashfn(net, laddr, lport, faddr, fport);
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index f93ad90a601b..773b10fa38e4 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -194,7 +194,7 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk)
194static inline __be32 inet_rcv_saddr(const struct sock *sk) 194static inline __be32 inet_rcv_saddr(const struct sock *sk)
195{ 195{
196 return likely(sk->sk_state != TCP_TIME_WAIT) ? 196 return likely(sk->sk_state != TCP_TIME_WAIT) ?
197 inet_sk(sk)->rcv_saddr : inet_twsk(sk)->tw_rcv_saddr; 197 inet_sk(sk)->inet_rcv_saddr : inet_twsk(sk)->tw_rcv_saddr;
198} 198}
199 199
200extern void inet_twsk_put(struct inet_timewait_sock *tw); 200extern void inet_twsk_put(struct inet_timewait_sock *tw);
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index 15e1f8fe4c1f..87b1df0d4d8c 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -13,20 +13,19 @@
13#include <linux/spinlock.h> 13#include <linux/spinlock.h>
14#include <asm/atomic.h> 14#include <asm/atomic.h>
15 15
16struct inet_peer 16struct inet_peer {
17{
18 /* group together avl_left,avl_right,v4daddr to speedup lookups */ 17 /* group together avl_left,avl_right,v4daddr to speedup lookups */
19 struct inet_peer *avl_left, *avl_right; 18 struct inet_peer *avl_left, *avl_right;
20 __be32 v4daddr; /* peer's address */ 19 __be32 v4daddr; /* peer's address */
21 __u16 avl_height; 20 __u32 avl_height;
22 __u16 ip_id_count; /* IP ID for the next packet */
23 struct list_head unused; 21 struct list_head unused;
24 __u32 dtime; /* the time of last use of not 22 __u32 dtime; /* the time of last use of not
25 * referenced entries */ 23 * referenced entries */
26 atomic_t refcnt; 24 atomic_t refcnt;
27 atomic_t rid; /* Frag reception counter */ 25 atomic_t rid; /* Frag reception counter */
26 atomic_t ip_id_count; /* IP ID for the next packet */
28 __u32 tcp_ts; 27 __u32 tcp_ts;
29 unsigned long tcp_ts_stamp; 28 __u32 tcp_ts_stamp;
30}; 29};
31 30
32void inet_initpeers(void) __init; 31void inet_initpeers(void) __init;
@@ -37,17 +36,11 @@ struct inet_peer *inet_getpeer(__be32 daddr, int create);
37/* can be called from BH context or outside */ 36/* can be called from BH context or outside */
38extern void inet_putpeer(struct inet_peer *p); 37extern void inet_putpeer(struct inet_peer *p);
39 38
40extern spinlock_t inet_peer_idlock;
41/* can be called with or without local BH being disabled */ 39/* can be called with or without local BH being disabled */
42static inline __u16 inet_getid(struct inet_peer *p, int more) 40static inline __u16 inet_getid(struct inet_peer *p, int more)
43{ 41{
44 __u16 id; 42 more++;
45 43 return atomic_add_return(more, &p->ip_id_count) - more;
46 spin_lock_bh(&inet_peer_idlock);
47 id = p->ip_id_count;
48 p->ip_id_count += 1 + more;
49 spin_unlock_bh(&inet_peer_idlock);
50 return id;
51} 44}
52 45
53#endif /* _NET_INETPEER_H */ 46#endif /* _NET_INETPEER_H */
diff --git a/include/net/ip.h b/include/net/ip.h
index 2f47e5482b55..e6b9d12d5f62 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -33,8 +33,7 @@
33 33
34struct sock; 34struct sock;
35 35
36struct inet_skb_parm 36struct inet_skb_parm {
37{
38 struct ip_options opt; /* Compiled IP options */ 37 struct ip_options opt; /* Compiled IP options */
39 unsigned char flags; 38 unsigned char flags;
40 39
@@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
50 return ip_hdr(skb)->ihl * 4; 49 return ip_hdr(skb)->ihl * 4;
51} 50}
52 51
53struct ipcm_cookie 52struct ipcm_cookie {
54{
55 __be32 addr; 53 __be32 addr;
56 int oif; 54 int oif;
57 struct ip_options *opt; 55 struct ip_options *opt;
@@ -60,8 +58,7 @@ struct ipcm_cookie
60 58
61#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) 59#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb))
62 60
63struct ip_ra_chain 61struct ip_ra_chain {
64{
65 struct ip_ra_chain *next; 62 struct ip_ra_chain *next;
66 struct sock *sk; 63 struct sock *sk;
67 void (*destructor)(struct sock *); 64 void (*destructor)(struct sock *);
@@ -159,8 +156,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
159void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, 156void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
160 unsigned int len); 157 unsigned int len);
161 158
162struct ipv4_config 159struct ipv4_config {
163{
164 int log_martians; 160 int log_martians;
165 int no_pmtu_disc; 161 int no_pmtu_disc;
166}; 162};
@@ -240,8 +236,8 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
240 * does not change, they drop every other packet in 236 * does not change, they drop every other packet in
241 * a TCP stream using header compression. 237 * a TCP stream using header compression.
242 */ 238 */
243 iph->id = (sk && inet_sk(sk)->daddr) ? 239 iph->id = (sk && inet_sk(sk)->inet_daddr) ?
244 htons(inet_sk(sk)->id++) : 0; 240 htons(inet_sk(sk)->inet_id++) : 0;
245 } else 241 } else
246 __ip_select_ident(iph, dst, 0); 242 __ip_select_ident(iph, dst, 0);
247} 243}
@@ -249,9 +245,9 @@ static inline void ip_select_ident(struct iphdr *iph, struct dst_entry *dst, str
249static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more) 245static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more)
250{ 246{
251 if (iph->frag_off & htons(IP_DF)) { 247 if (iph->frag_off & htons(IP_DF)) {
252 if (sk && inet_sk(sk)->daddr) { 248 if (sk && inet_sk(sk)->inet_daddr) {
253 iph->id = htons(inet_sk(sk)->id); 249 iph->id = htons(inet_sk(sk)->inet_id);
254 inet_sk(sk)->id += 1 + more; 250 inet_sk(sk)->inet_id += 1 + more;
255 } else 251 } else
256 iph->id = 0; 252 iph->id = 0;
257 } else 253 } else
@@ -317,7 +313,7 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch
317 313
318static __inline__ void inet_reset_saddr(struct sock *sk) 314static __inline__ void inet_reset_saddr(struct sock *sk)
319{ 315{
320 inet_sk(sk)->rcv_saddr = inet_sk(sk)->saddr = 0; 316 inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0;
321#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 317#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
322 if (sk->sk_family == PF_INET6) { 318 if (sk->sk_family == PF_INET6) {
323 struct ipv6_pinfo *np = inet6_sk(sk); 319 struct ipv6_pinfo *np = inet6_sk(sk);
@@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb);
336 * Functions provided by ip_fragment.c 332 * Functions provided by ip_fragment.c
337 */ 333 */
338 334
339enum ip_defrag_users 335enum ip_defrag_users {
340{
341 IP_DEFRAG_LOCAL_DELIVER, 336 IP_DEFRAG_LOCAL_DELIVER,
342 IP_DEFRAG_CALL_RA_CHAIN, 337 IP_DEFRAG_CALL_RA_CHAIN,
343 IP_DEFRAG_CONNTRACK_IN, 338 IP_DEFRAG_CONNTRACK_IN,
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 15b492a9aa79..257808188add 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -30,8 +30,7 @@
30 30
31struct rt6_info; 31struct rt6_info;
32 32
33struct fib6_config 33struct fib6_config {
34{
35 u32 fc_table; 34 u32 fc_table;
36 u32 fc_metric; 35 u32 fc_metric;
37 int fc_dst_len; 36 int fc_dst_len;
@@ -51,8 +50,7 @@ struct fib6_config
51 struct nl_info fc_nlinfo; 50 struct nl_info fc_nlinfo;
52}; 51};
53 52
54struct fib6_node 53struct fib6_node {
55{
56 struct fib6_node *parent; 54 struct fib6_node *parent;
57 struct fib6_node *left; 55 struct fib6_node *left;
58 struct fib6_node *right; 56 struct fib6_node *right;
@@ -78,16 +76,14 @@ struct fib6_node
78 * 76 *
79 */ 77 */
80 78
81struct rt6key 79struct rt6key {
82{
83 struct in6_addr addr; 80 struct in6_addr addr;
84 int plen; 81 int plen;
85}; 82};
86 83
87struct fib6_table; 84struct fib6_table;
88 85
89struct rt6_info 86struct rt6_info {
90{
91 union { 87 union {
92 struct dst_entry dst; 88 struct dst_entry dst;
93 } u; 89 } u;
@@ -127,8 +123,7 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
127 return ((struct rt6_info *)dst)->rt6i_idev; 123 return ((struct rt6_info *)dst)->rt6i_idev;
128} 124}
129 125
130struct fib6_walker_t 126struct fib6_walker_t {
131{
132 struct fib6_walker_t *prev, *next; 127 struct fib6_walker_t *prev, *next;
133 struct fib6_node *root, *node; 128 struct fib6_node *root, *node;
134 struct rt6_info *leaf; 129 struct rt6_info *leaf;
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 0e1b8aebaff8..4a808de7c0f6 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -103,8 +103,7 @@ extern void rt6_pmtu_discovery(struct in6_addr *daddr,
103 103
104struct netlink_callback; 104struct netlink_callback;
105 105
106struct rt6_rtnl_dump_arg 106struct rt6_rtnl_dump_arg {
107{
108 struct sk_buff *skb; 107 struct sk_buff *skb;
109 struct netlink_callback *cb; 108 struct netlink_callback *cb;
110 struct net *net; 109 struct net *net;
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 4d22fabc7719..c93f94edc610 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -144,18 +144,21 @@ struct fib_table {
144 struct hlist_node tb_hlist; 144 struct hlist_node tb_hlist;
145 u32 tb_id; 145 u32 tb_id;
146 int tb_default; 146 int tb_default;
147 int (*tb_lookup)(struct fib_table *tb, const struct flowi *flp, struct fib_result *res);
148 int (*tb_insert)(struct fib_table *, struct fib_config *);
149 int (*tb_delete)(struct fib_table *, struct fib_config *);
150 int (*tb_dump)(struct fib_table *table, struct sk_buff *skb,
151 struct netlink_callback *cb);
152 int (*tb_flush)(struct fib_table *table);
153 void (*tb_select_default)(struct fib_table *table,
154 const struct flowi *flp, struct fib_result *res);
155
156 unsigned char tb_data[0]; 147 unsigned char tb_data[0];
157}; 148};
158 149
150extern int fib_table_lookup(struct fib_table *tb, const struct flowi *flp,
151 struct fib_result *res);
152extern int fib_table_insert(struct fib_table *, struct fib_config *);
153extern int fib_table_delete(struct fib_table *, struct fib_config *);
154extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb,
155 struct netlink_callback *cb);
156extern int fib_table_flush(struct fib_table *table);
157extern void fib_table_select_default(struct fib_table *table,
158 const struct flowi *flp,
159 struct fib_result *res);
160
161
159#ifndef CONFIG_IP_MULTIPLE_TABLES 162#ifndef CONFIG_IP_MULTIPLE_TABLES
160 163
161#define TABLE_LOCAL_INDEX 0 164#define TABLE_LOCAL_INDEX 0
@@ -182,11 +185,11 @@ static inline int fib_lookup(struct net *net, const struct flowi *flp,
182 struct fib_table *table; 185 struct fib_table *table;
183 186
184 table = fib_get_table(net, RT_TABLE_LOCAL); 187 table = fib_get_table(net, RT_TABLE_LOCAL);
185 if (!table->tb_lookup(table, flp, res)) 188 if (!fib_table_lookup(table, flp, res))
186 return 0; 189 return 0;
187 190
188 table = fib_get_table(net, RT_TABLE_MAIN); 191 table = fib_get_table(net, RT_TABLE_MAIN);
189 if (!table->tb_lookup(table, flp, res)) 192 if (!fib_table_lookup(table, flp, res))
190 return 0; 193 return 0;
191 return -ENETUNREACH; 194 return -ENETUNREACH;
192} 195}
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 98978e73f666..8dc3296b7bea 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -251,8 +251,7 @@ struct ip_vs_estimator {
251 u32 outbps; 251 u32 outbps;
252}; 252};
253 253
254struct ip_vs_stats 254struct ip_vs_stats {
255{
256 struct ip_vs_stats_user ustats; /* statistics */ 255 struct ip_vs_stats_user ustats; /* statistics */
257 struct ip_vs_estimator est; /* estimator */ 256 struct ip_vs_estimator est; /* estimator */
258 257
@@ -518,8 +517,7 @@ struct ip_vs_scheduler {
518/* 517/*
519 * The application module object (a.k.a. app incarnation) 518 * The application module object (a.k.a. app incarnation)
520 */ 519 */
521struct ip_vs_app 520struct ip_vs_app {
522{
523 struct list_head a_list; /* member in app list */ 521 struct list_head a_list; /* member in app list */
524 int type; /* IP_VS_APP_TYPE_xxx */ 522 int type; /* IP_VS_APP_TYPE_xxx */
525 char *name; /* application module name */ 523 char *name; /* application module name */
diff --git a/include/net/ipip.h b/include/net/ipip.h
index 87acf8f3a155..11e8513d2d07 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -7,8 +7,15 @@
7/* Keep error state on tunnel for 30 sec */ 7/* Keep error state on tunnel for 30 sec */
8#define IPTUNNEL_ERR_TIMEO (30*HZ) 8#define IPTUNNEL_ERR_TIMEO (30*HZ)
9 9
10struct ip_tunnel 10/* 6rd prefix/relay information */
11{ 11struct ip_tunnel_6rd_parm {
12 struct in6_addr prefix;
13 __be32 relay_prefix;
14 u16 prefixlen;
15 u16 relay_prefixlen;
16};
17
18struct ip_tunnel {
12 struct ip_tunnel *next; 19 struct ip_tunnel *next;
13 struct net_device *dev; 20 struct net_device *dev;
14 21
@@ -23,15 +30,19 @@ struct ip_tunnel
23 30
24 struct ip_tunnel_parm parms; 31 struct ip_tunnel_parm parms;
25 32
33 /* for SIT */
34#ifdef CONFIG_IPV6_SIT_6RD
35 struct ip_tunnel_6rd_parm ip6rd;
36#endif
26 struct ip_tunnel_prl_entry *prl; /* potential router list */ 37 struct ip_tunnel_prl_entry *prl; /* potential router list */
27 unsigned int prl_count; /* # of entries in PRL */ 38 unsigned int prl_count; /* # of entries in PRL */
28}; 39};
29 40
30struct ip_tunnel_prl_entry 41struct ip_tunnel_prl_entry {
31{
32 struct ip_tunnel_prl_entry *next; 42 struct ip_tunnel_prl_entry *next;
33 __be32 addr; 43 __be32 addr;
34 u16 flags; 44 u16 flags;
45 struct rcu_head rcu_head;
35}; 46};
36 47
37#define IPTUNNEL_XMIT() do { \ 48#define IPTUNNEL_XMIT() do { \
@@ -42,9 +53,9 @@ struct ip_tunnel_prl_entry
42 ip_select_ident(iph, &rt->u.dst, NULL); \ 53 ip_select_ident(iph, &rt->u.dst, NULL); \
43 \ 54 \
44 err = ip_local_out(skb); \ 55 err = ip_local_out(skb); \
45 if (net_xmit_eval(err) == 0) { \ 56 if (likely(net_xmit_eval(err) == 0)) { \
46 stats->tx_bytes += pkt_len; \ 57 txq->tx_bytes += pkt_len; \
47 stats->tx_packets++; \ 58 txq->tx_packets++; \
48 } else { \ 59 } else { \
49 stats->tx_errors++; \ 60 stats->tx_errors++; \
50 stats->tx_aborted_errors++; \ 61 stats->tx_aborted_errors++; \
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 8c31d8a0c1fe..92db8617d188 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -160,8 +160,7 @@ extern struct ctl_path net_ipv6_ctl_path[];
160#define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \ 160#define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \
161 _DEVINC(net, icmpv6msg, _BH, idev, field) 161 _DEVINC(net, icmpv6msg, _BH, idev, field)
162 162
163struct ip6_ra_chain 163struct ip6_ra_chain {
164{
165 struct ip6_ra_chain *next; 164 struct ip6_ra_chain *next;
166 struct sock *sk; 165 struct sock *sk;
167 int sel; 166 int sel;
@@ -176,8 +175,7 @@ extern rwlock_t ip6_ra_lock;
176 ancillary data and passed to IPv6. 175 ancillary data and passed to IPv6.
177 */ 176 */
178 177
179struct ipv6_txoptions 178struct ipv6_txoptions {
180{
181 /* Length of this structure */ 179 /* Length of this structure */
182 int tot_len; 180 int tot_len;
183 181
@@ -194,8 +192,7 @@ struct ipv6_txoptions
194 /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ 192 /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */
195}; 193};
196 194
197struct ip6_flowlabel 195struct ip6_flowlabel {
198{
199 struct ip6_flowlabel *next; 196 struct ip6_flowlabel *next;
200 __be32 label; 197 __be32 label;
201 atomic_t users; 198 atomic_t users;
@@ -212,8 +209,7 @@ struct ip6_flowlabel
212#define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF) 209#define IPV6_FLOWINFO_MASK cpu_to_be32(0x0FFFFFFF)
213#define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF) 210#define IPV6_FLOWLABEL_MASK cpu_to_be32(0x000FFFFF)
214 211
215struct ipv6_fl_socklist 212struct ipv6_fl_socklist {
216{
217 struct ipv6_fl_socklist *next; 213 struct ipv6_fl_socklist *next;
218 struct ip6_flowlabel *fl; 214 struct ip6_flowlabel *fl;
219}; 215};
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index e9054a283fde..b2b98f3fa265 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -300,8 +300,7 @@
300 * This struct is also my long term insurance. I can add new fields here 300 * This struct is also my long term insurance. I can add new fields here
301 * without breaking the prototype of iw_handler... 301 * without breaking the prototype of iw_handler...
302 */ 302 */
303struct iw_request_info 303struct iw_request_info {
304{
305 __u16 cmd; /* Wireless Extension command */ 304 __u16 cmd; /* Wireless Extension command */
306 __u16 flags; /* More to come ;-) */ 305 __u16 flags; /* More to come ;-) */
307}; 306};
@@ -321,20 +320,20 @@ typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info,
321 * shared by all driver instances... Same for the members... 320 * shared by all driver instances... Same for the members...
322 * This will be linked from net_device in <linux/netdevice.h> 321 * This will be linked from net_device in <linux/netdevice.h>
323 */ 322 */
324struct iw_handler_def 323struct iw_handler_def {
325{
326 /* Number of handlers defined (more precisely, index of the
327 * last defined handler + 1) */
328 __u16 num_standard;
329 __u16 num_private;
330 /* Number of private arg description */
331 __u16 num_private_args;
332 324
333 /* Array of handlers for standard ioctls 325 /* Array of handlers for standard ioctls
334 * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWCOMMIT] 326 * We will call dev->wireless_handlers->standard[ioctl - SIOCSIWCOMMIT]
335 */ 327 */
336 const iw_handler * standard; 328 const iw_handler * standard;
329 /* Number of handlers defined (more precisely, index of the
330 * last defined handler + 1) */
331 __u16 num_standard;
337 332
333#ifdef CONFIG_WEXT_PRIV
334 __u16 num_private;
335 /* Number of private arg description */
336 __u16 num_private_args;
338 /* Array of handlers for private ioctls 337 /* Array of handlers for private ioctls
339 * Will call dev->wireless_handlers->private[ioctl - SIOCIWFIRSTPRIV] 338 * Will call dev->wireless_handlers->private[ioctl - SIOCIWFIRSTPRIV]
340 */ 339 */
@@ -344,6 +343,7 @@ struct iw_handler_def
344 * can put it in any order you want and should not leave holes... 343 * can put it in any order you want and should not leave holes...
345 * We will automatically export that to user space... */ 344 * We will automatically export that to user space... */
346 const struct iw_priv_args * private_args; 345 const struct iw_priv_args * private_args;
346#endif
347 347
348 /* New location of get_wireless_stats, to de-bloat struct net_device. 348 /* New location of get_wireless_stats, to de-bloat struct net_device.
349 * The old pointer in struct net_device will be gradually phased 349 * The old pointer in struct net_device will be gradually phased
@@ -370,8 +370,7 @@ struct iw_handler_def
370/* 370/*
371 * Describe how a standard IOCTL looks like. 371 * Describe how a standard IOCTL looks like.
372 */ 372 */
373struct iw_ioctl_description 373struct iw_ioctl_description {
374{
375 __u8 header_type; /* NULL, iw_point or other */ 374 __u8 header_type; /* NULL, iw_point or other */
376 __u8 token_type; /* Future */ 375 __u8 token_type; /* Future */
377 __u16 token_size; /* Granularity of payload */ 376 __u16 token_size; /* Granularity of payload */
@@ -393,8 +392,7 @@ struct iw_ioctl_description
393/* 392/*
394 * Instance specific spy data, i.e. addresses spied and quality for them. 393 * Instance specific spy data, i.e. addresses spied and quality for them.
395 */ 394 */
396struct iw_spy_data 395struct iw_spy_data {
397{
398 /* --- Standard spy support --- */ 396 /* --- Standard spy support --- */
399 int spy_number; 397 int spy_number;
400 u_char spy_address[IW_MAX_SPY][ETH_ALEN]; 398 u_char spy_address[IW_MAX_SPY][ETH_ALEN];
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c75b960c8ac8..3754ea405c88 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -219,7 +219,7 @@ struct ieee80211_bss_conf {
219 * 219 *
220 * These flags are used with the @flags member of &ieee80211_tx_info. 220 * These flags are used with the @flags member of &ieee80211_tx_info.
221 * 221 *
222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. 222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence 223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
224 * number to this frame, taking care of not overwriting the fragment 224 * number to this frame, taking care of not overwriting the fragment
225 * number and increasing the sequence number only when the 225 * number and increasing the sequence number only when the
@@ -390,10 +390,12 @@ struct ieee80211_tx_rate {
390 * @control: union for control data 390 * @control: union for control data
391 * @status: union for status data 391 * @status: union for status data
392 * @driver_data: array of driver_data pointers 392 * @driver_data: array of driver_data pointers
393 * @ampdu_ack_len: number of aggregated frames. 393 * @ampdu_ack_len: number of acked aggregated frames.
394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
395 * @ampdu_ack_map: block ack bit map for the aggregation. 395 * @ampdu_ack_map: block ack bit map for the aggregation.
396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ampdu_len: number of aggregated frames.
398 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ack_signal: signal strength of the ACK frame 399 * @ack_signal: signal strength of the ACK frame
398 */ 400 */
399struct ieee80211_tx_info { 401struct ieee80211_tx_info {
@@ -428,7 +430,8 @@ struct ieee80211_tx_info {
428 u8 ampdu_ack_len; 430 u8 ampdu_ack_len;
429 u64 ampdu_ack_map; 431 u64 ampdu_ack_map;
430 int ack_signal; 432 int ack_signal;
431 /* 8 bytes free */ 433 u8 ampdu_len;
434 /* 7 bytes free */
432 } status; 435 } status;
433 struct { 436 struct {
434 struct ieee80211_tx_rate driver_rates[ 437 struct ieee80211_tx_rate driver_rates[
@@ -494,7 +497,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
494 * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame. 497 * @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame.
495 * Use together with %RX_FLAG_MMIC_STRIPPED. 498 * Use together with %RX_FLAG_MMIC_STRIPPED.
496 * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. 499 * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware.
497 * @RX_FLAG_RADIOTAP: This frame starts with a radiotap header.
498 * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, 500 * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame,
499 * verification has been done by the hardware. 501 * verification has been done by the hardware.
500 * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. 502 * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame.
@@ -515,7 +517,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
515enum mac80211_rx_flags { 517enum mac80211_rx_flags {
516 RX_FLAG_MMIC_ERROR = 1<<0, 518 RX_FLAG_MMIC_ERROR = 1<<0,
517 RX_FLAG_DECRYPTED = 1<<1, 519 RX_FLAG_DECRYPTED = 1<<1,
518 RX_FLAG_RADIOTAP = 1<<2,
519 RX_FLAG_MMIC_STRIPPED = 1<<3, 520 RX_FLAG_MMIC_STRIPPED = 1<<3,
520 RX_FLAG_IV_STRIPPED = 1<<4, 521 RX_FLAG_IV_STRIPPED = 1<<4,
521 RX_FLAG_FAILED_FCS_CRC = 1<<5, 522 RX_FLAG_FAILED_FCS_CRC = 1<<5,
@@ -554,7 +555,7 @@ struct ieee80211_rx_status {
554 int freq; 555 int freq;
555 int signal; 556 int signal;
556 int noise; 557 int noise;
557 int qual; 558 int __deprecated qual;
558 int antenna; 559 int antenna;
559 int rate_idx; 560 int rate_idx;
560 int flag; 561 int flag;
@@ -565,7 +566,9 @@ struct ieee80211_rx_status {
565 * 566 *
566 * Flags to define PHY configuration options 567 * Flags to define PHY configuration options
567 * 568 *
568 * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) 569 * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this
570 * to determine for example whether to calculate timestamps for packets
571 * or not, do not use instead of filter flags!
569 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) 572 * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only)
570 * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set 573 * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set
571 * the driver should be prepared to handle configuration requests but 574 * the driver should be prepared to handle configuration requests but
@@ -574,7 +577,7 @@ struct ieee80211_rx_status {
574 * it can also be unset in that case when monitor interfaces are active. 577 * it can also be unset in that case when monitor interfaces are active.
575 */ 578 */
576enum ieee80211_conf_flags { 579enum ieee80211_conf_flags {
577 IEEE80211_CONF_RADIOTAP = (1<<0), 580 IEEE80211_CONF_MONITOR = (1<<0),
578 IEEE80211_CONF_PS = (1<<1), 581 IEEE80211_CONF_PS = (1<<1),
579 IEEE80211_CONF_IDLE = (1<<2), 582 IEEE80211_CONF_IDLE = (1<<2),
580}; 583};
@@ -584,7 +587,7 @@ enum ieee80211_conf_flags {
584 * enum ieee80211_conf_changed - denotes which configuration changed 587 * enum ieee80211_conf_changed - denotes which configuration changed
585 * 588 *
586 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed 589 * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
587 * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed 590 * @IEEE80211_CONF_CHANGE_MONITOR: the monitor flag changed
588 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed 591 * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
589 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed 592 * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
590 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed 593 * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
@@ -593,7 +596,7 @@ enum ieee80211_conf_flags {
593 */ 596 */
594enum ieee80211_conf_changed { 597enum ieee80211_conf_changed {
595 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), 598 IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
596 IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), 599 IEEE80211_CONF_CHANGE_MONITOR = BIT(3),
597 IEEE80211_CONF_CHANGE_PS = BIT(4), 600 IEEE80211_CONF_CHANGE_PS = BIT(4),
598 IEEE80211_CONF_CHANGE_POWER = BIT(5), 601 IEEE80211_CONF_CHANGE_POWER = BIT(5),
599 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), 602 IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
@@ -852,6 +855,19 @@ enum ieee80211_tkip_key_type {
852 * any particular flags. There are some exceptions to this rule, 855 * any particular flags. There are some exceptions to this rule,
853 * however, so you are advised to review these flags carefully. 856 * however, so you are advised to review these flags carefully.
854 * 857 *
858 * @IEEE80211_HW_HAS_RATE_CONTROL:
859 * The hardware or firmware includes rate control, and cannot be
860 * controlled by the stack. As such, no rate control algorithm
861 * should be instantiated, and the TX rate reported to userspace
862 * will be taken from the TX status instead of the rate control
863 * algorithm.
864 * Note that this requires that the driver implement a number of
865 * callbacks so it has the correct information, it needs to have
866 * the @set_rts_threshold callback and must look at the BSS config
867 * @use_cts_prot for G/N protection, @use_short_slot for slot
868 * timing in 2.4 GHz and @use_short_preamble for preambles for
869 * CCK frames.
870 *
855 * @IEEE80211_HW_RX_INCLUDES_FCS: 871 * @IEEE80211_HW_RX_INCLUDES_FCS:
856 * Indicates that received frames passed to the stack include 872 * Indicates that received frames passed to the stack include
857 * the FCS at the end. 873 * the FCS at the end.
@@ -910,6 +926,7 @@ enum ieee80211_tkip_key_type {
910 * avoid waking up cpu. 926 * avoid waking up cpu.
911 */ 927 */
912enum ieee80211_hw_flags { 928enum ieee80211_hw_flags {
929 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
913 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 930 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
914 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, 931 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
915 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 932 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
@@ -1505,6 +1522,7 @@ struct ieee80211_ops {
1505 void (*reset_tsf)(struct ieee80211_hw *hw); 1522 void (*reset_tsf)(struct ieee80211_hw *hw);
1506 int (*tx_last_beacon)(struct ieee80211_hw *hw); 1523 int (*tx_last_beacon)(struct ieee80211_hw *hw);
1507 int (*ampdu_action)(struct ieee80211_hw *hw, 1524 int (*ampdu_action)(struct ieee80211_hw *hw,
1525 struct ieee80211_vif *vif,
1508 enum ieee80211_ampdu_mlme_action action, 1526 enum ieee80211_ampdu_mlme_action action,
1509 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1527 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1510 1528
@@ -1661,15 +1679,14 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
1661 * ieee80211_rx - receive frame 1679 * ieee80211_rx - receive frame
1662 * 1680 *
1663 * Use this function to hand received frames to mac80211. The receive 1681 * Use this function to hand received frames to mac80211. The receive
1664 * buffer in @skb must start with an IEEE 802.11 header or a radiotap 1682 * buffer in @skb must start with an IEEE 802.11 header.
1665 * header if %RX_FLAG_RADIOTAP is set in the @status flags.
1666 * 1683 *
1667 * This function may not be called in IRQ context. Calls to this function 1684 * This function may not be called in IRQ context. Calls to this function
1668 * for a single hardware must be synchronized against each other. Calls 1685 * for a single hardware must be synchronized against each other. Calls to
1669 * to this function and ieee80211_rx_irqsafe() may not be mixed for a 1686 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
1670 * single hardware. 1687 * mixed for a single hardware.
1671 * 1688 *
1672 * Note that right now, this function must be called with softirqs disabled. 1689 * In process context use instead ieee80211_rx_ni().
1673 * 1690 *
1674 * @hw: the hardware this frame came in on 1691 * @hw: the hardware this frame came in on
1675 * @skb: the buffer to receive, owned by mac80211 after this call 1692 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1682,8 +1699,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1682 * Like ieee80211_rx() but can be called in IRQ context 1699 * Like ieee80211_rx() but can be called in IRQ context
1683 * (internally defers to a tasklet.) 1700 * (internally defers to a tasklet.)
1684 * 1701 *
1685 * Calls to this function and ieee80211_rx() may not be mixed for a 1702 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
1686 * single hardware. 1703 * be mixed for a single hardware.
1687 * 1704 *
1688 * @hw: the hardware this frame came in on 1705 * @hw: the hardware this frame came in on
1689 * @skb: the buffer to receive, owned by mac80211 after this call 1706 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1691,6 +1708,26 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1691void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); 1708void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
1692 1709
1693/** 1710/**
1711 * ieee80211_rx_ni - receive frame (in process context)
1712 *
1713 * Like ieee80211_rx() but can be called in process context
1714 * (internally disables bottom halves).
1715 *
1716 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
1717 * not be mixed for a single hardware.
1718 *
1719 * @hw: the hardware this frame came in on
1720 * @skb: the buffer to receive, owned by mac80211 after this call
1721 */
1722static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
1723 struct sk_buff *skb)
1724{
1725 local_bh_disable();
1726 ieee80211_rx(hw, skb);
1727 local_bh_enable();
1728}
1729
1730/**
1694 * ieee80211_tx_status - transmit status callback 1731 * ieee80211_tx_status - transmit status callback
1695 * 1732 *
1696 * Call this function for all transmitted frames after they have been 1733 * Call this function for all transmitted frames after they have been
@@ -1724,19 +1761,45 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
1724 struct sk_buff *skb); 1761 struct sk_buff *skb);
1725 1762
1726/** 1763/**
1727 * ieee80211_beacon_get - beacon generation function 1764 * ieee80211_beacon_get_tim - beacon generation function
1728 * @hw: pointer obtained from ieee80211_alloc_hw(). 1765 * @hw: pointer obtained from ieee80211_alloc_hw().
1729 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1766 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1767 * @tim_offset: pointer to variable that will receive the TIM IE offset.
1768 * Set to 0 if invalid (in non-AP modes).
1769 * @tim_length: pointer to variable that will receive the TIM IE length,
1770 * (including the ID and length bytes!).
1771 * Set to 0 if invalid (in non-AP modes).
1772 *
1773 * If the driver implements beaconing modes, it must use this function to
1774 * obtain the beacon frame/template.
1730 * 1775 *
1731 * If the beacon frames are generated by the host system (i.e., not in 1776 * If the beacon frames are generated by the host system (i.e., not in
1732 * hardware/firmware), the low-level driver uses this function to receive 1777 * hardware/firmware), the driver uses this function to get each beacon
1733 * the next beacon frame from the 802.11 code. The low-level is responsible 1778 * frame from mac80211 -- it is responsible for calling this function
1734 * for calling this function before beacon data is needed (e.g., based on 1779 * before the beacon is needed (e.g. based on hardware interrupt).
1735 * hardware interrupt). Returned skb is used only once and low-level driver 1780 *
1736 * is responsible for freeing it. 1781 * If the beacon frames are generated by the device, then the driver
1782 * must use the returned beacon as the template and change the TIM IE
1783 * according to the current DTIM parameters/TIM bitmap.
1784 *
1785 * The driver is responsible for freeing the returned skb.
1737 */ 1786 */
1738struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 1787struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
1739 struct ieee80211_vif *vif); 1788 struct ieee80211_vif *vif,
1789 u16 *tim_offset, u16 *tim_length);
1790
1791/**
1792 * ieee80211_beacon_get - beacon generation function
1793 * @hw: pointer obtained from ieee80211_alloc_hw().
1794 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1795 *
1796 * See ieee80211_beacon_get_tim().
1797 */
1798static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1799 struct ieee80211_vif *vif)
1800{
1801 return ieee80211_beacon_get_tim(hw, vif, NULL, NULL);
1802}
1740 1803
1741/** 1804/**
1742 * ieee80211_rts_get - RTS frame generation function 1805 * ieee80211_rts_get - RTS frame generation function
@@ -1981,8 +2044,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1981 2044
1982/** 2045/**
1983 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 2046 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1984 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2047 * @sta: the station for which to start a BA session
1985 * @ra: receiver address of the BA session recipient
1986 * @tid: the TID to BA on. 2048 * @tid: the TID to BA on.
1987 * 2049 *
1988 * Return: success if addBA request was sent, failure otherwise 2050 * Return: success if addBA request was sent, failure otherwise
@@ -1991,22 +2053,22 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
1991 * the need to start aggregation on a certain RA/TID, the session level 2053 * the need to start aggregation on a certain RA/TID, the session level
1992 * will be managed by the mac80211. 2054 * will be managed by the mac80211.
1993 */ 2055 */
1994int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2056int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
1995 2057
1996/** 2058/**
1997 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. 2059 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate.
1998 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2060 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
1999 * @ra: receiver address of the BA session recipient. 2061 * @ra: receiver address of the BA session recipient.
2000 * @tid: the TID to BA on. 2062 * @tid: the TID to BA on.
2001 * 2063 *
2002 * This function must be called by low level driver once it has 2064 * This function must be called by low level driver once it has
2003 * finished with preparations for the BA session. 2065 * finished with preparations for the BA session.
2004 */ 2066 */
2005void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2067void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
2006 2068
2007/** 2069/**
2008 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. 2070 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
2009 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2071 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2010 * @ra: receiver address of the BA session recipient. 2072 * @ra: receiver address of the BA session recipient.
2011 * @tid: the TID to BA on. 2073 * @tid: the TID to BA on.
2012 * 2074 *
@@ -2014,13 +2076,12 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid);
2014 * finished with preparations for the BA session. 2076 * finished with preparations for the BA session.
2015 * This version of the function is IRQ-safe. 2077 * This version of the function is IRQ-safe.
2016 */ 2078 */
2017void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2079void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2018 u16 tid); 2080 u16 tid);
2019 2081
2020/** 2082/**
2021 * ieee80211_stop_tx_ba_session - Stop a Block Ack session. 2083 * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
2022 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2084 * @sta: the station whose BA session to stop
2023 * @ra: receiver address of the BA session recipient
2024 * @tid: the TID to stop BA. 2085 * @tid: the TID to stop BA.
2025 * @initiator: if indicates initiator DELBA frame will be sent. 2086 * @initiator: if indicates initiator DELBA frame will be sent.
2026 * 2087 *
@@ -2030,24 +2091,23 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
2030 * the need to stop aggregation on a certain RA/TID, the session level 2091 * the need to stop aggregation on a certain RA/TID, the session level
2031 * will be managed by the mac80211. 2092 * will be managed by the mac80211.
2032 */ 2093 */
2033int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, 2094int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
2034 u8 *ra, u16 tid,
2035 enum ieee80211_back_parties initiator); 2095 enum ieee80211_back_parties initiator);
2036 2096
2037/** 2097/**
2038 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. 2098 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate.
2039 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2099 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2040 * @ra: receiver address of the BA session recipient. 2100 * @ra: receiver address of the BA session recipient.
2041 * @tid: the desired TID to BA on. 2101 * @tid: the desired TID to BA on.
2042 * 2102 *
2043 * This function must be called by low level driver once it has 2103 * This function must be called by low level driver once it has
2044 * finished with preparations for the BA session tear down. 2104 * finished with preparations for the BA session tear down.
2045 */ 2105 */
2046void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); 2106void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
2047 2107
2048/** 2108/**
2049 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. 2109 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
2050 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2110 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2051 * @ra: receiver address of the BA session recipient. 2111 * @ra: receiver address of the BA session recipient.
2052 * @tid: the desired TID to BA on. 2112 * @tid: the desired TID to BA on.
2053 * 2113 *
@@ -2055,22 +2115,75 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
2055 * finished with preparations for the BA session tear down. 2115 * finished with preparations for the BA session tear down.
2056 * This version of the function is IRQ-safe. 2116 * This version of the function is IRQ-safe.
2057 */ 2117 */
2058void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2118void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2059 u16 tid); 2119 u16 tid);
2060 2120
2061/** 2121/**
2062 * ieee80211_find_sta - find a station 2122 * ieee80211_find_sta - find a station
2063 * 2123 *
2064 * @hw: pointer as obtained from ieee80211_alloc_hw() 2124 * @vif: virtual interface to look for station on
2065 * @addr: station's address 2125 * @addr: station's address
2066 * 2126 *
2067 * This function must be called under RCU lock and the 2127 * This function must be called under RCU lock and the
2068 * resulting pointer is only valid under RCU lock as well. 2128 * resulting pointer is only valid under RCU lock as well.
2069 */ 2129 */
2070struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, 2130struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
2071 const u8 *addr); 2131 const u8 *addr);
2072 2132
2073/** 2133/**
2134 * ieee80211_find_sta_by_hw - find a station on hardware
2135 *
2136 * @hw: pointer as obtained from ieee80211_alloc_hw()
2137 * @addr: station's address
2138 *
2139 * This function must be called under RCU lock and the
2140 * resulting pointer is only valid under RCU lock as well.
2141 *
2142 * NOTE: This function should not be used! When mac80211 is converted
2143 * internally to properly keep track of stations on multiple
2144 * virtual interfaces, it will not always know which station to
2145 * return here since a single address might be used by multiple
2146 * logical stations (e.g. consider a station connecting to another
2147 * BSSID on the same AP hardware without disconnecting first).
2148 *
2149 * DO NOT USE THIS FUNCTION.
2150 */
2151struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw,
2152 const u8 *addr);
2153
2154/**
2155 * ieee80211_sta_block_awake - block station from waking up
2156 * @hw: the hardware
2157 * @pubsta: the station
2158 * @block: whether to block or unblock
2159 *
2160 * Some devices require that all frames that are on the queues
2161 * for a specific station that went to sleep are flushed before
2162 * a poll response or frames after the station woke up can be
2163 * delivered to that it. Note that such frames must be rejected
2164 * by the driver as filtered, with the appropriate status flag.
2165 *
2166 * This function allows implementing this mode in a race-free
2167 * manner.
2168 *
2169 * To do this, a driver must keep track of the number of frames
2170 * still enqueued for a specific station. If this number is not
2171 * zero when the station goes to sleep, the driver must call
2172 * this function to force mac80211 to consider the station to
2173 * be asleep regardless of the station's actual state. Once the
2174 * number of outstanding frames reaches zero, the driver must
2175 * call this function again to unblock the station. That will
2176 * cause mac80211 to be able to send ps-poll responses, and if
2177 * the station queried in the meantime then frames will also
2178 * be sent out as a result of this. Additionally, the driver
2179 * will be notified that the station woke up some time after
2180 * it is unblocked, regardless of whether the station actually
2181 * woke up while blocked or not.
2182 */
2183void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
2184 struct ieee80211_sta *pubsta, bool block);
2185
2186/**
2074 * ieee80211_beacon_loss - inform hardware does not receive beacons 2187 * ieee80211_beacon_loss - inform hardware does not receive beacons
2075 * 2188 *
2076 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 2189 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 3817fda82a80..db8e96dd114e 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -37,8 +37,7 @@
37 37
38struct neighbour; 38struct neighbour;
39 39
40struct neigh_parms 40struct neigh_parms {
41{
42#ifdef CONFIG_NET_NS 41#ifdef CONFIG_NET_NS
43 struct net *net; 42 struct net *net;
44#endif 43#endif
@@ -70,8 +69,7 @@ struct neigh_parms
70 int locktime; 69 int locktime;
71}; 70};
72 71
73struct neigh_statistics 72struct neigh_statistics {
74{
75 unsigned long allocs; /* number of allocated neighs */ 73 unsigned long allocs; /* number of allocated neighs */
76 unsigned long destroys; /* number of destroyed neighs */ 74 unsigned long destroys; /* number of destroyed neighs */
77 unsigned long hash_grows; /* number of hash resizes */ 75 unsigned long hash_grows; /* number of hash resizes */
@@ -97,8 +95,7 @@ struct neigh_statistics
97 preempt_enable(); \ 95 preempt_enable(); \
98 } while (0) 96 } while (0)
99 97
100struct neighbour 98struct neighbour {
101{
102 struct neighbour *next; 99 struct neighbour *next;
103 struct neigh_table *tbl; 100 struct neigh_table *tbl;
104 struct neigh_parms *parms; 101 struct neigh_parms *parms;
@@ -122,8 +119,7 @@ struct neighbour
122 u8 primary_key[0]; 119 u8 primary_key[0];
123}; 120};
124 121
125struct neigh_ops 122struct neigh_ops {
126{
127 int family; 123 int family;
128 void (*solicit)(struct neighbour *, struct sk_buff*); 124 void (*solicit)(struct neighbour *, struct sk_buff*);
129 void (*error_report)(struct neighbour *, struct sk_buff*); 125 void (*error_report)(struct neighbour *, struct sk_buff*);
@@ -133,8 +129,7 @@ struct neigh_ops
133 int (*queue_xmit)(struct sk_buff*); 129 int (*queue_xmit)(struct sk_buff*);
134}; 130};
135 131
136struct pneigh_entry 132struct pneigh_entry {
137{
138 struct pneigh_entry *next; 133 struct pneigh_entry *next;
139#ifdef CONFIG_NET_NS 134#ifdef CONFIG_NET_NS
140 struct net *net; 135 struct net *net;
@@ -149,8 +144,7 @@ struct pneigh_entry
149 */ 144 */
150 145
151 146
152struct neigh_table 147struct neigh_table {
153{
154 struct neigh_table *next; 148 struct neigh_table *next;
155 int family; 149 int family;
156 int entry_size; 150 int entry_size;
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index a1202841aadd..0addd45038ac 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -28,6 +28,10 @@ struct ctl_table_header;
28struct net_generic; 28struct net_generic;
29struct sock; 29struct sock;
30 30
31
32#define NETDEV_HASHBITS 8
33#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
34
31struct net { 35struct net {
32 atomic_t count; /* To decided when the network 36 atomic_t count; /* To decided when the network
33 * namespace should be freed. 37 * namespace should be freed.
@@ -80,7 +84,7 @@ struct net {
80#ifdef CONFIG_XFRM 84#ifdef CONFIG_XFRM
81 struct netns_xfrm xfrm; 85 struct netns_xfrm xfrm;
82#endif 86#endif
83#ifdef CONFIG_WIRELESS_EXT 87#ifdef CONFIG_WEXT_CORE
84 struct sk_buff_head wext_nlevents; 88 struct sk_buff_head wext_nlevents;
85#endif 89#endif
86 struct net_generic *gen; 90 struct net_generic *gen;
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h
index 4f20d58e2ab7..475facc3051a 100644
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -13,8 +13,7 @@
13#include <net/netfilter/nf_conntrack_extend.h> 13#include <net/netfilter/nf_conntrack_extend.h>
14 14
15/* Connection tracking event types */ 15/* Connection tracking event types */
16enum ip_conntrack_events 16enum ip_conntrack_events {
17{
18 IPCT_NEW = 0, /* new conntrack */ 17 IPCT_NEW = 0, /* new conntrack */
19 IPCT_RELATED = 1, /* related conntrack */ 18 IPCT_RELATED = 1, /* related conntrack */
20 IPCT_DESTROY = 2, /* destroyed conntrack */ 19 IPCT_DESTROY = 2, /* destroyed conntrack */
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index a9652806d0df..9a2b9cb52271 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -9,8 +9,7 @@
9extern unsigned int nf_ct_expect_hsize; 9extern unsigned int nf_ct_expect_hsize;
10extern unsigned int nf_ct_expect_max; 10extern unsigned int nf_ct_expect_max;
11 11
12struct nf_conntrack_expect 12struct nf_conntrack_expect {
13{
14 /* Conntrack expectation list member */ 13 /* Conntrack expectation list member */
15 struct hlist_node lnode; 14 struct hlist_node lnode;
16 15
@@ -64,8 +63,7 @@ static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp)
64#endif 63#endif
65} 64}
66 65
67struct nf_conntrack_expect_policy 66struct nf_conntrack_expect_policy {
68{
69 unsigned int max_expected; 67 unsigned int max_expected;
70 unsigned int timeout; 68 unsigned int timeout;
71}; 69};
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index 7f8fc5d123c5..e192dc17c583 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -3,8 +3,7 @@
3 3
4#include <net/netfilter/nf_conntrack.h> 4#include <net/netfilter/nf_conntrack.h>
5 5
6enum nf_ct_ext_id 6enum nf_ct_ext_id {
7{
8 NF_CT_EXT_HELPER, 7 NF_CT_EXT_HELPER,
9 NF_CT_EXT_NAT, 8 NF_CT_EXT_NAT,
10 NF_CT_EXT_ACCT, 9 NF_CT_EXT_ACCT,
@@ -65,8 +64,7 @@ __nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp);
65 64
66#define NF_CT_EXT_F_PREALLOC 0x0001 65#define NF_CT_EXT_F_PREALLOC 0x0001
67 66
68struct nf_ct_ext_type 67struct nf_ct_ext_type {
69{
70 /* Destroys relationships (can be NULL). */ 68 /* Destroys relationships (can be NULL). */
71 void (*destroy)(struct nf_conn *ct); 69 void (*destroy)(struct nf_conn *ct);
72 /* Called when realloacted (can be NULL). 70 /* Called when realloacted (can be NULL).
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h
index 1b7068000927..d015de92e03f 100644
--- a/include/net/netfilter/nf_conntrack_helper.h
+++ b/include/net/netfilter/nf_conntrack_helper.h
@@ -16,8 +16,7 @@ struct module;
16 16
17#define NF_CT_HELPER_NAME_LEN 16 17#define NF_CT_HELPER_NAME_LEN 16
18 18
19struct nf_conntrack_helper 19struct nf_conntrack_helper {
20{
21 struct hlist_node hnode; /* Internal use. */ 20 struct hlist_node hnode; /* Internal use. */
22 21
23 const char *name; /* name of the module */ 22 const char *name; /* name of the module */
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 9f99d36d5de9..a7547611e8f1 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -16,8 +16,7 @@
16#include <linux/seq_file.h> 16#include <linux/seq_file.h>
17#include <net/netfilter/nf_conntrack.h> 17#include <net/netfilter/nf_conntrack.h>
18 18
19struct nf_conntrack_l3proto 19struct nf_conntrack_l3proto {
20{
21 /* L3 Protocol Family number. ex) PF_INET */ 20 /* L3 Protocol Family number. ex) PF_INET */
22 u_int16_t l3proto; 21 u_int16_t l3proto;
23 22
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index 3767fb41e541..ca6dcf3445ab 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -15,8 +15,7 @@
15 15
16struct seq_file; 16struct seq_file;
17 17
18struct nf_conntrack_l4proto 18struct nf_conntrack_l4proto {
19{
20 /* L3 Protocol number. */ 19 /* L3 Protocol number. */
21 u_int16_t l3proto; 20 u_int16_t l3proto;
22 21
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 2628c154d40e..4ee44c84a304 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -26,8 +26,7 @@
26 26
27/* The protocol-specific manipulable parts of the tuple: always in 27/* The protocol-specific manipulable parts of the tuple: always in
28 network order! */ 28 network order! */
29union nf_conntrack_man_proto 29union nf_conntrack_man_proto {
30{
31 /* Add other protocols here. */ 30 /* Add other protocols here. */
32 __be16 all; 31 __be16 all;
33 32
@@ -52,8 +51,7 @@ union nf_conntrack_man_proto
52}; 51};
53 52
54/* The manipulable part of the tuple. */ 53/* The manipulable part of the tuple. */
55struct nf_conntrack_man 54struct nf_conntrack_man {
56{
57 union nf_inet_addr u3; 55 union nf_inet_addr u3;
58 union nf_conntrack_man_proto u; 56 union nf_conntrack_man_proto u;
59 /* Layer 3 protocol */ 57 /* Layer 3 protocol */
@@ -61,8 +59,7 @@ struct nf_conntrack_man
61}; 59};
62 60
63/* This contains the information to distinguish a connection. */ 61/* This contains the information to distinguish a connection. */
64struct nf_conntrack_tuple 62struct nf_conntrack_tuple {
65{
66 struct nf_conntrack_man src; 63 struct nf_conntrack_man src;
67 64
68 /* These are the parts of the tuple which are fixed. */ 65 /* These are the parts of the tuple which are fixed. */
@@ -100,8 +97,7 @@ struct nf_conntrack_tuple
100 } dst; 97 } dst;
101}; 98};
102 99
103struct nf_conntrack_tuple_mask 100struct nf_conntrack_tuple_mask {
104{
105 struct { 101 struct {
106 union nf_inet_addr u3; 102 union nf_inet_addr u3;
107 union nf_conntrack_man_proto u; 103 union nf_conntrack_man_proto u;
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h
index 8df0b7f7fc6e..f5f09f032a90 100644
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -5,8 +5,7 @@
5 5
6#define NF_NAT_MAPPING_TYPE_MAX_NAMELEN 16 6#define NF_NAT_MAPPING_TYPE_MAX_NAMELEN 16
7 7
8enum nf_nat_manip_type 8enum nf_nat_manip_type {
9{
10 IP_NAT_MANIP_SRC, 9 IP_NAT_MANIP_SRC,
11 IP_NAT_MANIP_DST 10 IP_NAT_MANIP_DST
12}; 11};
@@ -30,8 +29,7 @@ struct nf_nat_seq {
30}; 29};
31 30
32/* Single range specification. */ 31/* Single range specification. */
33struct nf_nat_range 32struct nf_nat_range {
34{
35 /* Set to OR of flags above. */ 33 /* Set to OR of flags above. */
36 unsigned int flags; 34 unsigned int flags;
37 35
@@ -43,8 +41,7 @@ struct nf_nat_range
43}; 41};
44 42
45/* For backwards compat: don't use in modern code. */ 43/* For backwards compat: don't use in modern code. */
46struct nf_nat_multi_range_compat 44struct nf_nat_multi_range_compat {
47{
48 unsigned int rangesize; /* Must be 1. */ 45 unsigned int rangesize; /* Must be 1. */
49 46
50 /* hangs off end. */ 47 /* hangs off end. */
@@ -57,8 +54,7 @@ struct nf_nat_multi_range_compat
57#include <net/netfilter/nf_conntrack_extend.h> 54#include <net/netfilter/nf_conntrack_extend.h>
58 55
59/* per conntrack: nat application helper private data */ 56/* per conntrack: nat application helper private data */
60union nf_conntrack_nat_help 57union nf_conntrack_nat_help {
61{
62 /* insert nat helper private data here */ 58 /* insert nat helper private data here */
63 struct nf_nat_pptp nat_pptp_info; 59 struct nf_nat_pptp nat_pptp_info;
64}; 60};
@@ -66,8 +62,7 @@ union nf_conntrack_nat_help
66struct nf_conn; 62struct nf_conn;
67 63
68/* The structure embedded in the conntrack structure. */ 64/* The structure embedded in the conntrack structure. */
69struct nf_conn_nat 65struct nf_conn_nat {
70{
71 struct hlist_node bysource; 66 struct hlist_node bysource;
72 struct nf_nat_seq seq[IP_CT_DIR_MAX]; 67 struct nf_nat_seq seq[IP_CT_DIR_MAX];
73 struct nf_conn *ct; 68 struct nf_conn *ct;
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h
index f3662c4394ef..c398017ccfa3 100644
--- a/include/net/netfilter/nf_nat_protocol.h
+++ b/include/net/netfilter/nf_nat_protocol.h
@@ -6,8 +6,7 @@
6 6
7struct nf_nat_range; 7struct nf_nat_range;
8 8
9struct nf_nat_protocol 9struct nf_nat_protocol {
10{
11 /* Protocol number. */ 10 /* Protocol number. */
12 unsigned int protonum; 11 unsigned int protonum;
13 12
diff --git a/include/net/phonet/phonet.h b/include/net/phonet/phonet.h
index d43f71b5ec00..7b114079a51b 100644
--- a/include/net/phonet/phonet.h
+++ b/include/net/phonet/phonet.h
@@ -46,7 +46,9 @@ static inline struct pn_sock *pn_sk(struct sock *sk)
46 46
47extern const struct proto_ops phonet_dgram_ops; 47extern const struct proto_ops phonet_dgram_ops;
48 48
49void pn_sock_init(void);
49struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa); 50struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa);
51void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb);
50void phonet_get_local_port_range(int *min, int *max); 52void phonet_get_local_port_range(int *min, int *max);
51void pn_sock_hash(struct sock *sk); 53void pn_sock_hash(struct sock *sk);
52void pn_sock_unhash(struct sock *sk); 54void pn_sock_unhash(struct sock *sk);
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
index 44c923c9e21d..d7b989ca3d63 100644
--- a/include/net/phonet/pn_dev.h
+++ b/include/net/phonet/pn_dev.h
@@ -25,7 +25,7 @@
25 25
26struct phonet_device_list { 26struct phonet_device_list {
27 struct list_head list; 27 struct list_head list;
28 spinlock_t lock; 28 struct mutex lock;
29}; 29};
30 30
31struct phonet_device_list *phonet_device_list(struct net *net); 31struct phonet_device_list *phonet_device_list(struct net *net);
@@ -47,6 +47,12 @@ u8 phonet_address_get(struct net_device *dev, u8 addr);
47int phonet_address_lookup(struct net *net, u8 addr); 47int phonet_address_lookup(struct net *net, u8 addr);
48void phonet_address_notify(int event, struct net_device *dev, u8 addr); 48void phonet_address_notify(int event, struct net_device *dev, u8 addr);
49 49
50int phonet_route_add(struct net_device *dev, u8 daddr);
51int phonet_route_del(struct net_device *dev, u8 daddr);
52void rtm_phonet_notify(int event, struct net_device *dev, u8 dst);
53struct net_device *phonet_route_get(struct net *net, u8 daddr);
54struct net_device *phonet_route_output(struct net *net, u8 daddr);
55
50#define PN_NO_ADDR 0xff 56#define PN_NO_ADDR 0xff
51 57
52extern const struct file_operations pn_sock_seq_fops; 58extern const struct file_operations pn_sock_seq_fops;
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index d1ca31444644..dd3031aed9d5 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -7,8 +7,7 @@
7 7
8/* Basic packet classifier frontend definitions. */ 8/* Basic packet classifier frontend definitions. */
9 9
10struct tcf_walker 10struct tcf_walker {
11{
12 int stop; 11 int stop;
13 int skip; 12 int skip;
14 int count; 13 int count;
@@ -61,8 +60,7 @@ tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r)
61 tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); 60 tp->q->ops->cl_ops->unbind_tcf(tp->q, cl);
62} 61}
63 62
64struct tcf_exts 63struct tcf_exts {
65{
66#ifdef CONFIG_NET_CLS_ACT 64#ifdef CONFIG_NET_CLS_ACT
67 struct tc_action *action; 65 struct tc_action *action;
68#endif 66#endif
@@ -71,8 +69,7 @@ struct tcf_exts
71/* Map to export classifier specific extension TLV types to the 69/* Map to export classifier specific extension TLV types to the
72 * generic extensions API. Unsupported extensions must be set to 0. 70 * generic extensions API. Unsupported extensions must be set to 0.
73 */ 71 */
74struct tcf_ext_map 72struct tcf_ext_map {
75{
76 int action; 73 int action;
77 int police; 74 int police;
78}; 75};
@@ -143,8 +140,7 @@ extern int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts,
143/** 140/**
144 * struct tcf_pkt_info - packet information 141 * struct tcf_pkt_info - packet information
145 */ 142 */
146struct tcf_pkt_info 143struct tcf_pkt_info {
147{
148 unsigned char * ptr; 144 unsigned char * ptr;
149 int nexthdr; 145 int nexthdr;
150}; 146};
@@ -162,8 +158,7 @@ struct tcf_ematch_ops;
162 * @datalen: length of the ematch specific configuration data 158 * @datalen: length of the ematch specific configuration data
163 * @data: ematch specific data 159 * @data: ematch specific data
164 */ 160 */
165struct tcf_ematch 161struct tcf_ematch {
166{
167 struct tcf_ematch_ops * ops; 162 struct tcf_ematch_ops * ops;
168 unsigned long data; 163 unsigned long data;
169 unsigned int datalen; 164 unsigned int datalen;
@@ -211,8 +206,7 @@ static inline int tcf_em_early_end(struct tcf_ematch *em, int result)
211 * @hdr: ematch tree header supplied by userspace 206 * @hdr: ematch tree header supplied by userspace
212 * @matches: array of ematches 207 * @matches: array of ematches
213 */ 208 */
214struct tcf_ematch_tree 209struct tcf_ematch_tree {
215{
216 struct tcf_ematch_tree_hdr hdr; 210 struct tcf_ematch_tree_hdr hdr;
217 struct tcf_ematch * matches; 211 struct tcf_ematch * matches;
218 212
@@ -230,8 +224,7 @@ struct tcf_ematch_tree
230 * @owner: owner, must be set to THIS_MODULE 224 * @owner: owner, must be set to THIS_MODULE
231 * @link: link to previous/next ematch module (internal use) 225 * @link: link to previous/next ematch module (internal use)
232 */ 226 */
233struct tcf_ematch_ops 227struct tcf_ematch_ops {
234{
235 int kind; 228 int kind;
236 int datalen; 229 int datalen;
237 int (*change)(struct tcf_proto *, void *, 230 int (*change)(struct tcf_proto *, void *,
@@ -302,8 +295,7 @@ static inline int tcf_em_tree_match(struct sk_buff *skb,
302 295
303#else /* CONFIG_NET_EMATCH */ 296#else /* CONFIG_NET_EMATCH */
304 297
305struct tcf_ematch_tree 298struct tcf_ematch_tree {
306{
307}; 299};
308 300
309#define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0) 301#define tcf_em_tree_validate(tp, tb, t) ((void)(t), 0)
@@ -351,9 +343,9 @@ tcf_match_indev(struct sk_buff *skb, char *indev)
351 struct net_device *dev; 343 struct net_device *dev;
352 344
353 if (indev[0]) { 345 if (indev[0]) {
354 if (!skb->iif) 346 if (!skb->skb_iif)
355 return 0; 347 return 0;
356 dev = __dev_get_by_index(dev_net(skb->dev), skb->iif); 348 dev = __dev_get_by_index(dev_net(skb->dev), skb->skb_iif);
357 if (!dev || strcmp(indev, dev->name)) 349 if (!dev || strcmp(indev, dev->name))
358 return 0; 350 return 0;
359 } 351 }
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index f911ec7598ef..2d567265363e 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -5,8 +5,7 @@
5#include <linux/ktime.h> 5#include <linux/ktime.h>
6#include <net/sch_generic.h> 6#include <net/sch_generic.h>
7 7
8struct qdisc_walker 8struct qdisc_walker {
9{
10 int stop; 9 int stop;
11 int skip; 10 int skip;
12 int count; 11 int count;
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 60249e51b669..f1effdd3c265 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -47,8 +47,7 @@ struct net_protocol {
47}; 47};
48 48
49#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 49#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
50struct inet6_protocol 50struct inet6_protocol {
51{
52 int (*handler)(struct sk_buff *skb); 51 int (*handler)(struct sk_buff *skb);
53 52
54 void (*err_handler)(struct sk_buff *skb, 53 void (*err_handler)(struct sk_buff *skb,
@@ -83,10 +82,6 @@ struct inet_protosw {
83 struct proto *prot; 82 struct proto *prot;
84 const struct proto_ops *ops; 83 const struct proto_ops *ops;
85 84
86 int capability; /* Which (if any) capability do
87 * we need to use this socket
88 * interface?
89 */
90 char no_check; /* checksum on rcv/xmit/none? */ 85 char no_check; /* checksum on rcv/xmit/none? */
91 unsigned char flags; /* See INET_PROTOSW_* below. */ 86 unsigned char flags; /* See INET_PROTOSW_* below. */
92}; 87};
diff --git a/include/net/red.h b/include/net/red.h
index 3cf31d466a81..995108e54d9f 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -90,8 +90,7 @@
90#define RED_STAB_SIZE 256 90#define RED_STAB_SIZE 256
91#define RED_STAB_MASK (RED_STAB_SIZE - 1) 91#define RED_STAB_MASK (RED_STAB_SIZE - 1)
92 92
93struct red_stats 93struct red_stats {
94{
95 u32 prob_drop; /* Early probability drops */ 94 u32 prob_drop; /* Early probability drops */
96 u32 prob_mark; /* Early probability marks */ 95 u32 prob_mark; /* Early probability marks */
97 u32 forced_drop; /* Forced drops, qavg > max_thresh */ 96 u32 forced_drop; /* Forced drops, qavg > max_thresh */
@@ -101,8 +100,7 @@ struct red_stats
101 u32 backlog; 100 u32 backlog;
102}; 101};
103 102
104struct red_parms 103struct red_parms {
105{
106 /* Parameters */ 104 /* Parameters */
107 u32 qth_min; /* Min avg length threshold: A scaled */ 105 u32 qth_min; /* Min avg length threshold: A scaled */
108 u32 qth_max; /* Max avg length threshold: A scaled */ 106 u32 qth_max; /* Max avg length threshold: A scaled */
diff --git a/include/net/route.h b/include/net/route.h
index 40f6346ef496..cfb4c071a136 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -49,10 +49,8 @@
49 49
50struct fib_nh; 50struct fib_nh;
51struct inet_peer; 51struct inet_peer;
52struct rtable 52struct rtable {
53{ 53 union {
54 union
55 {
56 struct dst_entry dst; 54 struct dst_entry dst;
57 } u; 55 } u;
58 56
@@ -77,16 +75,14 @@ struct rtable
77 struct inet_peer *peer; /* long-living peer info */ 75 struct inet_peer *peer; /* long-living peer info */
78}; 76};
79 77
80struct ip_rt_acct 78struct ip_rt_acct {
81{
82 __u32 o_bytes; 79 __u32 o_bytes;
83 __u32 o_packets; 80 __u32 o_packets;
84 __u32 i_bytes; 81 __u32 i_bytes;
85 __u32 i_packets; 82 __u32 i_packets;
86}; 83};
87 84
88struct rt_cache_stat 85struct rt_cache_stat {
89{
90 unsigned int in_hit; 86 unsigned int in_hit;
91 unsigned int in_slow_tot; 87 unsigned int in_slow_tot;
92 unsigned int in_slow_mc; 88 unsigned int in_slow_mc;
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index c3aa044d3fc3..48d3efcb0880 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -55,13 +55,15 @@ struct rtnl_link_ops {
55 int (*validate)(struct nlattr *tb[], 55 int (*validate)(struct nlattr *tb[],
56 struct nlattr *data[]); 56 struct nlattr *data[]);
57 57
58 int (*newlink)(struct net_device *dev, 58 int (*newlink)(struct net *src_net,
59 struct net_device *dev,
59 struct nlattr *tb[], 60 struct nlattr *tb[],
60 struct nlattr *data[]); 61 struct nlattr *data[]);
61 int (*changelink)(struct net_device *dev, 62 int (*changelink)(struct net_device *dev,
62 struct nlattr *tb[], 63 struct nlattr *tb[],
63 struct nlattr *data[]); 64 struct nlattr *data[]);
64 void (*dellink)(struct net_device *dev); 65 void (*dellink)(struct net_device *dev,
66 struct list_head *head);
65 67
66 size_t (*get_size)(const struct net_device *dev); 68 size_t (*get_size)(const struct net_device *dev);
67 int (*fill_info)(struct sk_buff *skb, 69 int (*fill_info)(struct sk_buff *skb,
@@ -82,8 +84,9 @@ extern void rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops);
82extern int rtnl_link_register(struct rtnl_link_ops *ops); 84extern int rtnl_link_register(struct rtnl_link_ops *ops);
83extern void rtnl_link_unregister(struct rtnl_link_ops *ops); 85extern void rtnl_link_unregister(struct rtnl_link_ops *ops);
84 86
85extern struct net_device *rtnl_create_link(struct net *net, char *ifname, 87extern struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]);
86 const struct rtnl_link_ops *ops, struct nlattr *tb[]); 88extern struct net_device *rtnl_create_link(struct net *src_net, struct net *net,
89 char *ifname, const struct rtnl_link_ops *ops, struct nlattr *tb[]);
87extern const struct nla_policy ifla_policy[IFLA_MAX+1]; 90extern const struct nla_policy ifla_policy[IFLA_MAX+1];
88 91
89#define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind) 92#define MODULE_ALIAS_RTNL_LINK(kind) MODULE_ALIAS("rtnl-link-" kind)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index c33180dd42b4..dad558bc06fa 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -15,16 +15,14 @@ struct qdisc_walker;
15struct tcf_walker; 15struct tcf_walker;
16struct module; 16struct module;
17 17
18struct qdisc_rate_table 18struct qdisc_rate_table {
19{
20 struct tc_ratespec rate; 19 struct tc_ratespec rate;
21 u32 data[256]; 20 u32 data[256];
22 struct qdisc_rate_table *next; 21 struct qdisc_rate_table *next;
23 int refcnt; 22 int refcnt;
24}; 23};
25 24
26enum qdisc_state_t 25enum qdisc_state_t {
27{
28 __QDISC_STATE_RUNNING, 26 __QDISC_STATE_RUNNING,
29 __QDISC_STATE_SCHED, 27 __QDISC_STATE_SCHED,
30 __QDISC_STATE_DEACTIVATED, 28 __QDISC_STATE_DEACTIVATED,
@@ -37,8 +35,7 @@ struct qdisc_size_table {
37 u16 data[]; 35 u16 data[];
38}; 36};
39 37
40struct Qdisc 38struct Qdisc {
41{
42 int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); 39 int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev);
43 struct sk_buff * (*dequeue)(struct Qdisc *dev); 40 struct sk_buff * (*dequeue)(struct Qdisc *dev);
44 unsigned flags; 41 unsigned flags;
@@ -78,8 +75,7 @@ struct Qdisc
78 struct gnet_stats_queue qstats; 75 struct gnet_stats_queue qstats;
79}; 76};
80 77
81struct Qdisc_class_ops 78struct Qdisc_class_ops {
82{
83 /* Child qdisc manipulation */ 79 /* Child qdisc manipulation */
84 struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *); 80 struct netdev_queue * (*select_queue)(struct Qdisc *, struct tcmsg *);
85 int (*graft)(struct Qdisc *, unsigned long cl, 81 int (*graft)(struct Qdisc *, unsigned long cl,
@@ -108,8 +104,7 @@ struct Qdisc_class_ops
108 struct gnet_dump *); 104 struct gnet_dump *);
109}; 105};
110 106
111struct Qdisc_ops 107struct Qdisc_ops {
112{
113 struct Qdisc_ops *next; 108 struct Qdisc_ops *next;
114 const struct Qdisc_class_ops *cl_ops; 109 const struct Qdisc_class_ops *cl_ops;
115 char id[IFNAMSIZ]; 110 char id[IFNAMSIZ];
@@ -133,14 +128,12 @@ struct Qdisc_ops
133}; 128};
134 129
135 130
136struct tcf_result 131struct tcf_result {
137{
138 unsigned long class; 132 unsigned long class;
139 u32 classid; 133 u32 classid;
140}; 134};
141 135
142struct tcf_proto_ops 136struct tcf_proto_ops {
143{
144 struct tcf_proto_ops *next; 137 struct tcf_proto_ops *next;
145 char kind[IFNAMSIZ]; 138 char kind[IFNAMSIZ];
146 139
@@ -164,8 +157,7 @@ struct tcf_proto_ops
164 struct module *owner; 157 struct module *owner;
165}; 158};
166 159
167struct tcf_proto 160struct tcf_proto {
168{
169 /* Fast access part */ 161 /* Fast access part */
170 struct tcf_proto *next; 162 struct tcf_proto *next;
171 void *root; 163 void *root;
@@ -261,14 +253,12 @@ extern struct Qdisc_ops noop_qdisc_ops;
261extern struct Qdisc_ops pfifo_fast_ops; 253extern struct Qdisc_ops pfifo_fast_ops;
262extern struct Qdisc_ops mq_qdisc_ops; 254extern struct Qdisc_ops mq_qdisc_ops;
263 255
264struct Qdisc_class_common 256struct Qdisc_class_common {
265{
266 u32 classid; 257 u32 classid;
267 struct hlist_node hnode; 258 struct hlist_node hnode;
268}; 259};
269 260
270struct Qdisc_class_hash 261struct Qdisc_class_hash {
271{
272 struct hlist_head *hash; 262 struct hlist_head *hash;
273 unsigned int hashsize; 263 unsigned int hashsize;
274 unsigned int hashmask; 264 unsigned int hashmask;
diff --git a/include/net/scm.h b/include/net/scm.h
index cf48c800e926..8360e47aa7e3 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -12,15 +12,13 @@
12 */ 12 */
13#define SCM_MAX_FD 255 13#define SCM_MAX_FD 255
14 14
15struct scm_fp_list 15struct scm_fp_list {
16{
17 struct list_head list; 16 struct list_head list;
18 int count; 17 int count;
19 struct file *fp[SCM_MAX_FD]; 18 struct file *fp[SCM_MAX_FD];
20}; 19};
21 20
22struct scm_cookie 21struct scm_cookie {
23{
24 struct ucred creds; /* Skb credentials */ 22 struct ucred creds; /* Skb credentials */
25 struct scm_fp_list *fp; /* Passed files */ 23 struct scm_fp_list *fp; /* Passed files */
26#ifdef CONFIG_SECURITY_NETWORK 24#ifdef CONFIG_SECURITY_NETWORK
@@ -88,8 +86,7 @@ static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct sc
88static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, 86static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,
89 struct scm_cookie *scm, int flags) 87 struct scm_cookie *scm, int flags)
90{ 88{
91 if (!msg->msg_control) 89 if (!msg->msg_control) {
92 {
93 if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp) 90 if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp)
94 msg->msg_flags |= MSG_CTRUNC; 91 msg->msg_flags |= MSG_CTRUNC;
95 scm_destroy(scm); 92 scm_destroy(scm);
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index 58f714a3b670..63908840eef0 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -308,6 +308,10 @@ enum { SCTP_MAX_GABS = 16 };
308 308
309#define SCTP_DEFAULT_MINWINDOW 1500 /* default minimum rwnd size */ 309#define SCTP_DEFAULT_MINWINDOW 1500 /* default minimum rwnd size */
310#define SCTP_DEFAULT_MAXWINDOW 65535 /* default rwnd size */ 310#define SCTP_DEFAULT_MAXWINDOW 65535 /* default rwnd size */
311#define SCTP_DEFAULT_RWND_SHIFT 4 /* by default, update on 1/16 of
312 * rcvbuf, which is 1/8 of initial
313 * window
314 */
311#define SCTP_DEFAULT_MAXSEGMENT 1500 /* MTU size, this is the limit 315#define SCTP_DEFAULT_MAXSEGMENT 1500 /* MTU size, this is the limit
312 * to which we will raise the P-MTU. 316 * to which we will raise the P-MTU.
313 */ 317 */
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 8a6d5297de16..78740ec57d5d 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -227,8 +227,7 @@ DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
227#endif /* !TEST_FRAME */ 227#endif /* !TEST_FRAME */
228 228
229/* sctp mib definitions */ 229/* sctp mib definitions */
230enum 230enum {
231{
232 SCTP_MIB_NUM = 0, 231 SCTP_MIB_NUM = 0,
233 SCTP_MIB_CURRESTAB, /* CurrEstab */ 232 SCTP_MIB_CURRESTAB, /* CurrEstab */
234 SCTP_MIB_ACTIVEESTABS, /* ActiveEstabs */ 233 SCTP_MIB_ACTIVEESTABS, /* ActiveEstabs */
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index c1dd89365833..851c813adb3a 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -243,7 +243,8 @@ struct sctp_chunk *sctp_make_op_error(const struct sctp_association *,
243 const struct sctp_chunk *chunk, 243 const struct sctp_chunk *chunk,
244 __be16 cause_code, 244 __be16 cause_code,
245 const void *payload, 245 const void *payload,
246 size_t paylen); 246 size_t paylen,
247 size_t reserve_tail);
247 248
248struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, 249struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *,
249 union sctp_addr *, 250 union sctp_addr *,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 0a474568b003..7571e32723bf 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -231,6 +231,11 @@ extern struct sctp_globals {
231 /* Flag to indicate whether computing and verifying checksum 231 /* Flag to indicate whether computing and verifying checksum
232 * is disabled. */ 232 * is disabled. */
233 int checksum_disable; 233 int checksum_disable;
234
235 /* Threshold for rwnd update SACKS. Receive buffer shifted this many
236 * bits is an indicator of when to send and window update SACK.
237 */
238 int rwnd_update_shift;
234} sctp_globals; 239} sctp_globals;
235 240
236#define sctp_rto_initial (sctp_globals.rto_initial) 241#define sctp_rto_initial (sctp_globals.rto_initial)
@@ -267,6 +272,7 @@ extern struct sctp_globals {
267#define sctp_prsctp_enable (sctp_globals.prsctp_enable) 272#define sctp_prsctp_enable (sctp_globals.prsctp_enable)
268#define sctp_auth_enable (sctp_globals.auth_enable) 273#define sctp_auth_enable (sctp_globals.auth_enable)
269#define sctp_checksum_disable (sctp_globals.checksum_disable) 274#define sctp_checksum_disable (sctp_globals.checksum_disable)
275#define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift)
270 276
271/* SCTP Socket type: UDP or TCP style. */ 277/* SCTP Socket type: UDP or TCP style. */
272typedef enum { 278typedef enum {
@@ -935,6 +941,8 @@ struct sctp_transport {
935 /* Data that has been sent, but not acknowledged. */ 941 /* Data that has been sent, but not acknowledged. */
936 __u32 flight_size; 942 __u32 flight_size;
937 943
944 __u32 burst_limited; /* Holds old cwnd when max.burst is applied */
945
938 /* TSN marking the fast recovery exit point */ 946 /* TSN marking the fast recovery exit point */
939 __u32 fast_recovery_exit; 947 __u32 fast_recovery_exit;
940 948
@@ -943,12 +951,6 @@ struct sctp_transport {
943 /* Source address. */ 951 /* Source address. */
944 union sctp_addr saddr; 952 union sctp_addr saddr;
945 953
946 /* When was the last time(in jiffies) that a data packet was sent on
947 * this transport? This is used to adjust the cwnd when the transport
948 * becomes inactive.
949 */
950 unsigned long last_time_used;
951
952 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to 954 /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
953 * the destination address every heartbeat interval. 955 * the destination address every heartbeat interval.
954 */ 956 */
@@ -1069,6 +1071,8 @@ void sctp_transport_put(struct sctp_transport *);
1069void sctp_transport_update_rto(struct sctp_transport *, __u32); 1071void sctp_transport_update_rto(struct sctp_transport *, __u32);
1070void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); 1072void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32);
1071void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); 1073void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t);
1074void sctp_transport_burst_limited(struct sctp_transport *);
1075void sctp_transport_burst_reset(struct sctp_transport *);
1072unsigned long sctp_transport_timeout(struct sctp_transport *); 1076unsigned long sctp_transport_timeout(struct sctp_transport *);
1073void sctp_transport_reset(struct sctp_transport *); 1077void sctp_transport_reset(struct sctp_transport *);
1074void sctp_transport_update_pmtu(struct sctp_transport *, u32); 1078void sctp_transport_update_pmtu(struct sctp_transport *, u32);
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index be2334aaf52e..2b2769c5ca9f 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -60,96 +60,49 @@ typedef __s32 sctp_assoc_t;
60/* The following symbols come from the Sockets API Extensions for 60/* The following symbols come from the Sockets API Extensions for
61 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>. 61 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
62 */ 62 */
63enum sctp_optname { 63#define SCTP_RTOINFO 0
64 SCTP_RTOINFO, 64#define SCTP_ASSOCINFO 1
65#define SCTP_RTOINFO SCTP_RTOINFO 65#define SCTP_INITMSG 2
66 SCTP_ASSOCINFO, 66#define SCTP_NODELAY 3 /* Get/set nodelay option. */
67#define SCTP_ASSOCINFO SCTP_ASSOCINFO 67#define SCTP_AUTOCLOSE 4
68 SCTP_INITMSG, 68#define SCTP_SET_PEER_PRIMARY_ADDR 5
69#define SCTP_INITMSG SCTP_INITMSG 69#define SCTP_PRIMARY_ADDR 6
70 SCTP_NODELAY, /* Get/set nodelay option. */ 70#define SCTP_ADAPTATION_LAYER 7
71#define SCTP_NODELAY SCTP_NODELAY 71#define SCTP_DISABLE_FRAGMENTS 8
72 SCTP_AUTOCLOSE, 72#define SCTP_PEER_ADDR_PARAMS 9
73#define SCTP_AUTOCLOSE SCTP_AUTOCLOSE 73#define SCTP_DEFAULT_SEND_PARAM 10
74 SCTP_SET_PEER_PRIMARY_ADDR, 74#define SCTP_EVENTS 11
75#define SCTP_SET_PEER_PRIMARY_ADDR SCTP_SET_PEER_PRIMARY_ADDR 75#define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */
76 SCTP_PRIMARY_ADDR, 76#define SCTP_MAXSEG 13 /* Get/set maximum fragment. */
77#define SCTP_PRIMARY_ADDR SCTP_PRIMARY_ADDR 77#define SCTP_STATUS 14
78 SCTP_ADAPTATION_LAYER, 78#define SCTP_GET_PEER_ADDR_INFO 15
79#define SCTP_ADAPTATION_LAYER SCTP_ADAPTATION_LAYER 79#define SCTP_DELAYED_ACK_TIME 16
80 SCTP_DISABLE_FRAGMENTS, 80#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME
81#define SCTP_DISABLE_FRAGMENTS SCTP_DISABLE_FRAGMENTS 81#define SCTP_CONTEXT 17
82 SCTP_PEER_ADDR_PARAMS, 82#define SCTP_FRAGMENT_INTERLEAVE 18
83#define SCTP_PEER_ADDR_PARAMS SCTP_PEER_ADDR_PARAMS 83#define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */
84 SCTP_DEFAULT_SEND_PARAM, 84#define SCTP_MAX_BURST 20 /* Set/Get max burst */
85#define SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM 85#define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */
86 SCTP_EVENTS, 86#define SCTP_HMAC_IDENT 22
87#define SCTP_EVENTS SCTP_EVENTS 87#define SCTP_AUTH_KEY 23
88 SCTP_I_WANT_MAPPED_V4_ADDR, /* Turn on/off mapped v4 addresses */ 88#define SCTP_AUTH_ACTIVE_KEY 24
89#define SCTP_I_WANT_MAPPED_V4_ADDR SCTP_I_WANT_MAPPED_V4_ADDR 89#define SCTP_AUTH_DELETE_KEY 25
90 SCTP_MAXSEG, /* Get/set maximum fragment. */ 90#define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */
91#define SCTP_MAXSEG SCTP_MAXSEG 91#define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */
92 SCTP_STATUS, 92#define SCTP_GET_ASSOC_NUMBER 28 /* Read only */
93#define SCTP_STATUS SCTP_STATUS 93
94 SCTP_GET_PEER_ADDR_INFO, 94/* Internal Socket Options. Some of the sctp library functions are
95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO 95 * implemented using these socket options.
96 SCTP_DELAYED_ACK, 96 */
97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK 97#define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */
98#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK 98#define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */
99 SCTP_CONTEXT, /* Receive Context */ 99#define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */
100#define SCTP_CONTEXT SCTP_CONTEXT 100/* Options 104-106 are deprecated and removed. Do not use this space */
101 SCTP_FRAGMENT_INTERLEAVE, 101#define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */
102#define SCTP_FRAGMENT_INTERLEAVE SCTP_FRAGMENT_INTERLEAVE 102#define SCTP_GET_PEER_ADDRS 108 /* Get all peer addresss. */
103 SCTP_PARTIAL_DELIVERY_POINT, /* Set/Get partial delivery point */ 103#define SCTP_GET_LOCAL_ADDRS 109 /* Get all local addresss. */
104#define SCTP_PARTIAL_DELIVERY_POINT SCTP_PARTIAL_DELIVERY_POINT 104#define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
105 SCTP_MAX_BURST, /* Set/Get max burst */ 105#define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
106#define SCTP_MAX_BURST SCTP_MAX_BURST
107 SCTP_AUTH_CHUNK, /* Set only: add a chunk type to authenticat */
108#define SCTP_AUTH_CHUNK SCTP_AUTH_CHUNK
109 SCTP_HMAC_IDENT,
110#define SCTP_HMAC_IDENT SCTP_HMAC_IDENT
111 SCTP_AUTH_KEY,
112#define SCTP_AUTH_KEY SCTP_AUTH_KEY
113 SCTP_AUTH_ACTIVE_KEY,
114#define SCTP_AUTH_ACTIVE_KEY SCTP_AUTH_ACTIVE_KEY
115 SCTP_AUTH_DELETE_KEY,
116#define SCTP_AUTH_DELETE_KEY SCTP_AUTH_DELETE_KEY
117 SCTP_PEER_AUTH_CHUNKS, /* Read only */
118#define SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
119 SCTP_LOCAL_AUTH_CHUNKS, /* Read only */
120#define SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
121 SCTP_GET_ASSOC_NUMBER, /* Read only */
122#define SCTP_GET_ASSOC_NUMBER SCTP_GET_ASSOC_NUMBER
123
124
125 /* Internal Socket Options. Some of the sctp library functions are
126 * implemented using these socket options.
127 */
128 SCTP_SOCKOPT_BINDX_ADD = 100,/* BINDX requests for adding addresses. */
129#define SCTP_SOCKOPT_BINDX_ADD SCTP_SOCKOPT_BINDX_ADD
130 SCTP_SOCKOPT_BINDX_REM, /* BINDX requests for removing addresses. */
131#define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM
132 SCTP_SOCKOPT_PEELOFF, /* peel off association. */
133#define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF
134 SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */
135#define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD
136 SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */
137#define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD
138 SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */
139#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD
140 SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */
141#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD
142 SCTP_SOCKOPT_CONNECTX_OLD, /* CONNECTX old requests. */
143#define SCTP_SOCKOPT_CONNECTX_OLD SCTP_SOCKOPT_CONNECTX_OLD
144 SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */
145#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS
146 SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
147#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
148 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
149#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
150 SCTP_SOCKOPT_CONNECTX3, /* CONNECTX requests. (new implementation) */
151#define SCTP_SOCKOPT_CONNECTX3 SCTP_SOCKOPT_CONNECTX3
152};
153 106
154/* 107/*
155 * 5.2.1 SCTP Initiation Structure (SCTP_INIT) 108 * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
@@ -206,6 +159,7 @@ enum sctp_sinfo_flags {
206 SCTP_UNORDERED = 1, /* Send/receive message unordered. */ 159 SCTP_UNORDERED = 1, /* Send/receive message unordered. */
207 SCTP_ADDR_OVER = 2, /* Override the primary destination. */ 160 SCTP_ADDR_OVER = 2, /* Override the primary destination. */
208 SCTP_ABORT=4, /* Send an ABORT message to the peer. */ 161 SCTP_ABORT=4, /* Send an ABORT message to the peer. */
162 SCTP_SACK_IMMEDIATELY = 8, /* SACK should be sent without delay */
209 SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */ 163 SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */
210}; 164};
211 165
diff --git a/include/net/sock.h b/include/net/sock.h
index 9f96394f694e..3f1a4804bb3f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -105,14 +105,17 @@ struct net;
105/** 105/**
106 * struct sock_common - minimal network layer representation of sockets 106 * struct sock_common - minimal network layer representation of sockets
107 * @skc_node: main hash linkage for various protocol lookup tables 107 * @skc_node: main hash linkage for various protocol lookup tables
108 * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol 108 * @skc_nulls_node: main hash linkage for TCP/UDP/UDP-Lite protocol
109 * @skc_refcnt: reference count 109 * @skc_refcnt: reference count
110 * @skc_tx_queue_mapping: tx queue number for this connection
110 * @skc_hash: hash value used with various protocol lookup tables 111 * @skc_hash: hash value used with various protocol lookup tables
112 * @skc_u16hashes: two u16 hash values used by UDP lookup tables
111 * @skc_family: network address family 113 * @skc_family: network address family
112 * @skc_state: Connection state 114 * @skc_state: Connection state
113 * @skc_reuse: %SO_REUSEADDR setting 115 * @skc_reuse: %SO_REUSEADDR setting
114 * @skc_bound_dev_if: bound device index if != 0 116 * @skc_bound_dev_if: bound device index if != 0
115 * @skc_bind_node: bind hash linkage for various protocol lookup tables 117 * @skc_bind_node: bind hash linkage for various protocol lookup tables
118 * @skc_portaddr_node: second hash linkage for UDP/UDP-Lite protocol
116 * @skc_prot: protocol handlers inside a network family 119 * @skc_prot: protocol handlers inside a network family
117 * @skc_net: reference to the network namespace of this socket 120 * @skc_net: reference to the network namespace of this socket
118 * 121 *
@@ -128,13 +131,20 @@ struct sock_common {
128 struct hlist_nulls_node skc_nulls_node; 131 struct hlist_nulls_node skc_nulls_node;
129 }; 132 };
130 atomic_t skc_refcnt; 133 atomic_t skc_refcnt;
134 int skc_tx_queue_mapping;
131 135
132 unsigned int skc_hash; 136 union {
137 unsigned int skc_hash;
138 __u16 skc_u16hashes[2];
139 };
133 unsigned short skc_family; 140 unsigned short skc_family;
134 volatile unsigned char skc_state; 141 volatile unsigned char skc_state;
135 unsigned char skc_reuse; 142 unsigned char skc_reuse;
136 int skc_bound_dev_if; 143 int skc_bound_dev_if;
137 struct hlist_node skc_bind_node; 144 union {
145 struct hlist_node skc_bind_node;
146 struct hlist_nulls_node skc_portaddr_node;
147 };
138 struct proto *skc_prot; 148 struct proto *skc_prot;
139#ifdef CONFIG_NET_NS 149#ifdef CONFIG_NET_NS
140 struct net *skc_net; 150 struct net *skc_net;
@@ -215,6 +225,7 @@ struct sock {
215#define sk_node __sk_common.skc_node 225#define sk_node __sk_common.skc_node
216#define sk_nulls_node __sk_common.skc_nulls_node 226#define sk_nulls_node __sk_common.skc_nulls_node
217#define sk_refcnt __sk_common.skc_refcnt 227#define sk_refcnt __sk_common.skc_refcnt
228#define sk_tx_queue_mapping __sk_common.skc_tx_queue_mapping
218 229
219#define sk_copy_start __sk_common.skc_hash 230#define sk_copy_start __sk_common.skc_hash
220#define sk_hash __sk_common.skc_hash 231#define sk_hash __sk_common.skc_hash
@@ -504,6 +515,8 @@ enum sock_flags {
504 SOCK_TIMESTAMPING_SOFTWARE, /* %SOF_TIMESTAMPING_SOFTWARE */ 515 SOCK_TIMESTAMPING_SOFTWARE, /* %SOF_TIMESTAMPING_SOFTWARE */
505 SOCK_TIMESTAMPING_RAW_HARDWARE, /* %SOF_TIMESTAMPING_RAW_HARDWARE */ 516 SOCK_TIMESTAMPING_RAW_HARDWARE, /* %SOF_TIMESTAMPING_RAW_HARDWARE */
506 SOCK_TIMESTAMPING_SYS_HARDWARE, /* %SOF_TIMESTAMPING_SYS_HARDWARE */ 517 SOCK_TIMESTAMPING_SYS_HARDWARE, /* %SOF_TIMESTAMPING_SYS_HARDWARE */
518 SOCK_FASYNC, /* fasync() active */
519 SOCK_RXQ_OVFL,
507}; 520};
508 521
509static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) 522static inline void sock_copy_flags(struct sock *nsk, struct sock *osk)
@@ -1092,8 +1105,29 @@ static inline void sock_put(struct sock *sk)
1092extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb, 1105extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
1093 const int nested); 1106 const int nested);
1094 1107
1108static inline void sk_tx_queue_set(struct sock *sk, int tx_queue)
1109{
1110 sk->sk_tx_queue_mapping = tx_queue;
1111}
1112
1113static inline void sk_tx_queue_clear(struct sock *sk)
1114{
1115 sk->sk_tx_queue_mapping = -1;
1116}
1117
1118static inline int sk_tx_queue_get(const struct sock *sk)
1119{
1120 return sk->sk_tx_queue_mapping;
1121}
1122
1123static inline bool sk_tx_queue_recorded(const struct sock *sk)
1124{
1125 return (sk && sk->sk_tx_queue_mapping >= 0);
1126}
1127
1095static inline void sk_set_socket(struct sock *sk, struct socket *sock) 1128static inline void sk_set_socket(struct sock *sk, struct socket *sock)
1096{ 1129{
1130 sk_tx_queue_clear(sk);
1097 sk->sk_socket = sock; 1131 sk->sk_socket = sock;
1098} 1132}
1099 1133
@@ -1150,6 +1184,7 @@ __sk_dst_set(struct sock *sk, struct dst_entry *dst)
1150{ 1184{
1151 struct dst_entry *old_dst; 1185 struct dst_entry *old_dst;
1152 1186
1187 sk_tx_queue_clear(sk);
1153 old_dst = sk->sk_dst_cache; 1188 old_dst = sk->sk_dst_cache;
1154 sk->sk_dst_cache = dst; 1189 sk->sk_dst_cache = dst;
1155 dst_release(old_dst); 1190 dst_release(old_dst);
@@ -1168,6 +1203,7 @@ __sk_dst_reset(struct sock *sk)
1168{ 1203{
1169 struct dst_entry *old_dst; 1204 struct dst_entry *old_dst;
1170 1205
1206 sk_tx_queue_clear(sk);
1171 old_dst = sk->sk_dst_cache; 1207 old_dst = sk->sk_dst_cache;
1172 sk->sk_dst_cache = NULL; 1208 sk->sk_dst_cache = NULL;
1173 dst_release(old_dst); 1209 dst_release(old_dst);
@@ -1396,7 +1432,7 @@ static inline unsigned long sock_wspace(struct sock *sk)
1396 1432
1397static inline void sk_wake_async(struct sock *sk, int how, int band) 1433static inline void sk_wake_async(struct sock *sk, int how, int band)
1398{ 1434{
1399 if (sk->sk_socket && sk->sk_socket->fasync_list) 1435 if (sock_flag(sk, SOCK_FASYNC))
1400 sock_wake_async(sk->sk_socket, how, band); 1436 sock_wake_async(sk->sk_socket, how, band);
1401} 1437}
1402 1438
@@ -1492,6 +1528,8 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
1492 sk->sk_stamp = kt; 1528 sk->sk_stamp = kt;
1493} 1529}
1494 1530
1531extern void sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk, struct sk_buff *skb);
1532
1495/** 1533/**
1496 * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped 1534 * sock_tx_timestamp - checks whether the outgoing packet is to be time stamped
1497 * @msg: outgoing packet 1535 * @msg: outgoing packet
diff --git a/include/net/tc_act/tc_skbedit.h b/include/net/tc_act/tc_skbedit.h
index 6abb3ed3ebf7..e103fe02f375 100644
--- a/include/net/tc_act/tc_skbedit.h
+++ b/include/net/tc_act/tc_skbedit.h
@@ -26,7 +26,9 @@ struct tcf_skbedit {
26 struct tcf_common common; 26 struct tcf_common common;
27 u32 flags; 27 u32 flags;
28 u32 priority; 28 u32 priority;
29 u32 mark;
29 u16 queue_mapping; 30 u16 queue_mapping;
31 /* XXX: 16-bit pad here? */
30}; 32};
31#define to_skbedit(pc) \ 33#define to_skbedit(pc) \
32 container_of(pc, struct tcf_skbedit, common) 34 container_of(pc, struct tcf_skbedit, common)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 03a49c703377..325bfcf5c934 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -62,9 +62,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
62/* Minimal accepted MSS. It is (60+60+8) - (20+20). */ 62/* Minimal accepted MSS. It is (60+60+8) - (20+20). */
63#define TCP_MIN_MSS 88U 63#define TCP_MIN_MSS 88U
64 64
65/* Minimal RCV_MSS. */
66#define TCP_MIN_RCVMSS 536U
67
68/* The least MTU to use for probing */ 65/* The least MTU to use for probing */
69#define TCP_BASE_MSS 512 66#define TCP_BASE_MSS 512
70 67
@@ -359,8 +356,7 @@ TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th)
359 inet_rsk(req)->ecn_ok = 1; 356 inet_rsk(req)->ecn_ok = 1;
360} 357}
361 358
362enum tcp_tw_status 359enum tcp_tw_status {
363{
364 TCP_TW_SUCCESS = 0, 360 TCP_TW_SUCCESS = 0,
365 TCP_TW_RST = 1, 361 TCP_TW_RST = 1,
366 TCP_TW_ACK = 2, 362 TCP_TW_ACK = 2,
@@ -409,7 +405,8 @@ extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk,
409 405
410extern void tcp_parse_options(struct sk_buff *skb, 406extern void tcp_parse_options(struct sk_buff *skb,
411 struct tcp_options_received *opt_rx, 407 struct tcp_options_received *opt_rx,
412 int estab); 408 int estab,
409 struct dst_entry *dst);
413 410
414extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); 411extern u8 *tcp_parse_md5sig_option(struct tcphdr *th);
415 412
diff --git a/include/net/udp.h b/include/net/udp.h
index f98abd2ce709..5348d80b25bb 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -50,16 +50,49 @@ struct udp_skb_cb {
50}; 50};
51#define UDP_SKB_CB(__skb) ((struct udp_skb_cb *)((__skb)->cb)) 51#define UDP_SKB_CB(__skb) ((struct udp_skb_cb *)((__skb)->cb))
52 52
53/**
54 * struct udp_hslot - UDP hash slot
55 *
56 * @head: head of list of sockets
57 * @count: number of sockets in 'head' list
58 * @lock: spinlock protecting changes to head/count
59 */
53struct udp_hslot { 60struct udp_hslot {
54 struct hlist_nulls_head head; 61 struct hlist_nulls_head head;
62 int count;
55 spinlock_t lock; 63 spinlock_t lock;
56} __attribute__((aligned(2 * sizeof(long)))); 64} __attribute__((aligned(2 * sizeof(long))));
65
66/**
67 * struct udp_table - UDP table
68 *
69 * @hash: hash table, sockets are hashed on (local port)
70 * @hash2: hash table, sockets are hashed on (local port, local address)
71 * @mask: number of slots in hash tables, minus 1
72 * @log: log2(number of slots in hash table)
73 */
57struct udp_table { 74struct udp_table {
58 struct udp_hslot hash[UDP_HTABLE_SIZE]; 75 struct udp_hslot *hash;
76 struct udp_hslot *hash2;
77 unsigned int mask;
78 unsigned int log;
59}; 79};
60extern struct udp_table udp_table; 80extern struct udp_table udp_table;
61extern void udp_table_init(struct udp_table *); 81extern void udp_table_init(struct udp_table *, const char *);
62 82static inline struct udp_hslot *udp_hashslot(struct udp_table *table,
83 struct net *net, unsigned num)
84{
85 return &table->hash[udp_hashfn(net, num, table->mask)];
86}
87/*
88 * For secondary hash, net_hash_mix() is performed before calling
89 * udp_hashslot2(), this explains difference with udp_hashslot()
90 */
91static inline struct udp_hslot *udp_hashslot2(struct udp_table *table,
92 unsigned int hash)
93{
94 return &table->hash2[hash & table->mask];
95}
63 96
64/* Note: this must match 'valbool' in sock_setsockopt */ 97/* Note: this must match 'valbool' in sock_setsockopt */
65#define UDP_CSUM_NOXMIT 1 98#define UDP_CSUM_NOXMIT 1
@@ -125,7 +158,8 @@ static inline void udp_lib_close(struct sock *sk, long timeout)
125} 158}
126 159
127extern int udp_lib_get_port(struct sock *sk, unsigned short snum, 160extern int udp_lib_get_port(struct sock *sk, unsigned short snum,
128 int (*)(const struct sock*,const struct sock*)); 161 int (*)(const struct sock *,const struct sock *),
162 unsigned int hash2_nulladdr);
129 163
130/* net/ipv4/udp.c */ 164/* net/ipv4/udp.c */
131extern int udp_get_port(struct sock *sk, unsigned short snum, 165extern int udp_get_port(struct sock *sk, unsigned short snum,
diff --git a/include/net/wext.h b/include/net/wext.h
index 3f2b94de2cfa..4f6e7423174c 100644
--- a/include/net/wext.h
+++ b/include/net/wext.h
@@ -1,29 +1,19 @@
1#ifndef __NET_WEXT_H 1#ifndef __NET_WEXT_H
2#define __NET_WEXT_H 2#define __NET_WEXT_H
3 3
4/* 4#include <net/iw_handler.h>
5 * wireless extensions interface to the core code
6 */
7 5
8struct net; 6struct net;
9 7
10#ifdef CONFIG_WIRELESS_EXT 8#ifdef CONFIG_WEXT_CORE
11extern int wext_proc_init(struct net *net);
12extern void wext_proc_exit(struct net *net);
13extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, 9extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
14 void __user *arg); 10 void __user *arg);
15extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, 11extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
16 unsigned long arg); 12 unsigned long arg);
13
17extern struct iw_statistics *get_wireless_stats(struct net_device *dev); 14extern struct iw_statistics *get_wireless_stats(struct net_device *dev);
15extern int call_commit_handler(struct net_device *dev);
18#else 16#else
19static inline int wext_proc_init(struct net *net)
20{
21 return 0;
22}
23static inline void wext_proc_exit(struct net *net)
24{
25 return;
26}
27static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, 17static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
28 void __user *arg) 18 void __user *arg)
29{ 19{
@@ -36,4 +26,35 @@ static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
36} 26}
37#endif 27#endif
38 28
29#ifdef CONFIG_WEXT_PROC
30extern int wext_proc_init(struct net *net);
31extern void wext_proc_exit(struct net *net);
32#else
33static inline int wext_proc_init(struct net *net)
34{
35 return 0;
36}
37static inline void wext_proc_exit(struct net *net)
38{
39 return;
40}
41#endif
42
43#ifdef CONFIG_WEXT_PRIV
44int ioctl_private_call(struct net_device *dev, struct iwreq *iwr,
45 unsigned int cmd, struct iw_request_info *info,
46 iw_handler handler);
47int compat_private_call(struct net_device *dev, struct iwreq *iwr,
48 unsigned int cmd, struct iw_request_info *info,
49 iw_handler handler);
50int iw_handler_get_private(struct net_device * dev,
51 struct iw_request_info * info,
52 union iwreq_data * wrqu,
53 char * extra);
54#else
55#define ioctl_private_call NULL
56#define compat_private_call NULL
57#endif
58
59
39#endif /* __NET_WEXT_H */ 60#endif /* __NET_WEXT_H */
diff --git a/include/net/wimax.h b/include/net/wimax.h
index 2af7bf839f23..d69c4a7a1267 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -195,6 +195,12 @@
195 * defining the `struct nla_policy` for each message, it has to have 195 * defining the `struct nla_policy` for each message, it has to have
196 * an array size of WIMAX_GNL_ATTR_MAX+1. 196 * an array size of WIMAX_GNL_ATTR_MAX+1.
197 * 197 *
198 * The op_*() function pointers will not be called if the wimax_dev is
199 * in a state <= %WIMAX_ST_UNINITIALIZED. The exception is:
200 *
201 * - op_reset: can be called at any time after wimax_dev_add() has
202 * been called.
203 *
198 * THE PIPE INTERFACE: 204 * THE PIPE INTERFACE:
199 * 205 *
200 * This interface is kept intentionally simple. The driver can send 206 * This interface is kept intentionally simple. The driver can send
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h
index 547b1e271ac9..85926231c07a 100644
--- a/include/net/wpan-phy.h
+++ b/include/net/wpan-phy.h
@@ -34,20 +34,32 @@ struct wpan_phy {
34 */ 34 */
35 u8 current_channel; 35 u8 current_channel;
36 u8 current_page; 36 u8 current_page;
37 u32 channels_supported; 37 u32 channels_supported[32];
38 u8 transmit_power; 38 u8 transmit_power;
39 u8 cca_mode; 39 u8 cca_mode;
40 40
41 struct device dev; 41 struct device dev;
42 int idx; 42 int idx;
43 43
44 struct net_device *(*add_iface)(struct wpan_phy *phy,
45 const char *name);
46 void (*del_iface)(struct wpan_phy *phy, struct net_device *dev);
47
44 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); 48 char priv[0] __attribute__((__aligned__(NETDEV_ALIGN)));
45}; 49};
46 50
51#define to_phy(_dev) container_of(_dev, struct wpan_phy, dev)
52
47struct wpan_phy *wpan_phy_alloc(size_t priv_size); 53struct wpan_phy *wpan_phy_alloc(size_t priv_size);
48int wpan_phy_register(struct device *parent, struct wpan_phy *phy); 54static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev)
55{
56 phy->dev.parent = dev;
57}
58int wpan_phy_register(struct wpan_phy *phy);
49void wpan_phy_unregister(struct wpan_phy *phy); 59void wpan_phy_unregister(struct wpan_phy *phy);
50void wpan_phy_free(struct wpan_phy *phy); 60void wpan_phy_free(struct wpan_phy *phy);
61/* Same semantics as for class_for_each_device */
62int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data), void *data);
51 63
52static inline void *wpan_phy_priv(struct wpan_phy *phy) 64static inline void *wpan_phy_priv(struct wpan_phy *phy)
53{ 65{
@@ -56,6 +68,12 @@ static inline void *wpan_phy_priv(struct wpan_phy *phy)
56} 68}
57 69
58struct wpan_phy *wpan_phy_find(const char *str); 70struct wpan_phy *wpan_phy_find(const char *str);
71
72static inline void wpan_phy_put(struct wpan_phy *phy)
73{
74 put_device(&phy->dev);
75}
76
59static inline const char *wpan_phy_name(struct wpan_phy *phy) 77static inline const char *wpan_phy_name(struct wpan_phy *phy)
60{ 78{
61 return dev_name(&phy->dev); 79 return dev_name(&phy->dev);
diff --git a/include/net/x25.h b/include/net/x25.h
index 2cda04011568..9baa07dc7d17 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -287,8 +287,14 @@ extern unsigned long x25_display_timer(struct sock *);
287extern void x25_check_rbuf(struct sock *); 287extern void x25_check_rbuf(struct sock *);
288 288
289/* sysctl_net_x25.c */ 289/* sysctl_net_x25.c */
290#ifdef CONFIG_SYSCTL
290extern void x25_register_sysctl(void); 291extern void x25_register_sysctl(void);
291extern void x25_unregister_sysctl(void); 292extern void x25_unregister_sysctl(void);
293#else
294static inline void x25_register_sysctl(void) {};
295static inline void x25_unregister_sysctl(void) {};
296#endif /* CONFIG_SYSCTL */
297
292struct x25_skb_cb { 298struct x25_skb_cb {
293 unsigned flags; 299 unsigned flags;
294}; 300};
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 223e90a44824..6d85861ab990 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -19,6 +19,9 @@
19#include <net/route.h> 19#include <net/route.h>
20#include <net/ipv6.h> 20#include <net/ipv6.h>
21#include <net/ip6_fib.h> 21#include <net/ip6_fib.h>
22
23#include <linux/interrupt.h>
24
22#ifdef CONFIG_XFRM_STATISTICS 25#ifdef CONFIG_XFRM_STATISTICS
23#include <net/snmp.h> 26#include <net/snmp.h>
24#endif 27#endif
@@ -121,8 +124,7 @@ struct xfrm_state_walk {
121}; 124};
122 125
123/* Full description of state of transformer. */ 126/* Full description of state of transformer. */
124struct xfrm_state 127struct xfrm_state {
125{
126#ifdef CONFIG_NET_NS 128#ifdef CONFIG_NET_NS
127 struct net *xs_net; 129 struct net *xs_net;
128#endif 130#endif
@@ -160,7 +162,7 @@ struct xfrm_state
160 struct xfrm_lifetime_cfg lft; 162 struct xfrm_lifetime_cfg lft;
161 163
162 /* Data for transformer */ 164 /* Data for transformer */
163 struct xfrm_algo *aalg; 165 struct xfrm_algo_auth *aalg;
164 struct xfrm_algo *ealg; 166 struct xfrm_algo *ealg;
165 struct xfrm_algo *calg; 167 struct xfrm_algo *calg;
166 struct xfrm_algo_aead *aead; 168 struct xfrm_algo_aead *aead;
@@ -199,7 +201,7 @@ struct xfrm_state
199 struct xfrm_stats stats; 201 struct xfrm_stats stats;
200 202
201 struct xfrm_lifetime_cur curlft; 203 struct xfrm_lifetime_cur curlft;
202 struct timer_list timer; 204 struct tasklet_hrtimer mtimer;
203 205
204 /* Last used time */ 206 /* Last used time */
205 unsigned long lastused; 207 unsigned long lastused;
@@ -237,8 +239,7 @@ enum {
237}; 239};
238 240
239/* callback structure passed from either netlink or pfkey */ 241/* callback structure passed from either netlink or pfkey */
240struct km_event 242struct km_event {
241{
242 union { 243 union {
243 u32 hard; 244 u32 hard;
244 u32 proto; 245 u32 proto;
@@ -313,8 +314,7 @@ extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo);
313 314
314extern void xfrm_state_delete_tunnel(struct xfrm_state *x); 315extern void xfrm_state_delete_tunnel(struct xfrm_state *x);
315 316
316struct xfrm_type 317struct xfrm_type {
317{
318 char *description; 318 char *description;
319 struct module *owner; 319 struct module *owner;
320 __u8 proto; 320 __u8 proto;
@@ -420,8 +420,7 @@ static inline struct xfrm_mode *xfrm_ip2inner_mode(struct xfrm_state *x, int ipp
420 return x->inner_mode_iaf; 420 return x->inner_mode_iaf;
421} 421}
422 422
423struct xfrm_tmpl 423struct xfrm_tmpl {
424{
425/* id in template is interpreted as: 424/* id in template is interpreted as:
426 * daddr - destination of tunnel, may be zero for transport mode. 425 * daddr - destination of tunnel, may be zero for transport mode.
427 * spi - zero to acquire spi. Not zero if spi is static, then 426 * spi - zero to acquire spi. Not zero if spi is static, then
@@ -468,8 +467,7 @@ struct xfrm_policy_walk {
468 u32 seq; 467 u32 seq;
469}; 468};
470 469
471struct xfrm_policy 470struct xfrm_policy {
472{
473#ifdef CONFIG_NET_NS 471#ifdef CONFIG_NET_NS
474 struct net *xp_net; 472 struct net *xp_net;
475#endif 473#endif
@@ -538,8 +536,7 @@ struct xfrm_migrate {
538/* default seq threshold size */ 536/* default seq threshold size */
539#define XFRM_AE_SEQT_SIZE 2 537#define XFRM_AE_SEQT_SIZE 2
540 538
541struct xfrm_mgr 539struct xfrm_mgr {
542{
543 struct list_head list; 540 struct list_head list;
544 char *id; 541 char *id;
545 int (*notify)(struct xfrm_state *x, struct km_event *c); 542 int (*notify)(struct xfrm_state *x, struct km_event *c);
@@ -626,8 +623,7 @@ struct xfrm_spi_skb_cb {
626#define XFRM_SPI_SKB_CB(__skb) ((struct xfrm_spi_skb_cb *)&((__skb)->cb[0])) 623#define XFRM_SPI_SKB_CB(__skb) ((struct xfrm_spi_skb_cb *)&((__skb)->cb[0]))
627 624
628/* Audit Information */ 625/* Audit Information */
629struct xfrm_audit 626struct xfrm_audit {
630{
631 u32 secid; 627 u32 secid;
632 uid_t loginuid; 628 uid_t loginuid;
633 u32 sessionid; 629 u32 sessionid;
@@ -871,8 +867,7 @@ static inline int xfrm_sec_ctx_match(struct xfrm_sec_ctx *s1, struct xfrm_sec_ct
871 * bundles differing by session id. All the bundles grow from a parent 867 * bundles differing by session id. All the bundles grow from a parent
872 * policy rule. 868 * policy rule.
873 */ 869 */
874struct xfrm_dst 870struct xfrm_dst {
875{
876 union { 871 union {
877 struct dst_entry dst; 872 struct dst_entry dst;
878 struct rtable rt; 873 struct rtable rt;
@@ -907,8 +902,7 @@ static inline void xfrm_dst_destroy(struct xfrm_dst *xdst)
907 902
908extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); 903extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev);
909 904
910struct sec_path 905struct sec_path {
911{
912 atomic_t refcnt; 906 atomic_t refcnt;
913 int len; 907 int len;
914 struct xfrm_state *xvec[XFRM_MAX_DEPTH]; 908 struct xfrm_state *xvec[XFRM_MAX_DEPTH];
@@ -1500,9 +1494,6 @@ struct scatterlist;
1500typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *, 1494typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *,
1501 unsigned int); 1495 unsigned int);
1502 1496
1503extern int skb_icv_walk(const struct sk_buff *skb, struct hash_desc *tfm,
1504 int offset, int len, icv_update_fn_t icv_update);
1505
1506static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, 1497static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b,
1507 int family) 1498 int family)
1508{ 1499{
@@ -1541,12 +1532,22 @@ static inline int xfrm_alg_len(struct xfrm_algo *alg)
1541 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8); 1532 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
1542} 1533}
1543 1534
1535static inline int xfrm_alg_auth_len(struct xfrm_algo_auth *alg)
1536{
1537 return sizeof(*alg) + ((alg->alg_key_len + 7) / 8);
1538}
1539
1544#ifdef CONFIG_XFRM_MIGRATE 1540#ifdef CONFIG_XFRM_MIGRATE
1545static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) 1541static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig)
1546{ 1542{
1547 return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); 1543 return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL);
1548} 1544}
1549 1545
1546static inline struct xfrm_algo_auth *xfrm_algo_auth_clone(struct xfrm_algo_auth *orig)
1547{
1548 return kmemdup(orig, xfrm_alg_auth_len(orig), GFP_KERNEL);
1549}
1550
1550static inline void xfrm_states_put(struct xfrm_state **states, int n) 1551static inline void xfrm_states_put(struct xfrm_state **states, int n)
1551{ 1552{
1552 int i; 1553 int i;