diff options
Diffstat (limited to 'include')
190 files changed, 2248 insertions, 1528 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 | */ |
39 | struct can_proto { | 38 | struct 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 | |||
34 | struct can_priv { | 32 | struct 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 | ||
55 | struct net_device *alloc_candev(int sizeof_priv); | 54 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); |
56 | void free_candev(struct net_device *dev); | 55 | void free_candev(struct net_device *dev); |
57 | 56 | ||
58 | int open_candev(struct net_device *dev); | 57 | int open_candev(struct net_device *dev); |
@@ -64,8 +63,13 @@ void unregister_candev(struct net_device *dev); | |||
64 | int can_restart_now(struct net_device *dev); | 63 | int can_restart_now(struct net_device *dev); |
65 | void can_bus_off(struct net_device *dev); | 64 | void can_bus_off(struct net_device *dev); |
66 | 65 | ||
67 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); | 66 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, |
68 | void can_get_echo_skb(struct net_device *dev, int idx); | 67 | unsigned int idx); |
69 | void can_free_echo_skb(struct net_device *dev, int idx); | 68 | void can_get_echo_skb(struct net_device *dev, unsigned int idx); |
69 | void can_free_echo_skb(struct net_device *dev, unsigned int idx); | ||
70 | |||
71 | struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf); | ||
72 | struct 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 | |||
26 | struct 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 | */ | ||
31 | struct 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 | ||
159 | struct 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 | |||
168 | struct 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 | |||
175 | struct 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 | |||
196 | struct compat_ifconf { | ||
197 | compat_int_t ifc_len; /* size of buffer */ | ||
198 | compat_caddr_t ifcbuf; | ||
199 | }; | ||
200 | |||
157 | struct compat_robust_list { | 201 | struct compat_robust_list { |
158 | compat_uptr_t next; | 202 | compat_uptr_t next; |
159 | }; | 203 | }; |
diff --git a/include/linux/cryptohash.h b/include/linux/cryptohash.h index c118b2ad9807..ec78a4bbe1d5 100644 --- a/include/linux/cryptohash.h +++ b/include/linux/cryptohash.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __CRYPTOHASH_H | 2 | #define __CRYPTOHASH_H |
3 | 3 | ||
4 | #define SHA_DIGEST_WORDS 5 | 4 | #define SHA_DIGEST_WORDS 5 |
5 | #define SHA_MESSAGE_BYTES (512 /*bits*/ / 8) | ||
5 | #define SHA_WORKSPACE_WORDS 80 | 6 | #define SHA_WORKSPACE_WORDS 80 |
6 | 7 | ||
7 | void sha_init(__u32 *buf); | 8 | void sha_init(__u32 *buf); |
diff --git a/include/linux/dn.h b/include/linux/dn.h index fe9990823193..9c50445462d9 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -71,14 +71,12 @@ | |||
71 | /* Structures */ | 71 | /* Structures */ |
72 | 72 | ||
73 | 73 | ||
74 | struct dn_naddr | 74 | struct 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 | ||
80 | struct sockaddr_dn | 79 | struct 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 | ||
104 | struct accessdata_dn | 102 | struct 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 | ||
6 | struct sock_extended_err | 6 | struct 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 | ||
34 | struct sock_exterr_skb | 33 | struct sock_exterr_skb { |
35 | { | ||
36 | union { | 34 | union { |
37 | struct inet_skb_parm h4; | 35 | struct inet_skb_parm h4; |
38 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) | 36 | #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 15e4eb713694..ef4a2d84d922 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -49,13 +49,14 @@ static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) | |||
49 | return (ep->speed_hi << 16) | ep->speed; | 49 | return (ep->speed_hi << 16) | ep->speed; |
50 | } | 50 | } |
51 | 51 | ||
52 | #define ETHTOOL_FWVERS_LEN 32 | ||
52 | #define ETHTOOL_BUSINFO_LEN 32 | 53 | #define ETHTOOL_BUSINFO_LEN 32 |
53 | /* these strings are set to whatever the driver author decides... */ | 54 | /* these strings are set to whatever the driver author decides... */ |
54 | struct ethtool_drvinfo { | 55 | struct ethtool_drvinfo { |
55 | __u32 cmd; | 56 | __u32 cmd; |
56 | char driver[32]; /* driver short name, "tulip", "eepro100" */ | 57 | char driver[32]; /* driver short name, "tulip", "eepro100" */ |
57 | char version[32]; /* driver version string */ | 58 | char version[32]; /* driver version string */ |
58 | char fw_version[32]; /* firmware version string, if applicable */ | 59 | char fw_version[ETHTOOL_FWVERS_LEN]; /* firmware version string */ |
59 | char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ | 60 | char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ |
60 | /* For PCI devices, use pci_name(pci_dev). */ | 61 | /* For PCI devices, use pci_name(pci_dev). */ |
61 | char reserved1[32]; | 62 | char reserved1[32]; |
@@ -495,13 +496,10 @@ struct ethtool_ops { | |||
495 | u32 (*get_priv_flags)(struct net_device *); | 496 | u32 (*get_priv_flags)(struct net_device *); |
496 | int (*set_priv_flags)(struct net_device *, u32); | 497 | int (*set_priv_flags)(struct net_device *, u32); |
497 | int (*get_sset_count)(struct net_device *, int); | 498 | int (*get_sset_count)(struct net_device *, int); |
498 | |||
499 | /* the following hooks are obsolete */ | ||
500 | int (*self_test_count)(struct net_device *);/* use get_sset_count */ | ||
501 | int (*get_stats_count)(struct net_device *);/* use get_sset_count */ | ||
502 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); | 499 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); |
503 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 500 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
504 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | 501 | int (*flash_device)(struct net_device *, struct ethtool_flash *); |
502 | int (*reset)(struct net_device *, u32 *); | ||
505 | }; | 503 | }; |
506 | #endif /* __KERNEL__ */ | 504 | #endif /* __KERNEL__ */ |
507 | 505 | ||
@@ -559,6 +557,7 @@ struct ethtool_ops { | |||
559 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | 557 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ |
560 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 558 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
561 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | 559 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ |
560 | #define ETHTOOL_RESET 0x00000034 /* Reset hardware */ | ||
562 | 561 | ||
563 | /* compatibility with older code */ | 562 | /* compatibility with older code */ |
564 | #define SPARC_ETH_GSET ETHTOOL_GSET | 563 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -633,6 +632,8 @@ struct ethtool_ops { | |||
633 | #define PORT_MII 0x02 | 632 | #define PORT_MII 0x02 |
634 | #define PORT_FIBRE 0x03 | 633 | #define PORT_FIBRE 0x03 |
635 | #define PORT_BNC 0x04 | 634 | #define PORT_BNC 0x04 |
635 | #define PORT_DA 0x05 | ||
636 | #define PORT_NONE 0xef | ||
636 | #define PORT_OTHER 0xff | 637 | #define PORT_OTHER 0xff |
637 | 638 | ||
638 | /* Which transceiver to use. */ | 639 | /* Which transceiver to use. */ |
@@ -676,6 +677,8 @@ struct ethtool_ops { | |||
676 | #define AH_V6_FLOW 0x0b | 677 | #define AH_V6_FLOW 0x0b |
677 | #define ESP_V6_FLOW 0x0c | 678 | #define ESP_V6_FLOW 0x0c |
678 | #define IP_USER_FLOW 0x0d | 679 | #define IP_USER_FLOW 0x0d |
680 | #define IPV4_FLOW 0x10 | ||
681 | #define IPV6_FLOW 0x11 | ||
679 | 682 | ||
680 | /* L3-L4 network traffic flow hash options */ | 683 | /* L3-L4 network traffic flow hash options */ |
681 | #define RXH_L2DA (1 << 1) | 684 | #define RXH_L2DA (1 << 1) |
@@ -689,4 +692,34 @@ struct ethtool_ops { | |||
689 | 692 | ||
690 | #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL | 693 | #define RX_CLS_FLOW_DISC 0xffffffffffffffffULL |
691 | 694 | ||
695 | /* Reset flags */ | ||
696 | /* The reset() operation must clear the flags for the components which | ||
697 | * were actually reset. On successful return, the flags indicate the | ||
698 | * components which were not reset, either because they do not exist | ||
699 | * in the hardware or because they cannot be reset independently. The | ||
700 | * driver must never reset any components that were not requested. | ||
701 | */ | ||
702 | enum ethtool_reset_flags { | ||
703 | /* These flags represent components dedicated to the interface | ||
704 | * the command is addressed to. Shift any flag left by | ||
705 | * ETH_RESET_SHARED_SHIFT to reset a shared component of the | ||
706 | * same type. | ||
707 | */ | ||
708 | ETH_RESET_MGMT = 1 << 0, /* Management processor */ | ||
709 | ETH_RESET_IRQ = 1 << 1, /* Interrupt requester */ | ||
710 | ETH_RESET_DMA = 1 << 2, /* DMA engine */ | ||
711 | ETH_RESET_FILTER = 1 << 3, /* Filtering/flow direction */ | ||
712 | ETH_RESET_OFFLOAD = 1 << 4, /* Protocol offload */ | ||
713 | ETH_RESET_MAC = 1 << 5, /* Media access controller */ | ||
714 | ETH_RESET_PHY = 1 << 6, /* Transceiver/PHY */ | ||
715 | ETH_RESET_RAM = 1 << 7, /* RAM shared between | ||
716 | * multiple components */ | ||
717 | |||
718 | ETH_RESET_DEDICATED = 0x0000ffff, /* All components dedicated to | ||
719 | * this interface */ | ||
720 | ETH_RESET_ALL = 0xffffffff, /* All components used by this | ||
721 | * interface, even if shared */ | ||
722 | }; | ||
723 | #define ETH_RESET_SHARED_SHIFT 16 | ||
724 | |||
692 | #endif /* _LINUX_ETHTOOL_H */ | 725 | #endif /* _LINUX_ETHTOOL_H */ |
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h index 87b606b63f1e..51da65b68b85 100644 --- a/include/linux/fib_rules.h +++ b/include/linux/fib_rules.h | |||
@@ -8,13 +8,14 @@ | |||
8 | #define FIB_RULE_PERMANENT 0x00000001 | 8 | #define FIB_RULE_PERMANENT 0x00000001 |
9 | #define FIB_RULE_INVERT 0x00000002 | 9 | #define FIB_RULE_INVERT 0x00000002 |
10 | #define FIB_RULE_UNRESOLVED 0x00000004 | 10 | #define FIB_RULE_UNRESOLVED 0x00000004 |
11 | #define FIB_RULE_DEV_DETACHED 0x00000008 | 11 | #define FIB_RULE_IIF_DETACHED 0x00000008 |
12 | #define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED | ||
13 | #define FIB_RULE_OIF_DETACHED 0x00000010 | ||
12 | 14 | ||
13 | /* try to find source address in routing lookups */ | 15 | /* try to find source address in routing lookups */ |
14 | #define FIB_RULE_FIND_SADDR 0x00010000 | 16 | #define FIB_RULE_FIND_SADDR 0x00010000 |
15 | 17 | ||
16 | struct fib_rule_hdr | 18 | struct fib_rule_hdr { |
17 | { | ||
18 | __u8 family; | 19 | __u8 family; |
19 | __u8 dst_len; | 20 | __u8 dst_len; |
20 | __u8 src_len; | 21 | __u8 src_len; |
@@ -28,12 +29,12 @@ struct fib_rule_hdr | |||
28 | __u32 flags; | 29 | __u32 flags; |
29 | }; | 30 | }; |
30 | 31 | ||
31 | enum | 32 | enum { |
32 | { | ||
33 | FRA_UNSPEC, | 33 | FRA_UNSPEC, |
34 | FRA_DST, /* destination address */ | 34 | FRA_DST, /* destination address */ |
35 | FRA_SRC, /* source address */ | 35 | FRA_SRC, /* source address */ |
36 | FRA_IFNAME, /* interface name */ | 36 | FRA_IIFNAME, /* interface name */ |
37 | #define FRA_IFNAME FRA_IIFNAME | ||
37 | FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */ | 38 | FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */ |
38 | FRA_UNUSED2, | 39 | FRA_UNUSED2, |
39 | FRA_PRIORITY, /* priority/preference */ | 40 | FRA_PRIORITY, /* priority/preference */ |
@@ -47,13 +48,13 @@ enum | |||
47 | FRA_UNUSED8, | 48 | FRA_UNUSED8, |
48 | FRA_TABLE, /* Extended table id */ | 49 | FRA_TABLE, /* Extended table id */ |
49 | FRA_FWMASK, /* mask for netfilter mark */ | 50 | FRA_FWMASK, /* mask for netfilter mark */ |
51 | FRA_OIFNAME, | ||
50 | __FRA_MAX | 52 | __FRA_MAX |
51 | }; | 53 | }; |
52 | 54 | ||
53 | #define FRA_MAX (__FRA_MAX - 1) | 55 | #define FRA_MAX (__FRA_MAX - 1) |
54 | 56 | ||
55 | enum | 57 | enum { |
56 | { | ||
57 | FR_ACT_UNSPEC, | 58 | FR_ACT_UNSPEC, |
58 | FR_ACT_TO_TBL, /* Pass to fixed table */ | 59 | FR_ACT_TO_TBL, /* Pass to fixed table */ |
59 | FR_ACT_GOTO, /* Jump to another rule */ | 60 | FR_ACT_GOTO, /* Jump to another rule */ |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 1354aaf6abbe..29a0e3db9f43 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -23,16 +23,14 @@ | |||
23 | * the BPF code definitions which need to match so you can share filters | 23 | * the BPF code definitions which need to match so you can share filters |
24 | */ | 24 | */ |
25 | 25 | ||
26 | struct sock_filter /* Filter block */ | 26 | struct 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 | ||
34 | struct sock_fprog /* Required for SO_ATTACH_FILTER. */ | 33 | struct 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 | */ |
21 | struct gnet_stats_basic | 21 | struct gnet_stats_basic { |
22 | { | ||
23 | __u64 bytes; | 22 | __u64 bytes; |
24 | __u32 packets; | 23 | __u32 packets; |
25 | }; | 24 | }; |
26 | struct gnet_stats_basic_packed | 25 | struct 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 | */ |
37 | struct gnet_stats_rate_est | 35 | struct 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 | */ |
51 | struct gnet_stats_queue | 48 | struct 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 | */ |
65 | struct gnet_estimator | 61 | struct 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 | |||
156 | struct i82593_conf_block { | ||
157 | u_char fifo_limit : 4, | ||
158 | forgnesi : 1, | ||
159 | fifo_32 : 1, | ||
160 | d6mod : 1, | ||
161 | throttle_enb : 1; | ||
162 | u_char throttle : 6, | ||
163 | cntrxint : 1, | ||
164 | contin : 1; | ||
165 | u_char addr_len : 3, | ||
166 | acloc : 1, | ||
167 | preamb_len : 2, | ||
168 | loopback : 2; | ||
169 | u_char lin_prio : 3, | ||
170 | tbofstop : 1, | ||
171 | exp_prio : 3, | ||
172 | bof_met : 1; | ||
173 | u_char : 4, | ||
174 | ifrm_spc : 4; | ||
175 | u_char : 5, | ||
176 | slottim_low : 3; | ||
177 | u_char slottim_hi : 3, | ||
178 | : 1, | ||
179 | max_retr : 4; | ||
180 | u_char prmisc : 1, | ||
181 | bc_dis : 1, | ||
182 | : 1, | ||
183 | crs_1 : 1, | ||
184 | nocrc_ins : 1, | ||
185 | crc_1632 : 1, | ||
186 | : 1, | ||
187 | crs_cdt : 1; | ||
188 | u_char cs_filter : 3, | ||
189 | crs_src : 1, | ||
190 | cd_filter : 3, | ||
191 | : 1; | ||
192 | u_char : 2, | ||
193 | min_fr_len : 6; | ||
194 | u_char lng_typ : 1, | ||
195 | lng_fld : 1, | ||
196 | rxcrc_xf : 1, | ||
197 | artx : 1, | ||
198 | sarec : 1, | ||
199 | tx_jabber : 1, /* why is this called max_len in the manual? */ | ||
200 | hash_1 : 1, | ||
201 | lbpkpol : 1; | ||
202 | u_char : 6, | ||
203 | fdx : 1, | ||
204 | : 1; | ||
205 | u_char dummy_6 : 6, /* supposed to be ones */ | ||
206 | mult_ia : 1, | ||
207 | dis_bof : 1; | ||
208 | u_char dummy_1 : 1, /* supposed to be one */ | ||
209 | tx_ifs_retrig : 2, | ||
210 | mc_all : 1, | ||
211 | rcv_mon : 2, | ||
212 | frag_acpt : 1, | ||
213 | tstrttrs : 1; | ||
214 | u_char fretx : 1, | ||
215 | runt_eop : 1, | ||
216 | hw_sw_pin : 1, | ||
217 | big_endn : 1, | ||
218 | syncrqs : 1, | ||
219 | sttlen : 1, | ||
220 | tx_eop : 1, | ||
221 | rx_eop : 1; | ||
222 | u_char rbuf_size : 5, | ||
223 | rcvstop : 1, | ||
224 | : 2; | ||
225 | }; | ||
226 | |||
227 | #define I82593_MAX_MULTICAST_ADDRESSES 128 /* Hardware hashed filter */ | ||
228 | |||
229 | #endif /* _I82593_H */ | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 52e15e079c61..d9724a28c0c2 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -115,7 +115,6 @@ | |||
115 | #define IEEE80211_MAX_SSID_LEN 32 | 115 | #define IEEE80211_MAX_SSID_LEN 32 |
116 | 116 | ||
117 | #define IEEE80211_MAX_MESH_ID_LEN 32 | 117 | #define IEEE80211_MAX_MESH_ID_LEN 32 |
118 | #define IEEE80211_MESH_CONFIG_LEN 24 | ||
119 | 118 | ||
120 | #define IEEE80211_QOS_CTL_LEN 2 | 119 | #define IEEE80211_QOS_CTL_LEN 2 |
121 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F | 120 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F |
@@ -472,7 +471,7 @@ static inline int ieee80211_is_cfendack(__le16 fc) | |||
472 | } | 471 | } |
473 | 472 | ||
474 | /** | 473 | /** |
475 | * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC | 474 | * ieee80211_is_nullfunc - check if frame is a regular (non-QoS) nullfunc frame |
476 | * @fc: frame control bytes in little-endian byteorder | 475 | * @fc: frame control bytes in little-endian byteorder |
477 | */ | 476 | */ |
478 | static inline int ieee80211_is_nullfunc(__le16 fc) | 477 | static 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 | */ | ||
487 | static 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 | |||
484 | struct ieee80211s_hdr { | 493 | struct 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 | */ | ||
561 | struct 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 | */ | ||
576 | struct 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 | ||
549 | struct ieee80211_mgmt { | 587 | struct ieee80211_mgmt { |
@@ -1060,6 +1098,7 @@ enum ieee80211_eid { | |||
1060 | WLAN_EID_PREQ = 68, | 1098 | WLAN_EID_PREQ = 68, |
1061 | WLAN_EID_PREP = 69, | 1099 | WLAN_EID_PREP = 69, |
1062 | WLAN_EID_PERR = 70, | 1100 | WLAN_EID_PERR = 70, |
1101 | WLAN_EID_RANN = 49, /* compatible with FreeBSD */ | ||
1063 | /* 802.11h */ | 1102 | /* 802.11h */ |
1064 | WLAN_EID_PWR_CONSTRAINT = 32, | 1103 | WLAN_EID_PWR_CONSTRAINT = 32, |
1065 | WLAN_EID_PWR_CAPABILITY = 33, | 1104 | WLAN_EID_PWR_CAPABILITY = 33, |
@@ -1227,6 +1266,8 @@ enum ieee80211_sa_query_action { | |||
1227 | 1266 | ||
1228 | #define WLAN_MAX_KEY_LEN 32 | 1267 | #define WLAN_MAX_KEY_LEN 32 |
1229 | 1268 | ||
1269 | #define WLAN_PMKID_LEN 16 | ||
1270 | |||
1230 | /** | 1271 | /** |
1231 | * ieee80211_get_qos_ctl - get pointer to qos control bytes | 1272 | * ieee80211_get_qos_ctl - get pointer to qos control bytes |
1232 | * @hdr: the frame | 1273 | * @hdr: the frame |
diff --git a/include/linux/if.h b/include/linux/if.h index b9a6229f3be7..3a9f410a296b 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -70,6 +70,7 @@ | |||
70 | #define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to | 70 | #define IFF_XMIT_DST_RELEASE 0x400 /* dev_hard_start_xmit() is allowed to |
71 | * release skb->dst | 71 | * release skb->dst |
72 | */ | 72 | */ |
73 | #define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */ | ||
73 | 74 | ||
74 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 75 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
75 | #define IF_GET_PROTO 0x0002 | 76 | #define IF_GET_PROTO 0x0002 |
@@ -125,8 +126,7 @@ enum { | |||
125 | * being very small might be worth keeping for clean configuration. | 126 | * being very small might be worth keeping for clean configuration. |
126 | */ | 127 | */ |
127 | 128 | ||
128 | struct ifmap | 129 | struct 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 | ||
139 | struct if_settings | 139 | struct 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 | ||
164 | struct ifreq | 163 | struct 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 | ||
214 | struct ifconf | 212 | struct 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 | ||
7 | struct ifaddrmsg | 7 | struct 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 | */ |
23 | enum | 22 | enum { |
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 | ||
50 | struct ifa_cacheinfo | 48 | struct 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 | ||
15 | struct ifaddrlblmsg | 15 | struct 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 | ||
25 | enum | 24 | enum { |
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 | */ |
59 | struct arc_rfc1201 | 59 | struct 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 | */ |
72 | struct arc_rfc1051 | 71 | struct 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 | */ |
84 | struct arc_eth_encap | 82 | struct 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 | ||
93 | struct arc_cap | 90 | struct 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 | */ |
111 | struct arc_hardware | 107 | struct 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 | */ |
123 | struct archdr | 118 | struct 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 | ||
136 | struct arphdr | 136 | struct 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 | ||
97 | typedef struct ifslave | 97 | typedef 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 | ||
52 | struct __bridge_info | 52 | struct __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 | ||
75 | struct __port_info | 74 | struct __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 | ||
92 | struct __fdb_entry | 90 | struct __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 | ||
8 | struct ec_addr | 8 | struct 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 | ||
14 | struct sockaddr_ec | 13 | struct 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. */ |
40 | struct ec_framehdr | 38 | struct 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 | ||
65 | struct ec_device | 62 | struct 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 | ||
137 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 137 | extern 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 | */ | ||
142 | extern 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 */ |
66 | struct fddi_8022_1_hdr | 66 | struct 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 */ |
74 | struct fddi_8022_2_hdr | 73 | struct 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 |
84 | struct fddi_snap_hdr | 82 | struct 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 */ |
94 | struct fddihdr | 91 | struct 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 | ||
54 | struct hipnet_statistics | 54 | struct 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 | ||
80 | struct hippi_fp_hdr | 79 | struct 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 | ||
111 | struct hippi_le_hdr | 109 | struct 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 | */ |
142 | struct hippi_snap_hdr | 139 | struct 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 | ||
151 | struct hippi_hdr | 147 | struct 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 */ |
8 | struct rtnl_link_stats | 8 | struct 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 */ |
42 | struct rtnl_link_ifmap | 41 | struct 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 | ||
52 | enum | 50 | enum { |
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 */ |
126 | enum | 123 | enum { |
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 | ||
140 | struct ifla_cacheinfo | 136 | struct 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 | ||
148 | enum | 143 | enum { |
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 | ||
161 | enum | 155 | enum { |
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 | ||
178 | enum | 171 | enum { |
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 | ||
187 | struct ifla_vlan_qos_mapping | 179 | struct ifla_vlan_qos_mapping { |
188 | { | ||
189 | __u32 from; | 180 | __u32 from; |
190 | __u32 to; | 181 | __u32 to; |
191 | }; | 182 | }; |
192 | 183 | ||
184 | /* MACVLAN section */ | ||
185 | enum { | ||
186 | IFLA_MACVLAN_UNSPEC, | ||
187 | IFLA_MACVLAN_MODE, | ||
188 | __IFLA_MACVLAN_MAX, | ||
189 | }; | ||
190 | |||
191 | #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1) | ||
192 | |||
193 | enum 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 | ||
6 | struct sockaddr_pkt | 6 | struct 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 | ||
13 | struct sockaddr_ll | 12 | struct 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 | ||
52 | struct tpacket_stats | 50 | struct 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 | ||
58 | struct tpacket_auxdata | 55 | struct 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 | ||
81 | struct tpacket_hdr | 77 | struct 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 | ||
96 | struct tpacket2_hdr | 91 | struct 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 | ||
110 | enum tpacket_versions | 104 | enum 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 | ||
129 | struct tpacket_req | 122 | struct 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 | ||
137 | struct packet_mreq | 129 | struct 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 | ||
18 | struct plipconf | 18 | struct 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 | */ |
27 | struct pppol2tp_addr | 27 | struct 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 | ||
28 | struct ip_tunnel_parm | 33 | struct 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 | ||
54 | enum | 58 | struct ip_tunnel_6rd { |
55 | { | 59 | struct in6_addr prefix; |
60 | __be32 relay_prefix; | ||
61 | __u16 prefixlen; | ||
62 | __u16 relay_prefixlen; | ||
63 | }; | ||
64 | |||
65 | enum { | ||
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 */ |
69 | extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); | 73 | extern 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) |
112 | extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); | 117 | extern 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); | |||
115 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 120 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
116 | u16 vlan_tci, int polling); | 121 | u16 vlan_tci, int polling); |
117 | extern int vlan_hwaccel_do_receive(struct sk_buff *skb); | 122 | extern int vlan_hwaccel_do_receive(struct sk_buff *skb); |
118 | extern int vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 123 | extern gro_result_t |
119 | unsigned int vlan_tci, struct sk_buff *skb); | 124 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
120 | extern 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); | 126 | extern gro_result_t |
127 | vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp, | ||
128 | unsigned int vlan_tci); | ||
122 | 129 | ||
123 | #else | 130 | #else |
124 | static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) | 131 | static 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 | ||
148 | static inline int vlan_gro_receive(struct napi_struct *napi, | 155 | static inline gro_result_t |
149 | struct vlan_group *grp, | 156 | vlan_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 | ||
155 | static inline int vlan_gro_frags(struct napi_struct *napi, | 162 | static inline gro_result_t |
156 | struct vlan_group *grp, unsigned int vlan_tci) | 163 | vlan_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) | |||
231 | static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, | 239 | static 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 { | |||
331 | enum vlan_flags { | 339 | enum 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 | ||
336 | enum vlan_name_types { | 345 | enum 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 | ||
30 | struct igmphdr | 30 | struct 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 * | |||
151 | extern int sysctl_igmp_max_memberships; | 150 | extern int sysctl_igmp_max_memberships; |
152 | extern int sysctl_igmp_max_msf; | 151 | extern int sysctl_igmp_max_msf; |
153 | 152 | ||
154 | struct ip_sf_socklist | 153 | struct 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 | ||
170 | struct ip_mc_socklist | 168 | struct 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 | ||
178 | struct ip_sf_list | 175 | struct 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 | ||
188 | struct ip_mc_list | 184 | struct 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 | ||
121 | struct ip_mreq | 121 | struct 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 | ||
127 | struct ip_mreqn | 126 | struct 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 | ||
152 | struct group_req | 150 | struct 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 | ||
158 | struct group_source_req | 155 | struct 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 | ||
165 | struct group_filter | 161 | struct 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 | ||
178 | struct in_pktinfo | 173 | struct 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 | ||
30 | struct in6_addr | 30 | struct 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 | ||
78 | struct in6_flowlabel_req | 76 | struct in6_flowlabel_req { |
79 | { | ||
80 | struct in6_addr flr_dst; | 77 | struct in6_addr flr_dst; |
81 | __be32 flr_label; | 78 | __be32 flr_label; |
82 | __u8 flr_action; | 79 | __u8 flr_action; |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index ad27c7da8798..699e85c01a4d 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -10,15 +10,13 @@ | |||
10 | #include <linux/timer.h> | 10 | #include <linux/timer.h> |
11 | #include <linux/sysctl.h> | 11 | #include <linux/sysctl.h> |
12 | 12 | ||
13 | struct ipv4_devconf | 13 | struct 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 | ||
20 | struct in_device | 19 | struct in_device { |
21 | { | ||
22 | struct net_device *dev; | 20 | struct net_device *dev; |
23 | atomic_t refcnt; | 21 | atomic_t refcnt; |
24 | int dead; | 22 | int dead; |
@@ -85,6 +83,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) | 83 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) |
86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ | 84 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ |
87 | ACCEPT_SOURCE_ROUTE) | 85 | ACCEPT_SOURCE_ROUTE) |
86 | #define IN_DEV_ACCEPT_LOCAL(in_dev) IN_DEV_ORCONF((in_dev), ACCEPT_LOCAL) | ||
88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) | 87 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) |
89 | 88 | ||
90 | #define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) | 89 | #define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) |
@@ -110,8 +109,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
110 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) | 109 | #define IN_DEV_ARP_IGNORE(in_dev) IN_DEV_MAXCONF((in_dev), ARP_IGNORE) |
111 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) | 110 | #define IN_DEV_ARP_NOTIFY(in_dev) IN_DEV_MAXCONF((in_dev), ARP_NOTIFY) |
112 | 111 | ||
113 | struct in_ifaddr | 112 | struct in_ifaddr { |
114 | { | ||
115 | struct in_ifaddr *ifa_next; | 113 | struct in_ifaddr *ifa_next; |
116 | struct in_device *ifa_dev; | 114 | struct in_device *ifa_dev; |
117 | struct rcu_head rcu_head; | 115 | struct rcu_head rcu_head; |
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h index 148265e63e8d..dfc170362842 100644 --- a/include/linux/ip_vs.h +++ b/include/linux/ip_vs.h | |||
@@ -127,8 +127,7 @@ struct ip_vs_dest_user { | |||
127 | /* | 127 | /* |
128 | * IPVS statistics object (for user space) | 128 | * IPVS statistics object (for user space) |
129 | */ | 129 | */ |
130 | struct ip_vs_stats_user | 130 | struct 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 | ||
74 | struct mfcctl | 79 | struct 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 | ||
90 | struct sioc_sg_req | 94 | struct 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 | ||
103 | struct sioc_vif_req | 106 | struct 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 | ||
117 | struct igmpmsg | 119 | struct 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 | ||
179 | struct vif_device | 180 | struct 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 | ||
193 | struct mfc_cache | 193 | struct 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 | ||
78 | struct mf6cctl | 78 | struct 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 | ||
90 | struct sioc_sg_req6 | 89 | struct 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 | ||
103 | struct sioc_mif_req6 | 101 | struct 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 | ||
175 | struct mif_device | 172 | struct 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 | ||
188 | struct mfc6_cache | 184 | struct 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 | ||
7 | struct ndmsg | 7 | struct 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 | ||
18 | enum | 17 | enum { |
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 | ||
59 | struct nda_cacheinfo | 57 | struct 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 | ||
92 | struct ndt_stats | 89 | struct 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 | ||
127 | struct ndtmsg | 123 | struct 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 | ||
134 | struct ndt_config | 129 | struct ndt_config { |
135 | { | ||
136 | __u16 ndtc_key_len; | 130 | __u16 ndtc_key_len; |
137 | __u16 ndtc_entry_size; | 131 | __u16 ndtc_entry_size; |
138 | __u32 ndtc_entries; | 132 | __u32 ndtc_entries; |
diff --git a/include/linux/net.h b/include/linux/net.h index d7e26e30c8c2..5e8083cacc8b 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ | 41 | #define SYS_SENDMSG 16 /* sys_sendmsg(2) */ |
42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ | 43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ |
44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ | ||
44 | 45 | ||
45 | typedef enum { | 46 | typedef 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 | |||
201 | struct net_proto_family { | 205 | struct 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); | |||
263 | extern int kernel_sock_shutdown(struct socket *sock, | 268 | extern 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) \ | ||
274 | static 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) \ | ||
284 | static 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) \ | ||
295 | SOCKCALL_WRAP(name, release, (struct socket *sock), (sock)) \ | ||
296 | SOCKCALL_WRAP(name, bind, (struct socket *sock, struct sockaddr *uaddr, int addr_len), \ | ||
297 | (sock, uaddr, addr_len)) \ | ||
298 | SOCKCALL_WRAP(name, connect, (struct socket *sock, struct sockaddr * uaddr, \ | ||
299 | int addr_len, int flags), \ | ||
300 | (sock, uaddr, addr_len, flags)) \ | ||
301 | SOCKCALL_WRAP(name, socketpair, (struct socket *sock1, struct socket *sock2), \ | ||
302 | (sock1, sock2)) \ | ||
303 | SOCKCALL_WRAP(name, accept, (struct socket *sock, struct socket *newsock, \ | ||
304 | int flags), (sock, newsock, flags)) \ | ||
305 | SOCKCALL_WRAP(name, getname, (struct socket *sock, struct sockaddr *uaddr, \ | ||
306 | int *addr_len, int peer), (sock, uaddr, addr_len, peer)) \ | ||
307 | SOCKCALL_UWRAP(name, poll, (struct file *file, struct socket *sock, struct poll_table_struct *wait), \ | ||
308 | (file, sock, wait)) \ | ||
309 | SOCKCALL_WRAP(name, ioctl, (struct socket *sock, unsigned int cmd, \ | ||
310 | unsigned long arg), (sock, cmd, arg)) \ | ||
311 | SOCKCALL_WRAP(name, compat_ioctl, (struct socket *sock, unsigned int cmd, \ | ||
312 | unsigned long arg), (sock, cmd, arg)) \ | ||
313 | SOCKCALL_WRAP(name, listen, (struct socket *sock, int len), (sock, len)) \ | ||
314 | SOCKCALL_WRAP(name, shutdown, (struct socket *sock, int flags), (sock, flags)) \ | ||
315 | SOCKCALL_WRAP(name, setsockopt, (struct socket *sock, int level, int optname, \ | ||
316 | char __user *optval, unsigned int optlen), (sock, level, optname, optval, optlen)) \ | ||
317 | SOCKCALL_WRAP(name, getsockopt, (struct socket *sock, int level, int optname, \ | ||
318 | char __user *optval, int __user *optlen), (sock, level, optname, optval, optlen)) \ | ||
319 | SOCKCALL_WRAP(name, sendmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len), \ | ||
320 | (iocb, sock, m, len)) \ | ||
321 | SOCKCALL_WRAP(name, recvmsg, (struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags), \ | ||
322 | (iocb, sock, m, len, flags)) \ | ||
323 | SOCKCALL_WRAP(name, mmap, (struct file *file, struct socket *sock, struct vm_area_struct *vma), \ | ||
324 | (file, sock, vma)) \ | ||
325 | \ | ||
326 | static const struct proto_ops name##_ops = { \ | ||
327 | .family = fam, \ | ||
328 | .owner = THIS_MODULE, \ | ||
329 | .release = __lock_##name##_release, \ | ||
330 | .bind = __lock_##name##_bind, \ | ||
331 | .connect = __lock_##name##_connect, \ | ||
332 | .socketpair = __lock_##name##_socketpair, \ | ||
333 | .accept = __lock_##name##_accept, \ | ||
334 | .getname = __lock_##name##_getname, \ | ||
335 | .poll = __lock_##name##_poll, \ | ||
336 | .ioctl = __lock_##name##_ioctl, \ | ||
337 | .compat_ioctl = __lock_##name##_compat_ioctl, \ | ||
338 | .listen = __lock_##name##_listen, \ | ||
339 | .shutdown = __lock_##name##_shutdown, \ | ||
340 | .setsockopt = __lock_##name##_setsockopt, \ | ||
341 | .getsockopt = __lock_##name##_getsockopt, \ | ||
342 | .sendmsg = __lock_##name##_sendmsg, \ | ||
343 | .recvmsg = __lock_##name##_recvmsg, \ | ||
344 | .mmap = __lock_##name##_mmap, \ | ||
345 | }; | ||
346 | |||
347 | #endif | ||
348 | |||
349 | #define MODULE_ALIAS_NETPROTO(proto) \ | 271 | #define MODULE_ALIAS_NETPROTO(proto) \ |
350 | MODULE_ALIAS("net-pf-" __stringify(proto)) | 272 | MODULE_ALIAS("net-pf-" __stringify(proto)) |
351 | 273 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 812a5f3c2abe..a3fccc85b1a0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -63,30 +63,69 @@ struct wireless_dev; | |||
63 | #define HAVE_FREE_NETDEV /* free_netdev() */ | 63 | #define HAVE_FREE_NETDEV /* free_netdev() */ |
64 | #define HAVE_NETDEV_PRIV /* netdev_priv() */ | 64 | #define HAVE_NETDEV_PRIV /* netdev_priv() */ |
65 | 65 | ||
66 | #define NET_XMIT_SUCCESS 0 | ||
67 | #define NET_XMIT_DROP 1 /* skb dropped */ | ||
68 | #define NET_XMIT_CN 2 /* congestion notification */ | ||
69 | #define NET_XMIT_POLICED 3 /* skb is shot by police */ | ||
70 | #define NET_XMIT_MASK 0xFFFF /* qdisc flags in net/sch_generic.h */ | ||
71 | |||
72 | /* Backlog congestion levels */ | 66 | /* Backlog congestion levels */ |
73 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ | 67 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ |
74 | #define NET_RX_DROP 1 /* packet dropped */ | 68 | #define NET_RX_DROP 1 /* packet dropped */ |
69 | |||
70 | /* | ||
71 | * Transmit return codes: transmit return codes originate from three different | ||
72 | * namespaces: | ||
73 | * | ||
74 | * - qdisc return codes | ||
75 | * - driver transmit return codes | ||
76 | * - errno values | ||
77 | * | ||
78 | * Drivers are allowed to return any one of those in their hard_start_xmit() | ||
79 | * function. Real network devices commonly used with qdiscs should only return | ||
80 | * the driver transmit return codes though - when qdiscs are used, the actual | ||
81 | * transmission happens asynchronously, so the value is not propagated to | ||
82 | * higher layers. Virtual network devices transmit synchronously, in this case | ||
83 | * the driver transmit return codes are consumed by dev_queue_xmit(), all | ||
84 | * others are propagated to higher layers. | ||
85 | */ | ||
86 | |||
87 | /* qdisc ->enqueue() return codes. */ | ||
88 | #define NET_XMIT_SUCCESS 0x00 | ||
89 | #define NET_XMIT_DROP 0x01 /* skb dropped */ | ||
90 | #define NET_XMIT_CN 0x02 /* congestion notification */ | ||
91 | #define NET_XMIT_POLICED 0x03 /* skb is shot by police */ | ||
92 | #define NET_XMIT_MASK 0x0f /* qdisc flags in net/sch_generic.h */ | ||
75 | 93 | ||
76 | /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It | 94 | /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It |
77 | * indicates that the device will soon be dropping packets, or already drops | 95 | * indicates that the device will soon be dropping packets, or already drops |
78 | * some packets of the same priority; prompting us to send less aggressively. */ | 96 | * some packets of the same priority; prompting us to send less aggressively. */ |
79 | #define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) | 97 | #define net_xmit_eval(e) ((e) == NET_XMIT_CN ? 0 : (e)) |
80 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) | 98 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) |
81 | 99 | ||
82 | /* Driver transmit return codes */ | 100 | /* Driver transmit return codes */ |
101 | #define NETDEV_TX_MASK 0xf0 | ||
102 | |||
83 | enum netdev_tx { | 103 | enum 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 | }; |
88 | typedef enum netdev_tx netdev_tx_t; | 109 | typedef 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 | */ | ||
115 | static 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 | ||
128 | struct net_device_stats | 167 | struct 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; | |||
179 | struct neigh_parms; | 217 | struct neigh_parms; |
180 | struct sk_buff; | 218 | struct sk_buff; |
181 | 219 | ||
182 | struct netif_rx_stats | 220 | struct 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 | ||
190 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 227 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
191 | 228 | ||
192 | struct dev_addr_list | 229 | struct 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 | ||
230 | struct hh_cache | 266 | struct 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 | ||
294 | enum netdev_state_t | 329 | enum 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 | ||
344 | enum | 378 | enum { |
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 | ||
351 | enum { | 384 | enum 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 | }; |
391 | typedef enum gro_result gro_result_t; | ||
358 | 392 | ||
359 | extern void __napi_schedule(struct napi_struct *n); | 393 | extern 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 | ||
460 | enum netdev_queue_state_t | 494 | enum 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 | ||
651 | struct net_device | 688 | struct net_device { |
652 | { | ||
653 | 689 | ||
654 | /* | 690 | /* |
655 | * This is the first field of the "visible" part of this structure | 691 | * This is the first field of the "visible" part of this structure |
@@ -683,6 +719,7 @@ struct net_device | |||
683 | 719 | ||
684 | struct list_head dev_list; | 720 | struct list_head dev_list; |
685 | struct list_head napi_list; | 721 | struct list_head napi_list; |
722 | struct list_head unreg_list; | ||
686 | 723 | ||
687 | /* Net device features */ | 724 | /* Net device features */ |
688 | unsigned long features; | 725 | unsigned long features; |
@@ -859,7 +896,7 @@ struct net_device | |||
859 | /* device index hash chain */ | 896 | /* device index hash chain */ |
860 | struct hlist_node index_hlist; | 897 | struct hlist_node index_hlist; |
861 | 898 | ||
862 | struct net_device *link_watch_next; | 899 | struct list_head link_watch_list; |
863 | 900 | ||
864 | /* register/unregister state machine */ | 901 | /* register/unregister state machine */ |
865 | enum { NETREG_UNINITIALIZED=0, | 902 | enum { NETREG_UNINITIALIZED=0, |
@@ -894,8 +931,8 @@ struct net_device | |||
894 | 931 | ||
895 | /* class/net/name entry */ | 932 | /* class/net/name entry */ |
896 | struct device dev; | 933 | struct device dev; |
897 | /* space for optional statistics and wireless sysfs groups */ | 934 | /* space for optional device, statistics, and wireless sysfs groups */ |
898 | const struct attribute_group *sysfs_groups[3]; | 935 | const struct attribute_group *sysfs_groups[4]; |
899 | 936 | ||
900 | /* rtnetlink link ops */ | 937 | /* rtnetlink link ops */ |
901 | const struct rtnl_link_ops *rtnl_link_ops; | 938 | const struct rtnl_link_ops *rtnl_link_ops; |
@@ -909,7 +946,7 @@ struct net_device | |||
909 | 946 | ||
910 | #ifdef CONFIG_DCB | 947 | #ifdef CONFIG_DCB |
911 | /* Data Center Bridging netlink ops */ | 948 | /* Data Center Bridging netlink ops */ |
912 | struct dcbnl_rtnl_ops *dcbnl_ops; | 949 | const struct dcbnl_rtnl_ops *dcbnl_ops; |
913 | #endif | 950 | #endif |
914 | 951 | ||
915 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 952 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
@@ -1075,10 +1112,16 @@ extern rwlock_t dev_base_lock; /* Device list lock */ | |||
1075 | 1112 | ||
1076 | #define for_each_netdev(net, d) \ | 1113 | #define for_each_netdev(net, d) \ |
1077 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) | 1114 | list_for_each_entry(d, &(net)->dev_base_head, dev_list) |
1115 | #define for_each_netdev_reverse(net, d) \ | ||
1116 | list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list) | ||
1117 | #define for_each_netdev_rcu(net, d) \ | ||
1118 | list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list) | ||
1078 | #define for_each_netdev_safe(net, d, n) \ | 1119 | #define for_each_netdev_safe(net, d, n) \ |
1079 | list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list) | 1120 | list_for_each_entry_safe(d, n, &(net)->dev_base_head, dev_list) |
1080 | #define for_each_netdev_continue(net, d) \ | 1121 | #define for_each_netdev_continue(net, d) \ |
1081 | list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list) | 1122 | list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list) |
1123 | #define for_each_netdev_continue_rcu(net, d) \ | ||
1124 | list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list) | ||
1082 | #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list) | 1125 | #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list) |
1083 | 1126 | ||
1084 | static inline struct net_device *next_net_device(struct net_device *dev) | 1127 | static inline struct net_device *next_net_device(struct net_device *dev) |
@@ -1091,6 +1134,16 @@ static inline struct net_device *next_net_device(struct net_device *dev) | |||
1091 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); | 1134 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); |
1092 | } | 1135 | } |
1093 | 1136 | ||
1137 | static inline struct net_device *next_net_device_rcu(struct net_device *dev) | ||
1138 | { | ||
1139 | struct list_head *lh; | ||
1140 | struct net *net; | ||
1141 | |||
1142 | net = dev_net(dev); | ||
1143 | lh = rcu_dereference(dev->dev_list.next); | ||
1144 | return lh == &net->dev_base_head ? NULL : net_device_entry(lh); | ||
1145 | } | ||
1146 | |||
1094 | static inline struct net_device *first_net_device(struct net *net) | 1147 | static inline struct net_device *first_net_device(struct net *net) |
1095 | { | 1148 | { |
1096 | return list_empty(&net->dev_base_head) ? NULL : | 1149 | return list_empty(&net->dev_base_head) ? NULL : |
@@ -1109,6 +1162,7 @@ extern void __dev_remove_pack(struct packet_type *pt); | |||
1109 | extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags, | 1162 | extern struct net_device *dev_get_by_flags(struct net *net, unsigned short flags, |
1110 | unsigned short mask); | 1163 | unsigned short mask); |
1111 | extern struct net_device *dev_get_by_name(struct net *net, const char *name); | 1164 | extern struct net_device *dev_get_by_name(struct net *net, const char *name); |
1165 | extern struct net_device *dev_get_by_name_rcu(struct net *net, const char *name); | ||
1112 | extern struct net_device *__dev_get_by_name(struct net *net, const char *name); | 1166 | extern struct net_device *__dev_get_by_name(struct net *net, const char *name); |
1113 | extern int dev_alloc_name(struct net_device *dev, const char *name); | 1167 | extern int dev_alloc_name(struct net_device *dev, const char *name); |
1114 | extern int dev_open(struct net_device *dev); | 1168 | extern int dev_open(struct net_device *dev); |
@@ -1116,7 +1170,14 @@ extern int dev_close(struct net_device *dev); | |||
1116 | extern void dev_disable_lro(struct net_device *dev); | 1170 | extern void dev_disable_lro(struct net_device *dev); |
1117 | extern int dev_queue_xmit(struct sk_buff *skb); | 1171 | extern int dev_queue_xmit(struct sk_buff *skb); |
1118 | extern int register_netdevice(struct net_device *dev); | 1172 | extern int register_netdevice(struct net_device *dev); |
1119 | extern void unregister_netdevice(struct net_device *dev); | 1173 | extern void unregister_netdevice_queue(struct net_device *dev, |
1174 | struct list_head *head); | ||
1175 | extern void unregister_netdevice_many(struct list_head *head); | ||
1176 | static inline void unregister_netdevice(struct net_device *dev) | ||
1177 | { | ||
1178 | unregister_netdevice_queue(dev, NULL); | ||
1179 | } | ||
1180 | |||
1120 | extern void free_netdev(struct net_device *dev); | 1181 | extern void free_netdev(struct net_device *dev); |
1121 | extern void synchronize_net(void); | 1182 | extern void synchronize_net(void); |
1122 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1183 | extern int register_netdevice_notifier(struct notifier_block *nb); |
@@ -1127,6 +1188,7 @@ extern void netdev_resync_ops(struct net_device *dev); | |||
1127 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1188 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1128 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1189 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |
1129 | extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); | 1190 | extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); |
1191 | extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); | ||
1130 | extern int dev_restart(struct net_device *dev); | 1192 | extern int dev_restart(struct net_device *dev); |
1131 | #ifdef CONFIG_NETPOLL_TRAP | 1193 | #ifdef CONFIG_NETPOLL_TRAP |
1132 | extern int netpoll_trap(void); | 1194 | extern int netpoll_trap(void); |
@@ -1212,8 +1274,7 @@ static inline int unregister_gifconf(unsigned int family) | |||
1212 | * Incoming packets are placed on per-cpu queues so that | 1274 | * Incoming packets are placed on per-cpu queues so that |
1213 | * no locking is needed. | 1275 | * no locking is needed. |
1214 | */ | 1276 | */ |
1215 | struct softnet_data | 1277 | struct softnet_data { |
1216 | { | ||
1217 | struct Qdisc *output_queue; | 1278 | struct Qdisc *output_queue; |
1218 | struct sk_buff_head input_pkt_queue; | 1279 | struct sk_buff_head input_pkt_queue; |
1219 | struct list_head poll_list; | 1280 | struct list_head poll_list; |
@@ -1467,18 +1528,19 @@ extern int netif_rx_ni(struct sk_buff *skb); | |||
1467 | #define HAVE_NETIF_RECEIVE_SKB 1 | 1528 | #define HAVE_NETIF_RECEIVE_SKB 1 |
1468 | extern int netif_receive_skb(struct sk_buff *skb); | 1529 | extern int netif_receive_skb(struct sk_buff *skb); |
1469 | extern void napi_gro_flush(struct napi_struct *napi); | 1530 | extern void napi_gro_flush(struct napi_struct *napi); |
1470 | extern int dev_gro_receive(struct napi_struct *napi, | 1531 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, |
1471 | struct sk_buff *skb); | 1532 | struct sk_buff *skb); |
1472 | extern int napi_skb_finish(int ret, struct sk_buff *skb); | 1533 | extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); |
1473 | extern int napi_gro_receive(struct napi_struct *napi, | 1534 | extern gro_result_t napi_gro_receive(struct napi_struct *napi, |
1474 | struct sk_buff *skb); | 1535 | struct sk_buff *skb); |
1475 | extern void napi_reuse_skb(struct napi_struct *napi, | 1536 | extern void napi_reuse_skb(struct napi_struct *napi, |
1476 | struct sk_buff *skb); | 1537 | struct sk_buff *skb); |
1477 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); | 1538 | extern struct sk_buff * napi_get_frags(struct napi_struct *napi); |
1478 | extern int napi_frags_finish(struct napi_struct *napi, | 1539 | extern gro_result_t napi_frags_finish(struct napi_struct *napi, |
1479 | struct sk_buff *skb, int ret); | 1540 | struct sk_buff *skb, |
1541 | gro_result_t ret); | ||
1480 | extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); | 1542 | extern struct sk_buff * napi_frags_skb(struct napi_struct *napi); |
1481 | extern int napi_gro_frags(struct napi_struct *napi); | 1543 | extern gro_result_t napi_gro_frags(struct napi_struct *napi); |
1482 | 1544 | ||
1483 | static inline void napi_free_frags(struct napi_struct *napi) | 1545 | static inline void napi_free_frags(struct napi_struct *napi) |
1484 | { | 1546 | { |
@@ -1502,6 +1564,8 @@ extern int dev_set_mac_address(struct net_device *, | |||
1502 | extern int dev_hard_start_xmit(struct sk_buff *skb, | 1564 | extern int dev_hard_start_xmit(struct sk_buff *skb, |
1503 | struct net_device *dev, | 1565 | struct net_device *dev, |
1504 | struct netdev_queue *txq); | 1566 | struct netdev_queue *txq); |
1567 | extern int dev_forward_skb(struct net_device *dev, | ||
1568 | struct sk_buff *skb); | ||
1505 | 1569 | ||
1506 | extern int netdev_budget; | 1570 | extern int netdev_budget; |
1507 | 1571 | ||
@@ -1540,6 +1604,7 @@ static inline void dev_hold(struct net_device *dev) | |||
1540 | */ | 1604 | */ |
1541 | 1605 | ||
1542 | extern void linkwatch_fire_event(struct net_device *dev); | 1606 | extern void linkwatch_fire_event(struct net_device *dev); |
1607 | extern void linkwatch_forget_dev(struct net_device *dev); | ||
1543 | 1608 | ||
1544 | /** | 1609 | /** |
1545 | * netif_carrier_ok - test if carrier present | 1610 | * netif_carrier_ok - test if carrier present |
@@ -1609,7 +1674,8 @@ static inline int netif_dormant(const struct net_device *dev) | |||
1609 | * | 1674 | * |
1610 | * Check if carrier is operational | 1675 | * Check if carrier is operational |
1611 | */ | 1676 | */ |
1612 | static inline int netif_oper_up(const struct net_device *dev) { | 1677 | static inline int netif_oper_up(const struct net_device *dev) |
1678 | { | ||
1613 | return (dev->operstate == IF_OPER_UP || | 1679 | return (dev->operstate == IF_OPER_UP || |
1614 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); | 1680 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); |
1615 | } | 1681 | } |
@@ -1880,6 +1946,7 @@ extern void netdev_features_change(struct net_device *dev); | |||
1880 | extern void dev_load(struct net *net, const char *name); | 1946 | extern void dev_load(struct net *net, const char *name); |
1881 | extern void dev_mcast_init(void); | 1947 | extern void dev_mcast_init(void); |
1882 | extern const struct net_device_stats *dev_get_stats(struct net_device *dev); | 1948 | extern const struct net_device_stats *dev_get_stats(struct net_device *dev); |
1949 | extern void dev_txq_stats_fold(const struct net_device *dev, struct net_device_stats *stats); | ||
1883 | 1950 | ||
1884 | extern int netdev_max_backlog; | 1951 | extern int netdev_max_backlog; |
1885 | extern int weight_p; | 1952 | extern int weight_p; |
@@ -1914,6 +1981,9 @@ unsigned long netdev_increment_features(unsigned long all, unsigned long one, | |||
1914 | unsigned long mask); | 1981 | unsigned long mask); |
1915 | unsigned long netdev_fix_features(unsigned long features, const char *name); | 1982 | unsigned long netdev_fix_features(unsigned long features, const char *name); |
1916 | 1983 | ||
1984 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | ||
1985 | struct net_device *dev); | ||
1986 | |||
1917 | static inline int net_gso_ok(int features, int gso_type) | 1987 | static inline int net_gso_ok(int features, int gso_type) |
1918 | { | 1988 | { |
1919 | int feature = gso_type << NETIF_F_GSO_SHIFT; | 1989 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 6132b5e6d9d3..48c54960773c 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -93,8 +93,7 @@ typedef unsigned int nf_hookfn(unsigned int hooknum, | |||
93 | const struct net_device *out, | 93 | const struct net_device *out, |
94 | int (*okfn)(struct sk_buff *)); | 94 | int (*okfn)(struct sk_buff *)); |
95 | 95 | ||
96 | struct nf_hook_ops | 96 | struct 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 | ||
109 | struct nf_sockopt_ops | 108 | struct 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. */ |
6 | enum ip_conntrack_info | 6 | enum 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__ |
79 | struct ip_conntrack_stat | 78 | struct 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 */ |
6 | enum nf_ct_ftp_type | 6 | enum 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 | ||
19 | struct ip_ct_sctp | 19 | struct ip_ct_sctp { |
20 | { | ||
21 | enum sctp_conntrack state; | 20 | enum sctp_conntrack state; |
22 | 21 | ||
23 | __be32 vtag[IP_CT_DIR_MAX]; | 22 | __be32 vtag[IP_CT_DIR_MAX]; |
diff --git a/include/linux/netfilter/nf_conntrack_tcp.h b/include/linux/netfilter/nf_conntrack_tcp.h index 4352feed2377..6e135f97e59a 100644 --- a/include/linux/netfilter/nf_conntrack_tcp.h +++ b/include/linux/netfilter/nf_conntrack_tcp.h | |||
@@ -55,8 +55,7 @@ struct ip_ct_tcp_state { | |||
55 | u_int8_t flags; /* per direction options */ | 55 | u_int8_t flags; /* per direction options */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct ip_ct_tcp | 58 | struct ip_ct_tcp { |
59 | { | ||
60 | struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ | 59 | struct ip_ct_tcp_state seen[2]; /* connection parameters per direction */ |
61 | u_int8_t state; /* state of the connection (enum tcp_conntrack) */ | 60 | u_int8_t state; /* state of the connection (enum tcp_conntrack) */ |
62 | /* For detecting stale connections */ | 61 | /* For detecting stale connections */ |
@@ -67,6 +66,9 @@ struct ip_ct_tcp | |||
67 | u_int32_t last_ack; /* Last sequence number seen in opposite dir */ | 66 | u_int32_t last_ack; /* Last sequence number seen in opposite dir */ |
68 | u_int32_t last_end; /* Last seq + len */ | 67 | u_int32_t last_end; /* Last seq + len */ |
69 | u_int16_t last_win; /* Last window advertisement seen in dir */ | 68 | u_int16_t last_win; /* Last window advertisement seen in dir */ |
69 | /* For SYN packets while we may be out-of-sync */ | ||
70 | u_int8_t last_wscale; /* Last window scaling factor seen */ | ||
71 | u_int8_t last_flags; /* Last flags set */ | ||
70 | }; | 72 | }; |
71 | 73 | ||
72 | #endif /* __KERNEL__ */ | 74 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index 9f00da287f2c..49d321f3ccd2 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -55,8 +55,7 @@ struct nfgenmsg { | |||
55 | #include <linux/capability.h> | 55 | #include <linux/capability.h> |
56 | #include <net/netlink.h> | 56 | #include <net/netlink.h> |
57 | 57 | ||
58 | struct nfnl_callback | 58 | struct 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 | ||
67 | struct nfnetlink_subsystem | 66 | struct 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 | ||
24 | struct nfattr | 24 | struct 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 | ||
9 | struct xt_entry_match | 9 | struct 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 | ||
34 | struct xt_entry_target | 33 | struct 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 | ||
67 | struct xt_standard_target | 65 | struct 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. */ |
75 | struct xt_get_revision | 72 | struct 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 | */ |
93 | struct _xt_align | 89 | struct _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 | ||
112 | struct xt_counters | 107 | struct 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. */ |
118 | struct xt_counters_info | 112 | struct 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 | ||
272 | struct xt_match | 265 | struct 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. */ |
313 | struct xt_target | 305 | struct 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... */ |
352 | struct xt_table | 343 | struct 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 */ |
374 | struct xt_table_info | 364 | struct 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 | ||
531 | struct compat_xt_entry_match | 520 | struct 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 | ||
548 | struct compat_xt_entry_target | 536 | struct 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 | ||
569 | struct compat_xt_counters | 556 | struct 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 | ||
578 | struct compat_xt_counters_info | 564 | struct 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 | ||
18 | struct xt_connbytes_info | 18 | struct 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 | ||
6 | struct xt_esp | 6 | struct 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 | ||
6 | enum xt_multiport_flags | 6 | enum 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 */ |
16 | struct xt_multiport | 15 | struct 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 | ||
23 | struct xt_multiport_v1 | 21 | struct 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 | ||
8 | enum xt_policy_flags | 8 | enum 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 | ||
16 | enum xt_policy_modes | 15 | enum 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 | ||
22 | struct xt_policy_spec | 20 | struct 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__ |
33 | union xt_policy_addr | 30 | union 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 | ||
40 | struct xt_policy_elem | 36 | struct 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 | ||
68 | struct xt_policy_info | 63 | struct 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 | ||
9 | struct xt_state_info | 9 | struct 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 | ||
14 | struct xt_string_info | 14 | struct 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 */ |
7 | struct xt_tcp | 7 | struct 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 */ |
25 | struct xt_udp | 24 | struct 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 */ |
135 | struct arpt_getinfo | 135 | struct 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. */ |
158 | struct arpt_replace | 157 | struct 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. */ |
194 | struct arpt_get_entries | 192 | struct 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. */ |
227 | struct arpt_standard | 224 | struct 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 | ||
233 | struct arpt_error_target | 229 | struct 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 | ||
239 | struct arpt_error | 234 | struct 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 | ||
282 | struct compat_arpt_entry | 276 | struct 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 | ||
61 | struct ebt_802_3_info | 61 | struct 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 | ||
32 | struct ebt_mac_wormhash_tuple | 32 | struct 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 | ||
38 | struct ebt_mac_wormhash | 37 | struct 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 | ||
48 | struct ebt_among_info | 46 | struct 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 | ||
4 | struct ebt_arpreply_info | 4 | struct 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 */ |
29 | struct ebt_ip_info | 29 | struct 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 */ |
26 | struct ebt_ip6_info | 26 | struct 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 | ||
12 | struct ebt_limit_info | 12 | struct 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 | ||
12 | struct ebt_log_info | 12 | struct 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) |
7 | struct ebt_mark_m_info | 7 | struct 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 | ||
16 | struct ebt_mark_t_info | 16 | struct 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) |
5 | struct ebt_nat_info | 5 | struct 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 | ||
4 | struct ebt_pkttype_info | 4 | struct 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 | ||
4 | struct ebt_redirect_info | 4 | struct 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 | ||
23 | struct ebt_stp_config_info | 23 | struct 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 | ||
38 | struct ebt_stp_info | 37 | struct 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 @@ | |||
34 | struct xt_match; | 34 | struct xt_match; |
35 | struct xt_target; | 35 | struct xt_target; |
36 | 36 | ||
37 | struct ebt_counter | 37 | struct ebt_counter { |
38 | { | ||
39 | uint64_t pcnt; | 38 | uint64_t pcnt; |
40 | uint64_t bcnt; | 39 | uint64_t bcnt; |
41 | }; | 40 | }; |
42 | 41 | ||
43 | struct ebt_replace | 42 | struct 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 | ||
60 | struct ebt_replace_kernel | 58 | struct 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 | ||
123 | struct ebt_entry_match | 120 | struct 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 | ||
134 | struct ebt_entry_watcher | 130 | struct 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 | ||
145 | struct ebt_entry_target | 140 | struct 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" |
157 | struct ebt_standard_target | 151 | struct 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 | ||
209 | struct ebt_match | 202 | struct 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 | ||
227 | struct ebt_watcher | 219 | struct 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 | ||
245 | struct ebt_target | 236 | struct 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) */ |
265 | struct ebt_chainstack | 255 | struct 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 | ||
272 | struct ebt_table_info | 261 | struct 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 | ||
285 | struct ebt_table | 273 | struct 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 */ |
79 | struct ipt_entry | 79 | struct 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 */ |
138 | struct ipt_icmp | 137 | struct 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 */ |
149 | struct ipt_getinfo | 147 | struct 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. */ |
172 | struct ipt_replace | 169 | struct 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. */ |
207 | struct ipt_get_entries | 203 | struct 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, | |||
250 | extern void ipt_unregister_table(struct xt_table *table); | 245 | extern void ipt_unregister_table(struct xt_table *table); |
251 | 246 | ||
252 | /* Standard entry. */ | 247 | /* Standard entry. */ |
253 | struct ipt_standard | 248 | struct 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 | ||
259 | struct ipt_error_target | 253 | struct 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 | ||
265 | struct ipt_error | 258 | struct 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 | ||
304 | struct compat_ipt_entry | 296 | struct 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 | ||
8 | struct ipt_same_info | 8 | struct 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 | ||
4 | struct ipt_ah | 4 | struct 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 */ |
91 | struct ip6t_entry | 91 | struct 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 */ |
114 | struct ip6t_standard | 113 | struct 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 | ||
120 | struct ip6t_error_target | 118 | struct 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 | ||
126 | struct ip6t_error | 123 | struct 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 */ |
198 | struct ip6t_icmp | 194 | struct 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 */ |
209 | struct ip6t_getinfo | 204 | struct 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. */ |
232 | struct ip6t_replace | 226 | struct 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. */ |
267 | struct ip6t_get_entries | 260 | struct 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 | ||
333 | struct compat_ip6t_entry | 325 | struct 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 | ||
4 | struct ip6t_ah | 4 | struct 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 | ||
4 | struct ip6t_frag | 4 | struct 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 | ||
11 | struct ip6t_ipv6header_info | 11 | struct 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 */ |
5 | struct ip6t_mh | 5 | struct 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 | ||
6 | struct ip6t_opts | 6 | struct 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 | ||
8 | struct ip6t_rt | 8 | struct 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 | ||
30 | struct net; | 30 | struct net; |
31 | 31 | ||
32 | struct sockaddr_nl | 32 | struct 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 | ||
40 | struct nlmsghdr | 39 | struct 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 | ||
97 | struct nlmsgerr | 95 | struct 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 | ||
109 | struct nl_pktinfo | 106 | struct 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 | ||
130 | struct nlattr | 126 | struct 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 | ||
164 | struct netlink_skb_parms | 159 | struct 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 | ||
223 | struct netlink_callback | 217 | struct 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 | ||
234 | struct netlink_notify | 227 | struct netlink_notify { |
235 | { | ||
236 | struct net *net; | 228 | struct net *net; |
237 | int pid; | 229 | int pid; |
238 | int protocol; | 230 | int protocol; |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index a8d71ed43a0e..da8ea2e19273 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -160,6 +160,11 @@ | |||
160 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 160 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
161 | * partial scan results may be available | 161 | * partial scan results may be available |
162 | * | 162 | * |
163 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | ||
164 | * or noise level | ||
165 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | ||
166 | * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) | ||
167 | * | ||
163 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | 168 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain |
164 | * has been changed and provides details of the request information | 169 | * has been changed and provides details of the request information |
165 | * that caused the change such as who initiated the regulatory request | 170 | * that caused the change such as who initiated the regulatory request |
@@ -341,6 +346,13 @@ enum nl80211_commands { | |||
341 | 346 | ||
342 | NL80211_CMD_SET_WIPHY_NETNS, | 347 | NL80211_CMD_SET_WIPHY_NETNS, |
343 | 348 | ||
349 | NL80211_CMD_GET_SURVEY, | ||
350 | NL80211_CMD_NEW_SURVEY_RESULTS, | ||
351 | |||
352 | NL80211_CMD_SET_PMKSA, | ||
353 | NL80211_CMD_DEL_PMKSA, | ||
354 | NL80211_CMD_FLUSH_PMKSA, | ||
355 | |||
344 | /* add new commands above here */ | 356 | /* add new commands above here */ |
345 | 357 | ||
346 | /* used to define NL80211_CMD_MAX below */ | 358 | /* used to define NL80211_CMD_MAX below */ |
@@ -584,6 +596,16 @@ enum nl80211_commands { | |||
584 | * changed then the list changed and the dump should be repeated | 596 | * changed then the list changed and the dump should be repeated |
585 | * completely from scratch. | 597 | * completely from scratch. |
586 | * | 598 | * |
599 | * @NL80211_ATTR_4ADDR: Use 4-address frames on a virtual interface | ||
600 | * | ||
601 | * @NL80211_ATTR_SURVEY_INFO: survey information about a channel, part of | ||
602 | * the survey response for %NL80211_CMD_GET_SURVEY, nested attribute | ||
603 | * containing info as possible, see &enum survey_info. | ||
604 | * | ||
605 | * @NL80211_ATTR_PMKID: PMK material for PMKSA caching. | ||
606 | * @NL80211_ATTR_MAX_NUM_PMKIDS: maximum number of PMKIDs a firmware can | ||
607 | * cache, a wiphy attribute. | ||
608 | * | ||
587 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 609 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
588 | * @__NL80211_ATTR_AFTER_LAST: internal use | 610 | * @__NL80211_ATTR_AFTER_LAST: internal use |
589 | */ | 611 | */ |
@@ -714,6 +736,13 @@ enum nl80211_attrs { | |||
714 | 736 | ||
715 | NL80211_ATTR_PID, | 737 | NL80211_ATTR_PID, |
716 | 738 | ||
739 | NL80211_ATTR_4ADDR, | ||
740 | |||
741 | NL80211_ATTR_SURVEY_INFO, | ||
742 | |||
743 | NL80211_ATTR_PMKID, | ||
744 | NL80211_ATTR_MAX_NUM_PMKIDS, | ||
745 | |||
717 | /* add attributes here, update the policy in nl80211.c */ | 746 | /* add attributes here, update the policy in nl80211.c */ |
718 | 747 | ||
719 | __NL80211_ATTR_AFTER_LAST, | 748 | __NL80211_ATTR_AFTER_LAST, |
@@ -895,14 +924,14 @@ enum nl80211_sta_info { | |||
895 | * | 924 | * |
896 | * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active | 925 | * @NL80211_MPATH_FLAG_ACTIVE: the mesh path is active |
897 | * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running | 926 | * @NL80211_MPATH_FLAG_RESOLVING: the mesh path discovery process is running |
898 | * @NL80211_MPATH_FLAG_DSN_VALID: the mesh path contains a valid DSN | 927 | * @NL80211_MPATH_FLAG_SN_VALID: the mesh path contains a valid SN |
899 | * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set | 928 | * @NL80211_MPATH_FLAG_FIXED: the mesh path has been manually set |
900 | * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded | 929 | * @NL80211_MPATH_FLAG_RESOLVED: the mesh path discovery process succeeded |
901 | */ | 930 | */ |
902 | enum nl80211_mpath_flags { | 931 | enum nl80211_mpath_flags { |
903 | NL80211_MPATH_FLAG_ACTIVE = 1<<0, | 932 | NL80211_MPATH_FLAG_ACTIVE = 1<<0, |
904 | NL80211_MPATH_FLAG_RESOLVING = 1<<1, | 933 | NL80211_MPATH_FLAG_RESOLVING = 1<<1, |
905 | NL80211_MPATH_FLAG_DSN_VALID = 1<<2, | 934 | NL80211_MPATH_FLAG_SN_VALID = 1<<2, |
906 | NL80211_MPATH_FLAG_FIXED = 1<<3, | 935 | NL80211_MPATH_FLAG_FIXED = 1<<3, |
907 | NL80211_MPATH_FLAG_RESOLVED = 1<<4, | 936 | NL80211_MPATH_FLAG_RESOLVED = 1<<4, |
908 | }; | 937 | }; |
@@ -915,7 +944,7 @@ enum nl80211_mpath_flags { | |||
915 | * | 944 | * |
916 | * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved | 945 | * @__NL80211_MPATH_INFO_INVALID: attribute number 0 is reserved |
917 | * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination | 946 | * @NL80211_ATTR_MPATH_FRAME_QLEN: number of queued frames for this destination |
918 | * @NL80211_ATTR_MPATH_DSN: destination sequence number | 947 | * @NL80211_ATTR_MPATH_SN: destination sequence number |
919 | * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path | 948 | * @NL80211_ATTR_MPATH_METRIC: metric (cost) of this mesh path |
920 | * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now | 949 | * @NL80211_ATTR_MPATH_EXPTIME: expiration time for the path, in msec from now |
921 | * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in | 950 | * @NL80211_ATTR_MPATH_FLAGS: mesh path flags, enumerated in |
@@ -926,7 +955,7 @@ enum nl80211_mpath_flags { | |||
926 | enum nl80211_mpath_info { | 955 | enum nl80211_mpath_info { |
927 | __NL80211_MPATH_INFO_INVALID, | 956 | __NL80211_MPATH_INFO_INVALID, |
928 | NL80211_MPATH_INFO_FRAME_QLEN, | 957 | NL80211_MPATH_INFO_FRAME_QLEN, |
929 | NL80211_MPATH_INFO_DSN, | 958 | NL80211_MPATH_INFO_SN, |
930 | NL80211_MPATH_INFO_METRIC, | 959 | NL80211_MPATH_INFO_METRIC, |
931 | NL80211_MPATH_INFO_EXPTIME, | 960 | NL80211_MPATH_INFO_EXPTIME, |
932 | NL80211_MPATH_INFO_FLAGS, | 961 | NL80211_MPATH_INFO_FLAGS, |
@@ -1117,6 +1146,26 @@ enum nl80211_reg_rule_flags { | |||
1117 | }; | 1146 | }; |
1118 | 1147 | ||
1119 | /** | 1148 | /** |
1149 | * enum nl80211_survey_info - survey information | ||
1150 | * | ||
1151 | * These attribute types are used with %NL80211_ATTR_SURVEY_INFO | ||
1152 | * when getting information about a survey. | ||
1153 | * | ||
1154 | * @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved | ||
1155 | * @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel | ||
1156 | * @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm) | ||
1157 | */ | ||
1158 | enum nl80211_survey_info { | ||
1159 | __NL80211_SURVEY_INFO_INVALID, | ||
1160 | NL80211_SURVEY_INFO_FREQUENCY, | ||
1161 | NL80211_SURVEY_INFO_NOISE, | ||
1162 | |||
1163 | /* keep last */ | ||
1164 | __NL80211_SURVEY_INFO_AFTER_LAST, | ||
1165 | NL80211_SURVEY_INFO_MAX = __NL80211_SURVEY_INFO_AFTER_LAST - 1 | ||
1166 | }; | ||
1167 | |||
1168 | /** | ||
1120 | * enum nl80211_mntr_flags - monitor configuration flags | 1169 | * enum nl80211_mntr_flags - monitor configuration flags |
1121 | * | 1170 | * |
1122 | * Monitor configuration flags. | 1171 | * Monitor configuration flags. |
@@ -1196,6 +1245,8 @@ enum nl80211_mntr_flags { | |||
1196 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) | 1245 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) |
1197 | * that it takes for an HWMP information element to propagate across the mesh | 1246 | * that it takes for an HWMP information element to propagate across the mesh |
1198 | * | 1247 | * |
1248 | * @NL80211_MESHCONF_ROOTMODE: whether root mode is enabled or not | ||
1249 | * | ||
1199 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | 1250 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute |
1200 | * | 1251 | * |
1201 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 1252 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
@@ -1215,6 +1266,7 @@ enum nl80211_meshconf_params { | |||
1215 | NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, | 1266 | NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT, |
1216 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, | 1267 | NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL, |
1217 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, | 1268 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, |
1269 | NL80211_MESHCONF_HWMP_ROOTMODE, | ||
1218 | 1270 | ||
1219 | /* keep last */ | 1271 | /* keep last */ |
1220 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 1272 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
@@ -1277,6 +1329,7 @@ enum nl80211_channel_type { | |||
1277 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1329 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1278 | * in unspecified units, scaled to 0..100 (u8) | 1330 | * in unspecified units, scaled to 0..100 (u8) |
1279 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | 1331 | * @NL80211_BSS_STATUS: status, if this BSS is "used" |
1332 | * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms | ||
1280 | * @__NL80211_BSS_AFTER_LAST: internal | 1333 | * @__NL80211_BSS_AFTER_LAST: internal |
1281 | * @NL80211_BSS_MAX: highest BSS attribute | 1334 | * @NL80211_BSS_MAX: highest BSS attribute |
1282 | */ | 1335 | */ |
@@ -1291,6 +1344,7 @@ enum nl80211_bss { | |||
1291 | NL80211_BSS_SIGNAL_MBM, | 1344 | NL80211_BSS_SIGNAL_MBM, |
1292 | NL80211_BSS_SIGNAL_UNSPEC, | 1345 | NL80211_BSS_SIGNAL_UNSPEC, |
1293 | NL80211_BSS_STATUS, | 1346 | NL80211_BSS_STATUS, |
1347 | NL80211_BSS_SEEN_MS_AGO, | ||
1294 | 1348 | ||
1295 | /* keep last */ | 1349 | /* keep last */ |
1296 | __NL80211_BSS_AFTER_LAST, | 1350 | __NL80211_BSS_AFTER_LAST, |
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h index b7d9435d5a9f..33d9f5175109 100644 --- a/include/linux/nl802154.h +++ b/include/linux/nl802154.h | |||
@@ -65,6 +65,9 @@ enum { | |||
65 | IEEE802154_ATTR_SEC, | 65 | IEEE802154_ATTR_SEC, |
66 | 66 | ||
67 | IEEE802154_ATTR_PAGE, | 67 | IEEE802154_ATTR_PAGE, |
68 | IEEE802154_ATTR_CHANNEL_PAGE_LIST, | ||
69 | |||
70 | IEEE802154_ATTR_PHY_NAME, | ||
68 | 71 | ||
69 | __IEEE802154_ATTR_MAX, | 72 | __IEEE802154_ATTR_MAX, |
70 | }; | 73 | }; |
@@ -114,6 +117,9 @@ enum { | |||
114 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ | 117 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ |
115 | 118 | ||
116 | IEEE802154_LIST_IFACE, | 119 | IEEE802154_LIST_IFACE, |
120 | IEEE802154_LIST_PHY, | ||
121 | IEEE802154_ADD_IFACE, | ||
122 | IEEE802154_DEL_IFACE, | ||
117 | 123 | ||
118 | __IEEE802154_CMD_MAX, | 124 | __IEEE802154_CMD_MAX, |
119 | }; | 125 | }; |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 44428d247dbe..fee6c2f68075 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -201,6 +201,8 @@ static inline int notifier_to_errno(int ret) | |||
201 | #define NETDEV_PRE_UP 0x000D | 201 | #define NETDEV_PRE_UP 0x000D |
202 | #define NETDEV_BONDING_OLDTYPE 0x000E | 202 | #define NETDEV_BONDING_OLDTYPE 0x000E |
203 | #define NETDEV_BONDING_NEWTYPE 0x000F | 203 | #define NETDEV_BONDING_NEWTYPE 0x000F |
204 | #define NETDEV_POST_INIT 0x0010 | ||
205 | #define NETDEV_UNREGISTER_BATCH 0x0011 | ||
204 | 206 | ||
205 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 207 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
206 | #define SYS_RESTART SYS_DOWN | 208 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 3c842edff388..7f6ba8658abe 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -75,8 +75,7 @@ bits 9,10,11: redirect counter - redirect TTL. Loop avoidance | |||
75 | #define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) | 75 | #define SET_TC_AT(v,n) ((V_TC_AT(n)) | (v & ~M_TC_AT)) |
76 | 76 | ||
77 | /* Action attributes */ | 77 | /* Action attributes */ |
78 | enum | 78 | enum { |
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*/ |
111 | enum | 110 | enum { |
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 | ||
121 | struct tc_police | 119 | struct 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 | ||
141 | struct tcf_t | 138 | struct 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 | ||
148 | struct tc_cnt | 144 | struct 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 | ||
161 | enum | 156 | enum { |
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 | ||
185 | enum | 179 | enum { |
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 | ||
203 | struct tc_u32_key | 196 | struct 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 | ||
211 | struct tc_u32_sel | 203 | struct 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 | ||
226 | struct tc_u32_mark | 217 | struct 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 | ||
233 | struct tc_u32_pcnt | 223 | struct 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 | ||
252 | enum | 241 | enum { |
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 | ||
266 | struct tc_rsvp_gpi | 254 | struct 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 | ||
273 | struct tc_rsvp_pinfo | 260 | struct 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 | ||
285 | enum | 271 | enum { |
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 | ||
302 | enum | 287 | enum { |
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 | ||
317 | enum | 301 | enum { |
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 | ||
334 | enum | 317 | enum { |
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 | ||
358 | enum | 340 | enum { |
359 | { | ||
360 | FLOW_MODE_MAP, | 341 | FLOW_MODE_MAP, |
361 | FLOW_MODE_HASH, | 342 | FLOW_MODE_HASH, |
362 | }; | 343 | }; |
363 | 344 | ||
364 | enum | 345 | enum { |
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 | ||
386 | enum | 366 | enum { |
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 | ||
401 | enum | 380 | enum { |
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 | ||
414 | struct tcf_ematch_tree_hdr | 392 | struct tcf_ematch_tree_hdr { |
415 | { | ||
416 | __u16 nmatches; | 393 | __u16 nmatches; |
417 | __u16 progid; | 394 | __u16 progid; |
418 | }; | 395 | }; |
419 | 396 | ||
420 | enum | 397 | enum { |
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 | ||
429 | struct tcf_ematch_hdr | 405 | struct 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 | ||
460 | enum | 435 | enum { |
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 | ||
482 | enum | 456 | enum { |
483 | { | ||
484 | TCF_EM_PROG_TC | 457 | TCF_EM_PROG_TC |
485 | }; | 458 | }; |
486 | 459 | ||
487 | enum | 460 | enum { |
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 | ||
32 | struct tc_stats | 32 | struct 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 | ||
45 | struct tc_estimator | 44 | struct 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 | ||
78 | struct tc_ratespec | 76 | struct 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 | ||
112 | struct tc_fifo_qopt | 109 | struct 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 | ||
122 | struct tc_prio_qopt | 118 | struct 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 | ||
137 | struct tc_tbf_qopt | 132 | struct 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 | ||
146 | enum | 140 | enum { |
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 | ||
164 | struct tc_sfq_qopt | 157 | struct 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 | ||
173 | struct tc_sfq_xstats | 165 | struct 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 | ||
189 | enum | 180 | enum { |
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 | ||
199 | struct tc_red_qopt | 189 | struct 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 | ||
212 | struct tc_red_xstats | 201 | struct 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 | ||
224 | enum | 212 | enum { |
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 | ||
235 | struct tc_gred_qopt | 222 | struct 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 */ |
256 | struct tc_gred_sopt | 242 | struct 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 | ||
270 | struct tc_htb_opt | 255 | struct 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 | }; |
280 | struct tc_htb_glob | 264 | struct 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 | }; |
290 | enum | 273 | enum { |
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 | ||
302 | struct tc_htb_xstats | 284 | struct 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 | ||
313 | struct tc_hfsc_qopt | 294 | struct tc_hfsc_qopt { |
314 | { | ||
315 | __u16 defcls; /* default class */ | 295 | __u16 defcls; /* default class */ |
316 | }; | 296 | }; |
317 | 297 | ||
318 | struct tc_service_curve | 298 | struct 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 | ||
325 | struct tc_hfsc_stats | 304 | struct 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 | ||
333 | enum | 311 | enum { |
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 | ||
351 | struct tc_cbq_lssopt | 328 | struct 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 | ||
371 | struct tc_cbq_wrropt | 347 | struct 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 | ||
381 | struct tc_cbq_ovl | 356 | struct 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 | ||
394 | struct tc_cbq_police | 368 | struct 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 | ||
401 | struct tc_cbq_fopt | 374 | struct 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 | ||
408 | struct tc_cbq_xstats | 380 | struct 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 | ||
416 | enum | 387 | enum { |
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 | ||
462 | enum | 432 | enum { |
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 | ||
474 | struct tc_netem_qopt | 443 | struct 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 | ||
484 | struct tc_netem_corr | 452 | struct 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 | ||
491 | struct tc_netem_reorder | 458 | struct tc_netem_reorder { |
492 | { | ||
493 | __u32 probability; | 459 | __u32 probability; |
494 | __u32 correlation; | 460 | __u32 correlation; |
495 | }; | 461 | }; |
496 | 462 | ||
497 | struct tc_netem_corrupt | 463 | struct 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 | ||
507 | enum | 472 | enum { |
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 | ||
516 | struct tc_drr_stats | 480 | struct 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 | ||
228 | struct 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 | |||
227 | struct rds_free_mr_args { | 235 | struct 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 | */ |
40 | enum rfkill_type { | 42 | enum 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. */ |
30 | struct rtentry | 30 | struct 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 | ||
130 | struct rtattr | 130 | struct 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 | ||
157 | struct rtmsg | 156 | struct 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 | ||
174 | enum | 172 | enum { |
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 | ||
233 | enum rt_scope_t | 230 | enum 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 | ||
252 | enum rt_class_t | 248 | enum 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 | ||
266 | enum rtattr_type_t | 261 | enum 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 | ||
301 | struct rtnexthop | 295 | struct 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 | ||
328 | struct rta_cacheinfo | 321 | struct 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 | ||
344 | enum | 336 | enum { |
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 | ||
384 | struct rta_session | 377 | struct 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 | ||
410 | struct rtgenmsg | 402 | struct 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 | ||
424 | struct ifinfomsg | 415 | struct 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 | ||
438 | struct prefixmsg | 428 | struct 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 | ||
460 | struct prefix_cacheinfo | 449 | struct 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 | ||
471 | struct tcmsg | 459 | struct 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 | ||
482 | enum | 469 | enum { |
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 | ||
505 | struct nduseroptmsg | 491 | struct 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 | ||
518 | enum | 503 | enum { |
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 */ |
601 | struct tcamsg | 585 | struct 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 | }; |
246 | enum { SCTP_DATA_FRAG_MASK = 0x03, }; | 247 | enum { SCTP_DATA_FRAG_MASK = 0x03, }; |
247 | 248 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index bcdd6606f468..ae836fded530 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -299,7 +299,7 @@ typedef unsigned char *sk_buff_data_t; | |||
299 | * @nfctinfo: Relationship of this skb to the connection | 299 | * @nfctinfo: Relationship of this skb to the connection |
300 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 300 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
301 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 301 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
302 | * @iif: ifindex of device we arrived on | 302 | * @skb_iif: ifindex of device we arrived on |
303 | * @queue_mapping: Queue mapping for multiqueue devices | 303 | * @queue_mapping: Queue mapping for multiqueue devices |
304 | * @tc_index: Traffic control index | 304 | * @tc_index: Traffic control index |
305 | * @tc_verd: traffic control verdict | 305 | * @tc_verd: traffic control verdict |
@@ -366,7 +366,7 @@ struct sk_buff { | |||
366 | struct nf_bridge_info *nf_bridge; | 366 | struct nf_bridge_info *nf_bridge; |
367 | #endif | 367 | #endif |
368 | 368 | ||
369 | int iif; | 369 | int skb_iif; |
370 | #ifdef CONFIG_NET_SCHED | 370 | #ifdef CONFIG_NET_SCHED |
371 | __u16 tc_index; /* traffic control index */ | 371 | __u16 tc_index; /* traffic control index */ |
372 | #ifdef CONFIG_NET_CLS_ACT | 372 | #ifdef CONFIG_NET_CLS_ACT |
@@ -389,8 +389,10 @@ struct sk_buff { | |||
389 | #ifdef CONFIG_NETWORK_SECMARK | 389 | #ifdef CONFIG_NETWORK_SECMARK |
390 | __u32 secmark; | 390 | __u32 secmark; |
391 | #endif | 391 | #endif |
392 | 392 | union { | |
393 | __u32 mark; | 393 | __u32 mark; |
394 | __u32 dropcount; | ||
395 | }; | ||
394 | 396 | ||
395 | __u16 vlan_tci; | 397 | __u16 vlan_tci; |
396 | 398 | ||
@@ -414,14 +416,6 @@ struct sk_buff { | |||
414 | 416 | ||
415 | #include <asm/system.h> | 417 | #include <asm/system.h> |
416 | 418 | ||
417 | #ifdef CONFIG_HAS_DMA | ||
418 | #include <linux/dma-mapping.h> | ||
419 | extern int skb_dma_map(struct device *dev, struct sk_buff *skb, | ||
420 | enum dma_data_direction dir); | ||
421 | extern void skb_dma_unmap(struct device *dev, struct sk_buff *skb, | ||
422 | enum dma_data_direction dir); | ||
423 | #endif | ||
424 | |||
425 | static inline struct dst_entry *skb_dst(const struct sk_buff *skb) | 419 | static inline struct dst_entry *skb_dst(const struct sk_buff *skb) |
426 | { | 420 | { |
427 | return (struct dst_entry *)skb->_skb_dst; | 421 | return (struct dst_entry *)skb->_skb_dst; |
@@ -489,8 +483,7 @@ extern int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | |||
489 | int len,int odd, struct sk_buff *skb), | 483 | int len,int odd, struct sk_buff *skb), |
490 | void *from, int length); | 484 | void *from, int length); |
491 | 485 | ||
492 | struct skb_seq_state | 486 | struct skb_seq_state { |
493 | { | ||
494 | __u32 lower_offset; | 487 | __u32 lower_offset; |
495 | __u32 upper_offset; | 488 | __u32 upper_offset; |
496 | __u32 frag_idx; | 489 | __u32 frag_idx; |
@@ -1489,6 +1482,16 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev, | |||
1489 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); | 1482 | return __netdev_alloc_skb(dev, length, GFP_ATOMIC); |
1490 | } | 1483 | } |
1491 | 1484 | ||
1485 | static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev, | ||
1486 | unsigned int length) | ||
1487 | { | ||
1488 | struct sk_buff *skb = netdev_alloc_skb(dev, length + NET_IP_ALIGN); | ||
1489 | |||
1490 | if (NET_IP_ALIGN && skb) | ||
1491 | skb_reserve(skb, NET_IP_ALIGN); | ||
1492 | return skb; | ||
1493 | } | ||
1494 | |||
1492 | extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask); | 1495 | extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask); |
1493 | 1496 | ||
1494 | /** | 1497 | /** |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 5241e4fb4eca..7144e8aa1e41 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -30,6 +30,7 @@ struct smsc911x_platform_config { | |||
30 | unsigned int irq_type; | 30 | unsigned int irq_type; |
31 | unsigned int flags; | 31 | unsigned int flags; |
32 | phy_interface_t phy_interface; | 32 | phy_interface_t phy_interface; |
33 | unsigned char mac[6]; | ||
33 | }; | 34 | }; |
34 | 35 | ||
35 | /* Constants for platform_device irq polarity configuration */ | 36 | /* Constants for platform_device irq polarity configuration */ |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 3273a0c5043b..7b3aae2052a6 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -24,6 +24,9 @@ struct __kernel_sockaddr_storage { | |||
24 | #include <linux/types.h> /* pid_t */ | 24 | #include <linux/types.h> /* pid_t */ |
25 | #include <linux/compiler.h> /* __user */ | 25 | #include <linux/compiler.h> /* __user */ |
26 | 26 | ||
27 | #define __sockaddr_check_size(size) \ | ||
28 | BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage))) | ||
29 | |||
27 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
28 | # ifdef CONFIG_PROC_FS | 31 | # ifdef CONFIG_PROC_FS |
29 | struct seq_file; | 32 | struct seq_file; |
@@ -65,6 +68,12 @@ struct msghdr { | |||
65 | unsigned msg_flags; | 68 | unsigned msg_flags; |
66 | }; | 69 | }; |
67 | 70 | ||
71 | /* For recvmmsg/sendmmsg */ | ||
72 | struct 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 | |||
312 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); | 321 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr); |
313 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 322 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
314 | 323 | ||
324 | struct timespec; | ||
325 | |||
326 | extern 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 | ||
27 | struct wl12xx_platform_data { | 27 | struct wl12xx_platform_data { |
28 | void (*set_power)(bool enable); | 28 | void (*set_power)(bool enable); |
29 | bool use_eeprom; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | #endif | 32 | #endif |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 3d0a9ff24f01..24f988547361 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -269,7 +269,8 @@ struct ssb_bus { | |||
269 | 269 | ||
270 | const struct ssb_bus_ops *ops; | 270 | const struct ssb_bus_ops *ops; |
271 | 271 | ||
272 | /* The core in the basic address register window. (PCI bus only) */ | 272 | /* The core currently mapped into the MMIO window. |
273 | * Not valid on all host-buses. So don't use outside of SSB. */ | ||
273 | struct ssb_device *mapped_device; | 274 | struct ssb_device *mapped_device; |
274 | union { | 275 | union { |
275 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ | 276 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ |
@@ -281,14 +282,17 @@ struct ssb_bus { | |||
281 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ | 282 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ |
282 | spinlock_t bar_lock; | 283 | spinlock_t bar_lock; |
283 | 284 | ||
284 | /* The bus this backplane is running on. */ | 285 | /* The host-bus this backplane is running on. */ |
285 | enum ssb_bustype bustype; | 286 | enum ssb_bustype bustype; |
286 | /* Pointer to the PCI bus (only valid if bustype == SSB_BUSTYPE_PCI). */ | 287 | /* Pointers to the host-bus. Check bustype before using any of these pointers. */ |
287 | struct pci_dev *host_pci; | 288 | union { |
288 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ | 289 | /* Pointer to the PCI bus (only valid if bustype == SSB_BUSTYPE_PCI). */ |
289 | struct pcmcia_device *host_pcmcia; | 290 | struct pci_dev *host_pci; |
290 | /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */ | 291 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ |
291 | struct sdio_func *host_sdio; | 292 | struct pcmcia_device *host_pcmcia; |
293 | /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */ | ||
294 | struct sdio_func *host_sdio; | ||
295 | }; | ||
292 | 296 | ||
293 | /* See enum ssb_quirks */ | 297 | /* See enum ssb_quirks */ |
294 | unsigned int quirks; | 298 | unsigned int quirks; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e79e2f3ccc51..bc70c5810fec 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -25,6 +25,7 @@ struct linux_dirent64; | |||
25 | struct list_head; | 25 | struct list_head; |
26 | struct msgbuf; | 26 | struct msgbuf; |
27 | struct msghdr; | 27 | struct msghdr; |
28 | struct mmsghdr; | ||
28 | struct msqid_ds; | 29 | struct msqid_ds; |
29 | struct new_utsname; | 30 | struct new_utsname; |
30 | struct nfsctl_arg; | 31 | struct nfsctl_arg; |
@@ -628,6 +629,9 @@ asmlinkage long sys_recv(int, void __user *, size_t, unsigned); | |||
628 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, | 629 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, |
629 | struct sockaddr __user *, int __user *); | 630 | struct sockaddr __user *, int __user *); |
630 | asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags); | 631 | asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags); |
632 | asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg, | ||
633 | unsigned int vlen, unsigned flags, | ||
634 | struct timespec __user *timeout); | ||
631 | asmlinkage long sys_socket(int, int, int); | 635 | asmlinkage long sys_socket(int, int, int); |
632 | asmlinkage long sys_socketpair(int, int, int, int __user *); | 636 | asmlinkage long sys_socketpair(int, int, int, int __user *); |
633 | asmlinkage long sys_socketcall(int call, unsigned long __user *args); | 637 | asmlinkage long sys_socketcall(int call, unsigned long __user *args); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index c83a86a22381..56af3ca75e24 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -481,6 +481,7 @@ enum | |||
481 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, | 481 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, |
482 | NET_IPV4_CONF_ARP_ACCEPT=21, | 482 | NET_IPV4_CONF_ARP_ACCEPT=21, |
483 | NET_IPV4_CONF_ARP_NOTIFY=22, | 483 | NET_IPV4_CONF_ARP_NOTIFY=22, |
484 | NET_IPV4_CONF_ACCEPT_LOCAL=23, | ||
484 | __NET_IPV4_CONF_MAX | 485 | __NET_IPV4_CONF_MAX |
485 | }; | 486 | }; |
486 | 487 | ||
diff --git a/include/linux/tc_act/tc_defact.h b/include/linux/tc_act/tc_defact.h index 964f473af0f0..6f65d07c7ce2 100644 --- a/include/linux/tc_act/tc_defact.h +++ b/include/linux/tc_act/tc_defact.h | |||
@@ -3,13 +3,11 @@ | |||
3 | 3 | ||
4 | #include <linux/pkt_cls.h> | 4 | #include <linux/pkt_cls.h> |
5 | 5 | ||
6 | struct tc_defact | 6 | struct tc_defact { |
7 | { | ||
8 | tc_gen; | 7 | tc_gen; |
9 | }; | 8 | }; |
10 | 9 | ||
11 | enum | 10 | enum { |
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 |
8 | struct tc_gact | 8 | struct tc_gact { |
9 | { | ||
10 | tc_gen; | 9 | tc_gen; |
11 | 10 | ||
12 | }; | 11 | }; |
13 | 12 | ||
14 | struct tc_gact_p | 13 | struct 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 | ||
25 | enum | 23 | enum { |
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 | ||
8 | enum | 8 | enum { |
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 | ||
13 | struct tc_mirred | 13 | struct 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 | ||
20 | enum | 19 | enum { |
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 | ||
9 | enum | 9 | enum { |
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 | ||
20 | struct tc_nat | 19 | struct 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 | ||
9 | enum | 9 | enum { |
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 | ||
18 | struct tc_pedit_key | 17 | struct 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 | ||
28 | struct tc_pedit_sel | 26 | struct 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 | ||
30 | struct tc_skbedit { | 31 | struct 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 | ||
7 | struct tcf_em_cmp | 7 | struct 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 | ||
18 | enum | 17 | enum { |
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 | ||
7 | enum | 7 | enum { |
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 | ||
17 | struct tcf_meta_val | 16 | struct 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 | ||
29 | enum | 27 | enum { |
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 | ||
37 | enum | 34 | enum { |
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 | ||
90 | struct tcf_meta_hdr | 86 | struct 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 | ||
7 | struct tcf_em_nbyte | 7 | struct 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 | ||
9 | struct tcf_em_text | 9 | struct tcf_em_text { |
10 | { | ||
11 | char algo[TC_EM_TEXT_ALGOSIZ]; | 10 | char algo[TC_EM_TEXT_ALGOSIZ]; |
12 | __u16 from_offset; | 11 | __u16 from_offset; |
13 | __u16 to_offset; | 12 | __u16 to_offset; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 61723a7c21fe..7fee8a4df931 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -81,6 +81,12 @@ enum { | |||
81 | TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) | 81 | TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) |
82 | }; | 82 | }; |
83 | 83 | ||
84 | /* | ||
85 | * TCP general constants | ||
86 | */ | ||
87 | #define TCP_MSS_DEFAULT 536U /* IPv4 (RFC1122, RFC2581) */ | ||
88 | #define TCP_MSS_DESIRED 1220U /* IPv6 (tunneled), EDNS0 (RFC3226) */ | ||
89 | |||
84 | /* TCP socket options */ | 90 | /* TCP socket options */ |
85 | #define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */ | 91 | #define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */ |
86 | #define TCP_MAXSEG 2 /* Limit MSS */ | 92 | #define TCP_MAXSEG 2 /* Limit MSS */ |
@@ -96,14 +102,15 @@ enum { | |||
96 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ | 102 | #define TCP_QUICKACK 12 /* Block/reenable quick acks */ |
97 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ | 103 | #define TCP_CONGESTION 13 /* Congestion control algorithm */ |
98 | #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ | 104 | #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ |
105 | #define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */ | ||
99 | 106 | ||
107 | /* for TCP_INFO socket option */ | ||
100 | #define TCPI_OPT_TIMESTAMPS 1 | 108 | #define TCPI_OPT_TIMESTAMPS 1 |
101 | #define TCPI_OPT_SACK 2 | 109 | #define TCPI_OPT_SACK 2 |
102 | #define TCPI_OPT_WSCALE 4 | 110 | #define TCPI_OPT_WSCALE 4 |
103 | #define TCPI_OPT_ECN 8 | 111 | #define TCPI_OPT_ECN 8 |
104 | 112 | ||
105 | enum tcp_ca_state | 113 | enum tcp_ca_state { |
106 | { | ||
107 | TCP_CA_Open = 0, | 114 | TCP_CA_Open = 0, |
108 | #define TCPF_CA_Open (1<<TCP_CA_Open) | 115 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
109 | TCP_CA_Disorder = 1, | 116 | TCP_CA_Disorder = 1, |
@@ -116,8 +123,7 @@ enum tcp_ca_state | |||
116 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) | 123 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
117 | }; | 124 | }; |
118 | 125 | ||
119 | struct tcp_info | 126 | struct tcp_info { |
120 | { | ||
121 | __u8 tcpi_state; | 127 | __u8 tcpi_state; |
122 | __u8 tcpi_ca_state; | 128 | __u8 tcpi_ca_state; |
123 | __u8 tcpi_retransmits; | 129 | __u8 tcpi_retransmits; |
@@ -170,6 +176,30 @@ struct tcp_md5sig { | |||
170 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ | 176 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ |
171 | }; | 177 | }; |
172 | 178 | ||
179 | /* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */ | ||
180 | #define TCP_COOKIE_MIN 8 /* 64-bits */ | ||
181 | #define TCP_COOKIE_MAX 16 /* 128-bits */ | ||
182 | #define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX) | ||
183 | |||
184 | /* Flags for both getsockopt and setsockopt */ | ||
185 | #define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */ | ||
186 | #define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies, | ||
187 | * supercedes everything. */ | ||
188 | |||
189 | /* Flags for getsockopt */ | ||
190 | #define TCP_S_DATA_IN (1 << 2) /* Was data received? */ | ||
191 | #define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */ | ||
192 | |||
193 | /* TCP_COOKIE_TRANSACTIONS data */ | ||
194 | struct tcp_cookie_transactions { | ||
195 | __u16 tcpct_flags; /* see above */ | ||
196 | __u8 __tcpct_pad1; /* zero */ | ||
197 | __u8 tcpct_cookie_desired; /* bytes */ | ||
198 | __u16 tcpct_s_data_desired; /* bytes of variable data */ | ||
199 | __u16 tcpct_used; /* bytes in value */ | ||
200 | __u8 tcpct_value[TCP_MSS_DEFAULT]; | ||
201 | }; | ||
202 | |||
173 | #ifdef __KERNEL__ | 203 | #ifdef __KERNEL__ |
174 | 204 | ||
175 | #include <linux/skbuff.h> | 205 | #include <linux/skbuff.h> |
@@ -217,26 +247,38 @@ struct tcp_options_received { | |||
217 | sack_ok : 4, /* SACK seen on SYN packet */ | 247 | sack_ok : 4, /* SACK seen on SYN packet */ |
218 | snd_wscale : 4, /* Window scaling received from sender */ | 248 | snd_wscale : 4, /* Window scaling received from sender */ |
219 | rcv_wscale : 4; /* Window scaling to send to receiver */ | 249 | rcv_wscale : 4; /* Window scaling to send to receiver */ |
220 | /* SACKs data */ | 250 | u8 cookie_plus:6, /* bytes in authenticator/cookie option */ |
251 | cookie_out_never:1, | ||
252 | cookie_in_always:1; | ||
221 | u8 num_sacks; /* Number of SACK blocks */ | 253 | u8 num_sacks; /* Number of SACK blocks */ |
222 | u16 user_mss; /* mss requested by user in ioctl */ | 254 | u16 user_mss; /* mss requested by user in ioctl */ |
223 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ | 255 | u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
224 | }; | 256 | }; |
225 | 257 | ||
258 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) | ||
259 | { | ||
260 | rx_opt->tstamp_ok = rx_opt->sack_ok = 0; | ||
261 | rx_opt->wscale_ok = rx_opt->snd_wscale = 0; | ||
262 | rx_opt->cookie_plus = 0; | ||
263 | } | ||
264 | |||
226 | /* This is the max number of SACKS that we'll generate and process. It's safe | 265 | /* This is the max number of SACKS that we'll generate and process. It's safe |
227 | * to increse this, although since: | 266 | * to increase this, although since: |
228 | * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8) | 267 | * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8) |
229 | * only four options will fit in a standard TCP header */ | 268 | * only four options will fit in a standard TCP header */ |
230 | #define TCP_NUM_SACKS 4 | 269 | #define TCP_NUM_SACKS 4 |
231 | 270 | ||
271 | struct tcp_cookie_values; | ||
272 | struct tcp_request_sock_ops; | ||
273 | |||
232 | struct tcp_request_sock { | 274 | struct tcp_request_sock { |
233 | struct inet_request_sock req; | 275 | struct inet_request_sock req; |
234 | #ifdef CONFIG_TCP_MD5SIG | 276 | #ifdef CONFIG_TCP_MD5SIG |
235 | /* Only used by TCP MD5 Signature so far. */ | 277 | /* Only used by TCP MD5 Signature so far. */ |
236 | const struct tcp_request_sock_ops *af_specific; | 278 | const struct tcp_request_sock_ops *af_specific; |
237 | #endif | 279 | #endif |
238 | u32 rcv_isn; | 280 | u32 rcv_isn; |
239 | u32 snt_isn; | 281 | u32 snt_isn; |
240 | }; | 282 | }; |
241 | 283 | ||
242 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | 284 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) |
@@ -406,6 +448,12 @@ struct tcp_sock { | |||
406 | /* TCP MD5 Signature Option information */ | 448 | /* TCP MD5 Signature Option information */ |
407 | struct tcp_md5sig_info *md5sig_info; | 449 | struct tcp_md5sig_info *md5sig_info; |
408 | #endif | 450 | #endif |
451 | |||
452 | /* When the cookie options are generated and exchanged, then this | ||
453 | * object holds a reference to them (cookie_values->kref). Also | ||
454 | * contains related tcp_cookie_transactions fields. | ||
455 | */ | ||
456 | struct tcp_cookie_values *cookie_values; | ||
409 | }; | 457 | }; |
410 | 458 | ||
411 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 459 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
@@ -424,6 +472,10 @@ struct tcp_timewait_sock { | |||
424 | u16 tw_md5_keylen; | 472 | u16 tw_md5_keylen; |
425 | u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN]; | 473 | u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN]; |
426 | #endif | 474 | #endif |
475 | /* Few sockets in timewait have cookies; in that case, then this | ||
476 | * object holds a reference to them (tw_cookie_values->kref). | ||
477 | */ | ||
478 | struct tcp_cookie_values *tw_cookie_values; | ||
427 | }; | 479 | }; |
428 | 480 | ||
429 | static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) | 481 | static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) |
@@ -431,6 +483,6 @@ static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) | |||
431 | return (struct tcp_timewait_sock *)sk; | 483 | return (struct tcp_timewait_sock *)sk; |
432 | } | 484 | } |
433 | 485 | ||
434 | #endif | 486 | #endif /* __KERNEL__ */ |
435 | 487 | ||
436 | #endif /* _LINUX_TCP_H */ | 488 | #endif /* _LINUX_TCP_H */ |
diff --git a/include/linux/udp.h b/include/linux/udp.h index 0cf5c4c0ec81..03f72a2ba028 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -45,16 +45,19 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | |||
45 | return (struct udphdr *)skb_transport_header(skb); | 45 | return (struct udphdr *)skb_transport_header(skb); |
46 | } | 46 | } |
47 | 47 | ||
48 | #define UDP_HTABLE_SIZE 128 | 48 | #define UDP_HTABLE_SIZE_MIN (CONFIG_BASE_SMALL ? 128 : 256) |
49 | 49 | ||
50 | static inline int udp_hashfn(struct net *net, const unsigned num) | 50 | static 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 | ||
55 | struct udp_sock { | 55 | struct udp_sock { |
56 | /* inet_sock has to be the first member */ | 56 | /* inet_sock has to be the first member */ |
57 | struct inet_sock inet; | 57 | struct inet_sock inet; |
58 | #define udp_port_hash inet.sk.__sk_common.skc_u16hashes[0] | ||
59 | #define udp_portaddr_hash inet.sk.__sk_common.skc_u16hashes[1] | ||
60 | #define udp_portaddr_node inet.sk.__sk_common.skc_portaddr_node | ||
58 | int pending; /* Any pending frames ? */ | 61 | int pending; /* Any pending frames ? */ |
59 | unsigned int corkflag; /* Cork is required */ | 62 | unsigned int corkflag; /* Cork is required */ |
60 | __u16 encap_type; /* Is this an Encapsulation socket? */ | 63 | __u16 encap_type; /* Is this an Encapsulation socket? */ |
@@ -85,6 +88,12 @@ static inline struct udp_sock *udp_sk(const struct sock *sk) | |||
85 | return (struct udp_sock *)sk; | 88 | return (struct udp_sock *)sk; |
86 | } | 89 | } |
87 | 90 | ||
91 | #define udp_portaddr_for_each_entry(__sk, node, list) \ | ||
92 | hlist_nulls_for_each_entry(__sk, node, list, __sk_common.skc_portaddr_node) | ||
93 | |||
94 | #define udp_portaddr_for_each_entry_rcu(__sk, node, list) \ | ||
95 | hlist_nulls_for_each_entry_rcu(__sk, node, list, __sk_common.skc_portaddr_node) | ||
96 | |||
88 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) | 97 | #define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag) |
89 | 98 | ||
90 | #endif | 99 | #endif |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index f81473052059..8ce61359bf73 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -55,6 +55,7 @@ struct usbnet { | |||
55 | struct sk_buff_head done; | 55 | struct sk_buff_head done; |
56 | struct sk_buff_head rxq_pause; | 56 | struct sk_buff_head rxq_pause; |
57 | struct urb *interrupt; | 57 | struct urb *interrupt; |
58 | struct usb_anchor deferred; | ||
58 | struct tasklet_struct bh; | 59 | struct tasklet_struct bh; |
59 | 60 | ||
60 | struct work_struct kevent; | 61 | struct work_struct kevent; |
@@ -65,6 +66,8 @@ struct usbnet { | |||
65 | # define EVENT_STS_SPLIT 3 | 66 | # define EVENT_STS_SPLIT 3 |
66 | # define EVENT_LINK_RESET 4 | 67 | # define EVENT_LINK_RESET 4 |
67 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
69 | # define EVENT_DEV_WAKING 6 | ||
70 | # define EVENT_DEV_ASLEEP 7 | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -90,7 +93,9 @@ struct driver_info { | |||
90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 93 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | 94 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ |
92 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ | 95 | #define FLAG_SEND_ZLP 0x0200 /* hw requires ZLPs are sent */ |
96 | #define FLAG_WWAN 0x0400 /* use "wwan%d" names */ | ||
93 | 97 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | ||
94 | 99 | ||
95 | /* init device ... can sleep, or cause probe() failure */ | 100 | /* init device ... can sleep, or cause probe() failure */ |
96 | int (*bind)(struct usbnet *, struct usb_interface *); | 101 | int (*bind)(struct usbnet *, struct usb_interface *); |
@@ -107,6 +112,9 @@ struct driver_info { | |||
107 | /* see if peer is connected ... can sleep */ | 112 | /* see if peer is connected ... can sleep */ |
108 | int (*check_connect)(struct usbnet *); | 113 | int (*check_connect)(struct usbnet *); |
109 | 114 | ||
115 | /* (dis)activate runtime power management */ | ||
116 | int (*manage_power)(struct usbnet *, int); | ||
117 | |||
110 | /* for status polling */ | 118 | /* for status polling */ |
111 | void (*status)(struct usbnet *, struct urb *); | 119 | void (*status)(struct usbnet *, struct urb *); |
112 | 120 | ||
diff --git a/include/linux/wimax/debug.h b/include/linux/wimax/debug.h index c703e0340423..db8096e88533 100644 --- a/include/linux/wimax/debug.h +++ b/include/linux/wimax/debug.h | |||
@@ -450,4 +450,76 @@ do { \ | |||
450 | }) | 450 | }) |
451 | 451 | ||
452 | 452 | ||
453 | static inline | ||
454 | void 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 | */ | ||
488 | static inline | ||
489 | void 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(¶ms, " "); | ||
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 */ | ||
172 | enum 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 | */ |
13 | typedef union | 13 | typedef 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 | */ |
23 | struct xfrm_id | 22 | struct 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 | ||
48 | struct xfrm_selector | 46 | struct 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 | ||
66 | struct xfrm_lifetime_cfg | 63 | struct 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 | ||
78 | struct xfrm_lifetime_cur | 74 | struct 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 | ||
86 | struct xfrm_replay_state | 81 | struct 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 | ||
93 | struct 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 | |||
99 | struct xfrm_algo_aead { | 100 | struct 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 | ||
112 | enum | 113 | enum { |
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 | ||
120 | enum | 120 | enum { |
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 | ||
129 | enum | 128 | enum { |
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 | ||
10 | struct ah_data | 9 | struct crypto_ahash; |
11 | { | 10 | |
12 | u8 *work_icv; | 11 | struct 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 | ||
19 | static 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 | |||
37 | out: | ||
38 | return err; | ||
39 | } | ||
40 | |||
41 | struct ip_auth_hdr; | 18 | struct ip_auth_hdr; |
42 | 19 | ||
43 | static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb) | 20 | static 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 | ||
124 | int bt_sock_register(int proto, struct net_proto_family *ops); | 124 | int bt_sock_register(int proto, const struct net_proto_family *ops); |
125 | int bt_sock_unregister(int proto); | 125 | int bt_sock_unregister(int proto); |
126 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); | 126 | void bt_sock_link(struct bt_sock_list *l, struct sock *s); |
127 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); | 127 | void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 7b640aeddb64..7b86094a894b 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -367,22 +367,6 @@ static inline void hci_conn_put(struct hci_conn *conn) | |||
367 | } | 367 | } |
368 | } | 368 | } |
369 | 369 | ||
370 | /* ----- HCI tasks ----- */ | ||
371 | static inline void hci_sched_cmd(struct hci_dev *hdev) | ||
372 | { | ||
373 | tasklet_schedule(&hdev->cmd_task); | ||
374 | } | ||
375 | |||
376 | static inline void hci_sched_rx(struct hci_dev *hdev) | ||
377 | { | ||
378 | tasklet_schedule(&hdev->rx_task); | ||
379 | } | ||
380 | |||
381 | static inline void hci_sched_tx(struct hci_dev *hdev) | ||
382 | { | ||
383 | tasklet_schedule(&hdev->tx_task); | ||
384 | } | ||
385 | |||
386 | /* ----- HCI Devices ----- */ | 370 | /* ----- HCI Devices ----- */ |
387 | static inline void __hci_dev_put(struct hci_dev *d) | 371 | static inline void __hci_dev_put(struct hci_dev *d) |
388 | { | 372 | { |
@@ -437,28 +421,7 @@ int hci_inquiry(void __user *arg); | |||
437 | 421 | ||
438 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 422 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
439 | 423 | ||
440 | /* Receive frame from HCI drivers */ | 424 | int hci_recv_frame(struct sk_buff *skb); |
441 | static inline int hci_recv_frame(struct sk_buff *skb) | ||
442 | { | ||
443 | struct hci_dev *hdev = (struct hci_dev *) skb->dev; | ||
444 | if (!hdev || (!test_bit(HCI_UP, &hdev->flags) | ||
445 | && !test_bit(HCI_INIT, &hdev->flags))) { | ||
446 | kfree_skb(skb); | ||
447 | return -ENXIO; | ||
448 | } | ||
449 | |||
450 | /* Incomming skb */ | ||
451 | bt_cb(skb)->incoming = 1; | ||
452 | |||
453 | /* Time stamp */ | ||
454 | __net_timestamp(skb); | ||
455 | |||
456 | /* Queue frame for rx task */ | ||
457 | skb_queue_tail(&hdev->rx_q, skb); | ||
458 | hci_sched_rx(hdev); | ||
459 | return 0; | ||
460 | } | ||
461 | |||
462 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | 425 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); |
463 | 426 | ||
464 | int hci_register_sysfs(struct hci_dev *hdev); | 427 | int hci_register_sysfs(struct hci_dev *hdev); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 9516f4b4a3c2..17a689f27a6a 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -324,7 +324,6 @@ struct l2cap_pinfo { | |||
324 | 324 | ||
325 | __u8 next_tx_seq; | 325 | __u8 next_tx_seq; |
326 | __u8 expected_ack_seq; | 326 | __u8 expected_ack_seq; |
327 | __u8 req_seq; | ||
328 | __u8 expected_tx_seq; | 327 | __u8 expected_tx_seq; |
329 | __u8 buffer_seq; | 328 | __u8 buffer_seq; |
330 | __u8 buffer_seq_srej; | 329 | __u8 buffer_seq_srej; |
@@ -375,6 +374,7 @@ struct l2cap_pinfo { | |||
375 | #define L2CAP_CONN_SEND_PBIT 0x10 | 374 | #define L2CAP_CONN_SEND_PBIT 0x10 |
376 | #define L2CAP_CONN_REMOTE_BUSY 0x20 | 375 | #define L2CAP_CONN_REMOTE_BUSY 0x20 |
377 | #define L2CAP_CONN_LOCAL_BUSY 0x40 | 376 | #define L2CAP_CONN_LOCAL_BUSY 0x40 |
377 | #define L2CAP_CONN_REJ_ACT 0x80 | ||
378 | 378 | ||
379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ | 379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ |
380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | 380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 3d874c620219..0884b9a0f778 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 | */ |
210 | struct vif_params { | 211 | struct 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 | */ | ||
243 | enum 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 | */ | ||
260 | struct 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 | */ |
428 | enum mpath_info_flags { | 459 | enum 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 { | |||
456 | struct mpath_info { | 487 | struct 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 | /** |
@@ -839,6 +871,19 @@ struct cfg80211_bitrate_mask { | |||
839 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | 871 | u32 fixed; /* fixed bitrate, 0 == not fixed */ |
840 | u32 maxrate; /* in kbps, 0 == no limit */ | 872 | u32 maxrate; /* in kbps, 0 == no limit */ |
841 | }; | 873 | }; |
874 | /** | ||
875 | * struct cfg80211_pmksa - PMK Security Association | ||
876 | * | ||
877 | * This structure is passed to the set/del_pmksa() method for PMKSA | ||
878 | * caching. | ||
879 | * | ||
880 | * @bssid: The AP's BSSID. | ||
881 | * @pmkid: The PMK material itself. | ||
882 | */ | ||
883 | struct cfg80211_pmksa { | ||
884 | u8 *bssid; | ||
885 | u8 *pmkid; | ||
886 | }; | ||
842 | 887 | ||
843 | /** | 888 | /** |
844 | * struct cfg80211_ops - backend description for wireless configuration | 889 | * struct cfg80211_ops - backend description for wireless configuration |
@@ -941,7 +986,16 @@ struct cfg80211_bitrate_mask { | |||
941 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting | 986 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting |
942 | * functions to adjust rfkill hw state | 987 | * functions to adjust rfkill hw state |
943 | * | 988 | * |
989 | * @dump_survey: get site survey information. | ||
990 | * | ||
944 | * @testmode_cmd: run a test mode command | 991 | * @testmode_cmd: run a test mode command |
992 | * | ||
993 | * @set_pmksa: Cache a PMKID for a BSSID. This is mostly useful for fullmac | ||
994 | * devices running firmwares capable of generating the (re) association | ||
995 | * RSN IE. It allows for faster roaming between WPA2 BSSIDs. | ||
996 | * @del_pmksa: Delete a cached PMKID. | ||
997 | * @flush_pmksa: Flush all cached PMKIDs. | ||
998 | * | ||
945 | */ | 999 | */ |
946 | struct cfg80211_ops { | 1000 | struct cfg80211_ops { |
947 | int (*suspend)(struct wiphy *wiphy); | 1001 | int (*suspend)(struct wiphy *wiphy); |
@@ -1060,6 +1114,15 @@ struct cfg80211_ops { | |||
1060 | const u8 *peer, | 1114 | const u8 *peer, |
1061 | const struct cfg80211_bitrate_mask *mask); | 1115 | const struct cfg80211_bitrate_mask *mask); |
1062 | 1116 | ||
1117 | int (*dump_survey)(struct wiphy *wiphy, struct net_device *netdev, | ||
1118 | int idx, struct survey_info *info); | ||
1119 | |||
1120 | int (*set_pmksa)(struct wiphy *wiphy, struct net_device *netdev, | ||
1121 | struct cfg80211_pmksa *pmksa); | ||
1122 | int (*del_pmksa)(struct wiphy *wiphy, struct net_device *netdev, | ||
1123 | struct cfg80211_pmksa *pmksa); | ||
1124 | int (*flush_pmksa)(struct wiphy *wiphy, struct net_device *netdev); | ||
1125 | |||
1063 | /* some temporary stuff to finish wext */ | 1126 | /* some temporary stuff to finish wext */ |
1064 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | 1127 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, |
1065 | bool enabled, int timeout); | 1128 | bool enabled, int timeout); |
@@ -1071,27 +1134,50 @@ struct cfg80211_ops { | |||
1071 | */ | 1134 | */ |
1072 | 1135 | ||
1073 | /** | 1136 | /** |
1074 | * struct wiphy - wireless hardware description | 1137 | * enum wiphy_flags - wiphy capability flags |
1075 | * @idx: the wiphy index assigned to this item | 1138 | * |
1076 | * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> | 1139 | * @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 | 1140 | * has its own custom regulatory domain and cannot identify the |
1079 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled | 1141 | * ISO / IEC 3166 alpha2 it belongs to. When this is enabled |
1080 | * we will disregard the first regulatory hint (when the | 1142 | * we will disregard the first regulatory hint (when the |
1081 | * initiator is %REGDOM_SET_BY_CORE). | 1143 | * initiator is %REGDOM_SET_BY_CORE). |
1082 | * @strict_regulatory: tells us the driver for this device will ignore | 1144 | * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will |
1083 | * regulatory domain settings until it gets its own regulatory domain | 1145 | * ignore regulatory domain settings until it gets its own regulatory |
1084 | * via its regulatory_hint(). After its gets its own regulatory domain | 1146 | * domain via its regulatory_hint(). After its gets its own regulatory |
1085 | * it will only allow further regulatory domain settings to further | 1147 | * domain it will only allow further regulatory domain settings to |
1086 | * enhance compliance. For example if channel 13 and 14 are disabled | 1148 | * further enhance compliance. For example if channel 13 and 14 are |
1087 | * by this regulatory domain no user regulatory domain can enable these | 1149 | * 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 | 1150 | * enable these channels at a later time. This can be used for devices |
1089 | * have calibration information gauranteed for frequencies or settings | 1151 | * which do not have calibration information gauranteed for frequencies |
1090 | * outside of its regulatory domain. | 1152 | * or settings outside of its regulatory domain. |
1091 | * @disable_beacon_hints: enable this if your driver needs to ensure that | 1153 | * @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 | 1154 | * that passive scan flags and beaconing flags may not be lifted by |
1093 | * due to regulatory beacon hints. For more information on beacon | 1155 | * cfg80211 due to regulatory beacon hints. For more information on beacon |
1094 | * hints read the documenation for regulatory_hint_found_beacon() | 1156 | * hints read the documenation for regulatory_hint_found_beacon() |
1157 | * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this | ||
1158 | * wiphy at all | ||
1159 | * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled | ||
1160 | * by default -- this flag will be set depending on the kernel's default | ||
1161 | * on wiphy_new(), but can be changed by the driver if it has a good | ||
1162 | * reason to override the default | ||
1163 | * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station | ||
1164 | * on a VLAN interface) | ||
1165 | * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station | ||
1166 | */ | ||
1167 | enum wiphy_flags { | ||
1168 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | ||
1169 | WIPHY_FLAG_STRICT_REGULATORY = BIT(1), | ||
1170 | WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2), | ||
1171 | WIPHY_FLAG_NETNS_OK = BIT(3), | ||
1172 | WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4), | ||
1173 | WIPHY_FLAG_4ADDR_AP = BIT(5), | ||
1174 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | ||
1175 | }; | ||
1176 | |||
1177 | /** | ||
1178 | * struct wiphy - wireless hardware description | ||
1179 | * @idx: the wiphy index assigned to this item | ||
1180 | * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> | ||
1095 | * @reg_notifier: the driver's regulatory notification callback | 1181 | * @reg_notifier: the driver's regulatory notification callback |
1096 | * @regd: the driver's regulatory domain, if one was requested via | 1182 | * @regd: the driver's regulatory domain, if one was requested via |
1097 | * the regulatory_hint() API. This can be used by the driver | 1183 | * the regulatory_hint() API. This can be used by the driver |
@@ -1106,11 +1192,6 @@ struct cfg80211_ops { | |||
1106 | * -1 = fragmentation disabled, only odd values >= 256 used | 1192 | * -1 = fragmentation disabled, only odd values >= 256 used |
1107 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1193 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1108 | * @net: the network namespace this wiphy currently lives in | 1194 | * @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 | */ | 1195 | */ |
1115 | struct wiphy { | 1196 | struct wiphy { |
1116 | /* assign these fields before you register the wiphy */ | 1197 | /* assign these fields before you register the wiphy */ |
@@ -1121,12 +1202,7 @@ struct wiphy { | |||
1121 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 1202 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
1122 | u16 interface_modes; | 1203 | u16 interface_modes; |
1123 | 1204 | ||
1124 | bool custom_regulatory; | 1205 | u32 flags; |
1125 | bool strict_regulatory; | ||
1126 | bool disable_beacon_hints; | ||
1127 | |||
1128 | bool netnsok; | ||
1129 | bool ps_default; | ||
1130 | 1206 | ||
1131 | enum cfg80211_signal_type signal_type; | 1207 | enum cfg80211_signal_type signal_type; |
1132 | 1208 | ||
@@ -1142,6 +1218,11 @@ struct wiphy { | |||
1142 | u32 frag_threshold; | 1218 | u32 frag_threshold; |
1143 | u32 rts_threshold; | 1219 | u32 rts_threshold; |
1144 | 1220 | ||
1221 | char fw_version[ETHTOOL_BUSINFO_LEN]; | ||
1222 | u32 hw_version; | ||
1223 | |||
1224 | u8 max_num_pmkids; | ||
1225 | |||
1145 | /* If multiple wiphys are registered and you're handed e.g. | 1226 | /* If multiple wiphys are registered and you're handed e.g. |
1146 | * a regular netdev with assigned ieee80211_ptr, you won't | 1227 | * a regular netdev with assigned ieee80211_ptr, you won't |
1147 | * know whether it points to a wiphy your driver has registered | 1228 | * know whether it points to a wiphy your driver has registered |
@@ -1171,6 +1252,10 @@ struct wiphy { | |||
1171 | struct net *_net; | 1252 | struct net *_net; |
1172 | #endif | 1253 | #endif |
1173 | 1254 | ||
1255 | #ifdef CONFIG_CFG80211_WEXT | ||
1256 | const struct iw_handler_def *wext; | ||
1257 | #endif | ||
1258 | |||
1174 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1259 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1175 | }; | 1260 | }; |
1176 | 1261 | ||
@@ -1314,6 +1399,10 @@ struct cfg80211_cached_keys; | |||
1314 | * @ssid_len: (private) Used by the internal configuration code | 1399 | * @ssid_len: (private) Used by the internal configuration code |
1315 | * @wext: (private) Used by the internal wireless extensions compat code | 1400 | * @wext: (private) Used by the internal wireless extensions compat code |
1316 | * @wext_bssid: (private) Used by the internal wireless extensions compat code | 1401 | * @wext_bssid: (private) Used by the internal wireless extensions compat code |
1402 | * @use_4addr: indicates 4addr mode is used on this interface, must be | ||
1403 | * set by driver (if supported) on add_interface BEFORE registering the | ||
1404 | * netdev and may otherwise be used by driver read-only, will be update | ||
1405 | * by cfg80211 on change_interface | ||
1317 | */ | 1406 | */ |
1318 | struct wireless_dev { | 1407 | struct wireless_dev { |
1319 | struct wiphy *wiphy; | 1408 | struct wiphy *wiphy; |
@@ -1327,6 +1416,8 @@ struct wireless_dev { | |||
1327 | 1416 | ||
1328 | struct work_struct cleanup_work; | 1417 | struct work_struct cleanup_work; |
1329 | 1418 | ||
1419 | bool use_4addr; | ||
1420 | |||
1330 | /* currently used for IBSS and SME - might be rearranged later */ | 1421 | /* currently used for IBSS and SME - might be rearranged later */ |
1331 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1422 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1332 | u8 ssid_len; | 1423 | u8 ssid_len; |
@@ -1345,7 +1436,7 @@ struct wireless_dev { | |||
1345 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; | 1436 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; |
1346 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | 1437 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ |
1347 | 1438 | ||
1348 | #ifdef CONFIG_WIRELESS_EXT | 1439 | #ifdef CONFIG_CFG80211_WEXT |
1349 | /* wext data */ | 1440 | /* wext data */ |
1350 | struct { | 1441 | struct { |
1351 | struct cfg80211_ibss_params ibss; | 1442 | struct cfg80211_ibss_params ibss; |
@@ -1776,6 +1867,18 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | |||
1776 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | 1867 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); |
1777 | 1868 | ||
1778 | /** | 1869 | /** |
1870 | * __cfg80211_auth_canceled - notify cfg80211 that authentication was canceled | ||
1871 | * @dev: network device | ||
1872 | * @addr: The MAC address of the device with which the authentication timed out | ||
1873 | * | ||
1874 | * When a pending authentication had no action yet, the driver may decide | ||
1875 | * to not send a deauth frame, but in that case must calls this function | ||
1876 | * to tell cfg80211 about this decision. It is only valid to call this | ||
1877 | * function within the deauth() callback. | ||
1878 | */ | ||
1879 | void __cfg80211_auth_canceled(struct net_device *dev, const u8 *addr); | ||
1880 | |||
1881 | /** | ||
1779 | * cfg80211_send_rx_assoc - notification of processed association | 1882 | * cfg80211_send_rx_assoc - notification of processed association |
1780 | * @dev: network device | 1883 | * @dev: network device |
1781 | * @buf: (re)association response frame (header + body) | 1884 | * @buf: (re)association response frame (header + body) |
@@ -1802,30 +1905,45 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | |||
1802 | * @dev: network device | 1905 | * @dev: network device |
1803 | * @buf: deauthentication frame (header + body) | 1906 | * @buf: deauthentication frame (header + body) |
1804 | * @len: length of the frame data | 1907 | * @len: length of the frame data |
1805 | * @cookie: cookie from ->deauth if called within that callback, | ||
1806 | * %NULL otherwise | ||
1807 | * | 1908 | * |
1808 | * This function is called whenever deauthentication has been processed in | 1909 | * This function is called whenever deauthentication has been processed in |
1809 | * station mode. This includes both received deauthentication frames and | 1910 | * station mode. This includes both received deauthentication frames and |
1810 | * locally generated ones. This function may sleep. | 1911 | * locally generated ones. This function may sleep. |
1811 | */ | 1912 | */ |
1812 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, | 1913 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); |
1813 | void *cookie); | 1914 | |
1915 | /** | ||
1916 | * __cfg80211_send_deauth - notification of processed deauthentication | ||
1917 | * @dev: network device | ||
1918 | * @buf: deauthentication frame (header + body) | ||
1919 | * @len: length of the frame data | ||
1920 | * | ||
1921 | * Like cfg80211_send_deauth(), but doesn't take the wdev lock. | ||
1922 | */ | ||
1923 | void __cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | ||
1814 | 1924 | ||
1815 | /** | 1925 | /** |
1816 | * cfg80211_send_disassoc - notification of processed disassociation | 1926 | * cfg80211_send_disassoc - notification of processed disassociation |
1817 | * @dev: network device | 1927 | * @dev: network device |
1818 | * @buf: disassociation response frame (header + body) | 1928 | * @buf: disassociation response frame (header + body) |
1819 | * @len: length of the frame data | 1929 | * @len: length of the frame data |
1820 | * @cookie: cookie from ->disassoc if called within that callback, | ||
1821 | * %NULL otherwise | ||
1822 | * | 1930 | * |
1823 | * This function is called whenever disassociation has been processed in | 1931 | * This function is called whenever disassociation has been processed in |
1824 | * station mode. This includes both received disassociation frames and locally | 1932 | * station mode. This includes both received disassociation frames and locally |
1825 | * generated ones. This function may sleep. | 1933 | * generated ones. This function may sleep. |
1826 | */ | 1934 | */ |
1827 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, | 1935 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); |
1828 | void *cookie); | 1936 | |
1937 | /** | ||
1938 | * __cfg80211_send_disassoc - notification of processed disassociation | ||
1939 | * @dev: network device | ||
1940 | * @buf: disassociation response frame (header + body) | ||
1941 | * @len: length of the frame data | ||
1942 | * | ||
1943 | * Like cfg80211_send_disassoc(), but doesn't take the wdev lock. | ||
1944 | */ | ||
1945 | void __cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, | ||
1946 | size_t len); | ||
1829 | 1947 | ||
1830 | /** | 1948 | /** |
1831 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) | 1949 | * 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 | ||
21 | struct compat_mmsghdr { | ||
22 | struct compat_msghdr msg_hdr; | ||
23 | compat_uint_t msg_len; | ||
24 | }; | ||
25 | |||
21 | struct compat_cmsghdr { | 26 | struct 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 *); | |||
28 | extern int compat_sock_get_timestampns(struct sock *, struct timespec __user *); | 33 | extern 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 | ||
34 | extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); | 43 | extern int get_compat_msghdr(struct msghdr *, struct compat_msghdr __user *); |
35 | extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int); | 44 | extern int verify_compat_iovec(struct msghdr *, struct iovec *, struct sockaddr *, int); |
36 | extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned); | 45 | extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsigned); |
37 | extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); | 46 | extern asmlinkage long compat_sys_recvmsg(int,struct compat_msghdr __user *,unsigned); |
47 | extern asmlinkage long compat_sys_recvmmsg(int, struct compat_mmsghdr __user *, | ||
48 | unsigned, unsigned, | ||
49 | struct timespec __user *); | ||
38 | extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); | 50 | extern asmlinkage long compat_sys_getsockopt(int, int, int, char __user *, int __user *); |
39 | extern int put_cmsg_compat(struct msghdr*, int, int, int, void *); | 51 | extern 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 3f781a4cafbe..511a459ec10f 100644 --- a/include/net/dn_dev.h +++ b/include/net/dn_dev.h | |||
@@ -96,16 +96,14 @@ struct dn_dev { | |||
96 | unsigned long uptime; /* Time device went up in jiffies */ | 96 | unsigned long uptime; /* Time device went up in jiffies */ |
97 | }; | 97 | }; |
98 | 98 | ||
99 | struct dn_short_packet | 99 | struct dn_short_packet { |
100 | { | ||
101 | __u8 msgflg; | 100 | __u8 msgflg; |
102 | __le16 dstnode; | 101 | __le16 dstnode; |
103 | __le16 srcnode; | 102 | __le16 srcnode; |
104 | __u8 forward; | 103 | __u8 forward; |
105 | } __attribute__((packed)); | 104 | } __attribute__((packed)); |
106 | 105 | ||
107 | struct dn_long_packet | 106 | struct dn_long_packet { |
108 | { | ||
109 | __u8 msgflg; | 107 | __u8 msgflg; |
110 | __u8 d_area; | 108 | __u8 d_area; |
111 | __u8 d_subarea; | 109 | __u8 d_subarea; |
@@ -121,8 +119,7 @@ struct dn_long_packet | |||
121 | 119 | ||
122 | /*------------------------- DRP - Routing messages ---------------------*/ | 120 | /*------------------------- DRP - Routing messages ---------------------*/ |
123 | 121 | ||
124 | struct endnode_hello_message | 122 | struct endnode_hello_message { |
125 | { | ||
126 | __u8 msgflg; | 123 | __u8 msgflg; |
127 | __u8 tiver[3]; | 124 | __u8 tiver[3]; |
128 | __u8 id[6]; | 125 | __u8 id[6]; |
@@ -137,8 +134,7 @@ struct endnode_hello_message | |||
137 | __u8 data[2]; | 134 | __u8 data[2]; |
138 | } __attribute__((packed)); | 135 | } __attribute__((packed)); |
139 | 136 | ||
140 | struct rtnode_hello_message | 137 | struct rtnode_hello_message { |
141 | { | ||
142 | __u8 msgflg; | 138 | __u8 msgflg; |
143 | __u8 tiver[3]; | 139 | __u8 tiver[3]; |
144 | __u8 id[6]; | 140 | __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 | */ |
7 | struct dn_kern_rta | 7 | struct 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 | ||
73 | struct nsp_data_seg_msg | 73 | struct 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 | ||
80 | struct nsp_data_opt_msg | 79 | struct 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 | ||
87 | struct nsp_data_opt_msg1 | 85 | struct 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) */ |
95 | struct nsp_data_ack_msg | 92 | struct 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 */ |
104 | struct nsp_conn_ack_msg | 100 | struct 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 */ |
112 | struct nsp_conn_init_msg | 107 | struct 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 */ |
129 | struct nsp_disconn_init_msg | 123 | struct 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 | ||
139 | struct srcobj_fmt | 132 | struct 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 | ||
37 | struct sk_buff; | 37 | struct sk_buff; |
38 | 38 | ||
39 | struct dst_entry | 39 | struct 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 | ||
113 | static inline u32 | ||
114 | dst_feature(const struct dst_entry *dst, u32 feature) | ||
115 | { | ||
116 | return (dst ? dst_metric(dst, RTAX_FEATURES) & feature : 0); | ||
117 | } | ||
118 | |||
114 | static inline u32 dst_mtu(const struct dst_entry *dst) | 119 | static 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, | |||
136 | static inline u32 | 141 | static inline u32 |
137 | dst_allfrag(const struct dst_entry *dst) | 142 | dst_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 | ||
225 | static inline void dst_negative_advice(struct dst_entry **dst_p) | 230 | static 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 | ||
232 | static inline void dst_link_failure(struct sk_buff *skb) | 245 | static 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..c07ac9650ebc 100644 --- a/include/net/fib_rules.h +++ b/include/net/fib_rules.h | |||
@@ -7,12 +7,11 @@ | |||
7 | #include <net/flow.h> | 7 | #include <net/flow.h> |
8 | #include <net/rtnetlink.h> | 8 | #include <net/rtnetlink.h> |
9 | 9 | ||
10 | struct fib_rule | 10 | struct 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 iifindex; |
15 | char ifname[IFNAMSIZ]; | 14 | int oifindex; |
16 | u32 mark; | 15 | u32 mark; |
17 | u32 mark_mask; | 16 | u32 mark_mask; |
18 | u32 pref; | 17 | u32 pref; |
@@ -21,19 +20,19 @@ struct fib_rule | |||
21 | u8 action; | 20 | u8 action; |
22 | u32 target; | 21 | u32 target; |
23 | struct fib_rule * ctarget; | 22 | struct fib_rule * ctarget; |
23 | char iifname[IFNAMSIZ]; | ||
24 | char oifname[IFNAMSIZ]; | ||
24 | struct rcu_head rcu; | 25 | struct rcu_head rcu; |
25 | struct net * fr_net; | 26 | struct net * fr_net; |
26 | }; | 27 | }; |
27 | 28 | ||
28 | struct fib_lookup_arg | 29 | struct fib_lookup_arg { |
29 | { | ||
30 | void *lookup_ptr; | 30 | void *lookup_ptr; |
31 | void *result; | 31 | void *result; |
32 | struct fib_rule *rule; | 32 | struct fib_rule *rule; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct fib_rules_ops | 35 | struct fib_rules_ops { |
36 | { | ||
37 | int family; | 36 | int family; |
38 | struct list_head list; | 37 | struct list_head list; |
39 | int rule_size; | 38 | int rule_size; |
@@ -67,10 +66,12 @@ struct fib_rules_ops | |||
67 | struct list_head rules_list; | 66 | struct list_head rules_list; |
68 | struct module *owner; | 67 | struct module *owner; |
69 | struct net *fro_net; | 68 | struct net *fro_net; |
69 | struct rcu_head rcu; | ||
70 | }; | 70 | }; |
71 | 71 | ||
72 | #define FRA_GENERIC_POLICY \ | 72 | #define FRA_GENERIC_POLICY \ |
73 | [FRA_IFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ | 73 | [FRA_IIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ |
74 | [FRA_OIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ | ||
74 | [FRA_PRIORITY] = { .type = NLA_U32 }, \ | 75 | [FRA_PRIORITY] = { .type = NLA_U32 }, \ |
75 | [FRA_FWMARK] = { .type = NLA_U32 }, \ | 76 | [FRA_FWMARK] = { .type = NLA_U32 }, \ |
76 | [FRA_FWMASK] = { .type = NLA_U32 }, \ | 77 | [FRA_FWMASK] = { .type = NLA_U32 }, \ |
@@ -102,7 +103,7 @@ static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla) | |||
102 | return frh->table; | 103 | return frh->table; |
103 | } | 104 | } |
104 | 105 | ||
105 | extern int fib_rules_register(struct fib_rules_ops *); | 106 | extern struct fib_rules_ops *fib_rules_register(struct fib_rules_ops *, struct net *); |
106 | extern void fib_rules_unregister(struct fib_rules_ops *); | 107 | extern void fib_rules_unregister(struct fib_rules_ops *); |
107 | extern void fib_rules_cleanup_ops(struct fib_rules_ops *); | 108 | extern void fib_rules_cleanup_ops(struct fib_rules_ops *); |
108 | 109 | ||
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 | ||
9 | struct gnet_dump | 9 | struct 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, | |||
30 | extern int gnet_stats_copy_basic(struct gnet_dump *d, | 29 | extern int gnet_stats_copy_basic(struct gnet_dump *d, |
31 | struct gnet_stats_basic_packed *b); | 30 | struct gnet_stats_basic_packed *b); |
32 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, | 31 | extern 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); |
34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, | 34 | extern 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 | */ |
16 | struct genl_multicast_group | 16 | struct 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 | */ |
38 | struct genl_family | 37 | struct 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 | */ |
61 | struct genl_info | 59 | struct 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 | */ |
105 | struct genl_ops | 102 | struct 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 | ||
77 | struct 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 | */ |
80 | struct ieee802154_mlme_ops { | 84 | struct 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 | ||
107 | static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops( | 113 | static 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 | ||
35 | struct inet6_ifaddr | 35 | struct 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 | ||
70 | struct ip6_sf_socklist | 69 | struct 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 | ||
82 | struct ipv6_mc_socklist | 80 | struct 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 | ||
92 | struct ip6_sf_list | 89 | struct 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 | ||
108 | struct ifmcaddr6 | 104 | struct 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 | ||
129 | struct ipv6_ac_socklist | 124 | struct 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 | ||
136 | struct ifacaddr6 | 130 | struct 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 | ||
160 | struct inet6_dev | 153 | struct 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 | ||
98 | struct inet_bind_hashbucket { | 98 | struct 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 | ||
164 | static inline spinlock_t *inet_ehash_lockp( | 164 | static inline spinlock_t *inet_ehash_lockp( |
@@ -241,7 +241,7 @@ static inline int inet_lhashfn(struct net *net, const unsigned short num) | |||
241 | 241 | ||
242 | static inline int inet_sk_listen_hashfn(const struct sock *sk) | 242 | static 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, | |||
190 | static inline int inet_sk_ehashfn(const struct sock *sk) | 190 | static 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..b801ade2295e 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -194,11 +194,13 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk) | |||
194 | static inline __be32 inet_rcv_saddr(const struct sock *sk) | 194 | static 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 | ||
200 | extern void inet_twsk_put(struct inet_timewait_sock *tw); | 200 | extern void inet_twsk_put(struct inet_timewait_sock *tw); |
201 | 201 | ||
202 | extern int inet_twsk_unhash(struct inet_timewait_sock *tw); | ||
203 | |||
202 | extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, | 204 | extern struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, |
203 | const int state); | 205 | const int state); |
204 | 206 | ||
@@ -212,14 +214,14 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw, | |||
212 | extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, | 214 | extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, |
213 | struct inet_timewait_death_row *twdr); | 215 | struct inet_timewait_death_row *twdr); |
214 | 216 | ||
215 | extern void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo, | 217 | extern void inet_twsk_purge(struct inet_hashinfo *hashinfo, |
216 | struct inet_timewait_death_row *twdr, int family); | 218 | struct inet_timewait_death_row *twdr, int family); |
217 | 219 | ||
218 | static inline | 220 | static inline |
219 | struct net *twsk_net(const struct inet_timewait_sock *twsk) | 221 | struct net *twsk_net(const struct inet_timewait_sock *twsk) |
220 | { | 222 | { |
221 | #ifdef CONFIG_NET_NS | 223 | #ifdef CONFIG_NET_NS |
222 | return twsk->tw_net; | 224 | return rcu_dereference(twsk->tw_net); |
223 | #else | 225 | #else |
224 | return &init_net; | 226 | return &init_net; |
225 | #endif | 227 | #endif |
@@ -229,7 +231,7 @@ static inline | |||
229 | void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net) | 231 | void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net) |
230 | { | 232 | { |
231 | #ifdef CONFIG_NET_NS | 233 | #ifdef CONFIG_NET_NS |
232 | twsk->tw_net = net; | 234 | rcu_assign_pointer(twsk->tw_net, net); |
233 | #endif | 235 | #endif |
234 | } | 236 | } |
235 | #endif /* _INET_TIMEWAIT_SOCK_ */ | 237 | #endif /* _INET_TIMEWAIT_SOCK_ */ |
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 | ||
16 | struct inet_peer | 16 | struct 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 | ||
32 | void inet_initpeers(void) __init; | 31 | void 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 */ |
38 | extern void inet_putpeer(struct inet_peer *p); | 37 | extern void inet_putpeer(struct inet_peer *p); |
39 | 38 | ||
40 | extern 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 */ |
42 | static inline __u16 inet_getid(struct inet_peer *p, int more) | 40 | static 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 | ||
34 | struct sock; | 34 | struct sock; |
35 | 35 | ||
36 | struct inet_skb_parm | 36 | struct 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 | ||
53 | struct ipcm_cookie | 52 | struct 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 | ||
63 | struct ip_ra_chain | 61 | struct 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) | |||
159 | void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, | 156 | void 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 | ||
162 | struct ipv4_config | 159 | struct 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 | |||
249 | static inline void ip_select_ident_more(struct iphdr *iph, struct dst_entry *dst, struct sock *sk, int more) | 245 | static 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 | ||
318 | static __inline__ void inet_reset_saddr(struct sock *sk) | 314 | static __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 | ||
339 | enum ip_defrag_users | 335 | enum 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 | ||
31 | struct rt6_info; | 31 | struct rt6_info; |
32 | 32 | ||
33 | struct fib6_config | 33 | struct 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 | ||
54 | struct fib6_node | 53 | struct 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 | ||
81 | struct rt6key | 79 | struct rt6key { |
82 | { | ||
83 | struct in6_addr addr; | 80 | struct in6_addr addr; |
84 | int plen; | 81 | int plen; |
85 | }; | 82 | }; |
86 | 83 | ||
87 | struct fib6_table; | 84 | struct fib6_table; |
88 | 85 | ||
89 | struct rt6_info | 86 | struct 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 | ||
130 | struct fib6_walker_t | 126 | struct 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 | ||
104 | struct netlink_callback; | 104 | struct netlink_callback; |
105 | 105 | ||
106 | struct rt6_rtnl_dump_arg | 106 | struct 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 | ||
150 | extern int fib_table_lookup(struct fib_table *tb, const struct flowi *flp, | ||
151 | struct fib_result *res); | ||
152 | extern int fib_table_insert(struct fib_table *, struct fib_config *); | ||
153 | extern int fib_table_delete(struct fib_table *, struct fib_config *); | ||
154 | extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb, | ||
155 | struct netlink_callback *cb); | ||
156 | extern int fib_table_flush(struct fib_table *table); | ||
157 | extern 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 | ||
254 | struct ip_vs_stats | 254 | struct 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 | */ |
521 | struct ip_vs_app | 520 | struct 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 | ||
10 | struct ip_tunnel | 10 | /* 6rd prefix/relay information */ |
11 | { | 11 | struct ip_tunnel_6rd_parm { |
12 | struct in6_addr prefix; | ||
13 | __be32 relay_prefix; | ||
14 | u16 prefixlen; | ||
15 | u16 relay_prefixlen; | ||
16 | }; | ||
17 | |||
18 | struct 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 | ||
30 | struct ip_tunnel_prl_entry | 41 | struct 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 | ||
163 | struct ip6_ra_chain | 163 | struct 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 | ||
179 | struct ipv6_txoptions | 178 | struct 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 | ||
197 | struct ip6_flowlabel | 195 | struct 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 | ||
215 | struct ipv6_fl_socklist | 212 | struct 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 | */ |
303 | struct iw_request_info | 303 | struct 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 | */ |
324 | struct iw_handler_def | 323 | struct 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 | */ |
373 | struct iw_ioctl_description | 373 | struct 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 | */ |
396 | struct iw_spy_data | 395 | struct 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 998c30fc8981..2aff4906b2ae 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 | */ |
399 | struct ieee80211_tx_info { | 401 | struct 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. |
@@ -511,11 +513,13 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
511 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index | 513 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index |
512 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used | 514 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used |
513 | * @RX_FLAG_SHORT_GI: Short guard interval was used | 515 | * @RX_FLAG_SHORT_GI: Short guard interval was used |
516 | * @RX_FLAG_INTERNAL_CMTR: set internally after frame was reported | ||
517 | * on cooked monitor to avoid double-reporting it for multiple | ||
518 | * virtual interfaces | ||
514 | */ | 519 | */ |
515 | enum mac80211_rx_flags { | 520 | enum mac80211_rx_flags { |
516 | RX_FLAG_MMIC_ERROR = 1<<0, | 521 | RX_FLAG_MMIC_ERROR = 1<<0, |
517 | RX_FLAG_DECRYPTED = 1<<1, | 522 | RX_FLAG_DECRYPTED = 1<<1, |
518 | RX_FLAG_RADIOTAP = 1<<2, | ||
519 | RX_FLAG_MMIC_STRIPPED = 1<<3, | 523 | RX_FLAG_MMIC_STRIPPED = 1<<3, |
520 | RX_FLAG_IV_STRIPPED = 1<<4, | 524 | RX_FLAG_IV_STRIPPED = 1<<4, |
521 | RX_FLAG_FAILED_FCS_CRC = 1<<5, | 525 | RX_FLAG_FAILED_FCS_CRC = 1<<5, |
@@ -525,6 +529,7 @@ enum mac80211_rx_flags { | |||
525 | RX_FLAG_HT = 1<<9, | 529 | RX_FLAG_HT = 1<<9, |
526 | RX_FLAG_40MHZ = 1<<10, | 530 | RX_FLAG_40MHZ = 1<<10, |
527 | RX_FLAG_SHORT_GI = 1<<11, | 531 | RX_FLAG_SHORT_GI = 1<<11, |
532 | RX_FLAG_INTERNAL_CMTR = 1<<12, | ||
528 | }; | 533 | }; |
529 | 534 | ||
530 | /** | 535 | /** |
@@ -554,7 +559,7 @@ struct ieee80211_rx_status { | |||
554 | int freq; | 559 | int freq; |
555 | int signal; | 560 | int signal; |
556 | int noise; | 561 | int noise; |
557 | int qual; | 562 | int __deprecated qual; |
558 | int antenna; | 563 | int antenna; |
559 | int rate_idx; | 564 | int rate_idx; |
560 | int flag; | 565 | int flag; |
@@ -565,7 +570,9 @@ struct ieee80211_rx_status { | |||
565 | * | 570 | * |
566 | * Flags to define PHY configuration options | 571 | * Flags to define PHY configuration options |
567 | * | 572 | * |
568 | * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported) | 573 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this |
574 | * to determine for example whether to calculate timestamps for packets | ||
575 | * or not, do not use instead of filter flags! | ||
569 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) | 576 | * @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 | 577 | * @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 | 578 | * the driver should be prepared to handle configuration requests but |
@@ -574,7 +581,7 @@ struct ieee80211_rx_status { | |||
574 | * it can also be unset in that case when monitor interfaces are active. | 581 | * it can also be unset in that case when monitor interfaces are active. |
575 | */ | 582 | */ |
576 | enum ieee80211_conf_flags { | 583 | enum ieee80211_conf_flags { |
577 | IEEE80211_CONF_RADIOTAP = (1<<0), | 584 | IEEE80211_CONF_MONITOR = (1<<0), |
578 | IEEE80211_CONF_PS = (1<<1), | 585 | IEEE80211_CONF_PS = (1<<1), |
579 | IEEE80211_CONF_IDLE = (1<<2), | 586 | IEEE80211_CONF_IDLE = (1<<2), |
580 | }; | 587 | }; |
@@ -584,7 +591,7 @@ enum ieee80211_conf_flags { | |||
584 | * enum ieee80211_conf_changed - denotes which configuration changed | 591 | * enum ieee80211_conf_changed - denotes which configuration changed |
585 | * | 592 | * |
586 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed | 593 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed |
587 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 594 | * @IEEE80211_CONF_CHANGE_MONITOR: the monitor flag changed |
588 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed | 595 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed |
589 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed | 596 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed |
590 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed | 597 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
@@ -593,7 +600,7 @@ enum ieee80211_conf_flags { | |||
593 | */ | 600 | */ |
594 | enum ieee80211_conf_changed { | 601 | enum ieee80211_conf_changed { |
595 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 602 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
596 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), | 603 | IEEE80211_CONF_CHANGE_MONITOR = BIT(3), |
597 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 604 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
598 | IEEE80211_CONF_CHANGE_POWER = BIT(5), | 605 | IEEE80211_CONF_CHANGE_POWER = BIT(5), |
599 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 606 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), |
@@ -852,6 +859,19 @@ enum ieee80211_tkip_key_type { | |||
852 | * any particular flags. There are some exceptions to this rule, | 859 | * any particular flags. There are some exceptions to this rule, |
853 | * however, so you are advised to review these flags carefully. | 860 | * however, so you are advised to review these flags carefully. |
854 | * | 861 | * |
862 | * @IEEE80211_HW_HAS_RATE_CONTROL: | ||
863 | * The hardware or firmware includes rate control, and cannot be | ||
864 | * controlled by the stack. As such, no rate control algorithm | ||
865 | * should be instantiated, and the TX rate reported to userspace | ||
866 | * will be taken from the TX status instead of the rate control | ||
867 | * algorithm. | ||
868 | * Note that this requires that the driver implement a number of | ||
869 | * callbacks so it has the correct information, it needs to have | ||
870 | * the @set_rts_threshold callback and must look at the BSS config | ||
871 | * @use_cts_prot for G/N protection, @use_short_slot for slot | ||
872 | * timing in 2.4 GHz and @use_short_preamble for preambles for | ||
873 | * CCK frames. | ||
874 | * | ||
855 | * @IEEE80211_HW_RX_INCLUDES_FCS: | 875 | * @IEEE80211_HW_RX_INCLUDES_FCS: |
856 | * Indicates that received frames passed to the stack include | 876 | * Indicates that received frames passed to the stack include |
857 | * the FCS at the end. | 877 | * the FCS at the end. |
@@ -910,6 +930,7 @@ enum ieee80211_tkip_key_type { | |||
910 | * avoid waking up cpu. | 930 | * avoid waking up cpu. |
911 | */ | 931 | */ |
912 | enum ieee80211_hw_flags { | 932 | enum ieee80211_hw_flags { |
933 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | ||
913 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 934 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
914 | IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, | 935 | IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, |
915 | IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, | 936 | IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, |
@@ -1511,6 +1532,7 @@ struct ieee80211_ops { | |||
1511 | void (*reset_tsf)(struct ieee80211_hw *hw); | 1532 | void (*reset_tsf)(struct ieee80211_hw *hw); |
1512 | int (*tx_last_beacon)(struct ieee80211_hw *hw); | 1533 | int (*tx_last_beacon)(struct ieee80211_hw *hw); |
1513 | int (*ampdu_action)(struct ieee80211_hw *hw, | 1534 | int (*ampdu_action)(struct ieee80211_hw *hw, |
1535 | struct ieee80211_vif *vif, | ||
1514 | enum ieee80211_ampdu_mlme_action action, | 1536 | enum ieee80211_ampdu_mlme_action action, |
1515 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1537 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
1516 | 1538 | ||
@@ -1667,15 +1689,14 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw); | |||
1667 | * ieee80211_rx - receive frame | 1689 | * ieee80211_rx - receive frame |
1668 | * | 1690 | * |
1669 | * Use this function to hand received frames to mac80211. The receive | 1691 | * Use this function to hand received frames to mac80211. The receive |
1670 | * buffer in @skb must start with an IEEE 802.11 header or a radiotap | 1692 | * buffer in @skb must start with an IEEE 802.11 header. |
1671 | * header if %RX_FLAG_RADIOTAP is set in the @status flags. | ||
1672 | * | 1693 | * |
1673 | * This function may not be called in IRQ context. Calls to this function | 1694 | * This function may not be called in IRQ context. Calls to this function |
1674 | * for a single hardware must be synchronized against each other. Calls | 1695 | * for a single hardware must be synchronized against each other. Calls to |
1675 | * to this function and ieee80211_rx_irqsafe() may not be mixed for a | 1696 | * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be |
1676 | * single hardware. | 1697 | * mixed for a single hardware. |
1677 | * | 1698 | * |
1678 | * Note that right now, this function must be called with softirqs disabled. | 1699 | * In process context use instead ieee80211_rx_ni(). |
1679 | * | 1700 | * |
1680 | * @hw: the hardware this frame came in on | 1701 | * @hw: the hardware this frame came in on |
1681 | * @skb: the buffer to receive, owned by mac80211 after this call | 1702 | * @skb: the buffer to receive, owned by mac80211 after this call |
@@ -1688,8 +1709,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
1688 | * Like ieee80211_rx() but can be called in IRQ context | 1709 | * Like ieee80211_rx() but can be called in IRQ context |
1689 | * (internally defers to a tasklet.) | 1710 | * (internally defers to a tasklet.) |
1690 | * | 1711 | * |
1691 | * Calls to this function and ieee80211_rx() may not be mixed for a | 1712 | * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not |
1692 | * single hardware. | 1713 | * be mixed for a single hardware. |
1693 | * | 1714 | * |
1694 | * @hw: the hardware this frame came in on | 1715 | * @hw: the hardware this frame came in on |
1695 | * @skb: the buffer to receive, owned by mac80211 after this call | 1716 | * @skb: the buffer to receive, owned by mac80211 after this call |
@@ -1697,6 +1718,26 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
1697 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); | 1718 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); |
1698 | 1719 | ||
1699 | /** | 1720 | /** |
1721 | * ieee80211_rx_ni - receive frame (in process context) | ||
1722 | * | ||
1723 | * Like ieee80211_rx() but can be called in process context | ||
1724 | * (internally disables bottom halves). | ||
1725 | * | ||
1726 | * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may | ||
1727 | * not be mixed for a single hardware. | ||
1728 | * | ||
1729 | * @hw: the hardware this frame came in on | ||
1730 | * @skb: the buffer to receive, owned by mac80211 after this call | ||
1731 | */ | ||
1732 | static inline void ieee80211_rx_ni(struct ieee80211_hw *hw, | ||
1733 | struct sk_buff *skb) | ||
1734 | { | ||
1735 | local_bh_disable(); | ||
1736 | ieee80211_rx(hw, skb); | ||
1737 | local_bh_enable(); | ||
1738 | } | ||
1739 | |||
1740 | /** | ||
1700 | * ieee80211_tx_status - transmit status callback | 1741 | * ieee80211_tx_status - transmit status callback |
1701 | * | 1742 | * |
1702 | * Call this function for all transmitted frames after they have been | 1743 | * Call this function for all transmitted frames after they have been |
@@ -1730,19 +1771,45 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, | |||
1730 | struct sk_buff *skb); | 1771 | struct sk_buff *skb); |
1731 | 1772 | ||
1732 | /** | 1773 | /** |
1733 | * ieee80211_beacon_get - beacon generation function | 1774 | * ieee80211_beacon_get_tim - beacon generation function |
1734 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1775 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1735 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 1776 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
1777 | * @tim_offset: pointer to variable that will receive the TIM IE offset. | ||
1778 | * Set to 0 if invalid (in non-AP modes). | ||
1779 | * @tim_length: pointer to variable that will receive the TIM IE length, | ||
1780 | * (including the ID and length bytes!). | ||
1781 | * Set to 0 if invalid (in non-AP modes). | ||
1782 | * | ||
1783 | * If the driver implements beaconing modes, it must use this function to | ||
1784 | * obtain the beacon frame/template. | ||
1736 | * | 1785 | * |
1737 | * If the beacon frames are generated by the host system (i.e., not in | 1786 | * If the beacon frames are generated by the host system (i.e., not in |
1738 | * hardware/firmware), the low-level driver uses this function to receive | 1787 | * hardware/firmware), the driver uses this function to get each beacon |
1739 | * the next beacon frame from the 802.11 code. The low-level is responsible | 1788 | * frame from mac80211 -- it is responsible for calling this function |
1740 | * for calling this function before beacon data is needed (e.g., based on | 1789 | * before the beacon is needed (e.g. based on hardware interrupt). |
1741 | * hardware interrupt). Returned skb is used only once and low-level driver | 1790 | * |
1742 | * is responsible for freeing it. | 1791 | * If the beacon frames are generated by the device, then the driver |
1792 | * must use the returned beacon as the template and change the TIM IE | ||
1793 | * according to the current DTIM parameters/TIM bitmap. | ||
1794 | * | ||
1795 | * The driver is responsible for freeing the returned skb. | ||
1743 | */ | 1796 | */ |
1744 | struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | 1797 | struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw, |
1745 | struct ieee80211_vif *vif); | 1798 | struct ieee80211_vif *vif, |
1799 | u16 *tim_offset, u16 *tim_length); | ||
1800 | |||
1801 | /** | ||
1802 | * ieee80211_beacon_get - beacon generation function | ||
1803 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1804 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | ||
1805 | * | ||
1806 | * See ieee80211_beacon_get_tim(). | ||
1807 | */ | ||
1808 | static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | ||
1809 | struct ieee80211_vif *vif) | ||
1810 | { | ||
1811 | return ieee80211_beacon_get_tim(hw, vif, NULL, NULL); | ||
1812 | } | ||
1746 | 1813 | ||
1747 | /** | 1814 | /** |
1748 | * ieee80211_rts_get - RTS frame generation function | 1815 | * ieee80211_rts_get - RTS frame generation function |
@@ -1987,8 +2054,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | |||
1987 | 2054 | ||
1988 | /** | 2055 | /** |
1989 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 2056 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1990 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2057 | * @sta: the station for which to start a BA session |
1991 | * @ra: receiver address of the BA session recipient | ||
1992 | * @tid: the TID to BA on. | 2058 | * @tid: the TID to BA on. |
1993 | * | 2059 | * |
1994 | * Return: success if addBA request was sent, failure otherwise | 2060 | * Return: success if addBA request was sent, failure otherwise |
@@ -1997,22 +2063,22 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | |||
1997 | * the need to start aggregation on a certain RA/TID, the session level | 2063 | * the need to start aggregation on a certain RA/TID, the session level |
1998 | * will be managed by the mac80211. | 2064 | * will be managed by the mac80211. |
1999 | */ | 2065 | */ |
2000 | int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid); | 2066 | int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid); |
2001 | 2067 | ||
2002 | /** | 2068 | /** |
2003 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. | 2069 | * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. |
2004 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2070 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf |
2005 | * @ra: receiver address of the BA session recipient. | 2071 | * @ra: receiver address of the BA session recipient. |
2006 | * @tid: the TID to BA on. | 2072 | * @tid: the TID to BA on. |
2007 | * | 2073 | * |
2008 | * This function must be called by low level driver once it has | 2074 | * This function must be called by low level driver once it has |
2009 | * finished with preparations for the BA session. | 2075 | * finished with preparations for the BA session. |
2010 | */ | 2076 | */ |
2011 | void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid); | 2077 | void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid); |
2012 | 2078 | ||
2013 | /** | 2079 | /** |
2014 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. | 2080 | * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. |
2015 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2081 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf |
2016 | * @ra: receiver address of the BA session recipient. | 2082 | * @ra: receiver address of the BA session recipient. |
2017 | * @tid: the TID to BA on. | 2083 | * @tid: the TID to BA on. |
2018 | * | 2084 | * |
@@ -2020,13 +2086,12 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid); | |||
2020 | * finished with preparations for the BA session. | 2086 | * finished with preparations for the BA session. |
2021 | * This version of the function is IRQ-safe. | 2087 | * This version of the function is IRQ-safe. |
2022 | */ | 2088 | */ |
2023 | void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | 2089 | void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra, |
2024 | u16 tid); | 2090 | u16 tid); |
2025 | 2091 | ||
2026 | /** | 2092 | /** |
2027 | * ieee80211_stop_tx_ba_session - Stop a Block Ack session. | 2093 | * ieee80211_stop_tx_ba_session - Stop a Block Ack session. |
2028 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2094 | * @sta: the station whose BA session to stop |
2029 | * @ra: receiver address of the BA session recipient | ||
2030 | * @tid: the TID to stop BA. | 2095 | * @tid: the TID to stop BA. |
2031 | * @initiator: if indicates initiator DELBA frame will be sent. | 2096 | * @initiator: if indicates initiator DELBA frame will be sent. |
2032 | * | 2097 | * |
@@ -2036,24 +2101,23 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | |||
2036 | * the need to stop aggregation on a certain RA/TID, the session level | 2101 | * the need to stop aggregation on a certain RA/TID, the session level |
2037 | * will be managed by the mac80211. | 2102 | * will be managed by the mac80211. |
2038 | */ | 2103 | */ |
2039 | int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, | 2104 | int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid, |
2040 | u8 *ra, u16 tid, | ||
2041 | enum ieee80211_back_parties initiator); | 2105 | enum ieee80211_back_parties initiator); |
2042 | 2106 | ||
2043 | /** | 2107 | /** |
2044 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. | 2108 | * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. |
2045 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2109 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf |
2046 | * @ra: receiver address of the BA session recipient. | 2110 | * @ra: receiver address of the BA session recipient. |
2047 | * @tid: the desired TID to BA on. | 2111 | * @tid: the desired TID to BA on. |
2048 | * | 2112 | * |
2049 | * This function must be called by low level driver once it has | 2113 | * This function must be called by low level driver once it has |
2050 | * finished with preparations for the BA session tear down. | 2114 | * finished with preparations for the BA session tear down. |
2051 | */ | 2115 | */ |
2052 | void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); | 2116 | void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid); |
2053 | 2117 | ||
2054 | /** | 2118 | /** |
2055 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. | 2119 | * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. |
2056 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 2120 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf |
2057 | * @ra: receiver address of the BA session recipient. | 2121 | * @ra: receiver address of the BA session recipient. |
2058 | * @tid: the desired TID to BA on. | 2122 | * @tid: the desired TID to BA on. |
2059 | * | 2123 | * |
@@ -2061,22 +2125,75 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); | |||
2061 | * finished with preparations for the BA session tear down. | 2125 | * finished with preparations for the BA session tear down. |
2062 | * This version of the function is IRQ-safe. | 2126 | * This version of the function is IRQ-safe. |
2063 | */ | 2127 | */ |
2064 | void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | 2128 | void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra, |
2065 | u16 tid); | 2129 | u16 tid); |
2066 | 2130 | ||
2067 | /** | 2131 | /** |
2068 | * ieee80211_find_sta - find a station | 2132 | * ieee80211_find_sta - find a station |
2069 | * | 2133 | * |
2070 | * @hw: pointer as obtained from ieee80211_alloc_hw() | 2134 | * @vif: virtual interface to look for station on |
2071 | * @addr: station's address | 2135 | * @addr: station's address |
2072 | * | 2136 | * |
2073 | * This function must be called under RCU lock and the | 2137 | * This function must be called under RCU lock and the |
2074 | * resulting pointer is only valid under RCU lock as well. | 2138 | * resulting pointer is only valid under RCU lock as well. |
2075 | */ | 2139 | */ |
2076 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 2140 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, |
2077 | const u8 *addr); | 2141 | const u8 *addr); |
2078 | 2142 | ||
2079 | /** | 2143 | /** |
2144 | * ieee80211_find_sta_by_hw - find a station on hardware | ||
2145 | * | ||
2146 | * @hw: pointer as obtained from ieee80211_alloc_hw() | ||
2147 | * @addr: station's address | ||
2148 | * | ||
2149 | * This function must be called under RCU lock and the | ||
2150 | * resulting pointer is only valid under RCU lock as well. | ||
2151 | * | ||
2152 | * NOTE: This function should not be used! When mac80211 is converted | ||
2153 | * internally to properly keep track of stations on multiple | ||
2154 | * virtual interfaces, it will not always know which station to | ||
2155 | * return here since a single address might be used by multiple | ||
2156 | * logical stations (e.g. consider a station connecting to another | ||
2157 | * BSSID on the same AP hardware without disconnecting first). | ||
2158 | * | ||
2159 | * DO NOT USE THIS FUNCTION. | ||
2160 | */ | ||
2161 | struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw, | ||
2162 | const u8 *addr); | ||
2163 | |||
2164 | /** | ||
2165 | * ieee80211_sta_block_awake - block station from waking up | ||
2166 | * @hw: the hardware | ||
2167 | * @pubsta: the station | ||
2168 | * @block: whether to block or unblock | ||
2169 | * | ||
2170 | * Some devices require that all frames that are on the queues | ||
2171 | * for a specific station that went to sleep are flushed before | ||
2172 | * a poll response or frames after the station woke up can be | ||
2173 | * delivered to that it. Note that such frames must be rejected | ||
2174 | * by the driver as filtered, with the appropriate status flag. | ||
2175 | * | ||
2176 | * This function allows implementing this mode in a race-free | ||
2177 | * manner. | ||
2178 | * | ||
2179 | * To do this, a driver must keep track of the number of frames | ||
2180 | * still enqueued for a specific station. If this number is not | ||
2181 | * zero when the station goes to sleep, the driver must call | ||
2182 | * this function to force mac80211 to consider the station to | ||
2183 | * be asleep regardless of the station's actual state. Once the | ||
2184 | * number of outstanding frames reaches zero, the driver must | ||
2185 | * call this function again to unblock the station. That will | ||
2186 | * cause mac80211 to be able to send ps-poll responses, and if | ||
2187 | * the station queried in the meantime then frames will also | ||
2188 | * be sent out as a result of this. Additionally, the driver | ||
2189 | * will be notified that the station woke up some time after | ||
2190 | * it is unblocked, regardless of whether the station actually | ||
2191 | * woke up while blocked or not. | ||
2192 | */ | ||
2193 | void ieee80211_sta_block_awake(struct ieee80211_hw *hw, | ||
2194 | struct ieee80211_sta *pubsta, bool block); | ||
2195 | |||
2196 | /** | ||
2080 | * ieee80211_beacon_loss - inform hardware does not receive beacons | 2197 | * ieee80211_beacon_loss - inform hardware does not receive beacons |
2081 | * | 2198 | * |
2082 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | 2199 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index da99fdd63cf5..0302f31a2fb7 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -37,8 +37,7 @@ | |||
37 | 37 | ||
38 | struct neighbour; | 38 | struct neighbour; |
39 | 39 | ||
40 | struct neigh_parms | 40 | struct 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 | ||
73 | struct neigh_statistics | 72 | struct 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 | ||
100 | struct neighbour | 98 | struct 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 | ||
125 | struct neigh_ops | 122 | struct 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 | ||
136 | struct pneigh_entry | 132 | struct 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 | ||
152 | struct neigh_table | 147 | struct 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..f307e133d14c 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -28,6 +28,10 @@ struct ctl_table_header; | |||
28 | struct net_generic; | 28 | struct net_generic; |
29 | struct sock; | 29 | struct sock; |
30 | 30 | ||
31 | |||
32 | #define NETDEV_HASHBITS 8 | ||
33 | #define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) | ||
34 | |||
31 | struct net { | 35 | struct 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. |
@@ -38,7 +42,8 @@ struct net { | |||
38 | */ | 42 | */ |
39 | #endif | 43 | #endif |
40 | struct list_head list; /* list of network namespaces */ | 44 | struct list_head list; /* list of network namespaces */ |
41 | struct work_struct work; /* work struct for freeing */ | 45 | struct list_head cleanup_list; /* namespaces on death row */ |
46 | struct list_head exit_list; /* Use only net_mutex */ | ||
42 | 47 | ||
43 | struct proc_dir_entry *proc_net; | 48 | struct proc_dir_entry *proc_net; |
44 | struct proc_dir_entry *proc_net_stat; | 49 | struct proc_dir_entry *proc_net_stat; |
@@ -80,7 +85,7 @@ struct net { | |||
80 | #ifdef CONFIG_XFRM | 85 | #ifdef CONFIG_XFRM |
81 | struct netns_xfrm xfrm; | 86 | struct netns_xfrm xfrm; |
82 | #endif | 87 | #endif |
83 | #ifdef CONFIG_WIRELESS_EXT | 88 | #ifdef CONFIG_WEXT_CORE |
84 | struct sk_buff_head wext_nlevents; | 89 | struct sk_buff_head wext_nlevents; |
85 | #endif | 90 | #endif |
86 | struct net_generic *gen; | 91 | struct net_generic *gen; |
@@ -232,6 +237,9 @@ struct pernet_operations { | |||
232 | struct list_head list; | 237 | struct list_head list; |
233 | int (*init)(struct net *net); | 238 | int (*init)(struct net *net); |
234 | void (*exit)(struct net *net); | 239 | void (*exit)(struct net *net); |
240 | void (*exit_batch)(struct list_head *net_exit_list); | ||
241 | int *id; | ||
242 | size_t size; | ||
235 | }; | 243 | }; |
236 | 244 | ||
237 | /* | 245 | /* |
@@ -255,12 +263,8 @@ struct pernet_operations { | |||
255 | */ | 263 | */ |
256 | extern int register_pernet_subsys(struct pernet_operations *); | 264 | extern int register_pernet_subsys(struct pernet_operations *); |
257 | extern void unregister_pernet_subsys(struct pernet_operations *); | 265 | extern void unregister_pernet_subsys(struct pernet_operations *); |
258 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); | ||
259 | extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *); | ||
260 | extern int register_pernet_device(struct pernet_operations *); | 266 | extern int register_pernet_device(struct pernet_operations *); |
261 | extern void unregister_pernet_device(struct pernet_operations *); | 267 | extern void unregister_pernet_device(struct pernet_operations *); |
262 | extern int register_pernet_gen_device(int *id, struct pernet_operations *); | ||
263 | extern void unregister_pernet_gen_device(int id, struct pernet_operations *); | ||
264 | 268 | ||
265 | struct ctl_path; | 269 | struct ctl_path; |
266 | struct ctl_table; | 270 | struct ctl_table; |
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 */ |
16 | enum ip_conntrack_events | 16 | enum 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 @@ | |||
9 | extern unsigned int nf_ct_expect_hsize; | 9 | extern unsigned int nf_ct_expect_hsize; |
10 | extern unsigned int nf_ct_expect_max; | 10 | extern unsigned int nf_ct_expect_max; |
11 | 11 | ||
12 | struct nf_conntrack_expect | 12 | struct 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 | ||
67 | struct nf_conntrack_expect_policy | 66 | struct 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 | ||
6 | enum nf_ct_ext_id | 6 | enum 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 | ||
68 | struct nf_ct_ext_type | 67 | struct 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 | ||
19 | struct nf_conntrack_helper | 19 | struct 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 | ||
19 | struct nf_conntrack_l3proto | 19 | struct 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 | ||
16 | struct seq_file; | 16 | struct seq_file; |
17 | 17 | ||
18 | struct nf_conntrack_l4proto | 18 | struct 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! */ |
29 | union nf_conntrack_man_proto | 29 | union 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. */ |
55 | struct nf_conntrack_man | 54 | struct 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. */ |
64 | struct nf_conntrack_tuple | 62 | struct 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 | ||
103 | struct nf_conntrack_tuple_mask | 100 | struct 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 | ||
8 | enum nf_nat_manip_type | 8 | enum 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. */ |
33 | struct nf_nat_range | 32 | struct 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. */ |
46 | struct nf_nat_multi_range_compat | 44 | struct 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 */ |
60 | union nf_conntrack_nat_help | 57 | union 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 | |||
66 | struct nf_conn; | 62 | struct nf_conn; |
67 | 63 | ||
68 | /* The structure embedded in the conntrack structure. */ | 64 | /* The structure embedded in the conntrack structure. */ |
69 | struct nf_conn_nat | 65 | struct 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 | ||
7 | struct nf_nat_range; | 7 | struct nf_nat_range; |
8 | 8 | ||
9 | struct nf_nat_protocol | 9 | struct 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/netns/generic.h b/include/net/netns/generic.h index 0c04fd2a700b..ff4982ab84b6 100644 --- a/include/net/netns/generic.h +++ b/include/net/netns/generic.h | |||
@@ -12,9 +12,11 @@ | |||
12 | * stuff on the struct net without explicit struct net modification | 12 | * stuff on the struct net without explicit struct net modification |
13 | * | 13 | * |
14 | * The rules are simple: | 14 | * The rules are simple: |
15 | * 1. register the ops with register_pernet_gen_device to get the id | 15 | * 1. set pernet_operations->id. After register_pernet_device you |
16 | * of your private pointer; | 16 | * will have the id of your private pointer. |
17 | * 2. call net_assign_generic() to put the private data on the struct | 17 | * 2. Either set pernet_operations->size (to have the code allocate and |
18 | * free a private structure pointed to from struct net ) or | ||
19 | * call net_assign_generic() to put the private data on the struct | ||
18 | * net (most preferably this should be done in the ->init callback | 20 | * net (most preferably this should be done in the ->init callback |
19 | * of the ops registered); | 21 | * of the ops registered); |
20 | * 3. do not change this pointer while the net is alive; | 22 | * 3. do not change this pointer while the net is alive; |
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 1ba912749caa..56f8e5585df7 100644 --- a/include/net/netns/xfrm.h +++ b/include/net/netns/xfrm.h | |||
@@ -43,6 +43,7 @@ struct netns_xfrm { | |||
43 | struct work_struct policy_hash_work; | 43 | struct work_struct policy_hash_work; |
44 | 44 | ||
45 | struct sock *nlsk; | 45 | struct sock *nlsk; |
46 | struct sock *nlsk_stash; | ||
46 | 47 | ||
47 | u32 sysctl_aevent_etime; | 48 | u32 sysctl_aevent_etime; |
48 | u32 sysctl_aevent_rseqth; | 49 | u32 sysctl_aevent_rseqth; |
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 | ||
47 | extern const struct proto_ops phonet_dgram_ops; | 47 | extern const struct proto_ops phonet_dgram_ops; |
48 | 48 | ||
49 | void pn_sock_init(void); | ||
49 | struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa); | 50 | struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa); |
51 | void pn_deliver_sock_broadcast(struct net *net, struct sk_buff *skb); | ||
50 | void phonet_get_local_port_range(int *min, int *max); | 52 | void phonet_get_local_port_range(int *min, int *max); |
51 | void pn_sock_hash(struct sock *sk); | 53 | void pn_sock_hash(struct sock *sk); |
52 | void pn_sock_unhash(struct sock *sk); | 54 | void 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 | ||
26 | struct phonet_device_list { | 26 | struct 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 | ||
31 | struct phonet_device_list *phonet_device_list(struct net *net); | 31 | struct phonet_device_list *phonet_device_list(struct net *net); |
@@ -47,6 +47,12 @@ u8 phonet_address_get(struct net_device *dev, u8 addr); | |||
47 | int phonet_address_lookup(struct net *net, u8 addr); | 47 | int phonet_address_lookup(struct net *net, u8 addr); |
48 | void phonet_address_notify(int event, struct net_device *dev, u8 addr); | 48 | void phonet_address_notify(int event, struct net_device *dev, u8 addr); |
49 | 49 | ||
50 | int phonet_route_add(struct net_device *dev, u8 daddr); | ||
51 | int phonet_route_del(struct net_device *dev, u8 daddr); | ||
52 | void rtm_phonet_notify(int event, struct net_device *dev, u8 dst); | ||
53 | struct net_device *phonet_route_get(struct net *net, u8 daddr); | ||
54 | struct 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 | ||
52 | extern const struct file_operations pn_sock_seq_fops; | 58 | extern 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 | ||
10 | struct tcf_walker | 10 | struct 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 | ||
64 | struct tcf_exts | 63 | struct 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 | */ |
74 | struct tcf_ext_map | 72 | struct 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 | */ |
146 | struct tcf_pkt_info | 143 | struct 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 | */ |
165 | struct tcf_ematch | 161 | struct 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 | */ |
214 | struct tcf_ematch_tree | 209 | struct 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 | */ |
233 | struct tcf_ematch_ops | 227 | struct 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 | ||
305 | struct tcf_ematch_tree | 298 | struct 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 | ||
8 | struct qdisc_walker | 8 | struct 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) |
50 | struct inet6_protocol | 50 | struct 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 | ||
93 | struct red_stats | 93 | struct 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 | ||
104 | struct red_parms | 103 | struct 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/request_sock.h b/include/net/request_sock.h index c7190846e128..c9b50ebd9ce9 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -27,13 +27,19 @@ struct sk_buff; | |||
27 | struct dst_entry; | 27 | struct dst_entry; |
28 | struct proto; | 28 | struct proto; |
29 | 29 | ||
30 | /* empty to "strongly type" an otherwise void parameter. | ||
31 | */ | ||
32 | struct request_values { | ||
33 | }; | ||
34 | |||
30 | struct request_sock_ops { | 35 | struct request_sock_ops { |
31 | int family; | 36 | int family; |
32 | int obj_size; | 37 | int obj_size; |
33 | struct kmem_cache *slab; | 38 | struct kmem_cache *slab; |
34 | char *slab_name; | 39 | char *slab_name; |
35 | int (*rtx_syn_ack)(struct sock *sk, | 40 | int (*rtx_syn_ack)(struct sock *sk, |
36 | struct request_sock *req); | 41 | struct request_sock *req, |
42 | struct request_values *rvp); | ||
37 | void (*send_ack)(struct sock *sk, struct sk_buff *skb, | 43 | void (*send_ack)(struct sock *sk, struct sk_buff *skb, |
38 | struct request_sock *req); | 44 | struct request_sock *req); |
39 | void (*send_reset)(struct sock *sk, | 45 | void (*send_reset)(struct sock *sk, |
diff --git a/include/net/route.h b/include/net/route.h index 40f6346ef496..bce6dd68d27b 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -49,10 +49,8 @@ | |||
49 | 49 | ||
50 | struct fib_nh; | 50 | struct fib_nh; |
51 | struct inet_peer; | 51 | struct inet_peer; |
52 | struct rtable | 52 | struct 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 | ||
80 | struct ip_rt_acct | 78 | struct 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 | ||
88 | struct rt_cache_stat | 85 | struct 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; |
@@ -112,6 +108,7 @@ extern int ip_rt_init(void); | |||
112 | extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, | 108 | extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, |
113 | __be32 src, struct net_device *dev); | 109 | __be32 src, struct net_device *dev); |
114 | extern void rt_cache_flush(struct net *net, int how); | 110 | extern void rt_cache_flush(struct net *net, int how); |
111 | extern void rt_cache_flush_batch(void); | ||
115 | extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); | 112 | extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); |
116 | extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); | 113 | extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); |
117 | extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); | 114 | extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); |
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); | |||
82 | extern int rtnl_link_register(struct rtnl_link_ops *ops); | 84 | extern int rtnl_link_register(struct rtnl_link_ops *ops); |
83 | extern void rtnl_link_unregister(struct rtnl_link_ops *ops); | 85 | extern void rtnl_link_unregister(struct rtnl_link_ops *ops); |
84 | 86 | ||
85 | extern struct net_device *rtnl_create_link(struct net *net, char *ifname, | 87 | extern struct net *rtnl_link_get_net(struct net *src_net, struct nlattr *tb[]); |
86 | const struct rtnl_link_ops *ops, struct nlattr *tb[]); | 88 | extern 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[]); | ||
87 | extern const struct nla_policy ifla_policy[IFLA_MAX+1]; | 90 | extern 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; | |||
15 | struct tcf_walker; | 15 | struct tcf_walker; |
16 | struct module; | 16 | struct module; |
17 | 17 | ||
18 | struct qdisc_rate_table | 18 | struct 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 | ||
26 | enum qdisc_state_t | 25 | enum 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 | ||
40 | struct Qdisc | 38 | struct 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 | ||
81 | struct Qdisc_class_ops | 78 | struct 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 | ||
111 | struct Qdisc_ops | 107 | struct 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 | ||
136 | struct tcf_result | 131 | struct tcf_result { |
137 | { | ||
138 | unsigned long class; | 132 | unsigned long class; |
139 | u32 classid; | 133 | u32 classid; |
140 | }; | 134 | }; |
141 | 135 | ||
142 | struct tcf_proto_ops | 136 | struct 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 | ||
167 | struct tcf_proto | 160 | struct 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; | |||
261 | extern struct Qdisc_ops pfifo_fast_ops; | 253 | extern struct Qdisc_ops pfifo_fast_ops; |
262 | extern struct Qdisc_ops mq_qdisc_ops; | 254 | extern struct Qdisc_ops mq_qdisc_ops; |
263 | 255 | ||
264 | struct Qdisc_class_common | 256 | struct Qdisc_class_common { |
265 | { | ||
266 | u32 classid; | 257 | u32 classid; |
267 | struct hlist_node hnode; | 258 | struct hlist_node hnode; |
268 | }; | 259 | }; |
269 | 260 | ||
270 | struct Qdisc_class_hash | 261 | struct 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 | ||
15 | struct scm_fp_list | 15 | struct 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 | ||
22 | struct scm_cookie | 21 | struct 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 | |||
88 | static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, | 86 | static __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 */ |
230 | enum | 230 | enum { |
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 | ||
248 | struct sctp_chunk *sctp_make_asconf_update_ip(struct sctp_association *, | 249 | struct 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. */ |
272 | typedef enum { | 278 | typedef 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 *); | |||
1069 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1071 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
1070 | void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); | 1072 | void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32); |
1071 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); | 1073 | void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t); |
1074 | void sctp_transport_burst_limited(struct sctp_transport *); | ||
1075 | void sctp_transport_burst_reset(struct sctp_transport *); | ||
1072 | unsigned long sctp_transport_timeout(struct sctp_transport *); | 1076 | unsigned long sctp_transport_timeout(struct sctp_transport *); |
1073 | void sctp_transport_reset(struct sctp_transport *); | 1077 | void sctp_transport_reset(struct sctp_transport *); |
1074 | void sctp_transport_update_pmtu(struct sctp_transport *, u32); | 1078 | void 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 | */ |
63 | enum 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 | ||
509 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) | 522 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) |
@@ -1092,8 +1105,29 @@ static inline void sock_put(struct sock *sk) | |||
1092 | extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb, | 1105 | extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb, |
1093 | const int nested); | 1106 | const int nested); |
1094 | 1107 | ||
1108 | static inline void sk_tx_queue_set(struct sock *sk, int tx_queue) | ||
1109 | { | ||
1110 | sk->sk_tx_queue_mapping = tx_queue; | ||
1111 | } | ||
1112 | |||
1113 | static inline void sk_tx_queue_clear(struct sock *sk) | ||
1114 | { | ||
1115 | sk->sk_tx_queue_mapping = -1; | ||
1116 | } | ||
1117 | |||
1118 | static inline int sk_tx_queue_get(const struct sock *sk) | ||
1119 | { | ||
1120 | return sk->sk_tx_queue_mapping; | ||
1121 | } | ||
1122 | |||
1123 | static inline bool sk_tx_queue_recorded(const struct sock *sk) | ||
1124 | { | ||
1125 | return (sk && sk->sk_tx_queue_mapping >= 0); | ||
1126 | } | ||
1127 | |||
1095 | static inline void sk_set_socket(struct sock *sk, struct socket *sock) | 1128 | static 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 | ||
1397 | static inline void sk_wake_async(struct sock *sk, int how, int band) | 1433 | static 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 | ||
1531 | extern 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..e2d2ca2509be 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/dmaengine.h> | 30 | #include <linux/dmaengine.h> |
31 | #include <linux/crypto.h> | 31 | #include <linux/crypto.h> |
32 | #include <linux/cryptohash.h> | 32 | #include <linux/cryptohash.h> |
33 | #include <linux/kref.h> | ||
33 | 34 | ||
34 | #include <net/inet_connection_sock.h> | 35 | #include <net/inet_connection_sock.h> |
35 | #include <net/inet_timewait_sock.h> | 36 | #include <net/inet_timewait_sock.h> |
@@ -62,9 +63,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
62 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ | 63 | /* Minimal accepted MSS. It is (60+60+8) - (20+20). */ |
63 | #define TCP_MIN_MSS 88U | 64 | #define TCP_MIN_MSS 88U |
64 | 65 | ||
65 | /* Minimal RCV_MSS. */ | ||
66 | #define TCP_MIN_RCVMSS 536U | ||
67 | |||
68 | /* The least MTU to use for probing */ | 66 | /* The least MTU to use for probing */ |
69 | #define TCP_BASE_MSS 512 | 67 | #define TCP_BASE_MSS 512 |
70 | 68 | ||
@@ -167,6 +165,7 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
167 | #define TCPOPT_SACK 5 /* SACK Block */ | 165 | #define TCPOPT_SACK 5 /* SACK Block */ |
168 | #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ | 166 | #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ |
169 | #define TCPOPT_MD5SIG 19 /* MD5 Signature (RFC2385) */ | 167 | #define TCPOPT_MD5SIG 19 /* MD5 Signature (RFC2385) */ |
168 | #define TCPOPT_COOKIE 253 /* Cookie extension (experimental) */ | ||
170 | 169 | ||
171 | /* | 170 | /* |
172 | * TCP option lengths | 171 | * TCP option lengths |
@@ -177,6 +176,10 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
177 | #define TCPOLEN_SACK_PERM 2 | 176 | #define TCPOLEN_SACK_PERM 2 |
178 | #define TCPOLEN_TIMESTAMP 10 | 177 | #define TCPOLEN_TIMESTAMP 10 |
179 | #define TCPOLEN_MD5SIG 18 | 178 | #define TCPOLEN_MD5SIG 18 |
179 | #define TCPOLEN_COOKIE_BASE 2 /* Cookie-less header extension */ | ||
180 | #define TCPOLEN_COOKIE_PAIR 3 /* Cookie pair header extension */ | ||
181 | #define TCPOLEN_COOKIE_MIN (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MIN) | ||
182 | #define TCPOLEN_COOKIE_MAX (TCPOLEN_COOKIE_BASE+TCP_COOKIE_MAX) | ||
180 | 183 | ||
181 | /* But this is what stacks really send out. */ | 184 | /* But this is what stacks really send out. */ |
182 | #define TCPOLEN_TSTAMP_ALIGNED 12 | 185 | #define TCPOLEN_TSTAMP_ALIGNED 12 |
@@ -237,6 +240,7 @@ extern int sysctl_tcp_base_mss; | |||
237 | extern int sysctl_tcp_workaround_signed_windows; | 240 | extern int sysctl_tcp_workaround_signed_windows; |
238 | extern int sysctl_tcp_slow_start_after_idle; | 241 | extern int sysctl_tcp_slow_start_after_idle; |
239 | extern int sysctl_tcp_max_ssthresh; | 242 | extern int sysctl_tcp_max_ssthresh; |
243 | extern int sysctl_tcp_cookie_size; | ||
240 | 244 | ||
241 | extern atomic_t tcp_memory_allocated; | 245 | extern atomic_t tcp_memory_allocated; |
242 | extern struct percpu_counter tcp_sockets_allocated; | 246 | extern struct percpu_counter tcp_sockets_allocated; |
@@ -343,11 +347,6 @@ static inline void tcp_dec_quickack_mode(struct sock *sk, | |||
343 | 347 | ||
344 | extern void tcp_enter_quickack_mode(struct sock *sk); | 348 | extern void tcp_enter_quickack_mode(struct sock *sk); |
345 | 349 | ||
346 | static inline void tcp_clear_options(struct tcp_options_received *rx_opt) | ||
347 | { | ||
348 | rx_opt->tstamp_ok = rx_opt->sack_ok = rx_opt->wscale_ok = rx_opt->snd_wscale = 0; | ||
349 | } | ||
350 | |||
351 | #define TCP_ECN_OK 1 | 350 | #define TCP_ECN_OK 1 |
352 | #define TCP_ECN_QUEUE_CWR 2 | 351 | #define TCP_ECN_QUEUE_CWR 2 |
353 | #define TCP_ECN_DEMAND_CWR 4 | 352 | #define TCP_ECN_DEMAND_CWR 4 |
@@ -359,8 +358,7 @@ TCP_ECN_create_request(struct request_sock *req, struct tcphdr *th) | |||
359 | inet_rsk(req)->ecn_ok = 1; | 358 | inet_rsk(req)->ecn_ok = 1; |
360 | } | 359 | } |
361 | 360 | ||
362 | enum tcp_tw_status | 361 | enum tcp_tw_status { |
363 | { | ||
364 | TCP_TW_SUCCESS = 0, | 362 | TCP_TW_SUCCESS = 0, |
365 | TCP_TW_RST = 1, | 363 | TCP_TW_RST = 1, |
366 | TCP_TW_ACK = 2, | 364 | TCP_TW_ACK = 2, |
@@ -409,7 +407,9 @@ extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, | |||
409 | 407 | ||
410 | extern void tcp_parse_options(struct sk_buff *skb, | 408 | extern void tcp_parse_options(struct sk_buff *skb, |
411 | struct tcp_options_received *opt_rx, | 409 | struct tcp_options_received *opt_rx, |
412 | int estab); | 410 | u8 **hvpp, |
411 | int estab, | ||
412 | struct dst_entry *dst); | ||
413 | 413 | ||
414 | extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); | 414 | extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); |
415 | 415 | ||
@@ -443,7 +443,8 @@ extern int tcp_connect(struct sock *sk); | |||
443 | 443 | ||
444 | extern struct sk_buff * tcp_make_synack(struct sock *sk, | 444 | extern struct sk_buff * tcp_make_synack(struct sock *sk, |
445 | struct dst_entry *dst, | 445 | struct dst_entry *dst, |
446 | struct request_sock *req); | 446 | struct request_sock *req, |
447 | struct request_values *rvp); | ||
447 | 448 | ||
448 | extern int tcp_disconnect(struct sock *sk, int flags); | 449 | extern int tcp_disconnect(struct sock *sk, int flags); |
449 | 450 | ||
@@ -1228,6 +1229,7 @@ static inline void tcp_write_queue_purge(struct sock *sk) | |||
1228 | while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) | 1229 | while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) |
1229 | sk_wmem_free_skb(sk, skb); | 1230 | sk_wmem_free_skb(sk, skb); |
1230 | sk_mem_reclaim(sk); | 1231 | sk_mem_reclaim(sk); |
1232 | tcp_clear_all_retrans_hints(tcp_sk(sk)); | ||
1231 | } | 1233 | } |
1232 | 1234 | ||
1233 | static inline struct sk_buff *tcp_write_queue_head(struct sock *sk) | 1235 | static inline struct sk_buff *tcp_write_queue_head(struct sock *sk) |
@@ -1480,6 +1482,91 @@ struct tcp_request_sock_ops { | |||
1480 | #endif | 1482 | #endif |
1481 | }; | 1483 | }; |
1482 | 1484 | ||
1485 | /* Using SHA1 for now, define some constants. | ||
1486 | */ | ||
1487 | #define COOKIE_DIGEST_WORDS (SHA_DIGEST_WORDS) | ||
1488 | #define COOKIE_MESSAGE_WORDS (SHA_MESSAGE_BYTES / 4) | ||
1489 | #define COOKIE_WORKSPACE_WORDS (COOKIE_DIGEST_WORDS + COOKIE_MESSAGE_WORDS) | ||
1490 | |||
1491 | extern int tcp_cookie_generator(u32 *bakery); | ||
1492 | |||
1493 | /** | ||
1494 | * struct tcp_cookie_values - each socket needs extra space for the | ||
1495 | * cookies, together with (optional) space for any SYN data. | ||
1496 | * | ||
1497 | * A tcp_sock contains a pointer to the current value, and this is | ||
1498 | * cloned to the tcp_timewait_sock. | ||
1499 | * | ||
1500 | * @cookie_pair: variable data from the option exchange. | ||
1501 | * | ||
1502 | * @cookie_desired: user specified tcpct_cookie_desired. Zero | ||
1503 | * indicates default (sysctl_tcp_cookie_size). | ||
1504 | * After cookie sent, remembers size of cookie. | ||
1505 | * Range 0, TCP_COOKIE_MIN to TCP_COOKIE_MAX. | ||
1506 | * | ||
1507 | * @s_data_desired: user specified tcpct_s_data_desired. When the | ||
1508 | * constant payload is specified (@s_data_constant), | ||
1509 | * holds its length instead. | ||
1510 | * Range 0 to TCP_MSS_DESIRED. | ||
1511 | * | ||
1512 | * @s_data_payload: constant data that is to be included in the | ||
1513 | * payload of SYN or SYNACK segments when the | ||
1514 | * cookie option is present. | ||
1515 | */ | ||
1516 | struct tcp_cookie_values { | ||
1517 | struct kref kref; | ||
1518 | u8 cookie_pair[TCP_COOKIE_PAIR_SIZE]; | ||
1519 | u8 cookie_pair_size; | ||
1520 | u8 cookie_desired; | ||
1521 | u16 s_data_desired:11, | ||
1522 | s_data_constant:1, | ||
1523 | s_data_in:1, | ||
1524 | s_data_out:1, | ||
1525 | s_data_unused:2; | ||
1526 | u8 s_data_payload[0]; | ||
1527 | }; | ||
1528 | |||
1529 | static inline void tcp_cookie_values_release(struct kref *kref) | ||
1530 | { | ||
1531 | kfree(container_of(kref, struct tcp_cookie_values, kref)); | ||
1532 | } | ||
1533 | |||
1534 | /* The length of constant payload data. Note that s_data_desired is | ||
1535 | * overloaded, depending on s_data_constant: either the length of constant | ||
1536 | * data (returned here) or the limit on variable data. | ||
1537 | */ | ||
1538 | static inline int tcp_s_data_size(const struct tcp_sock *tp) | ||
1539 | { | ||
1540 | return (tp->cookie_values != NULL && tp->cookie_values->s_data_constant) | ||
1541 | ? tp->cookie_values->s_data_desired | ||
1542 | : 0; | ||
1543 | } | ||
1544 | |||
1545 | /** | ||
1546 | * struct tcp_extend_values - tcp_ipv?.c to tcp_output.c workspace. | ||
1547 | * | ||
1548 | * As tcp_request_sock has already been extended in other places, the | ||
1549 | * only remaining method is to pass stack values along as function | ||
1550 | * parameters. These parameters are not needed after sending SYNACK. | ||
1551 | * | ||
1552 | * @cookie_bakery: cryptographic secret and message workspace. | ||
1553 | * | ||
1554 | * @cookie_plus: bytes in authenticator/cookie option, copied from | ||
1555 | * struct tcp_options_received (above). | ||
1556 | */ | ||
1557 | struct tcp_extend_values { | ||
1558 | struct request_values rv; | ||
1559 | u32 cookie_bakery[COOKIE_WORKSPACE_WORDS]; | ||
1560 | u8 cookie_plus:6, | ||
1561 | cookie_out_never:1, | ||
1562 | cookie_in_always:1; | ||
1563 | }; | ||
1564 | |||
1565 | static inline struct tcp_extend_values *tcp_xv(struct request_values *rvp) | ||
1566 | { | ||
1567 | return (struct tcp_extend_values *)rvp; | ||
1568 | } | ||
1569 | |||
1483 | extern void tcp_v4_init(void); | 1570 | extern void tcp_v4_init(void); |
1484 | extern void tcp_init(void); | 1571 | extern void tcp_init(void); |
1485 | 1572 | ||
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 | */ | ||
53 | struct udp_hslot { | 60 | struct 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 | */ | ||
57 | struct udp_table { | 74 | struct 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 | }; |
60 | extern struct udp_table udp_table; | 80 | extern struct udp_table udp_table; |
61 | extern void udp_table_init(struct udp_table *); | 81 | extern void udp_table_init(struct udp_table *, const char *); |
62 | 82 | static 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 | */ | ||
91 | static 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 | ||
127 | extern int udp_lib_get_port(struct sock *sk, unsigned short snum, | 160 | extern 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 */ |
131 | extern int udp_get_port(struct sock *sk, unsigned short snum, | 165 | extern 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 | ||
8 | struct net; | 6 | struct net; |
9 | 7 | ||
10 | #ifdef CONFIG_WIRELESS_EXT | 8 | #ifdef CONFIG_WEXT_CORE |
11 | extern int wext_proc_init(struct net *net); | ||
12 | extern void wext_proc_exit(struct net *net); | ||
13 | extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, | 9 | extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, |
14 | void __user *arg); | 10 | void __user *arg); |
15 | extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, | 11 | extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd, |
16 | unsigned long arg); | 12 | unsigned long arg); |
13 | |||
17 | extern struct iw_statistics *get_wireless_stats(struct net_device *dev); | 14 | extern struct iw_statistics *get_wireless_stats(struct net_device *dev); |
15 | extern int call_commit_handler(struct net_device *dev); | ||
18 | #else | 16 | #else |
19 | static inline int wext_proc_init(struct net *net) | ||
20 | { | ||
21 | return 0; | ||
22 | } | ||
23 | static inline void wext_proc_exit(struct net *net) | ||
24 | { | ||
25 | return; | ||
26 | } | ||
27 | static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, | 17 | static 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 | ||
30 | extern int wext_proc_init(struct net *net); | ||
31 | extern void wext_proc_exit(struct net *net); | ||
32 | #else | ||
33 | static inline int wext_proc_init(struct net *net) | ||
34 | { | ||
35 | return 0; | ||
36 | } | ||
37 | static inline void wext_proc_exit(struct net *net) | ||
38 | { | ||
39 | return; | ||
40 | } | ||
41 | #endif | ||
42 | |||
43 | #ifdef CONFIG_WEXT_PRIV | ||
44 | int ioctl_private_call(struct net_device *dev, struct iwreq *iwr, | ||
45 | unsigned int cmd, struct iw_request_info *info, | ||
46 | iw_handler handler); | ||
47 | int compat_private_call(struct net_device *dev, struct iwreq *iwr, | ||
48 | unsigned int cmd, struct iw_request_info *info, | ||
49 | iw_handler handler); | ||
50 | int 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 | |||
47 | struct wpan_phy *wpan_phy_alloc(size_t priv_size); | 53 | struct wpan_phy *wpan_phy_alloc(size_t priv_size); |
48 | int wpan_phy_register(struct device *parent, struct wpan_phy *phy); | 54 | static inline void wpan_phy_set_dev(struct wpan_phy *phy, struct device *dev) |
55 | { | ||
56 | phy->dev.parent = dev; | ||
57 | } | ||
58 | int wpan_phy_register(struct wpan_phy *phy); | ||
49 | void wpan_phy_unregister(struct wpan_phy *phy); | 59 | void wpan_phy_unregister(struct wpan_phy *phy); |
50 | void wpan_phy_free(struct wpan_phy *phy); | 60 | void wpan_phy_free(struct wpan_phy *phy); |
61 | /* Same semantics as for class_for_each_device */ | ||
62 | int wpan_phy_for_each(int (*fn)(struct wpan_phy *phy, void *data), void *data); | ||
51 | 63 | ||
52 | static inline void *wpan_phy_priv(struct wpan_phy *phy) | 64 | static 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 | ||
58 | struct wpan_phy *wpan_phy_find(const char *str); | 70 | struct wpan_phy *wpan_phy_find(const char *str); |
71 | |||
72 | static inline void wpan_phy_put(struct wpan_phy *phy) | ||
73 | { | ||
74 | put_device(&phy->dev); | ||
75 | } | ||
76 | |||
59 | static inline const char *wpan_phy_name(struct wpan_phy *phy) | 77 | static 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 *); | |||
287 | extern void x25_check_rbuf(struct sock *); | 287 | extern void x25_check_rbuf(struct sock *); |
288 | 288 | ||
289 | /* sysctl_net_x25.c */ | 289 | /* sysctl_net_x25.c */ |
290 | #ifdef CONFIG_SYSCTL | ||
290 | extern void x25_register_sysctl(void); | 291 | extern void x25_register_sysctl(void); |
291 | extern void x25_unregister_sysctl(void); | 292 | extern void x25_unregister_sysctl(void); |
293 | #else | ||
294 | static inline void x25_register_sysctl(void) {}; | ||
295 | static inline void x25_unregister_sysctl(void) {}; | ||
296 | #endif /* CONFIG_SYSCTL */ | ||
297 | |||
292 | struct x25_skb_cb { | 298 | struct 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. */ |
124 | struct xfrm_state | 127 | struct 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 */ |
240 | struct km_event | 242 | struct 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 | ||
314 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); | 315 | extern void xfrm_state_delete_tunnel(struct xfrm_state *x); |
315 | 316 | ||
316 | struct xfrm_type | 317 | struct 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 | ||
423 | struct xfrm_tmpl | 423 | struct 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 | ||
471 | struct xfrm_policy | 470 | struct 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 | ||
541 | struct xfrm_mgr | 539 | struct 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 */ |
629 | struct xfrm_audit | 626 | struct 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 | */ |
874 | struct xfrm_dst | 870 | struct 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 | ||
908 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); | 903 | extern void xfrm_dst_ifdown(struct dst_entry *dst, struct net_device *dev); |
909 | 904 | ||
910 | struct sec_path | 905 | struct 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; | |||
1500 | typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *, | 1494 | typedef int (icv_update_fn_t)(struct hash_desc *, struct scatterlist *, |
1501 | unsigned int); | 1495 | unsigned int); |
1502 | 1496 | ||
1503 | extern 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 | |||
1506 | static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, | 1497 | static 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 | ||
1535 | static 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 |
1545 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1541 | static 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 | ||
1546 | static 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 | |||
1550 | static inline void xfrm_states_put(struct xfrm_state **states, int n) | 1551 | static inline void xfrm_states_put(struct xfrm_state **states, int n) |
1551 | { | 1552 | { |
1552 | int i; | 1553 | int i; |