diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
commit | d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b (patch) | |
tree | c6c67d145771187b194d79d603742b31090a59d6 /include | |
parent | b8cb48aae1b8c50b37dcb7710363aa69a7a0d9ca (diff) | |
parent | 13af7a6ea502fcdd4c0e3d7de6e332b102309491 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
netxen: update copyright
netxen: fix tx timeout recovery
netxen: fix file firmware leak
netxen: improve pci memory access
netxen: change firmware write size
tg3: Fix return ring size breakage
netxen: build fix for INET=n
cdc-phonet: autoconfigure Phonet address
Phonet: back-end for autoconfigured addresses
Phonet: fix netlink address dump error handling
ipv6: Add IFA_F_DADFAILED flag
net: Add DEVTYPE support for Ethernet based devices
mv643xx_eth.c: remove unused txq_set_wrr()
ucc_geth: Fix hangs after switching from full to half duplex
ucc_geth: Rearrange some code to avoid forward declarations
phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
drivers/net/phy: introduce missing kfree
drivers/net/wan: introduce missing kfree
net: force bridge module(s) to be GPL
Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
...
Fixed up trivial conflicts:
- arch/x86/include/asm/socket.h
converted to <asm-generic/socket.h> in the x86 tree. The generic
header has the same new #define's, so that works out fine.
- drivers/net/tun.c
fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
switched over to using 'tun->socket.sk' instead of the redundantly
available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
to the TUN driver") which added a new 'tun->sk' use.
Noted in 'next' by Stephen Rothwell.
Diffstat (limited to 'include')
141 files changed, 1911 insertions, 1287 deletions
diff --git a/include/asm-generic/socket.h b/include/asm-generic/socket.h index 5d79e409241c..538991cef6f0 100644 --- a/include/asm-generic/socket.h +++ b/include/asm-generic/socket.h | |||
@@ -60,4 +60,7 @@ | |||
60 | #define SO_TIMESTAMPING 37 | 60 | #define SO_TIMESTAMPING 37 |
61 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | 61 | #define SCM_TIMESTAMPING SO_TIMESTAMPING |
62 | 62 | ||
63 | #define SO_PROTOCOL 38 | ||
64 | #define SO_DOMAIN 39 | ||
65 | |||
63 | #endif /* __ASM_GENERIC_SOCKET_H */ | 66 | #endif /* __ASM_GENERIC_SOCKET_H */ |
diff --git a/include/linux/arcdevice.h b/include/linux/arcdevice.h index cd4bcb6989ce..7d650a0e3d8f 100644 --- a/include/linux/arcdevice.h +++ b/include/linux/arcdevice.h | |||
@@ -337,7 +337,8 @@ struct net_device *alloc_arcdev(const char *name); | |||
337 | 337 | ||
338 | int arcnet_open(struct net_device *dev); | 338 | int arcnet_open(struct net_device *dev); |
339 | int arcnet_close(struct net_device *dev); | 339 | int arcnet_close(struct net_device *dev); |
340 | int arcnet_send_packet(struct sk_buff *skb, struct net_device *dev); | 340 | netdev_tx_t arcnet_send_packet(struct sk_buff *skb, |
341 | struct net_device *dev); | ||
341 | void arcnet_timeout(struct net_device *dev); | 342 | void arcnet_timeout(struct net_device *dev); |
342 | 343 | ||
343 | #endif /* __KERNEL__ */ | 344 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 4a37a56f6cdd..5824b20b5fcb 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
@@ -66,5 +66,6 @@ void can_bus_off(struct net_device *dev); | |||
66 | 66 | ||
67 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); | 67 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); |
68 | void can_get_echo_skb(struct net_device *dev, int idx); | 68 | void can_get_echo_skb(struct net_device *dev, int idx); |
69 | void can_free_echo_skb(struct net_device *dev, int idx); | ||
69 | 70 | ||
70 | #endif /* CAN_DEV_H */ | 71 | #endif /* CAN_DEV_H */ |
diff --git a/include/linux/connector.h b/include/linux/connector.h index b68d27850d51..47ebf416f512 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -136,7 +136,7 @@ struct cn_callback_data { | |||
136 | void *ddata; | 136 | void *ddata; |
137 | 137 | ||
138 | void *callback_priv; | 138 | void *callback_priv; |
139 | void (*callback) (void *); | 139 | void (*callback) (struct cn_msg *); |
140 | 140 | ||
141 | void *free; | 141 | void *free; |
142 | }; | 142 | }; |
@@ -167,11 +167,11 @@ struct cn_dev { | |||
167 | struct cn_queue_dev *cbdev; | 167 | struct cn_queue_dev *cbdev; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | 170 | int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *)); |
171 | void cn_del_callback(struct cb_id *); | 171 | void cn_del_callback(struct cb_id *); |
172 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); | 172 | int cn_netlink_send(struct cn_msg *, u32, gfp_t); |
173 | 173 | ||
174 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 174 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *)); |
175 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 175 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
176 | 176 | ||
177 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); | 177 | int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); |
diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 7d2e10006188..b7cdbb4373df 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h | |||
@@ -50,6 +50,8 @@ struct dcbmsg { | |||
50 | * @DCB_CMD_SNUMTCS: set the number of traffic classes | 50 | * @DCB_CMD_SNUMTCS: set the number of traffic classes |
51 | * @DCB_CMD_GBCN: set backward congestion notification configuration | 51 | * @DCB_CMD_GBCN: set backward congestion notification configuration |
52 | * @DCB_CMD_SBCN: get backward congestion notification configration. | 52 | * @DCB_CMD_SBCN: get backward congestion notification configration. |
53 | * @DCB_CMD_GAPP: get application protocol configuration | ||
54 | * @DCB_CMD_SAPP: set application protocol configuration | ||
53 | */ | 55 | */ |
54 | enum dcbnl_commands { | 56 | enum dcbnl_commands { |
55 | DCB_CMD_UNDEFINED, | 57 | DCB_CMD_UNDEFINED, |
@@ -80,6 +82,9 @@ enum dcbnl_commands { | |||
80 | DCB_CMD_BCN_GCFG, | 82 | DCB_CMD_BCN_GCFG, |
81 | DCB_CMD_BCN_SCFG, | 83 | DCB_CMD_BCN_SCFG, |
82 | 84 | ||
85 | DCB_CMD_GAPP, | ||
86 | DCB_CMD_SAPP, | ||
87 | |||
83 | __DCB_CMD_ENUM_MAX, | 88 | __DCB_CMD_ENUM_MAX, |
84 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, | 89 | DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, |
85 | }; | 90 | }; |
@@ -114,6 +119,7 @@ enum dcbnl_attrs { | |||
114 | DCB_ATTR_CAP, | 119 | DCB_ATTR_CAP, |
115 | DCB_ATTR_NUMTCS, | 120 | DCB_ATTR_NUMTCS, |
116 | DCB_ATTR_BCN, | 121 | DCB_ATTR_BCN, |
122 | DCB_ATTR_APP, | ||
117 | 123 | ||
118 | __DCB_ATTR_ENUM_MAX, | 124 | __DCB_ATTR_ENUM_MAX, |
119 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, | 125 | DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, |
@@ -338,5 +344,17 @@ enum dcb_general_attr_values { | |||
338 | DCB_ATTR_VALUE_UNDEFINED = 0xff | 344 | DCB_ATTR_VALUE_UNDEFINED = 0xff |
339 | }; | 345 | }; |
340 | 346 | ||
347 | #define DCB_APP_IDTYPE_ETHTYPE 0x00 | ||
348 | #define DCB_APP_IDTYPE_PORTNUM 0x01 | ||
349 | enum dcbnl_app_attrs { | ||
350 | DCB_APP_ATTR_UNDEFINED, | ||
351 | |||
352 | DCB_APP_ATTR_IDTYPE, | ||
353 | DCB_APP_ATTR_ID, | ||
354 | DCB_APP_ATTR_PRIORITY, | ||
355 | |||
356 | __DCB_APP_ATTR_ENUM_MAX, | ||
357 | DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, | ||
358 | }; | ||
341 | 359 | ||
342 | #endif /* __LINUX_DCBNL_H__ */ | 360 | #endif /* __LINUX_DCBNL_H__ */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 9b660bd2e2b3..15e4eb713694 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -362,12 +362,25 @@ struct ethtool_rxnfc { | |||
362 | __u32 rule_locs[0]; | 362 | __u32 rule_locs[0]; |
363 | }; | 363 | }; |
364 | 364 | ||
365 | #define ETHTOOL_FLASH_MAX_FILENAME 128 | ||
366 | enum ethtool_flash_op_type { | ||
367 | ETHTOOL_FLASH_ALL_REGIONS = 0, | ||
368 | }; | ||
369 | |||
370 | /* for passing firmware flashing related parameters */ | ||
371 | struct ethtool_flash { | ||
372 | __u32 cmd; | ||
373 | __u32 region; | ||
374 | char data[ETHTOOL_FLASH_MAX_FILENAME]; | ||
375 | }; | ||
376 | |||
365 | #ifdef __KERNEL__ | 377 | #ifdef __KERNEL__ |
366 | 378 | ||
367 | struct net_device; | 379 | struct net_device; |
368 | 380 | ||
369 | /* Some generic methods drivers may use in their ethtool_ops */ | 381 | /* Some generic methods drivers may use in their ethtool_ops */ |
370 | u32 ethtool_op_get_link(struct net_device *dev); | 382 | u32 ethtool_op_get_link(struct net_device *dev); |
383 | u32 ethtool_op_get_rx_csum(struct net_device *dev); | ||
371 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 384 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
372 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 385 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); |
373 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); | 386 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); |
@@ -488,6 +501,7 @@ struct ethtool_ops { | |||
488 | int (*get_stats_count)(struct net_device *);/* use get_sset_count */ | 501 | int (*get_stats_count)(struct net_device *);/* use get_sset_count */ |
489 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); | 502 | int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); |
490 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 503 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
504 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | ||
491 | }; | 505 | }; |
492 | #endif /* __KERNEL__ */ | 506 | #endif /* __KERNEL__ */ |
493 | 507 | ||
@@ -544,6 +558,7 @@ struct ethtool_ops { | |||
544 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ | 558 | #define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ |
545 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ | 559 | #define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ |
546 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ | 560 | #define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ |
561 | #define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ | ||
547 | 562 | ||
548 | /* compatibility with older code */ | 563 | /* compatibility with older code */ |
549 | #define SPARC_ETH_GSET ETHTOOL_GSET | 564 | #define SPARC_ETH_GSET ETHTOOL_GSET |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index 6a6e701f1631..ee275c8b3df1 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -38,7 +38,7 @@ struct hdlc_proto { | |||
38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); | 38 | int (*ioctl)(struct net_device *dev, struct ifreq *ifr); |
39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); | 39 | __be16 (*type_trans)(struct sk_buff *skb, struct net_device *dev); |
40 | int (*netif_rx)(struct sk_buff *skb); | 40 | int (*netif_rx)(struct sk_buff *skb); |
41 | int (*xmit)(struct sk_buff *skb, struct net_device *dev); | 41 | netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); |
42 | struct module *module; | 42 | struct module *module; |
43 | struct hdlc_proto *next; /* next protocol in the list */ | 43 | struct hdlc_proto *next; /* next protocol in the list */ |
44 | }; | 44 | }; |
@@ -51,7 +51,7 @@ typedef struct hdlc_device { | |||
51 | unsigned short encoding, unsigned short parity); | 51 | unsigned short encoding, unsigned short parity); |
52 | 52 | ||
53 | /* hardware driver must handle this instead of dev->hard_start_xmit */ | 53 | /* hardware driver must handle this instead of dev->hard_start_xmit */ |
54 | int (*xmit)(struct sk_buff *skb, struct net_device *dev); | 54 | netdev_tx_t (*xmit)(struct sk_buff *skb, struct net_device *dev); |
55 | 55 | ||
56 | /* Things below are for HDLC layer internal use only */ | 56 | /* Things below are for HDLC layer internal use only */ |
57 | const struct hdlc_proto *proto; | 57 | const struct hdlc_proto *proto; |
@@ -60,7 +60,7 @@ typedef struct hdlc_device { | |||
60 | spinlock_t state_lock; | 60 | spinlock_t state_lock; |
61 | void *state; | 61 | void *state; |
62 | void *priv; | 62 | void *priv; |
63 | }hdlc_device; | 63 | } hdlc_device; |
64 | 64 | ||
65 | 65 | ||
66 | 66 | ||
@@ -106,7 +106,7 @@ void hdlc_close(struct net_device *dev); | |||
106 | /* May be used by hardware driver */ | 106 | /* May be used by hardware driver */ |
107 | int hdlc_change_mtu(struct net_device *dev, int new_mtu); | 107 | int hdlc_change_mtu(struct net_device *dev, int new_mtu); |
108 | /* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */ | 108 | /* Must be pointed to by hw driver's dev->netdev_ops->ndo_start_xmit */ |
109 | int hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev); | 109 | netdev_tx_t hdlc_start_xmit(struct sk_buff *skb, struct net_device *dev); |
110 | 110 | ||
111 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, | 111 | int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, |
112 | size_t size); | 112 | size_t size); |
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index b6a85183c333..c0d8357917e2 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
@@ -171,8 +171,6 @@ struct icmp6_filter { | |||
171 | #ifdef __KERNEL__ | 171 | #ifdef __KERNEL__ |
172 | 172 | ||
173 | #include <linux/netdevice.h> | 173 | #include <linux/netdevice.h> |
174 | #include <linux/skbuff.h> | ||
175 | |||
176 | 174 | ||
177 | extern void icmpv6_send(struct sk_buff *skb, | 175 | extern void icmpv6_send(struct sk_buff *skb, |
178 | u8 type, u8 code, | 176 | u8 type, u8 code, |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index a9173d5434d1..52e15e079c61 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -115,7 +115,7 @@ | |||
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 19 | 118 | #define IEEE80211_MESH_CONFIG_LEN 24 |
119 | 119 | ||
120 | #define IEEE80211_QOS_CTL_LEN 2 | 120 | #define IEEE80211_QOS_CTL_LEN 2 |
121 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F | 121 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F |
@@ -802,6 +802,31 @@ struct ieee80211_ht_cap { | |||
802 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 802 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
803 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 803 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
804 | 804 | ||
805 | /* | ||
806 | * Maximum length of AMPDU that the STA can receive. | ||
807 | * Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets) | ||
808 | */ | ||
809 | enum ieee80211_max_ampdu_length_exp { | ||
810 | IEEE80211_HT_MAX_AMPDU_8K = 0, | ||
811 | IEEE80211_HT_MAX_AMPDU_16K = 1, | ||
812 | IEEE80211_HT_MAX_AMPDU_32K = 2, | ||
813 | IEEE80211_HT_MAX_AMPDU_64K = 3 | ||
814 | }; | ||
815 | |||
816 | #define IEEE80211_HT_MAX_AMPDU_FACTOR 13 | ||
817 | |||
818 | /* Minimum MPDU start spacing */ | ||
819 | enum ieee80211_min_mpdu_spacing { | ||
820 | IEEE80211_HT_MPDU_DENSITY_NONE = 0, /* No restriction */ | ||
821 | IEEE80211_HT_MPDU_DENSITY_0_25 = 1, /* 1/4 usec */ | ||
822 | IEEE80211_HT_MPDU_DENSITY_0_5 = 2, /* 1/2 usec */ | ||
823 | IEEE80211_HT_MPDU_DENSITY_1 = 3, /* 1 usec */ | ||
824 | IEEE80211_HT_MPDU_DENSITY_2 = 4, /* 2 usec */ | ||
825 | IEEE80211_HT_MPDU_DENSITY_4 = 5, /* 4 usec */ | ||
826 | IEEE80211_HT_MPDU_DENSITY_8 = 6, /* 8 usec */ | ||
827 | IEEE80211_HT_MPDU_DENSITY_16 = 7 /* 16 usec */ | ||
828 | }; | ||
829 | |||
805 | /** | 830 | /** |
806 | * struct ieee80211_ht_info - HT information | 831 | * struct ieee80211_ht_info - HT information |
807 | * | 832 | * |
@@ -1196,6 +1221,10 @@ enum ieee80211_sa_query_action { | |||
1196 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 | 1221 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 |
1197 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 | 1222 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 |
1198 | 1223 | ||
1224 | /* AKM suite selectors */ | ||
1225 | #define WLAN_AKM_SUITE_8021X 0x000FAC01 | ||
1226 | #define WLAN_AKM_SUITE_PSK 0x000FAC02 | ||
1227 | |||
1199 | #define WLAN_MAX_KEY_LEN 32 | 1228 | #define WLAN_MAX_KEY_LEN 32 |
1200 | 1229 | ||
1201 | /** | 1230 | /** |
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index a60c821be44c..fd9740466757 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h | |||
@@ -41,6 +41,7 @@ enum | |||
41 | 41 | ||
42 | #define IFA_F_NODAD 0x02 | 42 | #define IFA_F_NODAD 0x02 |
43 | #define IFA_F_OPTIMISTIC 0x04 | 43 | #define IFA_F_OPTIMISTIC 0x04 |
44 | #define IFA_F_DADFAILED 0x08 | ||
44 | #define IFA_F_HOMEADDRESS 0x10 | 45 | #define IFA_F_HOMEADDRESS 0x10 |
45 | #define IFA_F_DEPRECATED 0x20 | 46 | #define IFA_F_DEPRECATED 0x20 |
46 | #define IFA_F_TENTATIVE 0x40 | 47 | #define IFA_F_TENTATIVE 0x40 |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index b554300ef8bf..282eb37e2dec 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -87,7 +87,6 @@ | |||
87 | #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ | 87 | #define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */ |
88 | #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ | 88 | #define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */ |
89 | #define ARPHRD_IEEE802154 804 | 89 | #define ARPHRD_IEEE802154 804 |
90 | #define ARPHRD_IEEE802154_PHY 805 | ||
91 | 90 | ||
92 | #define ARPHRD_PHONET 820 /* PhoNet media type */ | 91 | #define ARPHRD_PHONET 820 /* PhoNet media type */ |
93 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ | 92 | #define ARPHRD_PHONET_PIPE 821 /* PhoNet pipe header */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 70fdba2bbf71..580b6004d00e 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -139,10 +139,10 @@ extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | |||
139 | /* | 139 | /* |
140 | * Display a 6 byte device address (MAC) in a readable format. | 140 | * Display a 6 byte device address (MAC) in a readable format. |
141 | */ | 141 | */ |
142 | extern char *print_mac(char *buf, const unsigned char *addr); | 142 | extern char *print_mac(char *buf, const unsigned char *addr) __deprecated; |
143 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" | 143 | #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" |
144 | #define MAC_BUF_SIZE 18 | 144 | #define MAC_BUF_SIZE 18 |
145 | #define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused | 145 | #define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] |
146 | 146 | ||
147 | #endif | 147 | #endif |
148 | 148 | ||
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 673f2209453d..80b3a1056a5f 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -69,11 +69,6 @@ struct dlci_conf { | |||
69 | 69 | ||
70 | #define DLCI_VALID_FLAGS 0x000B | 70 | #define DLCI_VALID_FLAGS 0x000B |
71 | 71 | ||
72 | /* FRAD driver uses these to indicate what it did with packet */ | ||
73 | #define DLCI_RET_OK 0x00 | ||
74 | #define DLCI_RET_ERR 0x01 | ||
75 | #define DLCI_RET_DROP 0x02 | ||
76 | |||
77 | /* defines for the actual Frame Relay hardware */ | 72 | /* defines for the actual Frame Relay hardware */ |
78 | #define FRAD_GET_CONF (SIOCDEVPRIVATE) | 73 | #define FRAD_GET_CONF (SIOCDEVPRIVATE) |
79 | #define FRAD_SET_CONF (SIOCDEVPRIVATE + 1) | 74 | #define FRAD_SET_CONF (SIOCDEVPRIVATE + 1) |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 915ba5789f0e..3f5fd523b49d 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -62,6 +62,7 @@ | |||
62 | #define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */ | 62 | #define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */ |
63 | #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ | 63 | #define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ |
64 | #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ | 64 | #define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ |
65 | #define TUN_F_UFO 0x10 /* I can handle UFO packets */ | ||
65 | 66 | ||
66 | /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ | 67 | /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ |
67 | #define TUN_PKT_STRIP 0x0001 | 68 | #define TUN_PKT_STRIP 0x0001 |
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h new file mode 100644 index 000000000000..4b3ecc40889a --- /dev/null +++ b/include/linux/isdn/hdlc.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * hdlc.h -- General purpose ISDN HDLC decoder. | ||
3 | * | ||
4 | * Implementation of a HDLC decoder/encoder in software. | ||
5 | * Neccessary because some ISDN devices don't have HDLC | ||
6 | * controllers. | ||
7 | * | ||
8 | * Copyright (C) | ||
9 | * 2009 Karsten Keil <keil@b1-systems.de> | ||
10 | * 2002 Wolfgang Mües <wolfgang@iksw-muees.de> | ||
11 | * 2001 Frode Isaksen <fisaksen@bewan.com> | ||
12 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
27 | */ | ||
28 | |||
29 | #ifndef __ISDNHDLC_H__ | ||
30 | #define __ISDNHDLC_H__ | ||
31 | |||
32 | struct isdnhdlc_vars { | ||
33 | int bit_shift; | ||
34 | int hdlc_bits1; | ||
35 | int data_bits; | ||
36 | int ffbit_shift; /* encoding only */ | ||
37 | int state; | ||
38 | int dstpos; | ||
39 | |||
40 | u16 crc; | ||
41 | |||
42 | u8 cbin; | ||
43 | u8 shift_reg; | ||
44 | u8 ffvalue; | ||
45 | |||
46 | /* set if transferring data */ | ||
47 | u32 data_received:1; | ||
48 | /* set if D channel (send idle instead of flags) */ | ||
49 | u32 dchannel:1; | ||
50 | /* set if 56K adaptation */ | ||
51 | u32 do_adapt56:1; | ||
52 | /* set if in closing phase (need to send CRC + flag) */ | ||
53 | u32 do_closing:1; | ||
54 | /* set if data is bitreverse */ | ||
55 | u32 do_bitreverse:1; | ||
56 | }; | ||
57 | |||
58 | /* Feature Flags */ | ||
59 | #define HDLC_56KBIT 0x01 | ||
60 | #define HDLC_DCHANNEL 0x02 | ||
61 | #define HDLC_BITREVERSE 0x04 | ||
62 | |||
63 | /* | ||
64 | The return value from isdnhdlc_decode is | ||
65 | the frame length, 0 if no complete frame was decoded, | ||
66 | or a negative error number | ||
67 | */ | ||
68 | #define HDLC_FRAMING_ERROR 1 | ||
69 | #define HDLC_CRC_ERROR 2 | ||
70 | #define HDLC_LENGTH_ERROR 3 | ||
71 | |||
72 | extern void isdnhdlc_rcv_init(struct isdnhdlc_vars *hdlc, u32 features); | ||
73 | |||
74 | extern int isdnhdlc_decode(struct isdnhdlc_vars *hdlc, const u8 *src, | ||
75 | int slen, int *count, u8 *dst, int dsize); | ||
76 | |||
77 | extern void isdnhdlc_out_init(struct isdnhdlc_vars *hdlc, u32 features); | ||
78 | |||
79 | extern int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const u8 *src, | ||
80 | u16 slen, int *count, u8 *dst, int dsize); | ||
81 | |||
82 | #endif /* __ISDNHDLC_H__ */ | ||
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h index 7f9831da847f..4af841408fb5 100644 --- a/include/linux/mISDNhw.h +++ b/include/linux/mISDNhw.h | |||
@@ -168,6 +168,7 @@ struct bchannel { | |||
168 | extern int mISDN_initdchannel(struct dchannel *, int, void *); | 168 | extern int mISDN_initdchannel(struct dchannel *, int, void *); |
169 | extern int mISDN_initbchannel(struct bchannel *, int); | 169 | extern int mISDN_initbchannel(struct bchannel *, int); |
170 | extern int mISDN_freedchannel(struct dchannel *); | 170 | extern int mISDN_freedchannel(struct dchannel *); |
171 | extern void mISDN_clear_bchannel(struct bchannel *); | ||
171 | extern int mISDN_freebchannel(struct bchannel *); | 172 | extern int mISDN_freebchannel(struct bchannel *); |
172 | extern void queue_ch_frame(struct mISDNchannel *, u_int, | 173 | extern void queue_ch_frame(struct mISDNchannel *, u_int, |
173 | int, struct sk_buff *); | 174 | int, struct sk_buff *); |
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h index 45100b39a7cf..536ca12442ca 100644 --- a/include/linux/mISDNif.h +++ b/include/linux/mISDNif.h | |||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | #define MISDN_MAJOR_VERSION 1 | 38 | #define MISDN_MAJOR_VERSION 1 |
39 | #define MISDN_MINOR_VERSION 1 | 39 | #define MISDN_MINOR_VERSION 1 |
40 | #define MISDN_RELEASE 20 | 40 | #define MISDN_RELEASE 21 |
41 | 41 | ||
42 | /* primitives for information exchange | 42 | /* primitives for information exchange |
43 | * generell format | 43 | * generell format |
@@ -153,6 +153,18 @@ | |||
153 | #define HFC_VOL_CHANGE_RX 0x2602 | 153 | #define HFC_VOL_CHANGE_RX 0x2602 |
154 | #define HFC_SPL_LOOP_ON 0x2603 | 154 | #define HFC_SPL_LOOP_ON 0x2603 |
155 | #define HFC_SPL_LOOP_OFF 0x2604 | 155 | #define HFC_SPL_LOOP_OFF 0x2604 |
156 | /* for T30 FAX and analog modem */ | ||
157 | #define HW_MOD_FRM 0x4000 | ||
158 | #define HW_MOD_FRH 0x4001 | ||
159 | #define HW_MOD_FTM 0x4002 | ||
160 | #define HW_MOD_FTH 0x4003 | ||
161 | #define HW_MOD_FTS 0x4004 | ||
162 | #define HW_MOD_CONNECT 0x4010 | ||
163 | #define HW_MOD_OK 0x4011 | ||
164 | #define HW_MOD_NOCARR 0x4012 | ||
165 | #define HW_MOD_FCERROR 0x4013 | ||
166 | #define HW_MOD_READY 0x4014 | ||
167 | #define HW_MOD_LASTDATA 0x4015 | ||
156 | 168 | ||
157 | /* DSP_TONE_PATT_ON parameter */ | 169 | /* DSP_TONE_PATT_ON parameter */ |
158 | #define TONE_OFF 0x0000 | 170 | #define TONE_OFF 0x0000 |
@@ -224,6 +236,8 @@ | |||
224 | #define ISDN_P_B_L2DTMF 0x24 | 236 | #define ISDN_P_B_L2DTMF 0x24 |
225 | #define ISDN_P_B_L2DSP 0x25 | 237 | #define ISDN_P_B_L2DSP 0x25 |
226 | #define ISDN_P_B_L2DSPHDLC 0x26 | 238 | #define ISDN_P_B_L2DSPHDLC 0x26 |
239 | #define ISDN_P_B_T30_FAX 0x27 | ||
240 | #define ISDN_P_B_MODEM_ASYNC 0x28 | ||
227 | 241 | ||
228 | #define OPTION_L2_PMX 1 | 242 | #define OPTION_L2_PMX 1 |
229 | #define OPTION_L2_PTP 2 | 243 | #define OPTION_L2_PTP 2 |
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index cfdf1df2875e..c779b49a1fda 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
@@ -304,7 +304,7 @@ static inline __u16 mdio_phy_id_devad(int phy_id) | |||
304 | */ | 304 | */ |
305 | struct mdio_if_info { | 305 | struct mdio_if_info { |
306 | int prtad; | 306 | int prtad; |
307 | u32 __bitwise mmds; | 307 | u32 mmds; |
308 | unsigned mode_support; | 308 | unsigned mode_support; |
309 | 309 | ||
310 | struct net_device *dev; | 310 | struct net_device *dev; |
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 39751c8cde9c..2dbfb5a05994 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h | |||
@@ -22,6 +22,12 @@ | |||
22 | /* | 22 | /* |
23 | * Vendors and devices. Sort key: vendor first, device next. | 23 | * Vendors and devices. Sort key: vendor first, device next. |
24 | */ | 24 | */ |
25 | #define SDIO_VENDOR_ID_INTEL 0x0089 | ||
26 | #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402 | ||
27 | #define SDIO_DEVICE_ID_INTEL_IWMC3200WIFI 0x1403 | ||
28 | #define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404 | ||
29 | #define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405 | ||
30 | #define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406 | ||
25 | 31 | ||
26 | #define SDIO_VENDOR_ID_MARVELL 0x02df | 32 | #define SDIO_VENDOR_ID_MARVELL 0x02df |
27 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 | 33 | #define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 |
diff --git a/include/linux/net_dropmon.h b/include/linux/net_dropmon.h index 3ceb0cc1bc78..2a739462caeb 100644 --- a/include/linux/net_dropmon.h +++ b/include/linux/net_dropmon.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
6 | #include <linux/types.h> | ||
7 | 6 | ||
8 | struct net_dm_drop_point { | 7 | struct net_dm_drop_point { |
9 | __u8 pc[8]; | 8 | __u8 pc[8]; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d4a4d9867794..65ee1929b2b1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -72,10 +72,6 @@ struct wireless_dev; | |||
72 | /* Backlog congestion levels */ | 72 | /* Backlog congestion levels */ |
73 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ | 73 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ |
74 | #define NET_RX_DROP 1 /* packet dropped */ | 74 | #define NET_RX_DROP 1 /* packet dropped */ |
75 | #define NET_RX_CN_LOW 2 /* storm alert, just in case */ | ||
76 | #define NET_RX_CN_MOD 3 /* Storm on its way! */ | ||
77 | #define NET_RX_CN_HIGH 4 /* The storm is here */ | ||
78 | #define NET_RX_BAD 5 /* packet dropped due to kernel error */ | ||
79 | 75 | ||
80 | /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It | 76 | /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It |
81 | * indicates that the device will soon be dropping packets, or already drops | 77 | * indicates that the device will soon be dropping packets, or already drops |
@@ -83,17 +79,19 @@ struct wireless_dev; | |||
83 | #define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) | 79 | #define net_xmit_eval(e) ((e) == NET_XMIT_CN? 0 : (e)) |
84 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) | 80 | #define net_xmit_errno(e) ((e) != NET_XMIT_CN ? -ENOBUFS : 0) |
85 | 81 | ||
82 | /* Driver transmit return codes */ | ||
83 | enum netdev_tx { | ||
84 | NETDEV_TX_OK = 0, /* driver took care of packet */ | ||
85 | NETDEV_TX_BUSY, /* driver tx path was busy*/ | ||
86 | NETDEV_TX_LOCKED = -1, /* driver tx lock was already taken */ | ||
87 | }; | ||
88 | typedef enum netdev_tx netdev_tx_t; | ||
89 | |||
86 | #endif | 90 | #endif |
87 | 91 | ||
88 | #define MAX_ADDR_LEN 32 /* Largest hardware address length */ | 92 | #define MAX_ADDR_LEN 32 /* Largest hardware address length */ |
89 | 93 | ||
90 | /* Driver transmit return codes */ | ||
91 | #define NETDEV_TX_OK 0 /* driver took care of packet */ | ||
92 | #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ | ||
93 | #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ | ||
94 | |||
95 | #ifdef __KERNEL__ | 94 | #ifdef __KERNEL__ |
96 | |||
97 | /* | 95 | /* |
98 | * Compute the worst case header length according to the protocols | 96 | * Compute the worst case header length according to the protocols |
99 | * used. | 97 | * used. |
@@ -511,9 +509,11 @@ struct netdev_queue { | |||
511 | * This function is called when network device transistions to the down | 509 | * This function is called when network device transistions to the down |
512 | * state. | 510 | * state. |
513 | * | 511 | * |
514 | * int (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev); | 512 | * netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, |
513 | * struct net_device *dev); | ||
515 | * Called when a packet needs to be transmitted. | 514 | * Called when a packet needs to be transmitted. |
516 | * Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED, | 515 | * Must return NETDEV_TX_OK , NETDEV_TX_BUSY. |
516 | * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX) | ||
517 | * Required can not be NULL. | 517 | * Required can not be NULL. |
518 | * | 518 | * |
519 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb); | 519 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb); |
@@ -584,7 +584,7 @@ struct net_device_ops { | |||
584 | void (*ndo_uninit)(struct net_device *dev); | 584 | void (*ndo_uninit)(struct net_device *dev); |
585 | int (*ndo_open)(struct net_device *dev); | 585 | int (*ndo_open)(struct net_device *dev); |
586 | int (*ndo_stop)(struct net_device *dev); | 586 | int (*ndo_stop)(struct net_device *dev); |
587 | int (*ndo_start_xmit) (struct sk_buff *skb, | 587 | netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb, |
588 | struct net_device *dev); | 588 | struct net_device *dev); |
589 | u16 (*ndo_select_queue)(struct net_device *dev, | 589 | u16 (*ndo_select_queue)(struct net_device *dev, |
590 | struct sk_buff *skb); | 590 | struct sk_buff *skb); |
@@ -627,6 +627,8 @@ struct net_device_ops { | |||
627 | void (*ndo_poll_controller)(struct net_device *dev); | 627 | void (*ndo_poll_controller)(struct net_device *dev); |
628 | #endif | 628 | #endif |
629 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 629 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
630 | int (*ndo_fcoe_enable)(struct net_device *dev); | ||
631 | int (*ndo_fcoe_disable)(struct net_device *dev); | ||
630 | int (*ndo_fcoe_ddp_setup)(struct net_device *dev, | 632 | int (*ndo_fcoe_ddp_setup)(struct net_device *dev, |
631 | u16 xid, | 633 | u16 xid, |
632 | struct scatterlist *sgl, | 634 | struct scatterlist *sgl, |
@@ -705,6 +707,7 @@ struct net_device | |||
705 | /* the GSO_MASK reserves bits 16 through 23 */ | 707 | /* the GSO_MASK reserves bits 16 through 23 */ |
706 | #define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ | 708 | #define NETIF_F_FCOE_CRC (1 << 24) /* FCoE CRC32 */ |
707 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ | 709 | #define NETIF_F_SCTP_CSUM (1 << 25) /* SCTP checksum offload */ |
710 | #define NETIF_F_FCOE_MTU (1 << 26) /* Supports max FCoE MTU, 2158 bytes*/ | ||
708 | 711 | ||
709 | /* Segmentation offload features */ | 712 | /* Segmentation offload features */ |
710 | #define NETIF_F_GSO_SHIFT 16 | 713 | #define NETIF_F_GSO_SHIFT 16 |
@@ -829,6 +832,9 @@ struct net_device | |||
829 | /* Number of TX queues currently active in device */ | 832 | /* Number of TX queues currently active in device */ |
830 | unsigned int real_num_tx_queues; | 833 | unsigned int real_num_tx_queues; |
831 | 834 | ||
835 | /* root qdisc from userspace point of view */ | ||
836 | struct Qdisc *qdisc; | ||
837 | |||
832 | unsigned long tx_queue_len; /* Max frames per queue allowed */ | 838 | unsigned long tx_queue_len; /* Max frames per queue allowed */ |
833 | spinlock_t tx_global_lock; | 839 | spinlock_t tx_global_lock; |
834 | /* | 840 | /* |
@@ -992,6 +998,12 @@ static inline void *netdev_priv(const struct net_device *dev) | |||
992 | */ | 998 | */ |
993 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) | 999 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
994 | 1000 | ||
1001 | /* Set the sysfs device type for the network logical device to allow | ||
1002 | * fin grained indentification of different network device types. For | ||
1003 | * example Ethernet, Wirelss LAN, Bluetooth, WiMAX etc. | ||
1004 | */ | ||
1005 | #define SET_NETDEV_DEVTYPE(net, devtype) ((net)->dev.type = (devtype)) | ||
1006 | |||
995 | /** | 1007 | /** |
996 | * netif_napi_add - initialize a napi context | 1008 | * netif_napi_add - initialize a napi context |
997 | * @dev: network device | 1009 | * @dev: network device |
@@ -1260,7 +1272,7 @@ static inline void netif_tx_wake_queue(struct netdev_queue *dev_queue) | |||
1260 | { | 1272 | { |
1261 | #ifdef CONFIG_NETPOLL_TRAP | 1273 | #ifdef CONFIG_NETPOLL_TRAP |
1262 | if (netpoll_trap()) { | 1274 | if (netpoll_trap()) { |
1263 | clear_bit(__QUEUE_STATE_XOFF, &dev_queue->state); | 1275 | netif_tx_start_queue(dev_queue); |
1264 | return; | 1276 | return; |
1265 | } | 1277 | } |
1266 | #endif | 1278 | #endif |
@@ -1366,7 +1378,8 @@ static inline int netif_running(const struct net_device *dev) | |||
1366 | static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) | 1378 | static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) |
1367 | { | 1379 | { |
1368 | struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); | 1380 | struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); |
1369 | clear_bit(__QUEUE_STATE_XOFF, &txq->state); | 1381 | |
1382 | netif_tx_start_queue(txq); | ||
1370 | } | 1383 | } |
1371 | 1384 | ||
1372 | /** | 1385 | /** |
@@ -1383,7 +1396,7 @@ static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index) | |||
1383 | if (netpoll_trap()) | 1396 | if (netpoll_trap()) |
1384 | return; | 1397 | return; |
1385 | #endif | 1398 | #endif |
1386 | set_bit(__QUEUE_STATE_XOFF, &txq->state); | 1399 | netif_tx_stop_queue(txq); |
1387 | } | 1400 | } |
1388 | 1401 | ||
1389 | /** | 1402 | /** |
@@ -1397,7 +1410,8 @@ static inline int __netif_subqueue_stopped(const struct net_device *dev, | |||
1397 | u16 queue_index) | 1410 | u16 queue_index) |
1398 | { | 1411 | { |
1399 | struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); | 1412 | struct netdev_queue *txq = netdev_get_tx_queue(dev, queue_index); |
1400 | return test_bit(__QUEUE_STATE_XOFF, &txq->state); | 1413 | |
1414 | return netif_tx_queue_stopped(txq); | ||
1401 | } | 1415 | } |
1402 | 1416 | ||
1403 | static inline int netif_subqueue_stopped(const struct net_device *dev, | 1417 | static inline int netif_subqueue_stopped(const struct net_device *dev, |
@@ -1749,8 +1763,7 @@ static inline void netif_tx_unlock(struct net_device *dev) | |||
1749 | * force a schedule. | 1763 | * force a schedule. |
1750 | */ | 1764 | */ |
1751 | clear_bit(__QUEUE_STATE_FROZEN, &txq->state); | 1765 | clear_bit(__QUEUE_STATE_FROZEN, &txq->state); |
1752 | if (!test_bit(__QUEUE_STATE_XOFF, &txq->state)) | 1766 | netif_schedule_queue(txq); |
1753 | __netif_schedule(txq->qdisc); | ||
1754 | } | 1767 | } |
1755 | spin_unlock(&dev->tx_global_lock); | 1768 | spin_unlock(&dev->tx_global_lock); |
1756 | } | 1769 | } |
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index bff4d5741d98..9f00da287f2c 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
@@ -58,7 +58,8 @@ struct nfgenmsg { | |||
58 | struct nfnl_callback | 58 | struct nfnl_callback |
59 | { | 59 | { |
60 | int (*call)(struct sock *nl, struct sk_buff *skb, | 60 | int (*call)(struct sock *nl, struct sk_buff *skb, |
61 | struct nlmsghdr *nlh, struct nlattr *cda[]); | 61 | const struct nlmsghdr *nlh, |
62 | const struct nlattr * const cda[]); | ||
62 | const struct nla_policy *policy; /* netlink attribute policy */ | 63 | const struct nla_policy *policy; /* netlink attribute policy */ |
63 | const u_int16_t attr_count; /* number of nlattr's */ | 64 | const u_int16_t attr_count; /* number of nlattr's */ |
64 | }; | 65 | }; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 1030b7593898..812cb153cabb 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -238,9 +238,9 @@ struct xt_mtdtor_param { | |||
238 | */ | 238 | */ |
239 | struct xt_target_param { | 239 | struct xt_target_param { |
240 | const struct net_device *in, *out; | 240 | const struct net_device *in, *out; |
241 | unsigned int hooknum; | ||
242 | const struct xt_target *target; | 241 | const struct xt_target *target; |
243 | const void *targinfo; | 242 | const void *targinfo; |
243 | unsigned int hooknum; | ||
244 | u_int8_t family; | 244 | u_int8_t family; |
245 | }; | 245 | }; |
246 | 246 | ||
@@ -407,7 +407,7 @@ extern int xt_check_target(struct xt_tgchk_param *, | |||
407 | unsigned int size, u_int8_t proto, bool inv_proto); | 407 | unsigned int size, u_int8_t proto, bool inv_proto); |
408 | 408 | ||
409 | extern struct xt_table *xt_register_table(struct net *net, | 409 | extern struct xt_table *xt_register_table(struct net *net, |
410 | struct xt_table *table, | 410 | const struct xt_table *table, |
411 | struct xt_table_info *bootstrap, | 411 | struct xt_table_info *bootstrap, |
412 | struct xt_table_info *newinfo); | 412 | struct xt_table_info *newinfo); |
413 | extern void *xt_unregister_table(struct xt_table *table); | 413 | extern void *xt_unregister_table(struct xt_table *table); |
diff --git a/include/linux/netfilter/xt_CONNMARK.h b/include/linux/netfilter/xt_CONNMARK.h index 7635c8ffdadb..0a8545866752 100644 --- a/include/linux/netfilter/xt_CONNMARK.h +++ b/include/linux/netfilter/xt_CONNMARK.h | |||
@@ -18,12 +18,6 @@ enum { | |||
18 | XT_CONNMARK_RESTORE | 18 | XT_CONNMARK_RESTORE |
19 | }; | 19 | }; |
20 | 20 | ||
21 | struct xt_connmark_target_info { | ||
22 | unsigned long mark; | ||
23 | unsigned long mask; | ||
24 | __u8 mode; | ||
25 | }; | ||
26 | |||
27 | struct xt_connmark_tginfo1 { | 21 | struct xt_connmark_tginfo1 { |
28 | __u32 ctmark, ctmask, nfmask; | 22 | __u32 ctmark, ctmask, nfmask; |
29 | __u8 mode; | 23 | __u8 mode; |
diff --git a/include/linux/netfilter/xt_MARK.h b/include/linux/netfilter/xt_MARK.h index 028304bcc0b1..bc9561bdef79 100644 --- a/include/linux/netfilter/xt_MARK.h +++ b/include/linux/netfilter/xt_MARK.h | |||
@@ -3,23 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | /* Version 0 */ | ||
7 | struct xt_mark_target_info { | ||
8 | unsigned long mark; | ||
9 | }; | ||
10 | |||
11 | /* Version 1 */ | ||
12 | enum { | ||
13 | XT_MARK_SET=0, | ||
14 | XT_MARK_AND, | ||
15 | XT_MARK_OR, | ||
16 | }; | ||
17 | |||
18 | struct xt_mark_target_info_v1 { | ||
19 | unsigned long mark; | ||
20 | __u8 mode; | ||
21 | }; | ||
22 | |||
23 | struct xt_mark_tginfo2 { | 6 | struct xt_mark_tginfo2 { |
24 | __u32 mark, mask; | 7 | __u32 mark, mask; |
25 | }; | 8 | }; |
diff --git a/include/linux/netfilter/xt_connmark.h b/include/linux/netfilter/xt_connmark.h index 571e266d004c..619e47cde01a 100644 --- a/include/linux/netfilter/xt_connmark.h +++ b/include/linux/netfilter/xt_connmark.h | |||
@@ -12,11 +12,6 @@ | |||
12 | * (at your option) any later version. | 12 | * (at your option) any later version. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | struct xt_connmark_info { | ||
16 | unsigned long mark, mask; | ||
17 | __u8 invert; | ||
18 | }; | ||
19 | |||
20 | struct xt_connmark_mtinfo1 { | 15 | struct xt_connmark_mtinfo1 { |
21 | __u32 mark, mask; | 16 | __u32 mark, mask; |
22 | __u8 invert; | 17 | __u8 invert; |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 7ae05338e94c..54f47a2f6152 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -32,42 +32,6 @@ enum { | |||
32 | XT_CONNTRACK_DIRECTION = 1 << 12, | 32 | XT_CONNTRACK_DIRECTION = 1 << 12, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* This is exposed to userspace, so remains frozen in time. */ | ||
36 | struct ip_conntrack_old_tuple | ||
37 | { | ||
38 | struct { | ||
39 | __be32 ip; | ||
40 | union { | ||
41 | __u16 all; | ||
42 | } u; | ||
43 | } src; | ||
44 | |||
45 | struct { | ||
46 | __be32 ip; | ||
47 | union { | ||
48 | __u16 all; | ||
49 | } u; | ||
50 | |||
51 | /* The protocol. */ | ||
52 | __u16 protonum; | ||
53 | } dst; | ||
54 | }; | ||
55 | |||
56 | struct xt_conntrack_info | ||
57 | { | ||
58 | unsigned int statemask, statusmask; | ||
59 | |||
60 | struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX]; | ||
61 | struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX]; | ||
62 | |||
63 | unsigned long expires_min, expires_max; | ||
64 | |||
65 | /* Flags word */ | ||
66 | __u8 flags; | ||
67 | /* Inverse flags */ | ||
68 | __u8 invflags; | ||
69 | }; | ||
70 | |||
71 | struct xt_conntrack_mtinfo1 { | 35 | struct xt_conntrack_mtinfo1 { |
72 | union nf_inet_addr origsrc_addr, origsrc_mask; | 36 | union nf_inet_addr origsrc_addr, origsrc_mask; |
73 | union nf_inet_addr origdst_addr, origdst_mask; | 37 | union nf_inet_addr origdst_addr, origdst_mask; |
diff --git a/include/linux/netfilter/xt_mark.h b/include/linux/netfilter/xt_mark.h index 6fa460a3cc29..6607c8f38ea5 100644 --- a/include/linux/netfilter/xt_mark.h +++ b/include/linux/netfilter/xt_mark.h | |||
@@ -3,11 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | struct xt_mark_info { | ||
7 | unsigned long mark, mask; | ||
8 | __u8 invert; | ||
9 | }; | ||
10 | |||
11 | struct xt_mark_mtinfo1 { | 6 | struct xt_mark_mtinfo1 { |
12 | __u32 mark, mask; | 7 | __u32 mark, mask; |
13 | __u8 invert; | 8 | __u8 invert; |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index 590ac3d6d5d6..6fe3e6aa10db 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
@@ -265,7 +265,7 @@ struct arpt_error | |||
265 | } | 265 | } |
266 | 266 | ||
267 | extern struct xt_table *arpt_register_table(struct net *net, | 267 | extern struct xt_table *arpt_register_table(struct net *net, |
268 | struct xt_table *table, | 268 | const struct xt_table *table, |
269 | const struct arpt_replace *repl); | 269 | const struct arpt_replace *repl); |
270 | extern void arpt_unregister_table(struct xt_table *table); | 270 | extern void arpt_unregister_table(struct xt_table *table); |
271 | extern unsigned int arpt_do_table(struct sk_buff *skb, | 271 | extern unsigned int arpt_do_table(struct sk_buff *skb, |
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index e40ddb94b1af..ea281e6a2048 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -301,7 +301,7 @@ struct ebt_table | |||
301 | #define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \ | 301 | #define EBT_ALIGN(s) (((s) + (__alignof__(struct ebt_replace)-1)) & \ |
302 | ~(__alignof__(struct ebt_replace)-1)) | 302 | ~(__alignof__(struct ebt_replace)-1)) |
303 | extern struct ebt_table *ebt_register_table(struct net *net, | 303 | extern struct ebt_table *ebt_register_table(struct net *net, |
304 | struct ebt_table *table); | 304 | const struct ebt_table *table); |
305 | extern void ebt_unregister_table(struct ebt_table *table); | 305 | extern void ebt_unregister_table(struct ebt_table *table); |
306 | extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, | 306 | extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb, |
307 | const struct net_device *in, const struct net_device *out, | 307 | const struct net_device *in, const struct net_device *out, |
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild index 3a7105bb8f33..431b40761920 100644 --- a/include/linux/netfilter_ipv4/Kbuild +++ b/include/linux/netfilter_ipv4/Kbuild | |||
@@ -1,46 +1,14 @@ | |||
1 | header-y += ipt_CLASSIFY.h | ||
2 | header-y += ipt_CLUSTERIP.h | 1 | header-y += ipt_CLUSTERIP.h |
3 | header-y += ipt_CONNMARK.h | ||
4 | header-y += ipt_DSCP.h | ||
5 | header-y += ipt_ECN.h | 2 | header-y += ipt_ECN.h |
6 | header-y += ipt_LOG.h | 3 | header-y += ipt_LOG.h |
7 | header-y += ipt_MARK.h | ||
8 | header-y += ipt_NFQUEUE.h | ||
9 | header-y += ipt_REJECT.h | 4 | header-y += ipt_REJECT.h |
10 | header-y += ipt_SAME.h | 5 | header-y += ipt_SAME.h |
11 | header-y += ipt_TCPMSS.h | ||
12 | header-y += ipt_TOS.h | ||
13 | header-y += ipt_TTL.h | 6 | header-y += ipt_TTL.h |
14 | header-y += ipt_ULOG.h | 7 | header-y += ipt_ULOG.h |
15 | header-y += ipt_addrtype.h | 8 | header-y += ipt_addrtype.h |
16 | header-y += ipt_ah.h | 9 | header-y += ipt_ah.h |
17 | header-y += ipt_comment.h | ||
18 | header-y += ipt_connbytes.h | ||
19 | header-y += ipt_connmark.h | ||
20 | header-y += ipt_conntrack.h | ||
21 | header-y += ipt_dccp.h | ||
22 | header-y += ipt_dscp.h | ||
23 | header-y += ipt_ecn.h | 10 | header-y += ipt_ecn.h |
24 | header-y += ipt_esp.h | ||
25 | header-y += ipt_hashlimit.h | ||
26 | header-y += ipt_helper.h | ||
27 | header-y += ipt_iprange.h | ||
28 | header-y += ipt_length.h | ||
29 | header-y += ipt_limit.h | ||
30 | header-y += ipt_mac.h | ||
31 | header-y += ipt_mark.h | ||
32 | header-y += ipt_multiport.h | ||
33 | header-y += ipt_owner.h | ||
34 | header-y += ipt_physdev.h | ||
35 | header-y += ipt_pkttype.h | ||
36 | header-y += ipt_policy.h | ||
37 | header-y += ipt_realm.h | 11 | header-y += ipt_realm.h |
38 | header-y += ipt_recent.h | ||
39 | header-y += ipt_sctp.h | ||
40 | header-y += ipt_state.h | ||
41 | header-y += ipt_string.h | ||
42 | header-y += ipt_tcpmss.h | ||
43 | header-y += ipt_tos.h | ||
44 | header-y += ipt_ttl.h | 12 | header-y += ipt_ttl.h |
45 | 13 | ||
46 | unifdef-y += ip_queue.h | 14 | unifdef-y += ip_queue.h |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 092bd50581a9..61fafc868a7b 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -245,7 +245,7 @@ ipt_get_target(struct ipt_entry *e) | |||
245 | extern void ipt_init(void) __init; | 245 | extern void ipt_init(void) __init; |
246 | 246 | ||
247 | extern struct xt_table *ipt_register_table(struct net *net, | 247 | extern struct xt_table *ipt_register_table(struct net *net, |
248 | struct xt_table *table, | 248 | const struct xt_table *table, |
249 | const struct ipt_replace *repl); | 249 | const struct ipt_replace *repl); |
250 | extern void ipt_unregister_table(struct xt_table *table); | 250 | extern void ipt_unregister_table(struct xt_table *table); |
251 | 251 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_CLASSIFY.h b/include/linux/netfilter_ipv4/ipt_CLASSIFY.h deleted file mode 100644 index a46d511b5c36..000000000000 --- a/include/linux/netfilter_ipv4/ipt_CLASSIFY.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_CLASSIFY_H | ||
2 | #define _IPT_CLASSIFY_H | ||
3 | |||
4 | #include <linux/netfilter/xt_CLASSIFY.h> | ||
5 | #define ipt_classify_target_info xt_classify_target_info | ||
6 | |||
7 | #endif /*_IPT_CLASSIFY_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_CONNMARK.h b/include/linux/netfilter_ipv4/ipt_CONNMARK.h deleted file mode 100644 index 9ecfee0a9e33..000000000000 --- a/include/linux/netfilter_ipv4/ipt_CONNMARK.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _IPT_CONNMARK_H_target | ||
2 | #define _IPT_CONNMARK_H_target | ||
3 | |||
4 | /* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com> | ||
5 | * by Henrik Nordstrom <hno@marasystems.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | #include <linux/netfilter/xt_CONNMARK.h> | ||
13 | #define IPT_CONNMARK_SET XT_CONNMARK_SET | ||
14 | #define IPT_CONNMARK_SAVE XT_CONNMARK_SAVE | ||
15 | #define IPT_CONNMARK_RESTORE XT_CONNMARK_RESTORE | ||
16 | |||
17 | #define ipt_connmark_target_info xt_connmark_target_info | ||
18 | |||
19 | #endif /*_IPT_CONNMARK_H_target*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_DSCP.h b/include/linux/netfilter_ipv4/ipt_DSCP.h deleted file mode 100644 index 3491e524d5ea..000000000000 --- a/include/linux/netfilter_ipv4/ipt_DSCP.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* iptables module for setting the IPv4 DSCP field | ||
2 | * | ||
3 | * (C) 2002 Harald Welte <laforge@gnumonks.org> | ||
4 | * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com> | ||
5 | * This software is distributed under GNU GPL v2, 1991 | ||
6 | * | ||
7 | * See RFC2474 for a description of the DSCP field within the IP Header. | ||
8 | * | ||
9 | * ipt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp | ||
10 | */ | ||
11 | #ifndef _IPT_DSCP_TARGET_H | ||
12 | #define _IPT_DSCP_TARGET_H | ||
13 | #include <linux/netfilter_ipv4/ipt_dscp.h> | ||
14 | #include <linux/netfilter/xt_DSCP.h> | ||
15 | |||
16 | #define ipt_DSCP_info xt_DSCP_info | ||
17 | |||
18 | #endif /* _IPT_DSCP_TARGET_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_ECN.h b/include/linux/netfilter_ipv4/ipt_ECN.h index 94e0d9866469..7ca45918ab8e 100644 --- a/include/linux/netfilter_ipv4/ipt_ECN.h +++ b/include/linux/netfilter_ipv4/ipt_ECN.h | |||
@@ -8,9 +8,9 @@ | |||
8 | */ | 8 | */ |
9 | #ifndef _IPT_ECN_TARGET_H | 9 | #ifndef _IPT_ECN_TARGET_H |
10 | #define _IPT_ECN_TARGET_H | 10 | #define _IPT_ECN_TARGET_H |
11 | #include <linux/netfilter_ipv4/ipt_DSCP.h> | 11 | #include <linux/netfilter/xt_DSCP.h> |
12 | 12 | ||
13 | #define IPT_ECN_IP_MASK (~IPT_DSCP_MASK) | 13 | #define IPT_ECN_IP_MASK (~XT_DSCP_MASK) |
14 | 14 | ||
15 | #define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */ | 15 | #define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */ |
16 | #define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */ | 16 | #define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */ |
diff --git a/include/linux/netfilter_ipv4/ipt_MARK.h b/include/linux/netfilter_ipv4/ipt_MARK.h deleted file mode 100644 index 697a486a96d3..000000000000 --- a/include/linux/netfilter_ipv4/ipt_MARK.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _IPT_MARK_H_target | ||
2 | #define _IPT_MARK_H_target | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | |||
6 | #include <linux/netfilter/xt_MARK.h> | ||
7 | |||
8 | /* Version 0 */ | ||
9 | #define ipt_mark_target_info xt_mark_target_info | ||
10 | |||
11 | /* Version 1 */ | ||
12 | #define IPT_MARK_SET XT_MARK_SET | ||
13 | #define IPT_MARK_AND XT_MARK_AND | ||
14 | #define IPT_MARK_OR XT_MARK_OR | ||
15 | |||
16 | #define ipt_mark_target_info_v1 xt_mark_target_info_v1 | ||
17 | |||
18 | #endif /*_IPT_MARK_H_target*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_NFQUEUE.h b/include/linux/netfilter_ipv4/ipt_NFQUEUE.h deleted file mode 100644 index 97a2a7557cb9..000000000000 --- a/include/linux/netfilter_ipv4/ipt_NFQUEUE.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* iptables module for using NFQUEUE mechanism | ||
2 | * | ||
3 | * (C) 2005 Harald Welte <laforge@netfilter.org> | ||
4 | * | ||
5 | * This software is distributed under GNU GPL v2, 1991 | ||
6 | * | ||
7 | */ | ||
8 | #ifndef _IPT_NFQ_TARGET_H | ||
9 | #define _IPT_NFQ_TARGET_H | ||
10 | |||
11 | /* Backwards compatibility for old userspace */ | ||
12 | #include <linux/netfilter/xt_NFQUEUE.h> | ||
13 | |||
14 | #define ipt_NFQ_info xt_NFQ_info | ||
15 | |||
16 | #endif /* _IPT_DSCP_TARGET_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_TCPMSS.h b/include/linux/netfilter_ipv4/ipt_TCPMSS.h deleted file mode 100644 index 7a850f945824..000000000000 --- a/include/linux/netfilter_ipv4/ipt_TCPMSS.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _IPT_TCPMSS_H | ||
2 | #define _IPT_TCPMSS_H | ||
3 | |||
4 | #include <linux/netfilter/xt_TCPMSS.h> | ||
5 | |||
6 | #define ipt_tcpmss_info xt_tcpmss_info | ||
7 | #define IPT_TCPMSS_CLAMP_PMTU XT_TCPMSS_CLAMP_PMTU | ||
8 | |||
9 | #endif /*_IPT_TCPMSS_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_TOS.h b/include/linux/netfilter_ipv4/ipt_TOS.h deleted file mode 100644 index 6bf9e1fdfd88..000000000000 --- a/include/linux/netfilter_ipv4/ipt_TOS.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _IPT_TOS_H_target | ||
2 | #define _IPT_TOS_H_target | ||
3 | |||
4 | #ifndef IPTOS_NORMALSVC | ||
5 | #define IPTOS_NORMALSVC 0 | ||
6 | #endif | ||
7 | |||
8 | struct ipt_tos_target_info { | ||
9 | u_int8_t tos; | ||
10 | }; | ||
11 | |||
12 | #endif /*_IPT_TOS_H_target*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_comment.h b/include/linux/netfilter_ipv4/ipt_comment.h deleted file mode 100644 index ae2afc2f7481..000000000000 --- a/include/linux/netfilter_ipv4/ipt_comment.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _IPT_COMMENT_H | ||
2 | #define _IPT_COMMENT_H | ||
3 | |||
4 | #include <linux/netfilter/xt_comment.h> | ||
5 | |||
6 | #define IPT_MAX_COMMENT_LEN XT_MAX_COMMENT_LEN | ||
7 | |||
8 | #define ipt_comment_info xt_comment_info | ||
9 | |||
10 | #endif /* _IPT_COMMENT_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_connbytes.h b/include/linux/netfilter_ipv4/ipt_connbytes.h deleted file mode 100644 index f63e6ee91113..000000000000 --- a/include/linux/netfilter_ipv4/ipt_connbytes.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _IPT_CONNBYTES_H | ||
2 | #define _IPT_CONNBYTES_H | ||
3 | |||
4 | #include <linux/netfilter/xt_connbytes.h> | ||
5 | #define ipt_connbytes_what xt_connbytes_what | ||
6 | |||
7 | #define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS | ||
8 | #define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES | ||
9 | #define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT | ||
10 | |||
11 | #define ipt_connbytes_direction xt_connbytes_direction | ||
12 | #define IPT_CONNBYTES_DIR_ORIGINAL XT_CONNBYTES_DIR_ORIGINAL | ||
13 | #define IPT_CONNBYTES_DIR_REPLY XT_CONNBYTES_DIR_REPLY | ||
14 | #define IPT_CONNBYTES_DIR_BOTH XT_CONNBYTES_DIR_BOTH | ||
15 | |||
16 | #define ipt_connbytes_info xt_connbytes_info | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/netfilter_ipv4/ipt_connmark.h b/include/linux/netfilter_ipv4/ipt_connmark.h deleted file mode 100644 index c7ba6560d44c..000000000000 --- a/include/linux/netfilter_ipv4/ipt_connmark.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_CONNMARK_H | ||
2 | #define _IPT_CONNMARK_H | ||
3 | |||
4 | #include <linux/netfilter/xt_connmark.h> | ||
5 | #define ipt_connmark_info xt_connmark_info | ||
6 | |||
7 | #endif /*_IPT_CONNMARK_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_conntrack.h b/include/linux/netfilter_ipv4/ipt_conntrack.h deleted file mode 100644 index cde6762949c5..000000000000 --- a/include/linux/netfilter_ipv4/ipt_conntrack.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* Header file for kernel module to match connection tracking information. | ||
2 | * GPL (C) 2001 Marc Boucher (marc@mbsi.ca). | ||
3 | */ | ||
4 | |||
5 | #ifndef _IPT_CONNTRACK_H | ||
6 | #define _IPT_CONNTRACK_H | ||
7 | |||
8 | #include <linux/netfilter/xt_conntrack.h> | ||
9 | |||
10 | #define IPT_CONNTRACK_STATE_BIT(ctinfo) XT_CONNTRACK_STATE_BIT(ctinfo) | ||
11 | #define IPT_CONNTRACK_STATE_INVALID XT_CONNTRACK_STATE_INVALID | ||
12 | |||
13 | #define IPT_CONNTRACK_STATE_SNAT XT_CONNTRACK_STATE_SNAT | ||
14 | #define IPT_CONNTRACK_STATE_DNAT XT_CONNTRACK_STATE_DNAT | ||
15 | #define IPT_CONNTRACK_STATE_UNTRACKED XT_CONNTRACK_STATE_UNTRACKED | ||
16 | |||
17 | /* flags, invflags: */ | ||
18 | #define IPT_CONNTRACK_STATE XT_CONNTRACK_STATE | ||
19 | #define IPT_CONNTRACK_PROTO XT_CONNTRACK_PROTO | ||
20 | #define IPT_CONNTRACK_ORIGSRC XT_CONNTRACK_ORIGSRC | ||
21 | #define IPT_CONNTRACK_ORIGDST XT_CONNTRACK_ORIGDST | ||
22 | #define IPT_CONNTRACK_REPLSRC XT_CONNTRACK_REPLSRC | ||
23 | #define IPT_CONNTRACK_REPLDST XT_CONNTRACK_REPLDST | ||
24 | #define IPT_CONNTRACK_STATUS XT_CONNTRACK_STATUS | ||
25 | #define IPT_CONNTRACK_EXPIRES XT_CONNTRACK_EXPIRES | ||
26 | |||
27 | #define ipt_conntrack_info xt_conntrack_info | ||
28 | #endif /*_IPT_CONNTRACK_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_dccp.h b/include/linux/netfilter_ipv4/ipt_dccp.h deleted file mode 100644 index e70d11e1f53c..000000000000 --- a/include/linux/netfilter_ipv4/ipt_dccp.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _IPT_DCCP_H_ | ||
2 | #define _IPT_DCCP_H_ | ||
3 | |||
4 | #include <linux/netfilter/xt_dccp.h> | ||
5 | #define IPT_DCCP_SRC_PORTS XT_DCCP_SRC_PORTS | ||
6 | #define IPT_DCCP_DEST_PORTS XT_DCCP_DEST_PORTS | ||
7 | #define IPT_DCCP_TYPE XT_DCCP_TYPE | ||
8 | #define IPT_DCCP_OPTION XT_DCCP_OPTION | ||
9 | |||
10 | #define IPT_DCCP_VALID_FLAGS XT_DCCP_VALID_FLAGS | ||
11 | |||
12 | #define ipt_dccp_info xt_dccp_info | ||
13 | |||
14 | #endif /* _IPT_DCCP_H_ */ | ||
15 | |||
diff --git a/include/linux/netfilter_ipv4/ipt_dscp.h b/include/linux/netfilter_ipv4/ipt_dscp.h deleted file mode 100644 index 4b82ca912b0e..000000000000 --- a/include/linux/netfilter_ipv4/ipt_dscp.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* iptables module for matching the IPv4 DSCP field | ||
2 | * | ||
3 | * (C) 2002 Harald Welte <laforge@gnumonks.org> | ||
4 | * This software is distributed under GNU GPL v2, 1991 | ||
5 | * | ||
6 | * See RFC2474 for a description of the DSCP field within the IP Header. | ||
7 | * | ||
8 | * ipt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp | ||
9 | */ | ||
10 | #ifndef _IPT_DSCP_H | ||
11 | #define _IPT_DSCP_H | ||
12 | |||
13 | #include <linux/netfilter/xt_dscp.h> | ||
14 | |||
15 | #define IPT_DSCP_MASK XT_DSCP_MASK | ||
16 | #define IPT_DSCP_SHIFT XT_DSCP_SHIFT | ||
17 | #define IPT_DSCP_MAX XT_DSCP_MAX | ||
18 | |||
19 | #define ipt_dscp_info xt_dscp_info | ||
20 | |||
21 | #endif /* _IPT_DSCP_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_ecn.h b/include/linux/netfilter_ipv4/ipt_ecn.h index 1f0d9a4d3378..9945baa4ccd7 100644 --- a/include/linux/netfilter_ipv4/ipt_ecn.h +++ b/include/linux/netfilter_ipv4/ipt_ecn.h | |||
@@ -8,9 +8,9 @@ | |||
8 | */ | 8 | */ |
9 | #ifndef _IPT_ECN_H | 9 | #ifndef _IPT_ECN_H |
10 | #define _IPT_ECN_H | 10 | #define _IPT_ECN_H |
11 | #include <linux/netfilter_ipv4/ipt_dscp.h> | 11 | #include <linux/netfilter/xt_dscp.h> |
12 | 12 | ||
13 | #define IPT_ECN_IP_MASK (~IPT_DSCP_MASK) | 13 | #define IPT_ECN_IP_MASK (~XT_DSCP_MASK) |
14 | 14 | ||
15 | #define IPT_ECN_OP_MATCH_IP 0x01 | 15 | #define IPT_ECN_OP_MATCH_IP 0x01 |
16 | #define IPT_ECN_OP_MATCH_ECE 0x10 | 16 | #define IPT_ECN_OP_MATCH_ECE 0x10 |
diff --git a/include/linux/netfilter_ipv4/ipt_esp.h b/include/linux/netfilter_ipv4/ipt_esp.h deleted file mode 100644 index 78296e7eeff9..000000000000 --- a/include/linux/netfilter_ipv4/ipt_esp.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _IPT_ESP_H | ||
2 | #define _IPT_ESP_H | ||
3 | |||
4 | #include <linux/netfilter/xt_esp.h> | ||
5 | |||
6 | #define ipt_esp xt_esp | ||
7 | #define IPT_ESP_INV_SPI XT_ESP_INV_SPI | ||
8 | #define IPT_ESP_INV_MASK XT_ESP_INV_MASK | ||
9 | |||
10 | #endif /*_IPT_ESP_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_hashlimit.h b/include/linux/netfilter_ipv4/ipt_hashlimit.h deleted file mode 100644 index 5662120a3d7b..000000000000 --- a/include/linux/netfilter_ipv4/ipt_hashlimit.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _IPT_HASHLIMIT_H | ||
2 | #define _IPT_HASHLIMIT_H | ||
3 | |||
4 | #include <linux/netfilter/xt_hashlimit.h> | ||
5 | |||
6 | #define IPT_HASHLIMIT_SCALE XT_HASHLIMIT_SCALE | ||
7 | #define IPT_HASHLIMIT_HASH_DIP XT_HASHLIMIT_HASH_DIP | ||
8 | #define IPT_HASHLIMIT_HASH_DPT XT_HASHLIMIT_HASH_DPT | ||
9 | #define IPT_HASHLIMIT_HASH_SIP XT_HASHLIMIT_HASH_SIP | ||
10 | #define IPT_HASHLIMIT_HASH_SPT XT_HASHLIMIT_HASH_SPT | ||
11 | |||
12 | #define ipt_hashlimit_info xt_hashlimit_info | ||
13 | |||
14 | #endif /* _IPT_HASHLIMIT_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_helper.h b/include/linux/netfilter_ipv4/ipt_helper.h deleted file mode 100644 index 80452c218551..000000000000 --- a/include/linux/netfilter_ipv4/ipt_helper.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_HELPER_H | ||
2 | #define _IPT_HELPER_H | ||
3 | |||
4 | #include <linux/netfilter/xt_helper.h> | ||
5 | #define ipt_helper_info xt_helper_info | ||
6 | |||
7 | #endif /* _IPT_HELPER_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_iprange.h b/include/linux/netfilter_ipv4/ipt_iprange.h deleted file mode 100644 index 5f1aebde4d2f..000000000000 --- a/include/linux/netfilter_ipv4/ipt_iprange.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef _IPT_IPRANGE_H | ||
2 | #define _IPT_IPRANGE_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/netfilter/xt_iprange.h> | ||
6 | |||
7 | struct ipt_iprange { | ||
8 | /* Inclusive: network order. */ | ||
9 | __be32 min_ip, max_ip; | ||
10 | }; | ||
11 | |||
12 | struct ipt_iprange_info | ||
13 | { | ||
14 | struct ipt_iprange src; | ||
15 | struct ipt_iprange dst; | ||
16 | |||
17 | /* Flags from above */ | ||
18 | u_int8_t flags; | ||
19 | }; | ||
20 | |||
21 | #endif /* _IPT_IPRANGE_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_length.h b/include/linux/netfilter_ipv4/ipt_length.h deleted file mode 100644 index 9b45206ffcef..000000000000 --- a/include/linux/netfilter_ipv4/ipt_length.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_LENGTH_H | ||
2 | #define _IPT_LENGTH_H | ||
3 | |||
4 | #include <linux/netfilter/xt_length.h> | ||
5 | #define ipt_length_info xt_length_info | ||
6 | |||
7 | #endif /*_IPT_LENGTH_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_limit.h b/include/linux/netfilter_ipv4/ipt_limit.h deleted file mode 100644 index 92f5cd07bbc4..000000000000 --- a/include/linux/netfilter_ipv4/ipt_limit.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _IPT_RATE_H | ||
2 | #define _IPT_RATE_H | ||
3 | |||
4 | #include <linux/netfilter/xt_limit.h> | ||
5 | #define IPT_LIMIT_SCALE XT_LIMIT_SCALE | ||
6 | #define ipt_rateinfo xt_rateinfo | ||
7 | |||
8 | #endif /*_IPT_RATE_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_mac.h b/include/linux/netfilter_ipv4/ipt_mac.h deleted file mode 100644 index b186008a3c47..000000000000 --- a/include/linux/netfilter_ipv4/ipt_mac.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_MAC_H | ||
2 | #define _IPT_MAC_H | ||
3 | |||
4 | #include <linux/netfilter/xt_mac.h> | ||
5 | #define ipt_mac_info xt_mac_info | ||
6 | |||
7 | #endif /*_IPT_MAC_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_mark.h b/include/linux/netfilter_ipv4/ipt_mark.h deleted file mode 100644 index bfde67c61224..000000000000 --- a/include/linux/netfilter_ipv4/ipt_mark.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _IPT_MARK_H | ||
2 | #define _IPT_MARK_H | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | #include <linux/netfilter/xt_mark.h> | ||
6 | |||
7 | #define ipt_mark_info xt_mark_info | ||
8 | |||
9 | #endif /*_IPT_MARK_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_multiport.h b/include/linux/netfilter_ipv4/ipt_multiport.h deleted file mode 100644 index 55fe85eca88c..000000000000 --- a/include/linux/netfilter_ipv4/ipt_multiport.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _IPT_MULTIPORT_H | ||
2 | #define _IPT_MULTIPORT_H | ||
3 | |||
4 | #include <linux/netfilter/xt_multiport.h> | ||
5 | |||
6 | #define IPT_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE | ||
7 | #define IPT_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IPT_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
9 | |||
10 | #define IPT_MULTI_PORTS XT_MULTI_PORTS | ||
11 | |||
12 | #define ipt_multiport xt_multiport | ||
13 | #define ipt_multiport_v1 xt_multiport_v1 | ||
14 | |||
15 | #endif /*_IPT_MULTIPORT_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_owner.h b/include/linux/netfilter_ipv4/ipt_owner.h deleted file mode 100644 index a78445be9992..000000000000 --- a/include/linux/netfilter_ipv4/ipt_owner.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _IPT_OWNER_H | ||
2 | #define _IPT_OWNER_H | ||
3 | |||
4 | /* match and invert flags */ | ||
5 | #define IPT_OWNER_UID 0x01 | ||
6 | #define IPT_OWNER_GID 0x02 | ||
7 | #define IPT_OWNER_PID 0x04 | ||
8 | #define IPT_OWNER_SID 0x08 | ||
9 | #define IPT_OWNER_COMM 0x10 | ||
10 | |||
11 | struct ipt_owner_info { | ||
12 | __kernel_uid32_t uid; | ||
13 | __kernel_gid32_t gid; | ||
14 | __kernel_pid_t pid; | ||
15 | __kernel_pid_t sid; | ||
16 | char comm[16]; | ||
17 | u_int8_t match, invert; /* flags */ | ||
18 | }; | ||
19 | |||
20 | #endif /*_IPT_OWNER_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_physdev.h b/include/linux/netfilter_ipv4/ipt_physdev.h deleted file mode 100644 index 2400e7140f26..000000000000 --- a/include/linux/netfilter_ipv4/ipt_physdev.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _IPT_PHYSDEV_H | ||
2 | #define _IPT_PHYSDEV_H | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | |||
6 | #include <linux/netfilter/xt_physdev.h> | ||
7 | |||
8 | #define IPT_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN | ||
9 | #define IPT_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT | ||
10 | #define IPT_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED | ||
11 | #define IPT_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN | ||
12 | #define IPT_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT | ||
13 | #define IPT_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK | ||
14 | |||
15 | #define ipt_physdev_info xt_physdev_info | ||
16 | |||
17 | #endif /*_IPT_PHYSDEV_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_pkttype.h b/include/linux/netfilter_ipv4/ipt_pkttype.h deleted file mode 100644 index ff1fbc949a0c..000000000000 --- a/include/linux/netfilter_ipv4/ipt_pkttype.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_PKTTYPE_H | ||
2 | #define _IPT_PKTTYPE_H | ||
3 | |||
4 | #include <linux/netfilter/xt_pkttype.h> | ||
5 | #define ipt_pkttype_info xt_pkttype_info | ||
6 | |||
7 | #endif /*_IPT_PKTTYPE_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h deleted file mode 100644 index 1037fb2cd206..000000000000 --- a/include/linux/netfilter_ipv4/ipt_policy.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _IPT_POLICY_H | ||
2 | #define _IPT_POLICY_H | ||
3 | |||
4 | #include <linux/netfilter/xt_policy.h> | ||
5 | |||
6 | #define IPT_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM | ||
7 | |||
8 | /* ipt_policy_flags */ | ||
9 | #define IPT_POLICY_MATCH_IN XT_POLICY_MATCH_IN | ||
10 | #define IPT_POLICY_MATCH_OUT XT_POLICY_MATCH_OUT | ||
11 | #define IPT_POLICY_MATCH_NONE XT_POLICY_MATCH_NONE | ||
12 | #define IPT_POLICY_MATCH_STRICT XT_POLICY_MATCH_STRICT | ||
13 | |||
14 | /* ipt_policy_modes */ | ||
15 | #define IPT_POLICY_MODE_TRANSPORT XT_POLICY_MODE_TRANSPORT | ||
16 | #define IPT_POLICY_MODE_TUNNEL XT_POLICY_MODE_TUNNEL | ||
17 | |||
18 | #define ipt_policy_spec xt_policy_spec | ||
19 | #define ipt_policy_addr xt_policy_addr | ||
20 | #define ipt_policy_elem xt_policy_elem | ||
21 | #define ipt_policy_info xt_policy_info | ||
22 | |||
23 | #endif /* _IPT_POLICY_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_recent.h b/include/linux/netfilter_ipv4/ipt_recent.h deleted file mode 100644 index d636cca133c2..000000000000 --- a/include/linux/netfilter_ipv4/ipt_recent.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | #ifndef _IPT_RECENT_H | ||
2 | #define _IPT_RECENT_H | ||
3 | |||
4 | #include <linux/netfilter/xt_recent.h> | ||
5 | |||
6 | #define ipt_recent_info xt_recent_mtinfo | ||
7 | |||
8 | enum { | ||
9 | IPT_RECENT_CHECK = XT_RECENT_CHECK, | ||
10 | IPT_RECENT_SET = XT_RECENT_SET, | ||
11 | IPT_RECENT_UPDATE = XT_RECENT_UPDATE, | ||
12 | IPT_RECENT_REMOVE = XT_RECENT_REMOVE, | ||
13 | IPT_RECENT_TTL = XT_RECENT_TTL, | ||
14 | |||
15 | IPT_RECENT_SOURCE = XT_RECENT_SOURCE, | ||
16 | IPT_RECENT_DEST = XT_RECENT_DEST, | ||
17 | |||
18 | IPT_RECENT_NAME_LEN = XT_RECENT_NAME_LEN, | ||
19 | }; | ||
20 | |||
21 | #endif /*_IPT_RECENT_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_sctp.h b/include/linux/netfilter_ipv4/ipt_sctp.h deleted file mode 100644 index 80b3dbacd193..000000000000 --- a/include/linux/netfilter_ipv4/ipt_sctp.h +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | #ifndef _IPT_SCTP_H_ | ||
2 | #define _IPT_SCTP_H_ | ||
3 | |||
4 | #define IPT_SCTP_SRC_PORTS 0x01 | ||
5 | #define IPT_SCTP_DEST_PORTS 0x02 | ||
6 | #define IPT_SCTP_CHUNK_TYPES 0x04 | ||
7 | |||
8 | #define IPT_SCTP_VALID_FLAGS 0x07 | ||
9 | |||
10 | |||
11 | struct ipt_sctp_flag_info { | ||
12 | u_int8_t chunktype; | ||
13 | u_int8_t flag; | ||
14 | u_int8_t flag_mask; | ||
15 | }; | ||
16 | |||
17 | #define IPT_NUM_SCTP_FLAGS 4 | ||
18 | |||
19 | struct ipt_sctp_info { | ||
20 | u_int16_t dpts[2]; /* Min, Max */ | ||
21 | u_int16_t spts[2]; /* Min, Max */ | ||
22 | |||
23 | u_int32_t chunkmap[256 / sizeof (u_int32_t)]; /* Bit mask of chunks to be matched according to RFC 2960 */ | ||
24 | |||
25 | #define SCTP_CHUNK_MATCH_ANY 0x01 /* Match if any of the chunk types are present */ | ||
26 | #define SCTP_CHUNK_MATCH_ALL 0x02 /* Match if all of the chunk types are present */ | ||
27 | #define SCTP_CHUNK_MATCH_ONLY 0x04 /* Match if these are the only chunk types present */ | ||
28 | |||
29 | u_int32_t chunk_match_type; | ||
30 | struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS]; | ||
31 | int flag_count; | ||
32 | |||
33 | u_int32_t flags; | ||
34 | u_int32_t invflags; | ||
35 | }; | ||
36 | |||
37 | #define bytes(type) (sizeof(type) * 8) | ||
38 | |||
39 | #define SCTP_CHUNKMAP_SET(chunkmap, type) \ | ||
40 | do { \ | ||
41 | chunkmap[type / bytes(u_int32_t)] |= \ | ||
42 | 1 << (type % bytes(u_int32_t)); \ | ||
43 | } while (0) | ||
44 | |||
45 | #define SCTP_CHUNKMAP_CLEAR(chunkmap, type) \ | ||
46 | do { \ | ||
47 | chunkmap[type / bytes(u_int32_t)] &= \ | ||
48 | ~(1 << (type % bytes(u_int32_t))); \ | ||
49 | } while (0) | ||
50 | |||
51 | #define SCTP_CHUNKMAP_IS_SET(chunkmap, type) \ | ||
52 | ({ \ | ||
53 | (chunkmap[type / bytes (u_int32_t)] & \ | ||
54 | (1 << (type % bytes (u_int32_t)))) ? 1: 0; \ | ||
55 | }) | ||
56 | |||
57 | #define SCTP_CHUNKMAP_RESET(chunkmap) \ | ||
58 | do { \ | ||
59 | int i; \ | ||
60 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ | ||
61 | chunkmap[i] = 0; \ | ||
62 | } while (0) | ||
63 | |||
64 | #define SCTP_CHUNKMAP_SET_ALL(chunkmap) \ | ||
65 | do { \ | ||
66 | int i; \ | ||
67 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ | ||
68 | chunkmap[i] = ~0; \ | ||
69 | } while (0) | ||
70 | |||
71 | #define SCTP_CHUNKMAP_COPY(destmap, srcmap) \ | ||
72 | do { \ | ||
73 | int i; \ | ||
74 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) \ | ||
75 | destmap[i] = srcmap[i]; \ | ||
76 | } while (0) | ||
77 | |||
78 | #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap) \ | ||
79 | ({ \ | ||
80 | int i; \ | ||
81 | int flag = 1; \ | ||
82 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \ | ||
83 | if (chunkmap[i]) { \ | ||
84 | flag = 0; \ | ||
85 | break; \ | ||
86 | } \ | ||
87 | } \ | ||
88 | flag; \ | ||
89 | }) | ||
90 | |||
91 | #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \ | ||
92 | ({ \ | ||
93 | int i; \ | ||
94 | int flag = 1; \ | ||
95 | for (i = 0; i < ARRAY_SIZE(chunkmap); i++) { \ | ||
96 | if (chunkmap[i] != ~0) { \ | ||
97 | flag = 0; \ | ||
98 | break; \ | ||
99 | } \ | ||
100 | } \ | ||
101 | flag; \ | ||
102 | }) | ||
103 | |||
104 | #endif /* _IPT_SCTP_H_ */ | ||
105 | |||
diff --git a/include/linux/netfilter_ipv4/ipt_state.h b/include/linux/netfilter_ipv4/ipt_state.h deleted file mode 100644 index a44a99cc28cc..000000000000 --- a/include/linux/netfilter_ipv4/ipt_state.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _IPT_STATE_H | ||
2 | #define _IPT_STATE_H | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | |||
6 | #include <linux/netfilter/xt_state.h> | ||
7 | |||
8 | #define IPT_STATE_BIT XT_STATE_BIT | ||
9 | #define IPT_STATE_INVALID XT_STATE_INVALID | ||
10 | |||
11 | #define IPT_STATE_UNTRACKED XT_STATE_UNTRACKED | ||
12 | |||
13 | #define ipt_state_info xt_state_info | ||
14 | |||
15 | #endif /*_IPT_STATE_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_string.h b/include/linux/netfilter_ipv4/ipt_string.h deleted file mode 100644 index c26de3059903..000000000000 --- a/include/linux/netfilter_ipv4/ipt_string.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _IPT_STRING_H | ||
2 | #define _IPT_STRING_H | ||
3 | |||
4 | #include <linux/netfilter/xt_string.h> | ||
5 | |||
6 | #define IPT_STRING_MAX_PATTERN_SIZE XT_STRING_MAX_PATTERN_SIZE | ||
7 | #define IPT_STRING_MAX_ALGO_NAME_SIZE XT_STRING_MAX_ALGO_NAME_SIZE | ||
8 | #define ipt_string_info xt_string_info | ||
9 | |||
10 | #endif /*_IPT_STRING_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_tcpmss.h b/include/linux/netfilter_ipv4/ipt_tcpmss.h deleted file mode 100644 index 18bbc8e8e009..000000000000 --- a/include/linux/netfilter_ipv4/ipt_tcpmss.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IPT_TCPMSS_MATCH_H | ||
2 | #define _IPT_TCPMSS_MATCH_H | ||
3 | |||
4 | #include <linux/netfilter/xt_tcpmss.h> | ||
5 | #define ipt_tcpmss_match_info xt_tcpmss_match_info | ||
6 | |||
7 | #endif /*_IPT_TCPMSS_MATCH_H*/ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_tos.h b/include/linux/netfilter_ipv4/ipt_tos.h deleted file mode 100644 index a21f5df23c50..000000000000 --- a/include/linux/netfilter_ipv4/ipt_tos.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _IPT_TOS_H | ||
2 | #define _IPT_TOS_H | ||
3 | |||
4 | struct ipt_tos_info { | ||
5 | u_int8_t tos; | ||
6 | u_int8_t invert; | ||
7 | }; | ||
8 | |||
9 | #ifndef IPTOS_NORMALSVC | ||
10 | #define IPTOS_NORMALSVC 0 | ||
11 | #endif | ||
12 | |||
13 | #endif /*_IPT_TOS_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild index aca4bd1f6d7c..e864eaee9e5e 100644 --- a/include/linux/netfilter_ipv6/Kbuild +++ b/include/linux/netfilter_ipv6/Kbuild | |||
@@ -1,22 +1,12 @@ | |||
1 | header-y += ip6t_HL.h | 1 | header-y += ip6t_HL.h |
2 | header-y += ip6t_LOG.h | 2 | header-y += ip6t_LOG.h |
3 | header-y += ip6t_MARK.h | ||
4 | header-y += ip6t_REJECT.h | 3 | header-y += ip6t_REJECT.h |
5 | header-y += ip6t_ah.h | 4 | header-y += ip6t_ah.h |
6 | header-y += ip6t_esp.h | ||
7 | header-y += ip6t_frag.h | 5 | header-y += ip6t_frag.h |
8 | header-y += ip6t_hl.h | ||
9 | header-y += ip6t_ipv6header.h | 6 | header-y += ip6t_ipv6header.h |
10 | header-y += ip6t_length.h | 7 | header-y += ip6t_hl.h |
11 | header-y += ip6t_limit.h | ||
12 | header-y += ip6t_mac.h | ||
13 | header-y += ip6t_mark.h | ||
14 | header-y += ip6t_mh.h | 8 | header-y += ip6t_mh.h |
15 | header-y += ip6t_multiport.h | ||
16 | header-y += ip6t_opts.h | 9 | header-y += ip6t_opts.h |
17 | header-y += ip6t_owner.h | ||
18 | header-y += ip6t_physdev.h | ||
19 | header-y += ip6t_policy.h | ||
20 | header-y += ip6t_rt.h | 10 | header-y += ip6t_rt.h |
21 | 11 | ||
22 | unifdef-y += ip6_tables.h | 12 | unifdef-y += ip6_tables.h |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index 1089e33cf633..a64e1451ac38 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
@@ -306,7 +306,7 @@ ip6t_get_target(struct ip6t_entry *e) | |||
306 | extern void ip6t_init(void) __init; | 306 | extern void ip6t_init(void) __init; |
307 | 307 | ||
308 | extern struct xt_table *ip6t_register_table(struct net *net, | 308 | extern struct xt_table *ip6t_register_table(struct net *net, |
309 | struct xt_table *table, | 309 | const struct xt_table *table, |
310 | const struct ip6t_replace *repl); | 310 | const struct ip6t_replace *repl); |
311 | extern void ip6t_unregister_table(struct xt_table *table); | 311 | extern void ip6t_unregister_table(struct xt_table *table); |
312 | extern unsigned int ip6t_do_table(struct sk_buff *skb, | 312 | extern unsigned int ip6t_do_table(struct sk_buff *skb, |
diff --git a/include/linux/netfilter_ipv6/ip6t_MARK.h b/include/linux/netfilter_ipv6/ip6t_MARK.h deleted file mode 100644 index 7cf629a8ab92..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_MARK.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _IP6T_MARK_H_target | ||
2 | #define _IP6T_MARK_H_target | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | #include <linux/netfilter/xt_MARK.h> | ||
6 | |||
7 | #define ip6t_mark_target_info xt_mark_target_info | ||
8 | |||
9 | #endif /*_IP6T_MARK_H_target*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_esp.h b/include/linux/netfilter_ipv6/ip6t_esp.h deleted file mode 100644 index f62eaf53c16c..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_esp.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _IP6T_ESP_H | ||
2 | #define _IP6T_ESP_H | ||
3 | |||
4 | #include <linux/netfilter/xt_esp.h> | ||
5 | |||
6 | #define ip6t_esp xt_esp | ||
7 | #define IP6T_ESP_INV_SPI XT_ESP_INV_SPI | ||
8 | #define IP6T_ESP_INV_MASK XT_ESP_INV_MASK | ||
9 | |||
10 | #endif /*_IP6T_ESP_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_length.h b/include/linux/netfilter_ipv6/ip6t_length.h deleted file mode 100644 index 9e9689d03ed7..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_length.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _IP6T_LENGTH_H | ||
2 | #define _IP6T_LENGTH_H | ||
3 | |||
4 | #include <linux/netfilter/xt_length.h> | ||
5 | #define ip6t_length_info xt_length_info | ||
6 | |||
7 | #endif /*_IP6T_LENGTH_H*/ | ||
8 | |||
diff --git a/include/linux/netfilter_ipv6/ip6t_limit.h b/include/linux/netfilter_ipv6/ip6t_limit.h deleted file mode 100644 index 487e5ea342c6..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_limit.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _IP6T_RATE_H | ||
2 | #define _IP6T_RATE_H | ||
3 | |||
4 | #include <linux/netfilter/xt_limit.h> | ||
5 | #define IP6T_LIMIT_SCALE XT_LIMIT_SCALE | ||
6 | #define ip6t_rateinfo xt_rateinfo | ||
7 | |||
8 | #endif /*_IP6T_RATE_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_mac.h b/include/linux/netfilter_ipv6/ip6t_mac.h deleted file mode 100644 index ac58e83e9423..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_mac.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _IP6T_MAC_H | ||
2 | #define _IP6T_MAC_H | ||
3 | |||
4 | #include <linux/netfilter/xt_mac.h> | ||
5 | #define ip6t_mac_info xt_mac_info | ||
6 | |||
7 | #endif /*_IP6T_MAC_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_mark.h b/include/linux/netfilter_ipv6/ip6t_mark.h deleted file mode 100644 index ff204951ddc3..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_mark.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _IP6T_MARK_H | ||
2 | #define _IP6T_MARK_H | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | #include <linux/netfilter/xt_mark.h> | ||
6 | |||
7 | #define ip6t_mark_info xt_mark_info | ||
8 | |||
9 | #endif /*_IPT_MARK_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_multiport.h b/include/linux/netfilter_ipv6/ip6t_multiport.h deleted file mode 100644 index 042c92661cee..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_multiport.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef _IP6T_MULTIPORT_H | ||
2 | #define _IP6T_MULTIPORT_H | ||
3 | |||
4 | #include <linux/netfilter/xt_multiport.h> | ||
5 | |||
6 | #define IP6T_MULTIPORT_SOURCE XT_MULTIPORT_SOURCE | ||
7 | #define IP6T_MULTIPORT_DESTINATION XT_MULTIPORT_DESTINATION | ||
8 | #define IP6T_MULTIPORT_EITHER XT_MULTIPORT_EITHER | ||
9 | |||
10 | #define IP6T_MULTI_PORTS XT_MULTI_PORTS | ||
11 | |||
12 | #define ip6t_multiport xt_multiport | ||
13 | |||
14 | #endif /*_IP6T_MULTIPORT_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_owner.h b/include/linux/netfilter_ipv6/ip6t_owner.h deleted file mode 100644 index ec5cc7a38c42..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_owner.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | #ifndef _IP6T_OWNER_H | ||
2 | #define _IP6T_OWNER_H | ||
3 | |||
4 | /* match and invert flags */ | ||
5 | #define IP6T_OWNER_UID 0x01 | ||
6 | #define IP6T_OWNER_GID 0x02 | ||
7 | #define IP6T_OWNER_PID 0x04 | ||
8 | #define IP6T_OWNER_SID 0x08 | ||
9 | |||
10 | struct ip6t_owner_info { | ||
11 | __kernel_uid32_t uid; | ||
12 | __kernel_gid32_t gid; | ||
13 | __kernel_pid_t pid; | ||
14 | __kernel_pid_t sid; | ||
15 | u_int8_t match, invert; /* flags */ | ||
16 | }; | ||
17 | |||
18 | #endif /*_IPT_OWNER_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_physdev.h b/include/linux/netfilter_ipv6/ip6t_physdev.h deleted file mode 100644 index c161c0a81b55..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_physdev.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _IP6T_PHYSDEV_H | ||
2 | #define _IP6T_PHYSDEV_H | ||
3 | |||
4 | /* Backwards compatibility for old userspace */ | ||
5 | |||
6 | #include <linux/netfilter/xt_physdev.h> | ||
7 | |||
8 | #define IP6T_PHYSDEV_OP_IN XT_PHYSDEV_OP_IN | ||
9 | #define IP6T_PHYSDEV_OP_OUT XT_PHYSDEV_OP_OUT | ||
10 | #define IP6T_PHYSDEV_OP_BRIDGED XT_PHYSDEV_OP_BRIDGED | ||
11 | #define IP6T_PHYSDEV_OP_ISIN XT_PHYSDEV_OP_ISIN | ||
12 | #define IP6T_PHYSDEV_OP_ISOUT XT_PHYSDEV_OP_ISOUT | ||
13 | #define IP6T_PHYSDEV_OP_MASK XT_PHYSDEV_OP_MASK | ||
14 | |||
15 | #define ip6t_physdev_info xt_physdev_info | ||
16 | |||
17 | #endif /*_IP6T_PHYSDEV_H*/ | ||
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h deleted file mode 100644 index b1c449d7ec89..000000000000 --- a/include/linux/netfilter_ipv6/ip6t_policy.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #ifndef _IP6T_POLICY_H | ||
2 | #define _IP6T_POLICY_H | ||
3 | |||
4 | #include <linux/netfilter/xt_policy.h> | ||
5 | |||
6 | #define IP6T_POLICY_MAX_ELEM XT_POLICY_MAX_ELEM | ||
7 | |||
8 | /* ip6t_policy_flags */ | ||
9 | #define IP6T_POLICY_MATCH_IN XT_POLICY_MATCH_IN | ||
10 | #define IP6T_POLICY_MATCH_OUT XT_POLICY_MATCH_OUT | ||
11 | #define IP6T_POLICY_MATCH_NONE XT_POLICY_MATCH_NONE | ||
12 | #define IP6T_POLICY_MATCH_STRICT XT_POLICY_MATCH_STRICT | ||
13 | |||
14 | /* ip6t_policy_modes */ | ||
15 | #define IP6T_POLICY_MODE_TRANSPORT XT_POLICY_MODE_TRANSPORT | ||
16 | #define IP6T_POLICY_MODE_TUNNEL XT_POLICY_MODE_TUNNEL | ||
17 | |||
18 | #define ip6t_policy_spec xt_policy_spec | ||
19 | #define ip6t_policy_addr xt_policy_addr | ||
20 | #define ip6t_policy_elem xt_policy_elem | ||
21 | #define ip6t_policy_info xt_policy_info | ||
22 | |||
23 | #endif /* _IP6T_POLICY_H */ | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 5ba398e90304..0fbecbbe8e9e 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -217,12 +217,13 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | |||
217 | 217 | ||
218 | struct netlink_callback | 218 | struct netlink_callback |
219 | { | 219 | { |
220 | struct sk_buff *skb; | 220 | struct sk_buff *skb; |
221 | struct nlmsghdr *nlh; | 221 | const struct nlmsghdr *nlh; |
222 | int (*dump)(struct sk_buff * skb, struct netlink_callback *cb); | 222 | int (*dump)(struct sk_buff * skb, |
223 | int (*done)(struct netlink_callback *cb); | 223 | struct netlink_callback *cb); |
224 | int family; | 224 | int (*done)(struct netlink_callback *cb); |
225 | long args[6]; | 225 | int family; |
226 | long args[6]; | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | struct netlink_notify | 229 | struct netlink_notify |
@@ -258,7 +259,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) | |||
258 | NLMSG_NEW(skb, pid, seq, type, len, 0) | 259 | NLMSG_NEW(skb, pid, seq, type, len, 0) |
259 | 260 | ||
260 | extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, | 261 | extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, |
261 | struct nlmsghdr *nlh, | 262 | const struct nlmsghdr *nlh, |
262 | int (*dump)(struct sk_buff *skb, struct netlink_callback*), | 263 | int (*dump)(struct sk_buff *skb, struct netlink_callback*), |
263 | int (*done)(struct netlink_callback*)); | 264 | int (*done)(struct netlink_callback*)); |
264 | 265 | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index dbea93b694e5..a8d71ed43a0e 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -242,6 +242,29 @@ | |||
242 | * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is | 242 | * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is |
243 | * determined by the network interface. | 243 | * determined by the network interface. |
244 | * | 244 | * |
245 | * @NL80211_CMD_TESTMODE: testmode command, takes a wiphy (or ifindex) attribute | ||
246 | * to identify the device, and the TESTDATA blob attribute to pass through | ||
247 | * to the driver. | ||
248 | * | ||
249 | * @NL80211_CMD_CONNECT: connection request and notification; this command | ||
250 | * requests to connect to a specified network but without separating | ||
251 | * auth and assoc steps. For this, you need to specify the SSID in a | ||
252 | * %NL80211_ATTR_SSID attribute, and can optionally specify the association | ||
253 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC, | ||
254 | * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT. | ||
255 | * It is also sent as an event, with the BSSID and response IEs when the | ||
256 | * connection is established or failed to be established. This can be | ||
257 | * determined by the STATUS_CODE attribute. | ||
258 | * @NL80211_CMD_ROAM: request that the card roam (currently not implemented), | ||
259 | * sent as an event when the card/driver roamed by itself. | ||
260 | * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify | ||
261 | * userspace that a connection was dropped by the AP or due to other | ||
262 | * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and | ||
263 | * %NL80211_ATTR_REASON_CODE attributes are used. | ||
264 | * | ||
265 | * @NL80211_CMD_SET_WIPHY_NETNS: Set a wiphy's netns. Note that all devices | ||
266 | * associated with this wiphy must be down and will follow. | ||
267 | * | ||
245 | * @NL80211_CMD_MAX: highest used command number | 268 | * @NL80211_CMD_MAX: highest used command number |
246 | * @__NL80211_CMD_AFTER_LAST: internal use | 269 | * @__NL80211_CMD_AFTER_LAST: internal use |
247 | */ | 270 | */ |
@@ -310,6 +333,14 @@ enum nl80211_commands { | |||
310 | NL80211_CMD_JOIN_IBSS, | 333 | NL80211_CMD_JOIN_IBSS, |
311 | NL80211_CMD_LEAVE_IBSS, | 334 | NL80211_CMD_LEAVE_IBSS, |
312 | 335 | ||
336 | NL80211_CMD_TESTMODE, | ||
337 | |||
338 | NL80211_CMD_CONNECT, | ||
339 | NL80211_CMD_ROAM, | ||
340 | NL80211_CMD_DISCONNECT, | ||
341 | |||
342 | NL80211_CMD_SET_WIPHY_NETNS, | ||
343 | |||
313 | /* add new commands above here */ | 344 | /* add new commands above here */ |
314 | 345 | ||
315 | /* used to define NL80211_CMD_MAX below */ | 346 | /* used to define NL80211_CMD_MAX below */ |
@@ -449,10 +480,6 @@ enum nl80211_commands { | |||
449 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | 480 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) |
450 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | 481 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive |
451 | * scanning and include a zero-length SSID (wildcard) for wildcard scan | 482 | * scanning and include a zero-length SSID (wildcard) for wildcard scan |
452 | * @NL80211_ATTR_SCAN_GENERATION: the scan generation increases whenever the | ||
453 | * scan result list changes (BSS expired or added) so that applications | ||
454 | * can verify that they got a single, consistent snapshot (when all dump | ||
455 | * messages carried the same generation number) | ||
456 | * @NL80211_ATTR_BSS: scan result BSS | 483 | * @NL80211_ATTR_BSS: scan result BSS |
457 | * | 484 | * |
458 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain | 485 | * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain |
@@ -511,6 +538,52 @@ enum nl80211_commands { | |||
511 | * authorized by user space. Otherwise, port is marked authorized by | 538 | * authorized by user space. Otherwise, port is marked authorized by |
512 | * default in station mode. | 539 | * default in station mode. |
513 | * | 540 | * |
541 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | ||
542 | * We recommend using nested, driver-specific attributes within this. | ||
543 | * | ||
544 | * @NL80211_ATTR_DISCONNECTED_BY_AP: A flag indicating that the DISCONNECT | ||
545 | * event was due to the AP disconnecting the station, and not due to | ||
546 | * a local disconnect request. | ||
547 | * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT | ||
548 | * event (u16) | ||
549 | * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating | ||
550 | * that protected APs should be used. | ||
551 | * | ||
552 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to | ||
553 | * indicate which unicast key ciphers will be used with the connection | ||
554 | * (an array of u32). | ||
555 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate | ||
556 | * which group key cipher will be used with the connection (a u32). | ||
557 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate | ||
558 | * which WPA version(s) the AP we want to associate with is using | ||
559 | * (a u32 with flags from &enum nl80211_wpa_versions). | ||
560 | * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate | ||
561 | * which key management algorithm(s) to use (an array of u32). | ||
562 | * | ||
563 | * @NL80211_ATTR_REQ_IE: (Re)association request information elements as | ||
564 | * sent out by the card, for ROAM and successful CONNECT events. | ||
565 | * @NL80211_ATTR_RESP_IE: (Re)association response information elements as | ||
566 | * sent by peer, for ROAM and successful CONNECT events. | ||
567 | * | ||
568 | * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE | ||
569 | * commands to specify using a reassociate frame | ||
570 | * | ||
571 | * @NL80211_ATTR_KEY: key information in a nested attribute with | ||
572 | * %NL80211_KEY_* sub-attributes | ||
573 | * @NL80211_ATTR_KEYS: array of keys for static WEP keys for connect() | ||
574 | * and join_ibss(), key information is in a nested attribute each | ||
575 | * with %NL80211_KEY_* sub-attributes | ||
576 | * | ||
577 | * @NL80211_ATTR_PID: Process ID of a network namespace. | ||
578 | * | ||
579 | * @NL80211_ATTR_GENERATION: Used to indicate consistent snapshots for | ||
580 | * dumps. This number increases whenever the object list being | ||
581 | * dumped changes, and as such userspace can verify that it has | ||
582 | * obtained a complete and consistent snapshot by verifying that | ||
583 | * all dump messages contain the same generation number. If it | ||
584 | * changed then the list changed and the dump should be repeated | ||
585 | * completely from scratch. | ||
586 | * | ||
514 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 587 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
515 | * @__NL80211_ATTR_AFTER_LAST: internal use | 588 | * @__NL80211_ATTR_AFTER_LAST: internal use |
516 | */ | 589 | */ |
@@ -582,7 +655,7 @@ enum nl80211_attrs { | |||
582 | 655 | ||
583 | NL80211_ATTR_SCAN_FREQUENCIES, | 656 | NL80211_ATTR_SCAN_FREQUENCIES, |
584 | NL80211_ATTR_SCAN_SSIDS, | 657 | NL80211_ATTR_SCAN_SSIDS, |
585 | NL80211_ATTR_SCAN_GENERATION, | 658 | NL80211_ATTR_GENERATION, /* replaces old SCAN_GENERATION */ |
586 | NL80211_ATTR_BSS, | 659 | NL80211_ATTR_BSS, |
587 | 660 | ||
588 | NL80211_ATTR_REG_INITIATOR, | 661 | NL80211_ATTR_REG_INITIATOR, |
@@ -619,16 +692,42 @@ enum nl80211_attrs { | |||
619 | 692 | ||
620 | NL80211_ATTR_CONTROL_PORT, | 693 | NL80211_ATTR_CONTROL_PORT, |
621 | 694 | ||
695 | NL80211_ATTR_TESTDATA, | ||
696 | |||
697 | NL80211_ATTR_PRIVACY, | ||
698 | |||
699 | NL80211_ATTR_DISCONNECTED_BY_AP, | ||
700 | NL80211_ATTR_STATUS_CODE, | ||
701 | |||
702 | NL80211_ATTR_CIPHER_SUITES_PAIRWISE, | ||
703 | NL80211_ATTR_CIPHER_SUITE_GROUP, | ||
704 | NL80211_ATTR_WPA_VERSIONS, | ||
705 | NL80211_ATTR_AKM_SUITES, | ||
706 | |||
707 | NL80211_ATTR_REQ_IE, | ||
708 | NL80211_ATTR_RESP_IE, | ||
709 | |||
710 | NL80211_ATTR_PREV_BSSID, | ||
711 | |||
712 | NL80211_ATTR_KEY, | ||
713 | NL80211_ATTR_KEYS, | ||
714 | |||
715 | NL80211_ATTR_PID, | ||
716 | |||
622 | /* add attributes here, update the policy in nl80211.c */ | 717 | /* add attributes here, update the policy in nl80211.c */ |
623 | 718 | ||
624 | __NL80211_ATTR_AFTER_LAST, | 719 | __NL80211_ATTR_AFTER_LAST, |
625 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 | 720 | NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 |
626 | }; | 721 | }; |
627 | 722 | ||
723 | /* source-level API compatibility */ | ||
724 | #define NL80211_ATTR_SCAN_GENERATION NL80211_ATTR_GENERATION | ||
725 | |||
628 | /* | 726 | /* |
629 | * Allow user space programs to use #ifdef on new attributes by defining them | 727 | * Allow user space programs to use #ifdef on new attributes by defining them |
630 | * here | 728 | * here |
631 | */ | 729 | */ |
730 | #define NL80211_CMD_CONNECT NL80211_CMD_CONNECT | ||
632 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY | 731 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY |
633 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 732 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
634 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 733 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
@@ -642,6 +741,12 @@ enum nl80211_attrs { | |||
642 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | 741 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID |
643 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | 742 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE |
644 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | 743 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE |
744 | #define NL80211_ATTR_CIPHER_SUITES_PAIRWISE NL80211_ATTR_CIPHER_SUITES_PAIRWISE | ||
745 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP | ||
746 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS | ||
747 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES | ||
748 | #define NL80211_ATTR_KEY NL80211_ATTR_KEY | ||
749 | #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS | ||
645 | 750 | ||
646 | #define NL80211_MAX_SUPP_RATES 32 | 751 | #define NL80211_MAX_SUPP_RATES 32 |
647 | #define NL80211_MAX_SUPP_REG_RULES 32 | 752 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -650,6 +755,9 @@ enum nl80211_attrs { | |||
650 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 755 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
651 | #define NL80211_HT_CAPABILITY_LEN 26 | 756 | #define NL80211_HT_CAPABILITY_LEN 26 |
652 | 757 | ||
758 | #define NL80211_MAX_NR_CIPHER_SUITES 5 | ||
759 | #define NL80211_MAX_NR_AKM_SUITES 2 | ||
760 | |||
653 | /** | 761 | /** |
654 | * enum nl80211_iftype - (virtual) interface types | 762 | * enum nl80211_iftype - (virtual) interface types |
655 | * | 763 | * |
@@ -1168,6 +1276,7 @@ enum nl80211_channel_type { | |||
1168 | * in mBm (100 * dBm) (s32) | 1276 | * in mBm (100 * dBm) (s32) |
1169 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1277 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1170 | * in unspecified units, scaled to 0..100 (u8) | 1278 | * in unspecified units, scaled to 0..100 (u8) |
1279 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | ||
1171 | * @__NL80211_BSS_AFTER_LAST: internal | 1280 | * @__NL80211_BSS_AFTER_LAST: internal |
1172 | * @NL80211_BSS_MAX: highest BSS attribute | 1281 | * @NL80211_BSS_MAX: highest BSS attribute |
1173 | */ | 1282 | */ |
@@ -1181,6 +1290,7 @@ enum nl80211_bss { | |||
1181 | NL80211_BSS_INFORMATION_ELEMENTS, | 1290 | NL80211_BSS_INFORMATION_ELEMENTS, |
1182 | NL80211_BSS_SIGNAL_MBM, | 1291 | NL80211_BSS_SIGNAL_MBM, |
1183 | NL80211_BSS_SIGNAL_UNSPEC, | 1292 | NL80211_BSS_SIGNAL_UNSPEC, |
1293 | NL80211_BSS_STATUS, | ||
1184 | 1294 | ||
1185 | /* keep last */ | 1295 | /* keep last */ |
1186 | __NL80211_BSS_AFTER_LAST, | 1296 | __NL80211_BSS_AFTER_LAST, |
@@ -1188,18 +1298,37 @@ enum nl80211_bss { | |||
1188 | }; | 1298 | }; |
1189 | 1299 | ||
1190 | /** | 1300 | /** |
1301 | * enum nl80211_bss_status - BSS "status" | ||
1302 | */ | ||
1303 | enum nl80211_bss_status { | ||
1304 | NL80211_BSS_STATUS_AUTHENTICATED, | ||
1305 | NL80211_BSS_STATUS_ASSOCIATED, | ||
1306 | NL80211_BSS_STATUS_IBSS_JOINED, | ||
1307 | }; | ||
1308 | |||
1309 | /** | ||
1191 | * enum nl80211_auth_type - AuthenticationType | 1310 | * enum nl80211_auth_type - AuthenticationType |
1192 | * | 1311 | * |
1193 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | 1312 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication |
1194 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | 1313 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) |
1195 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | 1314 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) |
1196 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | 1315 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) |
1316 | * @__NL80211_AUTHTYPE_NUM: internal | ||
1317 | * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm | ||
1318 | * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by | ||
1319 | * trying multiple times); this is invalid in netlink -- leave out | ||
1320 | * the attribute for this on CONNECT commands. | ||
1197 | */ | 1321 | */ |
1198 | enum nl80211_auth_type { | 1322 | enum nl80211_auth_type { |
1199 | NL80211_AUTHTYPE_OPEN_SYSTEM, | 1323 | NL80211_AUTHTYPE_OPEN_SYSTEM, |
1200 | NL80211_AUTHTYPE_SHARED_KEY, | 1324 | NL80211_AUTHTYPE_SHARED_KEY, |
1201 | NL80211_AUTHTYPE_FT, | 1325 | NL80211_AUTHTYPE_FT, |
1202 | NL80211_AUTHTYPE_NETWORK_EAP, | 1326 | NL80211_AUTHTYPE_NETWORK_EAP, |
1327 | |||
1328 | /* keep last */ | ||
1329 | __NL80211_AUTHTYPE_NUM, | ||
1330 | NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1, | ||
1331 | NL80211_AUTHTYPE_AUTOMATIC | ||
1203 | }; | 1332 | }; |
1204 | 1333 | ||
1205 | /** | 1334 | /** |
@@ -1224,4 +1353,39 @@ enum nl80211_mfp { | |||
1224 | NL80211_MFP_REQUIRED, | 1353 | NL80211_MFP_REQUIRED, |
1225 | }; | 1354 | }; |
1226 | 1355 | ||
1356 | enum nl80211_wpa_versions { | ||
1357 | NL80211_WPA_VERSION_1 = 1 << 0, | ||
1358 | NL80211_WPA_VERSION_2 = 1 << 1, | ||
1359 | }; | ||
1360 | |||
1361 | /** | ||
1362 | * enum nl80211_key_attributes - key attributes | ||
1363 | * @__NL80211_KEY_INVALID: invalid | ||
1364 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
1365 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
1366 | * keys | ||
1367 | * @NL80211_KEY_IDX: key ID (u8, 0-3) | ||
1368 | * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
1369 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
1370 | * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
1371 | * CCMP keys, each six bytes in little endian | ||
1372 | * @NL80211_KEY_DEFAULT: flag indicating default key | ||
1373 | * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key | ||
1374 | * @__NL80211_KEY_AFTER_LAST: internal | ||
1375 | * @NL80211_KEY_MAX: highest key attribute | ||
1376 | */ | ||
1377 | enum nl80211_key_attributes { | ||
1378 | __NL80211_KEY_INVALID, | ||
1379 | NL80211_KEY_DATA, | ||
1380 | NL80211_KEY_IDX, | ||
1381 | NL80211_KEY_CIPHER, | ||
1382 | NL80211_KEY_SEQ, | ||
1383 | NL80211_KEY_DEFAULT, | ||
1384 | NL80211_KEY_DEFAULT_MGMT, | ||
1385 | |||
1386 | /* keep last */ | ||
1387 | __NL80211_KEY_AFTER_LAST, | ||
1388 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | ||
1389 | }; | ||
1390 | |||
1227 | #endif /* __LINUX_NL80211_H */ | 1391 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h index 2cda00ccfcca..b7d9435d5a9f 100644 --- a/include/linux/nl802154.h +++ b/include/linux/nl802154.h | |||
@@ -64,12 +64,14 @@ enum { | |||
64 | IEEE802154_ATTR_COORD_REALIGN, | 64 | IEEE802154_ATTR_COORD_REALIGN, |
65 | IEEE802154_ATTR_SEC, | 65 | IEEE802154_ATTR_SEC, |
66 | 66 | ||
67 | IEEE802154_ATTR_PAGE, | ||
68 | |||
67 | __IEEE802154_ATTR_MAX, | 69 | __IEEE802154_ATTR_MAX, |
68 | }; | 70 | }; |
69 | 71 | ||
70 | #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1) | 72 | #define IEEE802154_ATTR_MAX (__IEEE802154_ATTR_MAX - 1) |
71 | 73 | ||
72 | extern struct nla_policy ieee802154_policy[]; | 74 | extern const struct nla_policy ieee802154_policy[]; |
73 | 75 | ||
74 | /* commands */ | 76 | /* commands */ |
75 | /* REQ should be responded with CONF | 77 | /* REQ should be responded with CONF |
@@ -111,6 +113,8 @@ enum { | |||
111 | IEEE802154_RX_ENABLE_REQ, /* Not supported yet */ | 113 | IEEE802154_RX_ENABLE_REQ, /* Not supported yet */ |
112 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ | 114 | IEEE802154_RX_ENABLE_CONF, /* Not supported yet */ |
113 | 115 | ||
116 | IEEE802154_LIST_IFACE, | ||
117 | |||
114 | __IEEE802154_CMD_MAX, | 118 | __IEEE802154_CMD_MAX, |
115 | }; | 119 | }; |
116 | 120 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c8fdcadce437..555a8262fbc2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1988,6 +1988,8 @@ | |||
1988 | 1988 | ||
1989 | #define PCI_VENDOR_ID_SAMSUNG 0x144d | 1989 | #define PCI_VENDOR_ID_SAMSUNG 0x144d |
1990 | 1990 | ||
1991 | #define PCI_VENDOR_ID_GIGABYTE 0x1458 | ||
1992 | |||
1991 | #define PCI_VENDOR_ID_AMBIT 0x1468 | 1993 | #define PCI_VENDOR_ID_AMBIT 0x1468 |
1992 | 1994 | ||
1993 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 | 1995 | #define PCI_VENDOR_ID_MYRICOM 0x14c1 |
@@ -2066,7 +2068,6 @@ | |||
2066 | #define PCI_DEVICE_ID_TIGON3_5787M 0x1693 | 2068 | #define PCI_DEVICE_ID_TIGON3_5787M 0x1693 |
2067 | #define PCI_DEVICE_ID_TIGON3_5782 0x1696 | 2069 | #define PCI_DEVICE_ID_TIGON3_5782 0x1696 |
2068 | #define PCI_DEVICE_ID_TIGON3_5784 0x1698 | 2070 | #define PCI_DEVICE_ID_TIGON3_5784 0x1698 |
2069 | #define PCI_DEVICE_ID_TIGON3_5785 0x1699 | ||
2070 | #define PCI_DEVICE_ID_TIGON3_5786 0x169a | 2071 | #define PCI_DEVICE_ID_TIGON3_5786 0x169a |
2071 | #define PCI_DEVICE_ID_TIGON3_5787 0x169b | 2072 | #define PCI_DEVICE_ID_TIGON3_5787 0x169b |
2072 | #define PCI_DEVICE_ID_TIGON3_5788 0x169c | 2073 | #define PCI_DEVICE_ID_TIGON3_5788 0x169c |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index ee5e3c9e2bca..1ef5a0781831 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
@@ -99,6 +99,9 @@ struct sockaddr_pn { | |||
99 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; | 99 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; |
100 | } __attribute__ ((packed)); | 100 | } __attribute__ ((packed)); |
101 | 101 | ||
102 | /* Well known address */ | ||
103 | #define PN_DEV_PC 0x10 | ||
104 | |||
102 | static inline __u16 pn_object(__u8 addr, __u16 port) | 105 | static inline __u16 pn_object(__u8 addr, __u16 port) |
103 | { | 106 | { |
104 | return (addr << 8) | (port & 0x3ff); | 107 | return (addr << 8) | (port & 0x3ff); |
@@ -170,4 +173,21 @@ static inline __u8 pn_sockaddr_get_resource(const struct sockaddr_pn *spn) | |||
170 | return spn->spn_resource; | 173 | return spn->spn_resource; |
171 | } | 174 | } |
172 | 175 | ||
176 | /* Phonet device ioctl requests */ | ||
177 | #ifdef __KERNEL__ | ||
178 | #define SIOCPNGAUTOCONF (SIOCDEVPRIVATE + 0) | ||
179 | |||
180 | struct if_phonet_autoconf { | ||
181 | uint8_t device; | ||
182 | }; | ||
183 | |||
184 | struct if_phonet_req { | ||
185 | char ifr_phonet_name[16]; | ||
186 | union { | ||
187 | struct if_phonet_autoconf ifru_phonet_autoconf; | ||
188 | } ifr_ifru; | ||
189 | }; | ||
190 | #define ifr_phonet_autoconf ifr_ifru.ifru_phonet_autoconf | ||
191 | #endif /* __KERNEL__ */ | ||
192 | |||
173 | #endif | 193 | #endif |
diff --git a/include/linux/rds.h b/include/linux/rds.h index d91dc91f5443..89d46e1afbb1 100644 --- a/include/linux/rds.h +++ b/include/linux/rds.h | |||
@@ -147,6 +147,18 @@ struct rds_info_socket { | |||
147 | u_int64_t inum; | 147 | u_int64_t inum; |
148 | } __attribute__((packed)); | 148 | } __attribute__((packed)); |
149 | 149 | ||
150 | struct rds_info_tcp_socket { | ||
151 | __be32 local_addr; | ||
152 | __be16 local_port; | ||
153 | __be32 peer_addr; | ||
154 | __be16 peer_port; | ||
155 | u_int64_t hdr_rem; | ||
156 | u_int64_t data_rem; | ||
157 | u_int32_t last_sent_nxt; | ||
158 | u_int32_t last_expected_una; | ||
159 | u_int32_t last_seen_una; | ||
160 | } __attribute__((packed)); | ||
161 | |||
150 | #define RDS_IB_GID_LEN 16 | 162 | #define RDS_IB_GID_LEN 16 |
151 | struct rds_info_rdma_connection { | 163 | struct rds_info_rdma_connection { |
152 | __be32 src_addr; | 164 | __be32 src_addr; |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 278777fa8a3a..3392c59d2706 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -6,20 +6,17 @@ | |||
6 | * Copyright (C) 2007 Dmitry Torokhov | 6 | * Copyright (C) 2007 Dmitry Torokhov |
7 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> | 7 | * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * Permission to use, copy, modify, and/or distribute this software for any |
10 | * it under the terms of the GNU General Public License as published by | 10 | * purpose with or without fee is hereby granted, provided that the above |
11 | * the Free Software Foundation; either version 2 of the License, or | 11 | * copyright notice and this permission notice appear in all copies. |
12 | * (at your option) any later version. | ||
13 | * | 12 | * |
14 | * This program is distributed in the hope that it will be useful, | 13 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
17 | * GNU General Public License for more details. | 16 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
18 | * | 17 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
19 | * You should have received a copy of the GNU General Public License | 18 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
20 | * along with this program; if not, write to the | 19 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
21 | * Free Software Foundation, Inc., | ||
22 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
23 | */ | 20 | */ |
24 | 21 | ||
25 | #include <linux/types.h> | 22 | #include <linux/types.h> |
@@ -47,6 +44,7 @@ enum rfkill_type { | |||
47 | RFKILL_TYPE_UWB, | 44 | RFKILL_TYPE_UWB, |
48 | RFKILL_TYPE_WIMAX, | 45 | RFKILL_TYPE_WIMAX, |
49 | RFKILL_TYPE_WWAN, | 46 | RFKILL_TYPE_WWAN, |
47 | RFKILL_TYPE_GPS, | ||
50 | NUM_RFKILL_TYPES, | 48 | NUM_RFKILL_TYPES, |
51 | }; | 49 | }; |
52 | 50 | ||
@@ -82,6 +80,20 @@ struct rfkill_event { | |||
82 | __u8 soft, hard; | 80 | __u8 soft, hard; |
83 | } __packed; | 81 | } __packed; |
84 | 82 | ||
83 | /* | ||
84 | * We are planning to be backward and forward compatible with changes | ||
85 | * to the event struct, by adding new, optional, members at the end. | ||
86 | * When reading an event (whether the kernel from userspace or vice | ||
87 | * versa) we need to accept anything that's at least as large as the | ||
88 | * version 1 event size, but might be able to accept other sizes in | ||
89 | * the future. | ||
90 | * | ||
91 | * One exception is the kernel -- we already have two event sizes in | ||
92 | * that we've made the 'hard' member optional since our only option | ||
93 | * is to ignore it anyway. | ||
94 | */ | ||
95 | #define RFKILL_EVENT_SIZE_V1 8 | ||
96 | |||
85 | /* ioctl for turning off rfkill-input (if present) */ | 97 | /* ioctl for turning off rfkill-input (if present) */ |
86 | #define RFKILL_IOC_MAGIC 'R' | 98 | #define RFKILL_IOC_MAGIC 'R' |
87 | #define RFKILL_IOC_NOINPUT 1 | 99 | #define RFKILL_IOC_NOINPUT 1 |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index ba3254ecf7fb..adf2068d12b5 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -104,7 +104,7 @@ enum { | |||
104 | RTM_NEWADDRLABEL = 72, | 104 | RTM_NEWADDRLABEL = 72, |
105 | #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL | 105 | #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL |
106 | RTM_DELADDRLABEL, | 106 | RTM_DELADDRLABEL, |
107 | #define RTM_NEWADDRLABEL RTM_NEWADDRLABEL | 107 | #define RTM_DELADDRLABEL RTM_DELADDRLABEL |
108 | RTM_GETADDRLABEL, | 108 | RTM_GETADDRLABEL, |
109 | #define RTM_GETADDRLABEL RTM_GETADDRLABEL | 109 | #define RTM_GETADDRLABEL RTM_GETADDRLABEL |
110 | 110 | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f2c69a2cca17..df7b23ac66e6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -304,7 +304,6 @@ typedef unsigned char *sk_buff_data_t; | |||
304 | * @tc_index: Traffic control index | 304 | * @tc_index: Traffic control index |
305 | * @tc_verd: traffic control verdict | 305 | * @tc_verd: traffic control verdict |
306 | * @ndisc_nodetype: router type (from link layer) | 306 | * @ndisc_nodetype: router type (from link layer) |
307 | * @do_not_encrypt: set to prevent encryption of this frame | ||
308 | * @dma_cookie: a cookie to one of several possible DMA operations | 307 | * @dma_cookie: a cookie to one of several possible DMA operations |
309 | * done by skb DMA functions | 308 | * done by skb DMA functions |
310 | * @secmark: security marking | 309 | * @secmark: security marking |
@@ -380,12 +379,9 @@ struct sk_buff { | |||
380 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 379 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
381 | __u8 ndisc_nodetype:2; | 380 | __u8 ndisc_nodetype:2; |
382 | #endif | 381 | #endif |
383 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) | ||
384 | __u8 do_not_encrypt:1; | ||
385 | #endif | ||
386 | kmemcheck_bitfield_end(flags2); | 382 | kmemcheck_bitfield_end(flags2); |
387 | 383 | ||
388 | /* 0/13/14 bit hole */ | 384 | /* 0/14 bit hole */ |
389 | 385 | ||
390 | #ifdef CONFIG_NET_DMA | 386 | #ifdef CONFIG_NET_DMA |
391 | dma_cookie_t dma_cookie; | 387 | dma_cookie_t dma_cookie; |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 5ae8fa22d331..3d0a9ff24f01 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -27,24 +27,54 @@ struct ssb_sprom { | |||
27 | u8 et1mdcport; /* MDIO for enet1 */ | 27 | u8 et1mdcport; /* MDIO for enet1 */ |
28 | u8 board_rev; /* Board revision number from SPROM. */ | 28 | u8 board_rev; /* Board revision number from SPROM. */ |
29 | u8 country_code; /* Country Code */ | 29 | u8 country_code; /* Country Code */ |
30 | u8 ant_available_a; /* A-PHY antenna available bits (up to 4) */ | 30 | u8 ant_available_a; /* 2GHz antenna available bits (up to 4) */ |
31 | u8 ant_available_bg; /* B/G-PHY antenna available bits (up to 4) */ | 31 | u8 ant_available_bg; /* 5GHz antenna available bits (up to 4) */ |
32 | u16 pa0b0; | 32 | u16 pa0b0; |
33 | u16 pa0b1; | 33 | u16 pa0b1; |
34 | u16 pa0b2; | 34 | u16 pa0b2; |
35 | u16 pa1b0; | 35 | u16 pa1b0; |
36 | u16 pa1b1; | 36 | u16 pa1b1; |
37 | u16 pa1b2; | 37 | u16 pa1b2; |
38 | u16 pa1lob0; | ||
39 | u16 pa1lob1; | ||
40 | u16 pa1lob2; | ||
41 | u16 pa1hib0; | ||
42 | u16 pa1hib1; | ||
43 | u16 pa1hib2; | ||
38 | u8 gpio0; /* GPIO pin 0 */ | 44 | u8 gpio0; /* GPIO pin 0 */ |
39 | u8 gpio1; /* GPIO pin 1 */ | 45 | u8 gpio1; /* GPIO pin 1 */ |
40 | u8 gpio2; /* GPIO pin 2 */ | 46 | u8 gpio2; /* GPIO pin 2 */ |
41 | u8 gpio3; /* GPIO pin 3 */ | 47 | u8 gpio3; /* GPIO pin 3 */ |
42 | u16 maxpwr_a; /* A-PHY Amplifier Max Power (in dBm Q5.2) */ | 48 | u16 maxpwr_bg; /* 2.4GHz Amplifier Max Power (in dBm Q5.2) */ |
43 | u16 maxpwr_bg; /* B/G-PHY Amplifier Max Power (in dBm Q5.2) */ | 49 | u16 maxpwr_al; /* 5.2GHz Amplifier Max Power (in dBm Q5.2) */ |
50 | u16 maxpwr_a; /* 5.3GHz Amplifier Max Power (in dBm Q5.2) */ | ||
51 | u16 maxpwr_ah; /* 5.8GHz Amplifier Max Power (in dBm Q5.2) */ | ||
44 | u8 itssi_a; /* Idle TSSI Target for A-PHY */ | 52 | u8 itssi_a; /* Idle TSSI Target for A-PHY */ |
45 | u8 itssi_bg; /* Idle TSSI Target for B/G-PHY */ | 53 | u8 itssi_bg; /* Idle TSSI Target for B/G-PHY */ |
46 | u16 boardflags_lo; /* Boardflags (low 16 bits) */ | 54 | u8 tri2g; /* 2.4GHz TX isolation */ |
47 | u16 boardflags_hi; /* Boardflags (high 16 bits) */ | 55 | u8 tri5gl; /* 5.2GHz TX isolation */ |
56 | u8 tri5g; /* 5.3GHz TX isolation */ | ||
57 | u8 tri5gh; /* 5.8GHz TX isolation */ | ||
58 | u8 rxpo2g; /* 2GHz RX power offset */ | ||
59 | u8 rxpo5g; /* 5GHz RX power offset */ | ||
60 | u8 rssisav2g; /* 2GHz RSSI params */ | ||
61 | u8 rssismc2g; | ||
62 | u8 rssismf2g; | ||
63 | u8 bxa2g; /* 2GHz BX arch */ | ||
64 | u8 rssisav5g; /* 5GHz RSSI params */ | ||
65 | u8 rssismc5g; | ||
66 | u8 rssismf5g; | ||
67 | u8 bxa5g; /* 5GHz BX arch */ | ||
68 | u16 cck2gpo; /* CCK power offset */ | ||
69 | u32 ofdm2gpo; /* 2.4GHz OFDM power offset */ | ||
70 | u32 ofdm5glpo; /* 5.2GHz OFDM power offset */ | ||
71 | u32 ofdm5gpo; /* 5.3GHz OFDM power offset */ | ||
72 | u32 ofdm5ghpo; /* 5.8GHz OFDM power offset */ | ||
73 | u16 boardflags_lo; /* Board flags (bits 0-15) */ | ||
74 | u16 boardflags_hi; /* Board flags (bits 16-31) */ | ||
75 | u16 boardflags2_lo; /* Board flags (bits 32-47) */ | ||
76 | u16 boardflags2_hi; /* Board flags (bits 48-63) */ | ||
77 | /* TODO store board flags in a single u64 */ | ||
48 | 78 | ||
49 | /* Antenna gain values for up to 4 antennas | 79 | /* Antenna gain values for up to 4 antennas |
50 | * on each band. Values in dBm/4 (Q5.2). Negative gain means the | 80 | * on each band. Values in dBm/4 (Q5.2). Negative gain means the |
@@ -58,7 +88,7 @@ struct ssb_sprom { | |||
58 | } ghz5; /* 5GHz band */ | 88 | } ghz5; /* 5GHz band */ |
59 | } antenna_gain; | 89 | } antenna_gain; |
60 | 90 | ||
61 | /* TODO - add any parameters needed from rev 2, 3, or 4 SPROMs */ | 91 | /* TODO - add any parameters needed from rev 2, 3, 4, 5 or 8 SPROMs */ |
62 | }; | 92 | }; |
63 | 93 | ||
64 | /* Information about the PCB the circuitry is soldered on. */ | 94 | /* Information about the PCB the circuitry is soldered on. */ |
@@ -208,6 +238,7 @@ enum ssb_bustype { | |||
208 | SSB_BUSTYPE_SSB, /* This SSB bus is the system bus */ | 238 | SSB_BUSTYPE_SSB, /* This SSB bus is the system bus */ |
209 | SSB_BUSTYPE_PCI, /* SSB is connected to PCI bus */ | 239 | SSB_BUSTYPE_PCI, /* SSB is connected to PCI bus */ |
210 | SSB_BUSTYPE_PCMCIA, /* SSB is connected to PCMCIA bus */ | 240 | SSB_BUSTYPE_PCMCIA, /* SSB is connected to PCMCIA bus */ |
241 | SSB_BUSTYPE_SDIO, /* SSB is connected to SDIO bus */ | ||
211 | }; | 242 | }; |
212 | 243 | ||
213 | /* board_vendor */ | 244 | /* board_vendor */ |
@@ -240,8 +271,12 @@ struct ssb_bus { | |||
240 | 271 | ||
241 | /* The core in the basic address register window. (PCI bus only) */ | 272 | /* The core in the basic address register window. (PCI bus only) */ |
242 | struct ssb_device *mapped_device; | 273 | struct ssb_device *mapped_device; |
243 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ | 274 | union { |
244 | u8 mapped_pcmcia_seg; | 275 | /* Currently mapped PCMCIA segment. (bustype == SSB_BUSTYPE_PCMCIA only) */ |
276 | u8 mapped_pcmcia_seg; | ||
277 | /* Current SSB base address window for SDIO. */ | ||
278 | u32 sdio_sbaddr; | ||
279 | }; | ||
245 | /* Lock for core and segment switching. | 280 | /* Lock for core and segment switching. |
246 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ | 281 | * On PCMCIA-host busses this is used to protect the whole MMIO access. */ |
247 | spinlock_t bar_lock; | 282 | spinlock_t bar_lock; |
@@ -252,6 +287,11 @@ struct ssb_bus { | |||
252 | struct pci_dev *host_pci; | 287 | struct pci_dev *host_pci; |
253 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ | 288 | /* Pointer to the PCMCIA device (only if bustype == SSB_BUSTYPE_PCMCIA). */ |
254 | struct pcmcia_device *host_pcmcia; | 289 | struct pcmcia_device *host_pcmcia; |
290 | /* Pointer to the SDIO device (only if bustype == SSB_BUSTYPE_SDIO). */ | ||
291 | struct sdio_func *host_sdio; | ||
292 | |||
293 | /* See enum ssb_quirks */ | ||
294 | unsigned int quirks; | ||
255 | 295 | ||
256 | #ifdef CONFIG_SSB_SPROM | 296 | #ifdef CONFIG_SSB_SPROM |
257 | /* Mutex to protect the SPROM writing. */ | 297 | /* Mutex to protect the SPROM writing. */ |
@@ -306,6 +346,11 @@ struct ssb_bus { | |||
306 | #endif /* DEBUG */ | 346 | #endif /* DEBUG */ |
307 | }; | 347 | }; |
308 | 348 | ||
349 | enum ssb_quirks { | ||
350 | /* SDIO connected card requires performing a read after writing a 32-bit value */ | ||
351 | SSB_QUIRK_SDIO_READ_AFTER_WRITE32 = (1 << 0), | ||
352 | }; | ||
353 | |||
309 | /* The initialization-invariants. */ | 354 | /* The initialization-invariants. */ |
310 | struct ssb_init_invariants { | 355 | struct ssb_init_invariants { |
311 | /* Versioning information about the PCB. */ | 356 | /* Versioning information about the PCB. */ |
@@ -336,6 +381,12 @@ extern int ssb_bus_pcmciabus_register(struct ssb_bus *bus, | |||
336 | struct pcmcia_device *pcmcia_dev, | 381 | struct pcmcia_device *pcmcia_dev, |
337 | unsigned long baseaddr); | 382 | unsigned long baseaddr); |
338 | #endif /* CONFIG_SSB_PCMCIAHOST */ | 383 | #endif /* CONFIG_SSB_PCMCIAHOST */ |
384 | #ifdef CONFIG_SSB_SDIOHOST | ||
385 | extern int ssb_bus_sdiobus_register(struct ssb_bus *bus, | ||
386 | struct sdio_func *sdio_func, | ||
387 | unsigned int quirks); | ||
388 | #endif /* CONFIG_SSB_SDIOHOST */ | ||
389 | |||
339 | 390 | ||
340 | extern void ssb_bus_unregister(struct ssb_bus *bus); | 391 | extern void ssb_bus_unregister(struct ssb_bus *bus); |
341 | 392 | ||
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index d3b1d18922f2..4e27acf0a92f 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -629,5 +629,15 @@ extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, | |||
629 | /* PMU support */ | 629 | /* PMU support */ |
630 | extern void ssb_pmu_init(struct ssb_chipcommon *cc); | 630 | extern void ssb_pmu_init(struct ssb_chipcommon *cc); |
631 | 631 | ||
632 | enum ssb_pmu_ldo_volt_id { | ||
633 | LDO_PAREF = 0, | ||
634 | LDO_VOLT1, | ||
635 | LDO_VOLT2, | ||
636 | LDO_VOLT3, | ||
637 | }; | ||
638 | |||
639 | void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc, | ||
640 | enum ssb_pmu_ldo_volt_id id, u32 voltage); | ||
641 | void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on); | ||
632 | 642 | ||
633 | #endif /* LINUX_SSB_CHIPCO_H_ */ | 643 | #endif /* LINUX_SSB_CHIPCO_H_ */ |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index a01b982b5783..9ae9082eaeb4 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -162,7 +162,7 @@ | |||
162 | 162 | ||
163 | /* SPROM shadow area. If not otherwise noted, fields are | 163 | /* SPROM shadow area. If not otherwise noted, fields are |
164 | * two bytes wide. Note that the SPROM can _only_ be read | 164 | * two bytes wide. Note that the SPROM can _only_ be read |
165 | * in two-byte quantinies. | 165 | * in two-byte quantities. |
166 | */ | 166 | */ |
167 | #define SSB_SPROMSIZE_WORDS 64 | 167 | #define SSB_SPROMSIZE_WORDS 64 |
168 | #define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16)) | 168 | #define SSB_SPROMSIZE_BYTES (SSB_SPROMSIZE_WORDS * sizeof(u16)) |
@@ -327,8 +327,11 @@ | |||
327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 | 327 | #define SSB_SPROM5_GPIOB_P3_SHIFT 8 |
328 | 328 | ||
329 | /* SPROM Revision 8 */ | 329 | /* SPROM Revision 8 */ |
330 | #define SSB_SPROM8_BFLLO 0x1084 /* Boardflags (low 16 bits) */ | 330 | #define SSB_SPROM8_BOARDREV 0x1082 /* Board revision */ |
331 | #define SSB_SPROM8_BFLHI 0x1086 /* Boardflags Hi */ | 331 | #define SSB_SPROM8_BFLLO 0x1084 /* Board flags (bits 0-15) */ |
332 | #define SSB_SPROM8_BFLHI 0x1086 /* Board flags (bits 16-31) */ | ||
333 | #define SSB_SPROM8_BFL2LO 0x1088 /* Board flags (bits 32-47) */ | ||
334 | #define SSB_SPROM8_BFL2HI 0x108A /* Board flags (bits 48-63) */ | ||
332 | #define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ | 335 | #define SSB_SPROM8_IL0MAC 0x108C /* 6 byte MAC address */ |
333 | #define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ | 336 | #define SSB_SPROM8_CCODE 0x1092 /* 2 byte country code */ |
334 | #define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ | 337 | #define SSB_SPROM8_ANTAVAIL 0x109C /* Antenna available bitfields*/ |
@@ -354,14 +357,63 @@ | |||
354 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ | 357 | #define SSB_SPROM8_GPIOB_P2 0x00FF /* Pin 2 */ |
355 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ | 358 | #define SSB_SPROM8_GPIOB_P3 0xFF00 /* Pin 3 */ |
356 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 | 359 | #define SSB_SPROM8_GPIOB_P3_SHIFT 8 |
357 | #define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power BG in path 1 */ | 360 | #define SSB_SPROM8_RSSIPARM2G 0x10A4 /* RSSI params for 2GHz */ |
358 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power BG */ | 361 | #define SSB_SPROM8_RSSISMF2G 0x000F |
362 | #define SSB_SPROM8_RSSISMC2G 0x00F0 | ||
363 | #define SSB_SPROM8_RSSISMC2G_SHIFT 4 | ||
364 | #define SSB_SPROM8_RSSISAV2G 0x0700 | ||
365 | #define SSB_SPROM8_RSSISAV2G_SHIFT 8 | ||
366 | #define SSB_SPROM8_BXA2G 0x1800 | ||
367 | #define SSB_SPROM8_BXA2G_SHIFT 11 | ||
368 | #define SSB_SPROM8_RSSIPARM5G 0x10A6 /* RSSI params for 5GHz */ | ||
369 | #define SSB_SPROM8_RSSISMF5G 0x000F | ||
370 | #define SSB_SPROM8_RSSISMC5G 0x00F0 | ||
371 | #define SSB_SPROM8_RSSISMC5G_SHIFT 4 | ||
372 | #define SSB_SPROM8_RSSISAV5G 0x0700 | ||
373 | #define SSB_SPROM8_RSSISAV5G_SHIFT 8 | ||
374 | #define SSB_SPROM8_BXA5G 0x1800 | ||
375 | #define SSB_SPROM8_BXA5G_SHIFT 11 | ||
376 | #define SSB_SPROM8_TRI25G 0x10A8 /* TX isolation 2.4&5.3GHz */ | ||
377 | #define SSB_SPROM8_TRI2G 0x00FF /* TX isolation 2.4GHz */ | ||
378 | #define SSB_SPROM8_TRI5G 0xFF00 /* TX isolation 5.3GHz */ | ||
379 | #define SSB_SPROM8_TRI5G_SHIFT 8 | ||
380 | #define SSB_SPROM8_TRI5GHL 0x10AA /* TX isolation 5.2/5.8GHz */ | ||
381 | #define SSB_SPROM8_TRI5GL 0x00FF /* TX isolation 5.2GHz */ | ||
382 | #define SSB_SPROM8_TRI5GH 0xFF00 /* TX isolation 5.8GHz */ | ||
383 | #define SSB_SPROM8_TRI5GH_SHIFT 8 | ||
384 | #define SSB_SPROM8_RXPO 0x10AC /* RX power offsets */ | ||
385 | #define SSB_SPROM8_RXPO2G 0x00FF /* 2GHz RX power offset */ | ||
386 | #define SSB_SPROM8_RXPO5G 0xFF00 /* 5GHz RX power offset */ | ||
387 | #define SSB_SPROM8_RXPO5G_SHIFT 8 | ||
388 | #define SSB_SPROM8_MAXP_BG 0x10C0 /* Max Power 2GHz in path 1 */ | ||
389 | #define SSB_SPROM8_MAXP_BG_MASK 0x00FF /* Mask for Max Power 2GHz */ | ||
359 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ | 390 | #define SSB_SPROM8_ITSSI_BG 0xFF00 /* Mask for path 1 itssi_bg */ |
360 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 | 391 | #define SSB_SPROM8_ITSSI_BG_SHIFT 8 |
361 | #define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power A in path 1 */ | 392 | #define SSB_SPROM8_PA0B0 0x10C2 /* 2GHz power amp settings */ |
362 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power A */ | 393 | #define SSB_SPROM8_PA0B1 0x10C4 |
394 | #define SSB_SPROM8_PA0B2 0x10C6 | ||
395 | #define SSB_SPROM8_MAXP_A 0x10C8 /* Max Power 5.3GHz */ | ||
396 | #define SSB_SPROM8_MAXP_A_MASK 0x00FF /* Mask for Max Power 5.3GHz */ | ||
363 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ | 397 | #define SSB_SPROM8_ITSSI_A 0xFF00 /* Mask for path 1 itssi_a */ |
364 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 | 398 | #define SSB_SPROM8_ITSSI_A_SHIFT 8 |
399 | #define SSB_SPROM8_MAXP_AHL 0x10CA /* Max Power 5.2/5.8GHz */ | ||
400 | #define SSB_SPROM8_MAXP_AH_MASK 0x00FF /* Mask for Max Power 5.8GHz */ | ||
401 | #define SSB_SPROM8_MAXP_AL_MASK 0xFF00 /* Mask for Max Power 5.2GHz */ | ||
402 | #define SSB_SPROM8_MAXP_AL_SHIFT 8 | ||
403 | #define SSB_SPROM8_PA1B0 0x10CC /* 5.3GHz power amp settings */ | ||
404 | #define SSB_SPROM8_PA1B1 0x10CE | ||
405 | #define SSB_SPROM8_PA1B2 0x10D0 | ||
406 | #define SSB_SPROM8_PA1LOB0 0x10D2 /* 5.2GHz power amp settings */ | ||
407 | #define SSB_SPROM8_PA1LOB1 0x10D4 | ||
408 | #define SSB_SPROM8_PA1LOB2 0x10D6 | ||
409 | #define SSB_SPROM8_PA1HIB0 0x10D8 /* 5.8GHz power amp settings */ | ||
410 | #define SSB_SPROM8_PA1HIB1 0x10DA | ||
411 | #define SSB_SPROM8_PA1HIB2 0x10DC | ||
412 | #define SSB_SPROM8_CCK2GPO 0x1140 /* CCK power offset */ | ||
413 | #define SSB_SPROM8_OFDM2GPO 0x1142 /* 2.4GHz OFDM power offset */ | ||
414 | #define SSB_SPROM8_OFDM5GPO 0x1146 /* 5.3GHz OFDM power offset */ | ||
415 | #define SSB_SPROM8_OFDM5GLPO 0x114A /* 5.2GHz OFDM power offset */ | ||
416 | #define SSB_SPROM8_OFDM5GHPO 0x114E /* 5.8GHz OFDM power offset */ | ||
365 | 417 | ||
366 | /* Values for SSB_SPROM1_BINF_CCODE */ | 418 | /* Values for SSB_SPROM1_BINF_CCODE */ |
367 | enum { | 419 | enum { |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 8afac76cd748..61723a7c21fe 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -233,7 +233,7 @@ struct tcp_request_sock { | |||
233 | struct inet_request_sock req; | 233 | struct inet_request_sock req; |
234 | #ifdef CONFIG_TCP_MD5SIG | 234 | #ifdef CONFIG_TCP_MD5SIG |
235 | /* Only used by TCP MD5 Signature so far. */ | 235 | /* Only used by TCP MD5 Signature so far. */ |
236 | struct tcp_request_sock_ops *af_specific; | 236 | const struct tcp_request_sock_ops *af_specific; |
237 | #endif | 237 | #endif |
238 | u32 rcv_isn; | 238 | u32 rcv_isn; |
239 | u32 snt_isn; | 239 | u32 snt_isn; |
@@ -401,9 +401,9 @@ struct tcp_sock { | |||
401 | 401 | ||
402 | #ifdef CONFIG_TCP_MD5SIG | 402 | #ifdef CONFIG_TCP_MD5SIG |
403 | /* TCP AF-Specific parts; only used by MD5 Signature support so far */ | 403 | /* TCP AF-Specific parts; only used by MD5 Signature support so far */ |
404 | struct tcp_sock_af_ops *af_specific; | 404 | const struct tcp_sock_af_ops *af_specific; |
405 | 405 | ||
406 | /* TCP MD5 Signagure Option information */ | 406 | /* TCP MD5 Signature Option information */ |
407 | struct tcp_md5sig_info *md5sig_info; | 407 | struct tcp_md5sig_info *md5sig_info; |
408 | #endif | 408 | #endif |
409 | }; | 409 | }; |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index bea469455a0c..3d92396639de 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -209,5 +209,7 @@ struct sockaddr_tipc { | |||
209 | #define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */ | 209 | #define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */ |
210 | #define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ | 210 | #define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ |
211 | #define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ | 211 | #define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ |
212 | #define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */ | ||
213 | #define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */ | ||
212 | 214 | ||
213 | #endif | 215 | #endif |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 37836b937d97..1ef1ebc2b04f 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -70,12 +70,13 @@ struct rndis_msg_hdr { | |||
70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | 70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) |
71 | 71 | ||
72 | /* codes for "status" field of completion messages */ | 72 | /* codes for "status" field of completion messages */ |
73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) | 73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) |
74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) | 74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) |
75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) | 75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) |
76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) | 76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) |
77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) | 77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) |
78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) | 78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) |
79 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION cpu_to_le32(0x40010012) | ||
79 | 80 | ||
80 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 81 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ |
81 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) | 82 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 310e18a880ff..bb69e256cd16 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -53,6 +53,7 @@ struct usbnet { | |||
53 | struct sk_buff_head rxq; | 53 | struct sk_buff_head rxq; |
54 | struct sk_buff_head txq; | 54 | struct sk_buff_head txq; |
55 | struct sk_buff_head done; | 55 | struct sk_buff_head done; |
56 | struct sk_buff_head rxq_pause; | ||
56 | struct urb *interrupt; | 57 | struct urb *interrupt; |
57 | struct tasklet_struct bh; | 58 | struct tasklet_struct bh; |
58 | 59 | ||
@@ -63,6 +64,7 @@ struct usbnet { | |||
63 | # define EVENT_RX_MEMORY 2 | 64 | # define EVENT_RX_MEMORY 2 |
64 | # define EVENT_STS_SPLIT 3 | 65 | # define EVENT_STS_SPLIT 3 |
65 | # define EVENT_LINK_RESET 4 | 66 | # define EVENT_LINK_RESET 4 |
67 | # define EVENT_RX_PAUSED 5 | ||
66 | }; | 68 | }; |
67 | 69 | ||
68 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 70 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -86,6 +88,7 @@ struct driver_info { | |||
86 | 88 | ||
87 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ | 89 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ |
88 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | ||
89 | 92 | ||
90 | 93 | ||
91 | /* init device ... can sleep, or cause probe() failure */ | 94 | /* init device ... can sleep, or cause probe() failure */ |
@@ -97,6 +100,9 @@ struct driver_info { | |||
97 | /* reset device ... can sleep */ | 100 | /* reset device ... can sleep */ |
98 | int (*reset)(struct usbnet *); | 101 | int (*reset)(struct usbnet *); |
99 | 102 | ||
103 | /* stop device ... can sleep */ | ||
104 | int (*stop)(struct usbnet *); | ||
105 | |||
100 | /* see if peer is connected ... can sleep */ | 106 | /* see if peer is connected ... can sleep */ |
101 | int (*check_connect)(struct usbnet *); | 107 | int (*check_connect)(struct usbnet *); |
102 | 108 | ||
@@ -118,9 +124,8 @@ struct driver_info { | |||
118 | * right after minidriver have initialized hardware. */ | 124 | * right after minidriver have initialized hardware. */ |
119 | int (*early_init)(struct usbnet *dev); | 125 | int (*early_init)(struct usbnet *dev); |
120 | 126 | ||
121 | /* called by minidriver when link state changes, state: 0=disconnect, | 127 | /* called by minidriver when receiving indication */ |
122 | * 1=connect */ | 128 | void (*indication)(struct usbnet *dev, void *ind, int indlen); |
123 | void (*link_change)(struct usbnet *dev, int state); | ||
124 | 129 | ||
125 | /* for new devices, use the descriptor-reading code instead */ | 130 | /* for new devices, use the descriptor-reading code instead */ |
126 | int in; /* rx endpoint */ | 131 | int in; /* rx endpoint */ |
@@ -177,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */ | |||
177 | 182 | ||
178 | extern int usbnet_open (struct net_device *net); | 183 | extern int usbnet_open (struct net_device *net); |
179 | extern int usbnet_stop (struct net_device *net); | 184 | extern int usbnet_stop (struct net_device *net); |
180 | extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); | 185 | extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, |
186 | struct net_device *net); | ||
181 | extern void usbnet_tx_timeout (struct net_device *net); | 187 | extern void usbnet_tx_timeout (struct net_device *net); |
182 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | 188 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); |
183 | 189 | ||
@@ -187,6 +193,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int); | |||
187 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); | 193 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); |
188 | extern void usbnet_unlink_rx_urbs(struct usbnet *); | 194 | extern void usbnet_unlink_rx_urbs(struct usbnet *); |
189 | 195 | ||
196 | extern void usbnet_pause_rx(struct usbnet *); | ||
197 | extern void usbnet_resume_rx(struct usbnet *); | ||
198 | extern void usbnet_purge_paused_rxq(struct usbnet *); | ||
199 | |||
190 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); | 200 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); |
191 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); | 201 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); |
192 | extern u32 usbnet_get_link (struct net_device *net); | 202 | extern u32 usbnet_get_link (struct net_device *net); |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index cb24204851f7..5b4c6c772a9b 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -1132,6 +1132,14 @@ struct __compat_iw_event { | |||
1132 | }; | 1132 | }; |
1133 | #define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer) | 1133 | #define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer) |
1134 | #define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length) | 1134 | #define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length) |
1135 | |||
1136 | /* Size of the various events for compat */ | ||
1137 | #define IW_EV_COMPAT_CHAR_LEN (IW_EV_COMPAT_LCP_LEN + IFNAMSIZ) | ||
1138 | #define IW_EV_COMPAT_UINT_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(__u32)) | ||
1139 | #define IW_EV_COMPAT_FREQ_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_freq)) | ||
1140 | #define IW_EV_COMPAT_PARAM_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_param)) | ||
1141 | #define IW_EV_COMPAT_ADDR_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct sockaddr)) | ||
1142 | #define IW_EV_COMPAT_QUAL_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_quality)) | ||
1135 | #define IW_EV_COMPAT_POINT_LEN \ | 1143 | #define IW_EV_COMPAT_POINT_LEN \ |
1136 | (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \ | 1144 | (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \ |
1137 | IW_EV_COMPAT_POINT_OFF) | 1145 | IW_EV_COMPAT_POINT_OFF) |
diff --git a/include/net/ieee802154/af_ieee802154.h b/include/net/af_ieee802154.h index 0d78605fb1a6..75e64c7a2960 100644 --- a/include/net/ieee802154/af_ieee802154.h +++ b/include/net/af_ieee802154.h | |||
@@ -54,7 +54,9 @@ struct sockaddr_ieee802154 { | |||
54 | struct ieee802154_addr addr; | 54 | struct ieee802154_addr addr; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* master device */ | 57 | /* get/setsockopt */ |
58 | #define IEEE802154_SIOC_ADD_SLAVE (SIOCDEVPRIVATE + 0) | 58 | #define SOL_IEEE802154 0 |
59 | |||
60 | #define WPAN_WANTACK 0 | ||
59 | 61 | ||
60 | #endif | 62 | #endif |
diff --git a/include/net/arp.h b/include/net/arp.h index c236270ec95e..716f43c5c98e 100644 --- a/include/net/arp.h +++ b/include/net/arp.h | |||
@@ -26,6 +26,6 @@ extern struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
26 | const unsigned char *target_hw); | 26 | const unsigned char *target_hw); |
27 | extern void arp_xmit(struct sk_buff *skb); | 27 | extern void arp_xmit(struct sk_buff *skb); |
28 | 28 | ||
29 | extern struct neigh_ops arp_broken_ops; | 29 | extern const struct neigh_ops arp_broken_ops; |
30 | 30 | ||
31 | #endif /* _ARP_H */ | 31 | #endif /* _ARP_H */ |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 968166a45f86..718394e2c01e 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -138,8 +138,11 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); | |||
138 | struct bt_skb_cb { | 138 | struct bt_skb_cb { |
139 | __u8 pkt_type; | 139 | __u8 pkt_type; |
140 | __u8 incoming; | 140 | __u8 incoming; |
141 | __u8 tx_seq; | ||
142 | __u8 retries; | ||
143 | __u8 sar; | ||
141 | }; | 144 | }; |
142 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) | 145 | #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) |
143 | 146 | ||
144 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) | 147 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) |
145 | { | 148 | { |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index c4ca4228b083..7b640aeddb64 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -117,7 +117,7 @@ struct hci_dev { | |||
117 | struct sk_buff *sent_cmd; | 117 | struct sk_buff *sent_cmd; |
118 | struct sk_buff *reassembly[3]; | 118 | struct sk_buff *reassembly[3]; |
119 | 119 | ||
120 | struct semaphore req_lock; | 120 | struct mutex req_lock; |
121 | wait_queue_head_t req_wait_q; | 121 | wait_queue_head_t req_wait_q; |
122 | __u32 req_status; | 122 | __u32 req_status; |
123 | __u32 req_result; | 123 | __u32 req_result; |
@@ -187,6 +187,7 @@ struct hci_conn { | |||
187 | struct work_struct work_del; | 187 | struct work_struct work_del; |
188 | 188 | ||
189 | struct device dev; | 189 | struct device dev; |
190 | atomic_t devref; | ||
190 | 191 | ||
191 | struct hci_dev *hdev; | 192 | struct hci_dev *hdev; |
192 | void *l2cap_data; | 193 | void *l2cap_data; |
@@ -339,6 +340,9 @@ int hci_conn_switch_role(struct hci_conn *conn, __u8 role); | |||
339 | void hci_conn_enter_active_mode(struct hci_conn *conn); | 340 | void hci_conn_enter_active_mode(struct hci_conn *conn); |
340 | void hci_conn_enter_sniff_mode(struct hci_conn *conn); | 341 | void hci_conn_enter_sniff_mode(struct hci_conn *conn); |
341 | 342 | ||
343 | void hci_conn_hold_device(struct hci_conn *conn); | ||
344 | void hci_conn_put_device(struct hci_conn *conn); | ||
345 | |||
342 | static inline void hci_conn_hold(struct hci_conn *conn) | 346 | static inline void hci_conn_hold(struct hci_conn *conn) |
343 | { | 347 | { |
344 | atomic_inc(&conn->refcnt); | 348 | atomic_inc(&conn->refcnt); |
@@ -700,8 +704,8 @@ struct hci_sec_filter { | |||
700 | #define HCI_REQ_PEND 1 | 704 | #define HCI_REQ_PEND 1 |
701 | #define HCI_REQ_CANCELED 2 | 705 | #define HCI_REQ_CANCELED 2 |
702 | 706 | ||
703 | #define hci_req_lock(d) down(&d->req_lock) | 707 | #define hci_req_lock(d) mutex_lock(&d->req_lock) |
704 | #define hci_req_unlock(d) up(&d->req_lock) | 708 | #define hci_req_unlock(d) mutex_unlock(&d->req_lock) |
705 | 709 | ||
706 | void hci_req_complete(struct hci_dev *hdev, int result); | 710 | void hci_req_complete(struct hci_dev *hdev, int result); |
707 | 711 | ||
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index e919fca1072a..9516f4b4a3c2 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -27,12 +27,14 @@ | |||
27 | 27 | ||
28 | /* L2CAP defaults */ | 28 | /* L2CAP defaults */ |
29 | #define L2CAP_DEFAULT_MTU 672 | 29 | #define L2CAP_DEFAULT_MTU 672 |
30 | #define L2CAP_DEFAULT_MIN_MTU 48 | ||
30 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff | 31 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff |
31 | #define L2CAP_DEFAULT_RX_WINDOW 1 | 32 | #define L2CAP_DEFAULT_TX_WINDOW 63 |
32 | #define L2CAP_DEFAULT_MAX_RECEIVE 1 | 33 | #define L2CAP_DEFAULT_NUM_TO_ACK (L2CAP_DEFAULT_TX_WINDOW/5) |
33 | #define L2CAP_DEFAULT_RETRANS_TO 300 /* 300 milliseconds */ | 34 | #define L2CAP_DEFAULT_MAX_TX 3 |
34 | #define L2CAP_DEFAULT_MONITOR_TO 1000 /* 1 second */ | 35 | #define L2CAP_DEFAULT_RETRANS_TO 1000 /* 1 second */ |
35 | #define L2CAP_DEFAULT_MAX_RX_APDU 0xfff7 | 36 | #define L2CAP_DEFAULT_MONITOR_TO 12000 /* 12 seconds */ |
37 | #define L2CAP_DEFAULT_MAX_PDU_SIZE 672 | ||
36 | 38 | ||
37 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ | 39 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ |
38 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ | 40 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ |
@@ -52,6 +54,7 @@ struct l2cap_options { | |||
52 | __u16 imtu; | 54 | __u16 imtu; |
53 | __u16 flush_to; | 55 | __u16 flush_to; |
54 | __u8 mode; | 56 | __u8 mode; |
57 | __u8 fcs; | ||
55 | }; | 58 | }; |
56 | 59 | ||
57 | #define L2CAP_CONNINFO 0x02 | 60 | #define L2CAP_CONNINFO 0x02 |
@@ -93,6 +96,32 @@ struct l2cap_conninfo { | |||
93 | #define L2CAP_FCS_NONE 0x00 | 96 | #define L2CAP_FCS_NONE 0x00 |
94 | #define L2CAP_FCS_CRC16 0x01 | 97 | #define L2CAP_FCS_CRC16 0x01 |
95 | 98 | ||
99 | /* L2CAP Control Field bit masks */ | ||
100 | #define L2CAP_CTRL_SAR 0xC000 | ||
101 | #define L2CAP_CTRL_REQSEQ 0x3F00 | ||
102 | #define L2CAP_CTRL_TXSEQ 0x007E | ||
103 | #define L2CAP_CTRL_RETRANS 0x0080 | ||
104 | #define L2CAP_CTRL_FINAL 0x0080 | ||
105 | #define L2CAP_CTRL_POLL 0x0010 | ||
106 | #define L2CAP_CTRL_SUPERVISE 0x000C | ||
107 | #define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */ | ||
108 | |||
109 | #define L2CAP_CTRL_TXSEQ_SHIFT 1 | ||
110 | #define L2CAP_CTRL_REQSEQ_SHIFT 8 | ||
111 | #define L2CAP_CTRL_SAR_SHIFT 14 | ||
112 | |||
113 | /* L2CAP Supervisory Function */ | ||
114 | #define L2CAP_SUPER_RCV_READY 0x0000 | ||
115 | #define L2CAP_SUPER_REJECT 0x0004 | ||
116 | #define L2CAP_SUPER_RCV_NOT_READY 0x0008 | ||
117 | #define L2CAP_SUPER_SELECT_REJECT 0x000C | ||
118 | |||
119 | /* L2CAP Segmentation and Reassembly */ | ||
120 | #define L2CAP_SDU_UNSEGMENTED 0x0000 | ||
121 | #define L2CAP_SDU_START 0x4000 | ||
122 | #define L2CAP_SDU_END 0x8000 | ||
123 | #define L2CAP_SDU_CONTINUE 0xC000 | ||
124 | |||
96 | /* L2CAP structures */ | 125 | /* L2CAP structures */ |
97 | struct l2cap_hdr { | 126 | struct l2cap_hdr { |
98 | __le16 len; | 127 | __le16 len; |
@@ -190,7 +219,7 @@ struct l2cap_conf_rfc { | |||
190 | #define L2CAP_MODE_RETRANS 0x01 | 219 | #define L2CAP_MODE_RETRANS 0x01 |
191 | #define L2CAP_MODE_FLOWCTL 0x02 | 220 | #define L2CAP_MODE_FLOWCTL 0x02 |
192 | #define L2CAP_MODE_ERTM 0x03 | 221 | #define L2CAP_MODE_ERTM 0x03 |
193 | #define L2CAP_MODE_STREAM 0x04 | 222 | #define L2CAP_MODE_STREAMING 0x04 |
194 | 223 | ||
195 | struct l2cap_disconn_req { | 224 | struct l2cap_disconn_req { |
196 | __le16 dcid; | 225 | __le16 dcid; |
@@ -261,6 +290,14 @@ struct l2cap_conn { | |||
261 | 290 | ||
262 | /* ----- L2CAP channel and socket info ----- */ | 291 | /* ----- L2CAP channel and socket info ----- */ |
263 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) | 292 | #define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) |
293 | #define TX_QUEUE(sk) (&l2cap_pi(sk)->tx_queue) | ||
294 | #define SREJ_QUEUE(sk) (&l2cap_pi(sk)->srej_queue) | ||
295 | #define SREJ_LIST(sk) (&l2cap_pi(sk)->srej_l.list) | ||
296 | |||
297 | struct srej_list { | ||
298 | __u8 tx_seq; | ||
299 | struct list_head list; | ||
300 | }; | ||
264 | 301 | ||
265 | struct l2cap_pinfo { | 302 | struct l2cap_pinfo { |
266 | struct bt_sock bt; | 303 | struct bt_sock bt; |
@@ -271,30 +308,97 @@ struct l2cap_pinfo { | |||
271 | __u16 imtu; | 308 | __u16 imtu; |
272 | __u16 omtu; | 309 | __u16 omtu; |
273 | __u16 flush_to; | 310 | __u16 flush_to; |
274 | __u8 sec_level; | 311 | __u8 mode; |
312 | __u8 num_conf_req; | ||
313 | __u8 num_conf_rsp; | ||
314 | |||
315 | __u8 fcs; | ||
316 | __u8 sec_level; | ||
275 | __u8 role_switch; | 317 | __u8 role_switch; |
276 | __u8 force_reliable; | 318 | __u8 force_reliable; |
277 | 319 | ||
278 | __u8 conf_req[64]; | 320 | __u8 conf_req[64]; |
279 | __u8 conf_len; | 321 | __u8 conf_len; |
280 | __u8 conf_state; | 322 | __u8 conf_state; |
281 | __u8 conf_retry; | 323 | __u8 conn_state; |
324 | |||
325 | __u8 next_tx_seq; | ||
326 | __u8 expected_ack_seq; | ||
327 | __u8 req_seq; | ||
328 | __u8 expected_tx_seq; | ||
329 | __u8 buffer_seq; | ||
330 | __u8 buffer_seq_srej; | ||
331 | __u8 srej_save_reqseq; | ||
332 | __u8 unacked_frames; | ||
333 | __u8 retry_count; | ||
334 | __u8 num_to_ack; | ||
335 | __u16 sdu_len; | ||
336 | __u16 partial_sdu_len; | ||
337 | struct sk_buff *sdu; | ||
282 | 338 | ||
283 | __u8 ident; | 339 | __u8 ident; |
284 | 340 | ||
341 | __u8 remote_tx_win; | ||
342 | __u8 remote_max_tx; | ||
343 | __u16 retrans_timeout; | ||
344 | __u16 monitor_timeout; | ||
345 | __u16 max_pdu_size; | ||
346 | |||
285 | __le16 sport; | 347 | __le16 sport; |
286 | 348 | ||
349 | struct timer_list retrans_timer; | ||
350 | struct timer_list monitor_timer; | ||
351 | struct sk_buff_head tx_queue; | ||
352 | struct sk_buff_head srej_queue; | ||
353 | struct srej_list srej_l; | ||
287 | struct l2cap_conn *conn; | 354 | struct l2cap_conn *conn; |
288 | struct sock *next_c; | 355 | struct sock *next_c; |
289 | struct sock *prev_c; | 356 | struct sock *prev_c; |
290 | }; | 357 | }; |
291 | 358 | ||
292 | #define L2CAP_CONF_REQ_SENT 0x01 | 359 | #define L2CAP_CONF_REQ_SENT 0x01 |
293 | #define L2CAP_CONF_INPUT_DONE 0x02 | 360 | #define L2CAP_CONF_INPUT_DONE 0x02 |
294 | #define L2CAP_CONF_OUTPUT_DONE 0x04 | 361 | #define L2CAP_CONF_OUTPUT_DONE 0x04 |
295 | #define L2CAP_CONF_CONNECT_PEND 0x80 | 362 | #define L2CAP_CONF_MTU_DONE 0x08 |
296 | 363 | #define L2CAP_CONF_MODE_DONE 0x10 | |
297 | #define L2CAP_CONF_MAX_RETRIES 2 | 364 | #define L2CAP_CONF_CONNECT_PEND 0x20 |
365 | #define L2CAP_CONF_NO_FCS_RECV 0x40 | ||
366 | #define L2CAP_CONF_STATE2_DEVICE 0x80 | ||
367 | |||
368 | #define L2CAP_CONF_MAX_CONF_REQ 2 | ||
369 | #define L2CAP_CONF_MAX_CONF_RSP 2 | ||
370 | |||
371 | #define L2CAP_CONN_SAR_SDU 0x01 | ||
372 | #define L2CAP_CONN_SREJ_SENT 0x02 | ||
373 | #define L2CAP_CONN_WAIT_F 0x04 | ||
374 | #define L2CAP_CONN_SREJ_ACT 0x08 | ||
375 | #define L2CAP_CONN_SEND_PBIT 0x10 | ||
376 | #define L2CAP_CONN_REMOTE_BUSY 0x20 | ||
377 | #define L2CAP_CONN_LOCAL_BUSY 0x40 | ||
378 | |||
379 | #define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ | ||
380 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); | ||
381 | #define __mod_monitor_timer() mod_timer(&l2cap_pi(sk)->monitor_timer, \ | ||
382 | jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); | ||
383 | |||
384 | static inline int l2cap_tx_window_full(struct sock *sk) | ||
385 | { | ||
386 | struct l2cap_pinfo *pi = l2cap_pi(sk); | ||
387 | int sub; | ||
388 | |||
389 | sub = (pi->next_tx_seq - pi->expected_ack_seq) % 64; | ||
390 | |||
391 | if (sub < 0) | ||
392 | sub += 64; | ||
393 | |||
394 | return (sub == pi->remote_tx_win); | ||
395 | } | ||
396 | |||
397 | #define __get_txseq(ctrl) ((ctrl) & L2CAP_CTRL_TXSEQ) >> 1 | ||
398 | #define __get_reqseq(ctrl) ((ctrl) & L2CAP_CTRL_REQSEQ) >> 8 | ||
399 | #define __is_iframe(ctrl) !((ctrl) & L2CAP_CTRL_FRAME_TYPE) | ||
400 | #define __is_sframe(ctrl) (ctrl) & L2CAP_CTRL_FRAME_TYPE | ||
401 | #define __is_sar_start(ctrl) ((ctrl) & L2CAP_CTRL_SAR) == L2CAP_SDU_START | ||
298 | 402 | ||
299 | void l2cap_load(void); | 403 | void l2cap_load(void); |
300 | 404 | ||
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index c274993234e3..921d7b3c7f8d 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) | 29 | #define RFCOMM_CONN_TIMEOUT (HZ * 30) |
30 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) | 30 | #define RFCOMM_DISC_TIMEOUT (HZ * 20) |
31 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) | 31 | #define RFCOMM_AUTH_TIMEOUT (HZ * 25) |
32 | #define RFCOMM_IDLE_TIMEOUT (HZ * 2) | ||
32 | 33 | ||
33 | #define RFCOMM_DEFAULT_MTU 127 | 34 | #define RFCOMM_DEFAULT_MTU 127 |
34 | #define RFCOMM_DEFAULT_CREDITS 7 | 35 | #define RFCOMM_DEFAULT_CREDITS 7 |
@@ -154,6 +155,7 @@ struct rfcomm_msc { | |||
154 | struct rfcomm_session { | 155 | struct rfcomm_session { |
155 | struct list_head list; | 156 | struct list_head list; |
156 | struct socket *sock; | 157 | struct socket *sock; |
158 | struct timer_list timer; | ||
157 | unsigned long state; | 159 | unsigned long state; |
158 | unsigned long flags; | 160 | unsigned long flags; |
159 | atomic_t refcnt; | 161 | atomic_t refcnt; |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d1892d66701a..3d874c620219 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -80,7 +80,6 @@ enum ieee80211_channel_flags { | |||
80 | * with cfg80211. | 80 | * with cfg80211. |
81 | * | 81 | * |
82 | * @center_freq: center frequency in MHz | 82 | * @center_freq: center frequency in MHz |
83 | * @max_bandwidth: maximum allowed bandwidth for this channel, in MHz | ||
84 | * @hw_value: hardware-specific value for the channel | 83 | * @hw_value: hardware-specific value for the channel |
85 | * @flags: channel flags from &enum ieee80211_channel_flags. | 84 | * @flags: channel flags from &enum ieee80211_channel_flags. |
86 | * @orig_flags: channel flags at registration time, used by regulatory | 85 | * @orig_flags: channel flags at registration time, used by regulatory |
@@ -97,7 +96,6 @@ enum ieee80211_channel_flags { | |||
97 | struct ieee80211_channel { | 96 | struct ieee80211_channel { |
98 | enum ieee80211_band band; | 97 | enum ieee80211_band band; |
99 | u16 center_freq; | 98 | u16 center_freq; |
100 | u8 max_bandwidth; | ||
101 | u16 hw_value; | 99 | u16 hw_value; |
102 | u32 flags; | 100 | u32 flags; |
103 | int max_antenna_gain; | 101 | int max_antenna_gain; |
@@ -372,6 +370,10 @@ struct rate_info { | |||
372 | * @txrate: current unicast bitrate to this station | 370 | * @txrate: current unicast bitrate to this station |
373 | * @rx_packets: packets received from this station | 371 | * @rx_packets: packets received from this station |
374 | * @tx_packets: packets transmitted to this station | 372 | * @tx_packets: packets transmitted to this station |
373 | * @generation: generation number for nl80211 dumps. | ||
374 | * This number should increase every time the list of stations | ||
375 | * changes, i.e. when a station is added or removed, so that | ||
376 | * userspace can tell whether it got a consistent snapshot. | ||
375 | */ | 377 | */ |
376 | struct station_info { | 378 | struct station_info { |
377 | u32 filled; | 379 | u32 filled; |
@@ -385,6 +387,8 @@ struct station_info { | |||
385 | struct rate_info txrate; | 387 | struct rate_info txrate; |
386 | u32 rx_packets; | 388 | u32 rx_packets; |
387 | u32 tx_packets; | 389 | u32 tx_packets; |
390 | |||
391 | int generation; | ||
388 | }; | 392 | }; |
389 | 393 | ||
390 | /** | 394 | /** |
@@ -444,6 +448,10 @@ enum mpath_info_flags { | |||
444 | * @flags: mesh path flags | 448 | * @flags: mesh path flags |
445 | * @discovery_timeout: total mesh path discovery timeout, in msecs | 449 | * @discovery_timeout: total mesh path discovery timeout, in msecs |
446 | * @discovery_retries: mesh path discovery retries | 450 | * @discovery_retries: mesh path discovery retries |
451 | * @generation: generation number for nl80211 dumps. | ||
452 | * This number should increase every time the list of mesh paths | ||
453 | * changes, i.e. when a station is added or removed, so that | ||
454 | * userspace can tell whether it got a consistent snapshot. | ||
447 | */ | 455 | */ |
448 | struct mpath_info { | 456 | struct mpath_info { |
449 | u32 filled; | 457 | u32 filled; |
@@ -454,6 +462,8 @@ struct mpath_info { | |||
454 | u32 discovery_timeout; | 462 | u32 discovery_timeout; |
455 | u8 discovery_retries; | 463 | u8 discovery_retries; |
456 | u8 flags; | 464 | u8 flags; |
465 | |||
466 | int generation; | ||
457 | }; | 467 | }; |
458 | 468 | ||
459 | /** | 469 | /** |
@@ -538,23 +548,26 @@ struct cfg80211_ssid { | |||
538 | * @ssids: SSIDs to scan for (active scan only) | 548 | * @ssids: SSIDs to scan for (active scan only) |
539 | * @n_ssids: number of SSIDs | 549 | * @n_ssids: number of SSIDs |
540 | * @channels: channels to scan on. | 550 | * @channels: channels to scan on. |
541 | * @n_channels: number of channels for each band | 551 | * @n_channels: total number of channels to scan |
542 | * @ie: optional information element(s) to add into Probe Request or %NULL | 552 | * @ie: optional information element(s) to add into Probe Request or %NULL |
543 | * @ie_len: length of ie in octets | 553 | * @ie_len: length of ie in octets |
544 | * @wiphy: the wiphy this was for | 554 | * @wiphy: the wiphy this was for |
545 | * @ifidx: the interface index | 555 | * @dev: the interface |
546 | */ | 556 | */ |
547 | struct cfg80211_scan_request { | 557 | struct cfg80211_scan_request { |
548 | struct cfg80211_ssid *ssids; | 558 | struct cfg80211_ssid *ssids; |
549 | int n_ssids; | 559 | int n_ssids; |
550 | struct ieee80211_channel **channels; | ||
551 | u32 n_channels; | 560 | u32 n_channels; |
552 | const u8 *ie; | 561 | const u8 *ie; |
553 | size_t ie_len; | 562 | size_t ie_len; |
554 | 563 | ||
555 | /* internal */ | 564 | /* internal */ |
556 | struct wiphy *wiphy; | 565 | struct wiphy *wiphy; |
557 | int ifidx; | 566 | struct net_device *dev; |
567 | bool aborted; | ||
568 | |||
569 | /* keep last */ | ||
570 | struct ieee80211_channel *channels[0]; | ||
558 | }; | 571 | }; |
559 | 572 | ||
560 | /** | 573 | /** |
@@ -584,7 +597,6 @@ enum cfg80211_signal_type { | |||
584 | * is no guarantee that these are well-formed!) | 597 | * is no guarantee that these are well-formed!) |
585 | * @len_information_elements: total length of the information elements | 598 | * @len_information_elements: total length of the information elements |
586 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 599 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
587 | * @hold: BSS should not expire | ||
588 | * @free_priv: function pointer to free private data | 600 | * @free_priv: function pointer to free private data |
589 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 601 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
590 | */ | 602 | */ |
@@ -605,37 +617,59 @@ struct cfg80211_bss { | |||
605 | }; | 617 | }; |
606 | 618 | ||
607 | /** | 619 | /** |
620 | * ieee80211_bss_get_ie - find IE with given ID | ||
621 | * @bss: the bss to search | ||
622 | * @ie: the IE ID | ||
623 | * Returns %NULL if not found. | ||
624 | */ | ||
625 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | ||
626 | |||
627 | |||
628 | /** | ||
629 | * struct cfg80211_crypto_settings - Crypto settings | ||
630 | * @wpa_versions: indicates which, if any, WPA versions are enabled | ||
631 | * (from enum nl80211_wpa_versions) | ||
632 | * @cipher_group: group key cipher suite (or 0 if unset) | ||
633 | * @n_ciphers_pairwise: number of AP supported unicast ciphers | ||
634 | * @ciphers_pairwise: unicast key cipher suites | ||
635 | * @n_akm_suites: number of AKM suites | ||
636 | * @akm_suites: AKM suites | ||
637 | * @control_port: Whether user space controls IEEE 802.1X port, i.e., | ||
638 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is | ||
639 | * required to assume that the port is unauthorized until authorized by | ||
640 | * user space. Otherwise, port is marked authorized by default. | ||
641 | */ | ||
642 | struct cfg80211_crypto_settings { | ||
643 | u32 wpa_versions; | ||
644 | u32 cipher_group; | ||
645 | int n_ciphers_pairwise; | ||
646 | u32 ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES]; | ||
647 | int n_akm_suites; | ||
648 | u32 akm_suites[NL80211_MAX_NR_AKM_SUITES]; | ||
649 | bool control_port; | ||
650 | }; | ||
651 | |||
652 | /** | ||
608 | * struct cfg80211_auth_request - Authentication request data | 653 | * struct cfg80211_auth_request - Authentication request data |
609 | * | 654 | * |
610 | * This structure provides information needed to complete IEEE 802.11 | 655 | * This structure provides information needed to complete IEEE 802.11 |
611 | * authentication. | 656 | * authentication. |
612 | * NOTE: This structure will likely change when more code from mac80211 is | 657 | * |
613 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | 658 | * @bss: The BSS to authenticate with. |
614 | * Before using this in a driver that does not use mac80211, it would be better | ||
615 | * to check the status of that work and better yet, volunteer to work on it. | ||
616 | * | ||
617 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
618 | * scan results) | ||
619 | * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case); | ||
620 | * this field is required to be present; if the driver wants to help with | ||
621 | * BSS selection, it should use (yet to be added) MLME event to allow user | ||
622 | * space SME to be notified of roaming candidate, so that the SME can then | ||
623 | * use the authentication request with the recommended BSSID and whatever | ||
624 | * other data may be needed for authentication/association | ||
625 | * @ssid: SSID or %NULL if not yet available | ||
626 | * @ssid_len: Length of ssid in octets | ||
627 | * @auth_type: Authentication type (algorithm) | 659 | * @auth_type: Authentication type (algorithm) |
628 | * @ie: Extra IEs to add to Authentication frame or %NULL | 660 | * @ie: Extra IEs to add to Authentication frame or %NULL |
629 | * @ie_len: Length of ie buffer in octets | 661 | * @ie_len: Length of ie buffer in octets |
662 | * @key_len: length of WEP key for shared key authentication | ||
663 | * @key_idx: index of WEP key for shared key authentication | ||
664 | * @key: WEP key for shared key authentication | ||
630 | */ | 665 | */ |
631 | struct cfg80211_auth_request { | 666 | struct cfg80211_auth_request { |
632 | struct ieee80211_channel *chan; | 667 | struct cfg80211_bss *bss; |
633 | u8 *peer_addr; | ||
634 | const u8 *ssid; | ||
635 | size_t ssid_len; | ||
636 | enum nl80211_auth_type auth_type; | ||
637 | const u8 *ie; | 668 | const u8 *ie; |
638 | size_t ie_len; | 669 | size_t ie_len; |
670 | enum nl80211_auth_type auth_type; | ||
671 | const u8 *key; | ||
672 | u8 key_len, key_idx; | ||
639 | }; | 673 | }; |
640 | 674 | ||
641 | /** | 675 | /** |
@@ -643,35 +677,19 @@ struct cfg80211_auth_request { | |||
643 | * | 677 | * |
644 | * This structure provides information needed to complete IEEE 802.11 | 678 | * This structure provides information needed to complete IEEE 802.11 |
645 | * (re)association. | 679 | * (re)association. |
646 | * NOTE: This structure will likely change when more code from mac80211 is | 680 | * @bss: The BSS to associate with. |
647 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
648 | * Before using this in a driver that does not use mac80211, it would be better | ||
649 | * to check the status of that work and better yet, volunteer to work on it. | ||
650 | * | ||
651 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
652 | * scan results) | ||
653 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
654 | * to be present and the STA must be in State 2 (authenticated) with the | ||
655 | * peer STA | ||
656 | * @ssid: SSID | ||
657 | * @ssid_len: Length of ssid in octets | ||
658 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | 681 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL |
659 | * @ie_len: Length of ie buffer in octets | 682 | * @ie_len: Length of ie buffer in octets |
660 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association | 683 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association |
661 | * @control_port: Whether user space controls IEEE 802.1X port, i.e., | 684 | * @crypto: crypto settings |
662 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is | 685 | * @prev_bssid: previous BSSID, if not %NULL use reassociate frame |
663 | * required to assume that the port is unauthorized until authorized by | ||
664 | * user space. Otherwise, port is marked authorized by default. | ||
665 | */ | 686 | */ |
666 | struct cfg80211_assoc_request { | 687 | struct cfg80211_assoc_request { |
667 | struct ieee80211_channel *chan; | 688 | struct cfg80211_bss *bss; |
668 | u8 *peer_addr; | 689 | const u8 *ie, *prev_bssid; |
669 | const u8 *ssid; | ||
670 | size_t ssid_len; | ||
671 | const u8 *ie; | ||
672 | size_t ie_len; | 690 | size_t ie_len; |
691 | struct cfg80211_crypto_settings crypto; | ||
673 | bool use_mfp; | 692 | bool use_mfp; |
674 | bool control_port; | ||
675 | }; | 693 | }; |
676 | 694 | ||
677 | /** | 695 | /** |
@@ -680,16 +698,16 @@ struct cfg80211_assoc_request { | |||
680 | * This structure provides information needed to complete IEEE 802.11 | 698 | * This structure provides information needed to complete IEEE 802.11 |
681 | * deauthentication. | 699 | * deauthentication. |
682 | * | 700 | * |
683 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | 701 | * @bss: the BSS to deauthenticate from |
684 | * to be present and the STA must be authenticated with the peer STA | ||
685 | * @ie: Extra IEs to add to Deauthentication frame or %NULL | 702 | * @ie: Extra IEs to add to Deauthentication frame or %NULL |
686 | * @ie_len: Length of ie buffer in octets | 703 | * @ie_len: Length of ie buffer in octets |
704 | * @reason_code: The reason code for the deauthentication | ||
687 | */ | 705 | */ |
688 | struct cfg80211_deauth_request { | 706 | struct cfg80211_deauth_request { |
689 | u8 *peer_addr; | 707 | struct cfg80211_bss *bss; |
690 | u16 reason_code; | ||
691 | const u8 *ie; | 708 | const u8 *ie; |
692 | size_t ie_len; | 709 | size_t ie_len; |
710 | u16 reason_code; | ||
693 | }; | 711 | }; |
694 | 712 | ||
695 | /** | 713 | /** |
@@ -698,16 +716,16 @@ struct cfg80211_deauth_request { | |||
698 | * This structure provides information needed to complete IEEE 802.11 | 716 | * This structure provides information needed to complete IEEE 802.11 |
699 | * disassocation. | 717 | * disassocation. |
700 | * | 718 | * |
701 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | 719 | * @bss: the BSS to disassociate from |
702 | * to be present and the STA must be associated with the peer STA | ||
703 | * @ie: Extra IEs to add to Disassociation frame or %NULL | 720 | * @ie: Extra IEs to add to Disassociation frame or %NULL |
704 | * @ie_len: Length of ie buffer in octets | 721 | * @ie_len: Length of ie buffer in octets |
722 | * @reason_code: The reason code for the disassociation | ||
705 | */ | 723 | */ |
706 | struct cfg80211_disassoc_request { | 724 | struct cfg80211_disassoc_request { |
707 | u8 *peer_addr; | 725 | struct cfg80211_bss *bss; |
708 | u16 reason_code; | ||
709 | const u8 *ie; | 726 | const u8 *ie; |
710 | size_t ie_len; | 727 | size_t ie_len; |
728 | u16 reason_code; | ||
711 | }; | 729 | }; |
712 | 730 | ||
713 | /** | 731 | /** |
@@ -726,6 +744,8 @@ struct cfg80211_disassoc_request { | |||
726 | * @ie: information element(s) to include in the beacon | 744 | * @ie: information element(s) to include in the beacon |
727 | * @ie_len: length of that | 745 | * @ie_len: length of that |
728 | * @beacon_interval: beacon interval to use | 746 | * @beacon_interval: beacon interval to use |
747 | * @privacy: this is a protected network, keys will be configured | ||
748 | * after joining | ||
729 | */ | 749 | */ |
730 | struct cfg80211_ibss_params { | 750 | struct cfg80211_ibss_params { |
731 | u8 *ssid; | 751 | u8 *ssid; |
@@ -735,6 +755,42 @@ struct cfg80211_ibss_params { | |||
735 | u8 ssid_len, ie_len; | 755 | u8 ssid_len, ie_len; |
736 | u16 beacon_interval; | 756 | u16 beacon_interval; |
737 | bool channel_fixed; | 757 | bool channel_fixed; |
758 | bool privacy; | ||
759 | }; | ||
760 | |||
761 | /** | ||
762 | * struct cfg80211_connect_params - Connection parameters | ||
763 | * | ||
764 | * This structure provides information needed to complete IEEE 802.11 | ||
765 | * authentication and association. | ||
766 | * | ||
767 | * @channel: The channel to use or %NULL if not specified (auto-select based | ||
768 | * on scan results) | ||
769 | * @bssid: The AP BSSID or %NULL if not specified (auto-select based on scan | ||
770 | * results) | ||
771 | * @ssid: SSID | ||
772 | * @ssid_len: Length of ssid in octets | ||
773 | * @auth_type: Authentication type (algorithm) | ||
774 | * @assoc_ie: IEs for association request | ||
775 | * @assoc_ie_len: Length of assoc_ie in octets | ||
776 | * @privacy: indicates whether privacy-enabled APs should be used | ||
777 | * @crypto: crypto settings | ||
778 | * @key_len: length of WEP key for shared key authentication | ||
779 | * @key_idx: index of WEP key for shared key authentication | ||
780 | * @key: WEP key for shared key authentication | ||
781 | */ | ||
782 | struct cfg80211_connect_params { | ||
783 | struct ieee80211_channel *channel; | ||
784 | u8 *bssid; | ||
785 | u8 *ssid; | ||
786 | size_t ssid_len; | ||
787 | enum nl80211_auth_type auth_type; | ||
788 | u8 *ie; | ||
789 | size_t ie_len; | ||
790 | bool privacy; | ||
791 | struct cfg80211_crypto_settings crypto; | ||
792 | const u8 *key; | ||
793 | u8 key_len, key_idx; | ||
738 | }; | 794 | }; |
739 | 795 | ||
740 | /** | 796 | /** |
@@ -764,6 +820,26 @@ enum tx_power_setting { | |||
764 | TX_POWER_FIXED, | 820 | TX_POWER_FIXED, |
765 | }; | 821 | }; |
766 | 822 | ||
823 | /* | ||
824 | * cfg80211_bitrate_mask - masks for bitrate control | ||
825 | */ | ||
826 | struct cfg80211_bitrate_mask { | ||
827 | /* | ||
828 | * As discussed in Berlin, this struct really | ||
829 | * should look like this: | ||
830 | |||
831 | struct { | ||
832 | u32 legacy; | ||
833 | u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; | ||
834 | } control[IEEE80211_NUM_BANDS]; | ||
835 | |||
836 | * Since we can always fix in-kernel users, let's keep | ||
837 | * it simpler for now: | ||
838 | */ | ||
839 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | ||
840 | u32 maxrate; /* in kbps, 0 == no limit */ | ||
841 | }; | ||
842 | |||
767 | /** | 843 | /** |
768 | * struct cfg80211_ops - backend description for wireless configuration | 844 | * struct cfg80211_ops - backend description for wireless configuration |
769 | * | 845 | * |
@@ -781,7 +857,8 @@ enum tx_power_setting { | |||
781 | * @resume: wiphy device needs to be resumed | 857 | * @resume: wiphy device needs to be resumed |
782 | * | 858 | * |
783 | * @add_virtual_intf: create a new virtual interface with the given name, | 859 | * @add_virtual_intf: create a new virtual interface with the given name, |
784 | * must set the struct wireless_dev's iftype. | 860 | * must set the struct wireless_dev's iftype. Beware: You must create |
861 | * the new netdev in the wiphy's network namespace! | ||
785 | * | 862 | * |
786 | * @del_virtual_intf: remove the virtual interface determined by ifindex. | 863 | * @del_virtual_intf: remove the virtual interface determined by ifindex. |
787 | * | 864 | * |
@@ -841,6 +918,12 @@ enum tx_power_setting { | |||
841 | * @deauth: Request to deauthenticate from the specified peer | 918 | * @deauth: Request to deauthenticate from the specified peer |
842 | * @disassoc: Request to disassociate from the specified peer | 919 | * @disassoc: Request to disassociate from the specified peer |
843 | * | 920 | * |
921 | * @connect: Connect to the ESS with the specified parameters. When connected, | ||
922 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. | ||
923 | * If the connection fails for some reason, call cfg80211_connect_result() | ||
924 | * with the status from the AP. | ||
925 | * @disconnect: Disconnect from the BSS/ESS. | ||
926 | * | ||
844 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call | 927 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call |
845 | * cfg80211_ibss_joined(), also call that function when changing BSSID due | 928 | * cfg80211_ibss_joined(), also call that function when changing BSSID due |
846 | * to a merge. | 929 | * to a merge. |
@@ -857,6 +940,8 @@ enum tx_power_setting { | |||
857 | * | 940 | * |
858 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting | 941 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting |
859 | * functions to adjust rfkill hw state | 942 | * functions to adjust rfkill hw state |
943 | * | ||
944 | * @testmode_cmd: run a test mode command | ||
860 | */ | 945 | */ |
861 | struct cfg80211_ops { | 946 | struct cfg80211_ops { |
862 | int (*suspend)(struct wiphy *wiphy); | 947 | int (*suspend)(struct wiphy *wiphy); |
@@ -865,8 +950,9 @@ struct cfg80211_ops { | |||
865 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 950 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
866 | enum nl80211_iftype type, u32 *flags, | 951 | enum nl80211_iftype type, u32 *flags, |
867 | struct vif_params *params); | 952 | struct vif_params *params); |
868 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); | 953 | int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev); |
869 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, | 954 | int (*change_virtual_intf)(struct wiphy *wiphy, |
955 | struct net_device *dev, | ||
870 | enum nl80211_iftype type, u32 *flags, | 956 | enum nl80211_iftype type, u32 *flags, |
871 | struct vif_params *params); | 957 | struct vif_params *params); |
872 | 958 | ||
@@ -939,9 +1025,16 @@ struct cfg80211_ops { | |||
939 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, | 1025 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, |
940 | struct cfg80211_assoc_request *req); | 1026 | struct cfg80211_assoc_request *req); |
941 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, | 1027 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, |
942 | struct cfg80211_deauth_request *req); | 1028 | struct cfg80211_deauth_request *req, |
1029 | void *cookie); | ||
943 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, | 1030 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, |
944 | struct cfg80211_disassoc_request *req); | 1031 | struct cfg80211_disassoc_request *req, |
1032 | void *cookie); | ||
1033 | |||
1034 | int (*connect)(struct wiphy *wiphy, struct net_device *dev, | ||
1035 | struct cfg80211_connect_params *sme); | ||
1036 | int (*disconnect)(struct wiphy *wiphy, struct net_device *dev, | ||
1037 | u16 reason_code); | ||
945 | 1038 | ||
946 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, | 1039 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, |
947 | struct cfg80211_ibss_params *params); | 1040 | struct cfg80211_ibss_params *params); |
@@ -953,7 +1046,23 @@ struct cfg80211_ops { | |||
953 | enum tx_power_setting type, int dbm); | 1046 | enum tx_power_setting type, int dbm); |
954 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); | 1047 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); |
955 | 1048 | ||
1049 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, | ||
1050 | u8 *addr); | ||
1051 | |||
956 | void (*rfkill_poll)(struct wiphy *wiphy); | 1052 | void (*rfkill_poll)(struct wiphy *wiphy); |
1053 | |||
1054 | #ifdef CONFIG_NL80211_TESTMODE | ||
1055 | int (*testmode_cmd)(struct wiphy *wiphy, void *data, int len); | ||
1056 | #endif | ||
1057 | |||
1058 | int (*set_bitrate_mask)(struct wiphy *wiphy, | ||
1059 | struct net_device *dev, | ||
1060 | const u8 *peer, | ||
1061 | const struct cfg80211_bitrate_mask *mask); | ||
1062 | |||
1063 | /* some temporary stuff to finish wext */ | ||
1064 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | ||
1065 | bool enabled, int timeout); | ||
957 | }; | 1066 | }; |
958 | 1067 | ||
959 | /* | 1068 | /* |
@@ -996,6 +1105,12 @@ struct cfg80211_ops { | |||
996 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); | 1105 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); |
997 | * -1 = fragmentation disabled, only odd values >= 256 used | 1106 | * -1 = fragmentation disabled, only odd values >= 256 used |
998 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1107 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1108 | * @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 | ||
999 | */ | 1114 | */ |
1000 | struct wiphy { | 1115 | struct wiphy { |
1001 | /* assign these fields before you register the wiphy */ | 1116 | /* assign these fields before you register the wiphy */ |
@@ -1010,6 +1125,9 @@ struct wiphy { | |||
1010 | bool strict_regulatory; | 1125 | bool strict_regulatory; |
1011 | bool disable_beacon_hints; | 1126 | bool disable_beacon_hints; |
1012 | 1127 | ||
1128 | bool netnsok; | ||
1129 | bool ps_default; | ||
1130 | |||
1013 | enum cfg80211_signal_type signal_type; | 1131 | enum cfg80211_signal_type signal_type; |
1014 | 1132 | ||
1015 | int bss_priv_size; | 1133 | int bss_priv_size; |
@@ -1048,9 +1166,35 @@ struct wiphy { | |||
1048 | /* dir in debugfs: ieee80211/<wiphyname> */ | 1166 | /* dir in debugfs: ieee80211/<wiphyname> */ |
1049 | struct dentry *debugfsdir; | 1167 | struct dentry *debugfsdir; |
1050 | 1168 | ||
1169 | #ifdef CONFIG_NET_NS | ||
1170 | /* the network namespace this phy lives in currently */ | ||
1171 | struct net *_net; | ||
1172 | #endif | ||
1173 | |||
1051 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1174 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1052 | }; | 1175 | }; |
1053 | 1176 | ||
1177 | #ifdef CONFIG_NET_NS | ||
1178 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1179 | { | ||
1180 | return wiphy->_net; | ||
1181 | } | ||
1182 | |||
1183 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1184 | { | ||
1185 | wiphy->_net = net; | ||
1186 | } | ||
1187 | #else | ||
1188 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1189 | { | ||
1190 | return &init_net; | ||
1191 | } | ||
1192 | |||
1193 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1194 | { | ||
1195 | } | ||
1196 | #endif | ||
1197 | |||
1054 | /** | 1198 | /** |
1055 | * wiphy_priv - return priv from wiphy | 1199 | * wiphy_priv - return priv from wiphy |
1056 | * | 1200 | * |
@@ -1063,6 +1207,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy) | |||
1063 | } | 1207 | } |
1064 | 1208 | ||
1065 | /** | 1209 | /** |
1210 | * priv_to_wiphy - return the wiphy containing the priv | ||
1211 | * | ||
1212 | * @priv: a pointer previously returned by wiphy_priv | ||
1213 | */ | ||
1214 | static inline struct wiphy *priv_to_wiphy(void *priv) | ||
1215 | { | ||
1216 | BUG_ON(!priv); | ||
1217 | return container_of(priv, struct wiphy, priv); | ||
1218 | } | ||
1219 | |||
1220 | /** | ||
1066 | * set_wiphy_dev - set device pointer for wiphy | 1221 | * set_wiphy_dev - set device pointer for wiphy |
1067 | * | 1222 | * |
1068 | * @wiphy: The wiphy whose device to bind | 1223 | * @wiphy: The wiphy whose device to bind |
@@ -1134,6 +1289,13 @@ extern void wiphy_unregister(struct wiphy *wiphy); | |||
1134 | */ | 1289 | */ |
1135 | extern void wiphy_free(struct wiphy *wiphy); | 1290 | extern void wiphy_free(struct wiphy *wiphy); |
1136 | 1291 | ||
1292 | /* internal structs */ | ||
1293 | struct cfg80211_conn; | ||
1294 | struct cfg80211_internal_bss; | ||
1295 | struct cfg80211_cached_keys; | ||
1296 | |||
1297 | #define MAX_AUTH_BSSES 4 | ||
1298 | |||
1137 | /** | 1299 | /** |
1138 | * struct wireless_dev - wireless per-netdev state | 1300 | * struct wireless_dev - wireless per-netdev state |
1139 | * | 1301 | * |
@@ -1157,22 +1319,45 @@ struct wireless_dev { | |||
1157 | struct wiphy *wiphy; | 1319 | struct wiphy *wiphy; |
1158 | enum nl80211_iftype iftype; | 1320 | enum nl80211_iftype iftype; |
1159 | 1321 | ||
1160 | /* private to the generic wireless code */ | 1322 | /* the remainder of this struct should be private to cfg80211 */ |
1161 | struct list_head list; | 1323 | struct list_head list; |
1162 | struct net_device *netdev; | 1324 | struct net_device *netdev; |
1163 | 1325 | ||
1164 | /* currently used for IBSS - might be rearranged in the future */ | 1326 | struct mutex mtx; |
1165 | struct cfg80211_bss *current_bss; | 1327 | |
1166 | u8 bssid[ETH_ALEN]; | 1328 | struct work_struct cleanup_work; |
1329 | |||
1330 | /* currently used for IBSS and SME - might be rearranged later */ | ||
1167 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1331 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1168 | u8 ssid_len; | 1332 | u8 ssid_len; |
1333 | enum { | ||
1334 | CFG80211_SME_IDLE, | ||
1335 | CFG80211_SME_CONNECTING, | ||
1336 | CFG80211_SME_CONNECTED, | ||
1337 | } sme_state; | ||
1338 | struct cfg80211_conn *conn; | ||
1339 | struct cfg80211_cached_keys *connect_keys; | ||
1340 | |||
1341 | struct list_head event_list; | ||
1342 | spinlock_t event_lock; | ||
1343 | |||
1344 | struct cfg80211_internal_bss *authtry_bsses[MAX_AUTH_BSSES]; | ||
1345 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; | ||
1346 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | ||
1169 | 1347 | ||
1170 | #ifdef CONFIG_WIRELESS_EXT | 1348 | #ifdef CONFIG_WIRELESS_EXT |
1171 | /* wext data */ | 1349 | /* wext data */ |
1172 | struct { | 1350 | struct { |
1173 | struct cfg80211_ibss_params ibss; | 1351 | struct cfg80211_ibss_params ibss; |
1174 | u8 bssid[ETH_ALEN]; | 1352 | struct cfg80211_connect_params connect; |
1353 | struct cfg80211_cached_keys *keys; | ||
1354 | u8 *ie; | ||
1355 | size_t ie_len; | ||
1356 | u8 bssid[ETH_ALEN], prev_bssid[ETH_ALEN]; | ||
1357 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | ||
1175 | s8 default_key, default_mgmt_key; | 1358 | s8 default_key, default_mgmt_key; |
1359 | bool ps, prev_bssid_valid; | ||
1360 | int ps_timeout; | ||
1176 | } wext; | 1361 | } wext; |
1177 | #endif | 1362 | #endif |
1178 | }; | 1363 | }; |
@@ -1352,20 +1537,6 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb); | |||
1352 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | 1537 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); |
1353 | 1538 | ||
1354 | /** | 1539 | /** |
1355 | * regulatory_hint_11d - hints a country IE as a regulatory domain | ||
1356 | * @wiphy: the wireless device giving the hint (used only for reporting | ||
1357 | * conflicts) | ||
1358 | * @country_ie: pointer to the country IE | ||
1359 | * @country_ie_len: length of the country IE | ||
1360 | * | ||
1361 | * We will intersect the rd with the what CRDA tells us should apply | ||
1362 | * for the alpha2 this country IE belongs to, this prevents APs from | ||
1363 | * sending us incorrect or outdated information against a country. | ||
1364 | */ | ||
1365 | extern void regulatory_hint_11d(struct wiphy *wiphy, | ||
1366 | u8 *country_ie, | ||
1367 | u8 country_ie_len); | ||
1368 | /** | ||
1369 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain | 1540 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain |
1370 | * @wiphy: the wireless device we want to process the regulatory domain on | 1541 | * @wiphy: the wireless device we want to process the regulatory domain on |
1371 | * @regd: the custom regulatory domain to use for this wiphy | 1542 | * @regd: the custom regulatory domain to use for this wiphy |
@@ -1433,27 +1604,34 @@ int cfg80211_wext_siwmlme(struct net_device *dev, | |||
1433 | int cfg80211_wext_giwrange(struct net_device *dev, | 1604 | int cfg80211_wext_giwrange(struct net_device *dev, |
1434 | struct iw_request_info *info, | 1605 | struct iw_request_info *info, |
1435 | struct iw_point *data, char *extra); | 1606 | struct iw_point *data, char *extra); |
1436 | int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | 1607 | int cfg80211_wext_siwgenie(struct net_device *dev, |
1437 | struct iw_request_info *info, | 1608 | struct iw_request_info *info, |
1438 | struct iw_freq *freq, char *extra); | 1609 | struct iw_point *data, char *extra); |
1439 | int cfg80211_ibss_wext_giwfreq(struct net_device *dev, | 1610 | int cfg80211_wext_siwauth(struct net_device *dev, |
1440 | struct iw_request_info *info, | 1611 | struct iw_request_info *info, |
1441 | struct iw_freq *freq, char *extra); | 1612 | struct iw_param *data, char *extra); |
1442 | int cfg80211_ibss_wext_siwessid(struct net_device *dev, | 1613 | int cfg80211_wext_giwauth(struct net_device *dev, |
1443 | struct iw_request_info *info, | 1614 | struct iw_request_info *info, |
1444 | struct iw_point *data, char *ssid); | 1615 | struct iw_param *data, char *extra); |
1445 | int cfg80211_ibss_wext_giwessid(struct net_device *dev, | ||
1446 | struct iw_request_info *info, | ||
1447 | struct iw_point *data, char *ssid); | ||
1448 | int cfg80211_ibss_wext_siwap(struct net_device *dev, | ||
1449 | struct iw_request_info *info, | ||
1450 | struct sockaddr *ap_addr, char *extra); | ||
1451 | int cfg80211_ibss_wext_giwap(struct net_device *dev, | ||
1452 | struct iw_request_info *info, | ||
1453 | struct sockaddr *ap_addr, char *extra); | ||
1454 | 1616 | ||
1455 | struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, | 1617 | int cfg80211_wext_siwfreq(struct net_device *dev, |
1456 | struct iw_freq *freq); | 1618 | struct iw_request_info *info, |
1619 | struct iw_freq *freq, char *extra); | ||
1620 | int cfg80211_wext_giwfreq(struct net_device *dev, | ||
1621 | struct iw_request_info *info, | ||
1622 | struct iw_freq *freq, char *extra); | ||
1623 | int cfg80211_wext_siwessid(struct net_device *dev, | ||
1624 | struct iw_request_info *info, | ||
1625 | struct iw_point *data, char *ssid); | ||
1626 | int cfg80211_wext_giwessid(struct net_device *dev, | ||
1627 | struct iw_request_info *info, | ||
1628 | struct iw_point *data, char *ssid); | ||
1629 | int cfg80211_wext_siwrate(struct net_device *dev, | ||
1630 | struct iw_request_info *info, | ||
1631 | struct iw_param *rate, char *extra); | ||
1632 | int cfg80211_wext_giwrate(struct net_device *dev, | ||
1633 | struct iw_request_info *info, | ||
1634 | struct iw_param *rate, char *extra); | ||
1457 | 1635 | ||
1458 | int cfg80211_wext_siwrts(struct net_device *dev, | 1636 | int cfg80211_wext_siwrts(struct net_device *dev, |
1459 | struct iw_request_info *info, | 1637 | struct iw_request_info *info, |
@@ -1488,6 +1666,21 @@ int cfg80211_wext_siwtxpower(struct net_device *dev, | |||
1488 | int cfg80211_wext_giwtxpower(struct net_device *dev, | 1666 | int cfg80211_wext_giwtxpower(struct net_device *dev, |
1489 | struct iw_request_info *info, | 1667 | struct iw_request_info *info, |
1490 | union iwreq_data *data, char *keybuf); | 1668 | union iwreq_data *data, char *keybuf); |
1669 | struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev); | ||
1670 | |||
1671 | int cfg80211_wext_siwpower(struct net_device *dev, | ||
1672 | struct iw_request_info *info, | ||
1673 | struct iw_param *wrq, char *extra); | ||
1674 | int cfg80211_wext_giwpower(struct net_device *dev, | ||
1675 | struct iw_request_info *info, | ||
1676 | struct iw_param *wrq, char *extra); | ||
1677 | |||
1678 | int cfg80211_wext_siwap(struct net_device *dev, | ||
1679 | struct iw_request_info *info, | ||
1680 | struct sockaddr *ap_addr, char *extra); | ||
1681 | int cfg80211_wext_giwap(struct net_device *dev, | ||
1682 | struct iw_request_info *info, | ||
1683 | struct sockaddr *ap_addr, char *extra); | ||
1491 | 1684 | ||
1492 | /* | 1685 | /* |
1493 | * callbacks for asynchronous cfg80211 methods, notification | 1686 | * callbacks for asynchronous cfg80211 methods, notification |
@@ -1569,7 +1762,7 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | |||
1569 | * This function is called whenever an authentication has been processed in | 1762 | * This function is called whenever an authentication has been processed in |
1570 | * station mode. The driver is required to call either this function or | 1763 | * station mode. The driver is required to call either this function or |
1571 | * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() | 1764 | * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() |
1572 | * call. | 1765 | * call. This function may sleep. |
1573 | */ | 1766 | */ |
1574 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | 1767 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); |
1575 | 1768 | ||
@@ -1577,6 +1770,8 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | |||
1577 | * cfg80211_send_auth_timeout - notification of timed out authentication | 1770 | * cfg80211_send_auth_timeout - notification of timed out authentication |
1578 | * @dev: network device | 1771 | * @dev: network device |
1579 | * @addr: The MAC address of the device with which the authentication timed out | 1772 | * @addr: The MAC address of the device with which the authentication timed out |
1773 | * | ||
1774 | * This function may sleep. | ||
1580 | */ | 1775 | */ |
1581 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | 1776 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); |
1582 | 1777 | ||
@@ -1589,7 +1784,7 @@ void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | |||
1589 | * This function is called whenever a (re)association response has been | 1784 | * This function is called whenever a (re)association response has been |
1590 | * processed in station mode. The driver is required to call either this | 1785 | * processed in station mode. The driver is required to call either this |
1591 | * function or cfg80211_send_assoc_timeout() to indicate the result of | 1786 | * function or cfg80211_send_assoc_timeout() to indicate the result of |
1592 | * cfg80211_ops::assoc() call. | 1787 | * cfg80211_ops::assoc() call. This function may sleep. |
1593 | */ | 1788 | */ |
1594 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | 1789 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); |
1595 | 1790 | ||
@@ -1597,6 +1792,8 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | |||
1597 | * cfg80211_send_assoc_timeout - notification of timed out association | 1792 | * cfg80211_send_assoc_timeout - notification of timed out association |
1598 | * @dev: network device | 1793 | * @dev: network device |
1599 | * @addr: The MAC address of the device with which the association timed out | 1794 | * @addr: The MAC address of the device with which the association timed out |
1795 | * | ||
1796 | * This function may sleep. | ||
1600 | */ | 1797 | */ |
1601 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | 1798 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); |
1602 | 1799 | ||
@@ -1605,41 +1802,30 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | |||
1605 | * @dev: network device | 1802 | * @dev: network device |
1606 | * @buf: deauthentication frame (header + body) | 1803 | * @buf: deauthentication frame (header + body) |
1607 | * @len: length of the frame data | 1804 | * @len: length of the frame data |
1805 | * @cookie: cookie from ->deauth if called within that callback, | ||
1806 | * %NULL otherwise | ||
1608 | * | 1807 | * |
1609 | * This function is called whenever deauthentication has been processed in | 1808 | * This function is called whenever deauthentication has been processed in |
1610 | * station mode. This includes both received deauthentication frames and | 1809 | * station mode. This includes both received deauthentication frames and |
1611 | * locally generated ones. | 1810 | * locally generated ones. This function may sleep. |
1612 | */ | 1811 | */ |
1613 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | 1812 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, |
1813 | void *cookie); | ||
1614 | 1814 | ||
1615 | /** | 1815 | /** |
1616 | * cfg80211_send_disassoc - notification of processed disassociation | 1816 | * cfg80211_send_disassoc - notification of processed disassociation |
1617 | * @dev: network device | 1817 | * @dev: network device |
1618 | * @buf: disassociation response frame (header + body) | 1818 | * @buf: disassociation response frame (header + body) |
1619 | * @len: length of the frame data | 1819 | * @len: length of the frame data |
1820 | * @cookie: cookie from ->disassoc if called within that callback, | ||
1821 | * %NULL otherwise | ||
1620 | * | 1822 | * |
1621 | * This function is called whenever disassociation has been processed in | 1823 | * This function is called whenever disassociation has been processed in |
1622 | * station mode. This includes both received disassociation frames and locally | 1824 | * station mode. This includes both received disassociation frames and locally |
1623 | * generated ones. | 1825 | * generated ones. This function may sleep. |
1624 | */ | ||
1625 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); | ||
1626 | |||
1627 | /** | ||
1628 | * cfg80211_hold_bss - exclude bss from expiration | ||
1629 | * @bss: bss which should not expire | ||
1630 | * | ||
1631 | * In a case when the BSS is not updated but it shouldn't expire this | ||
1632 | * function can be used to mark the BSS to be excluded from expiration. | ||
1633 | */ | ||
1634 | void cfg80211_hold_bss(struct cfg80211_bss *bss); | ||
1635 | |||
1636 | /** | ||
1637 | * cfg80211_unhold_bss - remove expiration exception from the BSS | ||
1638 | * @bss: bss which can expire again | ||
1639 | * | ||
1640 | * This function marks the BSS to be expirable again. | ||
1641 | */ | 1826 | */ |
1642 | void cfg80211_unhold_bss(struct cfg80211_bss *bss); | 1827 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, |
1828 | void *cookie); | ||
1643 | 1829 | ||
1644 | /** | 1830 | /** |
1645 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) | 1831 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) |
@@ -1648,6 +1834,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss); | |||
1648 | * @key_type: The key type that the received frame used | 1834 | * @key_type: The key type that the received frame used |
1649 | * @key_id: Key identifier (0..3) | 1835 | * @key_id: Key identifier (0..3) |
1650 | * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) | 1836 | * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) |
1837 | * @gfp: allocation flags | ||
1651 | * | 1838 | * |
1652 | * This function is called whenever the local MAC detects a MIC failure in a | 1839 | * This function is called whenever the local MAC detects a MIC failure in a |
1653 | * received frame. This matches with MLME-MICHAELMICFAILURE.indication() | 1840 | * received frame. This matches with MLME-MICHAELMICFAILURE.indication() |
@@ -1655,7 +1842,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss); | |||
1655 | */ | 1842 | */ |
1656 | void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, | 1843 | void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, |
1657 | enum nl80211_key_type key_type, int key_id, | 1844 | enum nl80211_key_type key_type, int key_id, |
1658 | const u8 *tsc); | 1845 | const u8 *tsc, gfp_t gfp); |
1659 | 1846 | ||
1660 | /** | 1847 | /** |
1661 | * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS | 1848 | * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS |
@@ -1692,4 +1879,137 @@ void wiphy_rfkill_start_polling(struct wiphy *wiphy); | |||
1692 | */ | 1879 | */ |
1693 | void wiphy_rfkill_stop_polling(struct wiphy *wiphy); | 1880 | void wiphy_rfkill_stop_polling(struct wiphy *wiphy); |
1694 | 1881 | ||
1882 | #ifdef CONFIG_NL80211_TESTMODE | ||
1883 | /** | ||
1884 | * cfg80211_testmode_alloc_reply_skb - allocate testmode reply | ||
1885 | * @wiphy: the wiphy | ||
1886 | * @approxlen: an upper bound of the length of the data that will | ||
1887 | * be put into the skb | ||
1888 | * | ||
1889 | * This function allocates and pre-fills an skb for a reply to | ||
1890 | * the testmode command. Since it is intended for a reply, calling | ||
1891 | * it outside of the @testmode_cmd operation is invalid. | ||
1892 | * | ||
1893 | * The returned skb (or %NULL if any errors happen) is pre-filled | ||
1894 | * with the wiphy index and set up in a way that any data that is | ||
1895 | * put into the skb (with skb_put(), nla_put() or similar) will end | ||
1896 | * up being within the %NL80211_ATTR_TESTDATA attribute, so all that | ||
1897 | * needs to be done with the skb is adding data for the corresponding | ||
1898 | * userspace tool which can then read that data out of the testdata | ||
1899 | * attribute. You must not modify the skb in any other way. | ||
1900 | * | ||
1901 | * When done, call cfg80211_testmode_reply() with the skb and return | ||
1902 | * its error code as the result of the @testmode_cmd operation. | ||
1903 | */ | ||
1904 | struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, | ||
1905 | int approxlen); | ||
1906 | |||
1907 | /** | ||
1908 | * cfg80211_testmode_reply - send the reply skb | ||
1909 | * @skb: The skb, must have been allocated with | ||
1910 | * cfg80211_testmode_alloc_reply_skb() | ||
1911 | * | ||
1912 | * Returns an error code or 0 on success, since calling this | ||
1913 | * function will usually be the last thing before returning | ||
1914 | * from the @testmode_cmd you should return the error code. | ||
1915 | * Note that this function consumes the skb regardless of the | ||
1916 | * return value. | ||
1917 | */ | ||
1918 | int cfg80211_testmode_reply(struct sk_buff *skb); | ||
1919 | |||
1920 | /** | ||
1921 | * cfg80211_testmode_alloc_event_skb - allocate testmode event | ||
1922 | * @wiphy: the wiphy | ||
1923 | * @approxlen: an upper bound of the length of the data that will | ||
1924 | * be put into the skb | ||
1925 | * @gfp: allocation flags | ||
1926 | * | ||
1927 | * This function allocates and pre-fills an skb for an event on the | ||
1928 | * testmode multicast group. | ||
1929 | * | ||
1930 | * The returned skb (or %NULL if any errors happen) is set up in the | ||
1931 | * same way as with cfg80211_testmode_alloc_reply_skb() but prepared | ||
1932 | * for an event. As there, you should simply add data to it that will | ||
1933 | * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must | ||
1934 | * not modify the skb in any other way. | ||
1935 | * | ||
1936 | * When done filling the skb, call cfg80211_testmode_event() with the | ||
1937 | * skb to send the event. | ||
1938 | */ | ||
1939 | struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, | ||
1940 | int approxlen, gfp_t gfp); | ||
1941 | |||
1942 | /** | ||
1943 | * cfg80211_testmode_event - send the event | ||
1944 | * @skb: The skb, must have been allocated with | ||
1945 | * cfg80211_testmode_alloc_event_skb() | ||
1946 | * @gfp: allocation flags | ||
1947 | * | ||
1948 | * This function sends the given @skb, which must have been allocated | ||
1949 | * by cfg80211_testmode_alloc_event_skb(), as an event. It always | ||
1950 | * consumes it. | ||
1951 | */ | ||
1952 | void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp); | ||
1953 | |||
1954 | #define CFG80211_TESTMODE_CMD(cmd) .testmode_cmd = (cmd), | ||
1955 | #else | ||
1956 | #define CFG80211_TESTMODE_CMD(cmd) | ||
1957 | #endif | ||
1958 | |||
1959 | /** | ||
1960 | * cfg80211_connect_result - notify cfg80211 of connection result | ||
1961 | * | ||
1962 | * @dev: network device | ||
1963 | * @bssid: the BSSID of the AP | ||
1964 | * @req_ie: association request IEs (maybe be %NULL) | ||
1965 | * @req_ie_len: association request IEs length | ||
1966 | * @resp_ie: association response IEs (may be %NULL) | ||
1967 | * @resp_ie_len: assoc response IEs length | ||
1968 | * @status: status code, 0 for successful connection, use | ||
1969 | * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you | ||
1970 | * the real status code for failures. | ||
1971 | * @gfp: allocation flags | ||
1972 | * | ||
1973 | * It should be called by the underlying driver whenever connect() has | ||
1974 | * succeeded. | ||
1975 | */ | ||
1976 | void cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | ||
1977 | const u8 *req_ie, size_t req_ie_len, | ||
1978 | const u8 *resp_ie, size_t resp_ie_len, | ||
1979 | u16 status, gfp_t gfp); | ||
1980 | |||
1981 | /** | ||
1982 | * cfg80211_roamed - notify cfg80211 of roaming | ||
1983 | * | ||
1984 | * @dev: network device | ||
1985 | * @bssid: the BSSID of the new AP | ||
1986 | * @req_ie: association request IEs (maybe be %NULL) | ||
1987 | * @req_ie_len: association request IEs length | ||
1988 | * @resp_ie: association response IEs (may be %NULL) | ||
1989 | * @resp_ie_len: assoc response IEs length | ||
1990 | * @gfp: allocation flags | ||
1991 | * | ||
1992 | * It should be called by the underlying driver whenever it roamed | ||
1993 | * from one AP to another while connected. | ||
1994 | */ | ||
1995 | void cfg80211_roamed(struct net_device *dev, const u8 *bssid, | ||
1996 | const u8 *req_ie, size_t req_ie_len, | ||
1997 | const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp); | ||
1998 | |||
1999 | /** | ||
2000 | * cfg80211_disconnected - notify cfg80211 that connection was dropped | ||
2001 | * | ||
2002 | * @dev: network device | ||
2003 | * @ie: information elements of the deauth/disassoc frame (may be %NULL) | ||
2004 | * @ie_len: length of IEs | ||
2005 | * @reason: reason code for the disconnection, set it to 0 if unknown | ||
2006 | * @gfp: allocation flags | ||
2007 | * | ||
2008 | * After it calls this function, the driver should enter an idle state | ||
2009 | * and not try to connect to any AP any more. | ||
2010 | */ | ||
2011 | void cfg80211_disconnected(struct net_device *dev, u16 reason, | ||
2012 | u8 *ie, size_t ie_len, gfp_t gfp); | ||
2013 | |||
2014 | |||
1695 | #endif /* __NET_CFG80211_H */ | 2015 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/dcbnl.h b/include/net/dcbnl.h index 775cfc8055be..b36ac7e0914d 100644 --- a/include/net/dcbnl.h +++ b/include/net/dcbnl.h | |||
@@ -48,6 +48,8 @@ struct dcbnl_rtnl_ops { | |||
48 | void (*setbcncfg)(struct net_device *, int, u32); | 48 | void (*setbcncfg)(struct net_device *, int, u32); |
49 | void (*getbcnrp)(struct net_device *, int, u8 *); | 49 | void (*getbcnrp)(struct net_device *, int, u8 *); |
50 | void (*setbcnrp)(struct net_device *, int, u8); | 50 | void (*setbcnrp)(struct net_device *, int, u8); |
51 | u8 (*setapp)(struct net_device *, u8, u16, u8); | ||
52 | u8 (*getapp)(struct net_device *, u8, u16); | ||
51 | }; | 53 | }; |
52 | 54 | ||
53 | #endif /* __NET_DCBNL_H__ */ | 55 | #endif /* __NET_DCBNL_H__ */ |
diff --git a/include/net/dst.h b/include/net/dst.h index 7fc409c19b37..5a900ddcf10d 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #ifndef _NET_DST_H | 8 | #ifndef _NET_DST_H |
9 | #define _NET_DST_H | 9 | #define _NET_DST_H |
10 | 10 | ||
11 | #include <net/dst_ops.h> | ||
11 | #include <linux/netdevice.h> | 12 | #include <linux/netdevice.h> |
12 | #include <linux/rtnetlink.h> | 13 | #include <linux/rtnetlink.h> |
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
@@ -102,28 +103,6 @@ struct dst_entry | |||
102 | }; | 103 | }; |
103 | }; | 104 | }; |
104 | 105 | ||
105 | |||
106 | struct dst_ops | ||
107 | { | ||
108 | unsigned short family; | ||
109 | __be16 protocol; | ||
110 | unsigned gc_thresh; | ||
111 | |||
112 | int (*gc)(struct dst_ops *ops); | ||
113 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | ||
114 | void (*destroy)(struct dst_entry *); | ||
115 | void (*ifdown)(struct dst_entry *, | ||
116 | struct net_device *dev, int how); | ||
117 | struct dst_entry * (*negative_advice)(struct dst_entry *); | ||
118 | void (*link_failure)(struct sk_buff *); | ||
119 | void (*update_pmtu)(struct dst_entry *dst, u32 mtu); | ||
120 | int (*local_out)(struct sk_buff *skb); | ||
121 | |||
122 | atomic_t entries; | ||
123 | struct kmem_cache *kmem_cachep; | ||
124 | struct net *dst_net; | ||
125 | }; | ||
126 | |||
127 | #ifdef __KERNEL__ | 106 | #ifdef __KERNEL__ |
128 | 107 | ||
129 | static inline u32 | 108 | static inline u32 |
diff --git a/include/net/dst_ops.h b/include/net/dst_ops.h new file mode 100644 index 000000000000..d1ff9b7e99b8 --- /dev/null +++ b/include/net/dst_ops.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef _NET_DST_OPS_H | ||
2 | #define _NET_DST_OPS_H | ||
3 | #include <linux/types.h> | ||
4 | |||
5 | struct dst_entry; | ||
6 | struct kmem_cachep; | ||
7 | struct net_device; | ||
8 | struct sk_buff; | ||
9 | |||
10 | struct dst_ops { | ||
11 | unsigned short family; | ||
12 | __be16 protocol; | ||
13 | unsigned gc_thresh; | ||
14 | |||
15 | int (*gc)(struct dst_ops *ops); | ||
16 | struct dst_entry * (*check)(struct dst_entry *, __u32 cookie); | ||
17 | void (*destroy)(struct dst_entry *); | ||
18 | void (*ifdown)(struct dst_entry *, | ||
19 | struct net_device *dev, int how); | ||
20 | struct dst_entry * (*negative_advice)(struct dst_entry *); | ||
21 | void (*link_failure)(struct sk_buff *); | ||
22 | void (*update_pmtu)(struct dst_entry *dst, u32 mtu); | ||
23 | int (*local_out)(struct sk_buff *skb); | ||
24 | |||
25 | atomic_t entries; | ||
26 | struct kmem_cache *kmem_cachep; | ||
27 | }; | ||
28 | #endif | ||
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 1b0e3ee4ddd8..2a1c06874c42 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/genetlink.h> | 4 | #include <linux/genetlink.h> |
5 | #include <net/netlink.h> | 5 | #include <net/netlink.h> |
6 | #include <net/net_namespace.h> | ||
6 | 7 | ||
7 | /** | 8 | /** |
8 | * struct genl_multicast_group - generic netlink multicast group | 9 | * struct genl_multicast_group - generic netlink multicast group |
@@ -27,6 +28,8 @@ struct genl_multicast_group | |||
27 | * @name: name of family | 28 | * @name: name of family |
28 | * @version: protocol version | 29 | * @version: protocol version |
29 | * @maxattr: maximum number of attributes supported | 30 | * @maxattr: maximum number of attributes supported |
31 | * @netnsok: set to true if the family can handle network | ||
32 | * namespaces and should be presented in all of them | ||
30 | * @attrbuf: buffer to store parsed attributes | 33 | * @attrbuf: buffer to store parsed attributes |
31 | * @ops_list: list of all assigned operations | 34 | * @ops_list: list of all assigned operations |
32 | * @family_list: family list | 35 | * @family_list: family list |
@@ -39,6 +42,7 @@ struct genl_family | |||
39 | char name[GENL_NAMSIZ]; | 42 | char name[GENL_NAMSIZ]; |
40 | unsigned int version; | 43 | unsigned int version; |
41 | unsigned int maxattr; | 44 | unsigned int maxattr; |
45 | bool netnsok; | ||
42 | struct nlattr ** attrbuf; /* private */ | 46 | struct nlattr ** attrbuf; /* private */ |
43 | struct list_head ops_list; /* private */ | 47 | struct list_head ops_list; /* private */ |
44 | struct list_head family_list; /* private */ | 48 | struct list_head family_list; /* private */ |
@@ -62,8 +66,32 @@ struct genl_info | |||
62 | struct genlmsghdr * genlhdr; | 66 | struct genlmsghdr * genlhdr; |
63 | void * userhdr; | 67 | void * userhdr; |
64 | struct nlattr ** attrs; | 68 | struct nlattr ** attrs; |
69 | #ifdef CONFIG_NET_NS | ||
70 | struct net * _net; | ||
71 | #endif | ||
65 | }; | 72 | }; |
66 | 73 | ||
74 | #ifdef CONFIG_NET_NS | ||
75 | static inline struct net *genl_info_net(struct genl_info *info) | ||
76 | { | ||
77 | return info->_net; | ||
78 | } | ||
79 | |||
80 | static inline void genl_info_net_set(struct genl_info *info, struct net *net) | ||
81 | { | ||
82 | info->_net = net; | ||
83 | } | ||
84 | #else | ||
85 | static inline struct net *genl_info_net(struct genl_info *info) | ||
86 | { | ||
87 | return &init_net; | ||
88 | } | ||
89 | |||
90 | static inline void genl_info_net_set(struct genl_info *info, struct net *net) | ||
91 | { | ||
92 | } | ||
93 | #endif | ||
94 | |||
67 | /** | 95 | /** |
68 | * struct genl_ops - generic netlink operations | 96 | * struct genl_ops - generic netlink operations |
69 | * @cmd: command identifier | 97 | * @cmd: command identifier |
@@ -98,8 +126,6 @@ extern int genl_register_mc_group(struct genl_family *family, | |||
98 | extern void genl_unregister_mc_group(struct genl_family *family, | 126 | extern void genl_unregister_mc_group(struct genl_family *family, |
99 | struct genl_multicast_group *grp); | 127 | struct genl_multicast_group *grp); |
100 | 128 | ||
101 | extern struct sock *genl_sock; | ||
102 | |||
103 | /** | 129 | /** |
104 | * genlmsg_put - Add generic netlink header to netlink message | 130 | * genlmsg_put - Add generic netlink header to netlink message |
105 | * @skb: socket buffer holding the message | 131 | * @skb: socket buffer holding the message |
@@ -170,7 +196,21 @@ static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) | |||
170 | } | 196 | } |
171 | 197 | ||
172 | /** | 198 | /** |
173 | * genlmsg_multicast - multicast a netlink message | 199 | * genlmsg_multicast_netns - multicast a netlink message to a specific netns |
200 | * @net: the net namespace | ||
201 | * @skb: netlink message as socket buffer | ||
202 | * @pid: own netlink pid to avoid sending to yourself | ||
203 | * @group: multicast group id | ||
204 | * @flags: allocation flags | ||
205 | */ | ||
206 | static inline int genlmsg_multicast_netns(struct net *net, struct sk_buff *skb, | ||
207 | u32 pid, unsigned int group, gfp_t flags) | ||
208 | { | ||
209 | return nlmsg_multicast(net->genl_sock, skb, pid, group, flags); | ||
210 | } | ||
211 | |||
212 | /** | ||
213 | * genlmsg_multicast - multicast a netlink message to the default netns | ||
174 | * @skb: netlink message as socket buffer | 214 | * @skb: netlink message as socket buffer |
175 | * @pid: own netlink pid to avoid sending to yourself | 215 | * @pid: own netlink pid to avoid sending to yourself |
176 | * @group: multicast group id | 216 | * @group: multicast group id |
@@ -179,17 +219,29 @@ static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) | |||
179 | static inline int genlmsg_multicast(struct sk_buff *skb, u32 pid, | 219 | static inline int genlmsg_multicast(struct sk_buff *skb, u32 pid, |
180 | unsigned int group, gfp_t flags) | 220 | unsigned int group, gfp_t flags) |
181 | { | 221 | { |
182 | return nlmsg_multicast(genl_sock, skb, pid, group, flags); | 222 | return genlmsg_multicast_netns(&init_net, skb, pid, group, flags); |
183 | } | 223 | } |
184 | 224 | ||
185 | /** | 225 | /** |
226 | * genlmsg_multicast_allns - multicast a netlink message to all net namespaces | ||
227 | * @skb: netlink message as socket buffer | ||
228 | * @pid: own netlink pid to avoid sending to yourself | ||
229 | * @group: multicast group id | ||
230 | * @flags: allocation flags | ||
231 | * | ||
232 | * This function must hold the RTNL or rcu_read_lock(). | ||
233 | */ | ||
234 | int genlmsg_multicast_allns(struct sk_buff *skb, u32 pid, | ||
235 | unsigned int group, gfp_t flags); | ||
236 | |||
237 | /** | ||
186 | * genlmsg_unicast - unicast a netlink message | 238 | * genlmsg_unicast - unicast a netlink message |
187 | * @skb: netlink message as socket buffer | 239 | * @skb: netlink message as socket buffer |
188 | * @pid: netlink pid of the destination socket | 240 | * @pid: netlink pid of the destination socket |
189 | */ | 241 | */ |
190 | static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) | 242 | static inline int genlmsg_unicast(struct net *net, struct sk_buff *skb, u32 pid) |
191 | { | 243 | { |
192 | return nlmsg_unicast(genl_sock, skb, pid); | 244 | return nlmsg_unicast(net->genl_sock, skb, pid); |
193 | } | 245 | } |
194 | 246 | ||
195 | /** | 247 | /** |
@@ -199,7 +251,7 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) | |||
199 | */ | 251 | */ |
200 | static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info) | 252 | static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info) |
201 | { | 253 | { |
202 | return genlmsg_unicast(skb, info->snd_pid); | 254 | return genlmsg_unicast(genl_info_net(info), skb, info->snd_pid); |
203 | } | 255 | } |
204 | 256 | ||
205 | /** | 257 | /** |
diff --git a/include/net/ieee802154/mac_def.h b/include/net/ieee802154.h index 8cb684635650..d52685defb11 100644 --- a/include/net/ieee802154/mac_def.h +++ b/include/net/ieee802154.h | |||
@@ -23,8 +23,8 @@ | |||
23 | * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 23 | * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef IEEE802154_MAC_DEF_H | 26 | #ifndef NET_IEEE802154_H |
27 | #define IEEE802154_MAC_DEF_H | 27 | #define NET_IEEE802154_H |
28 | 28 | ||
29 | #define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */ | 29 | #define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */ |
30 | #define IEEE802154_FC_TYPE_DATA 0x1 /* Frame is data */ | 30 | #define IEEE802154_FC_TYPE_DATA 0x1 /* Frame is data */ |
diff --git a/include/net/ieee802154/nl802154.h b/include/net/ieee802154/nl802154.h deleted file mode 100644 index 78efcdf52b59..000000000000 --- a/include/net/ieee802154/nl802154.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* | ||
2 | * nl802154.h | ||
3 | * | ||
4 | * Copyright (C) 2007, 2008, 2009 Siemens AG | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | ||
19 | */ | ||
20 | |||
21 | #ifndef IEEE802154_NL_H | ||
22 | #define IEEE802154_NL_H | ||
23 | |||
24 | struct net_device; | ||
25 | struct ieee802154_addr; | ||
26 | |||
27 | int ieee802154_nl_assoc_indic(struct net_device *dev, | ||
28 | struct ieee802154_addr *addr, u8 cap); | ||
29 | int ieee802154_nl_assoc_confirm(struct net_device *dev, | ||
30 | u16 short_addr, u8 status); | ||
31 | int ieee802154_nl_disassoc_indic(struct net_device *dev, | ||
32 | struct ieee802154_addr *addr, u8 reason); | ||
33 | int ieee802154_nl_disassoc_confirm(struct net_device *dev, | ||
34 | u8 status); | ||
35 | int ieee802154_nl_scan_confirm(struct net_device *dev, | ||
36 | u8 status, u8 scan_type, u32 unscanned, | ||
37 | u8 *edl/*, struct list_head *pan_desc_list */); | ||
38 | int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, | ||
39 | u16 coord_addr); | ||
40 | |||
41 | #endif | ||
diff --git a/include/net/ieee802154/netdevice.h b/include/net/ieee802154_netdev.h index e2506af3e7c8..5dc6a61952de 100644 --- a/include/net/ieee802154/netdevice.h +++ b/include/net/ieee802154_netdev.h | |||
@@ -80,7 +80,7 @@ static inline int mac_cb_type(struct sk_buff *skb) | |||
80 | struct ieee802154_mlme_ops { | 80 | struct ieee802154_mlme_ops { |
81 | int (*assoc_req)(struct net_device *dev, | 81 | int (*assoc_req)(struct net_device *dev, |
82 | struct ieee802154_addr *addr, | 82 | struct ieee802154_addr *addr, |
83 | u8 channel, u8 cap); | 83 | u8 channel, u8 page, u8 cap); |
84 | int (*assoc_resp)(struct net_device *dev, | 84 | int (*assoc_resp)(struct net_device *dev, |
85 | struct ieee802154_addr *addr, | 85 | struct ieee802154_addr *addr, |
86 | u16 short_addr, u8 status); | 86 | u16 short_addr, u8 status); |
@@ -89,10 +89,10 @@ struct ieee802154_mlme_ops { | |||
89 | u8 reason); | 89 | u8 reason); |
90 | int (*start_req)(struct net_device *dev, | 90 | int (*start_req)(struct net_device *dev, |
91 | struct ieee802154_addr *addr, | 91 | struct ieee802154_addr *addr, |
92 | u8 channel, u8 bcn_ord, u8 sf_ord, | 92 | u8 channel, u8 page, u8 bcn_ord, u8 sf_ord, |
93 | u8 pan_coord, u8 blx, u8 coord_realign); | 93 | u8 pan_coord, u8 blx, u8 coord_realign); |
94 | int (*scan_req)(struct net_device *dev, | 94 | int (*scan_req)(struct net_device *dev, |
95 | u8 type, u32 channels, u8 duration); | 95 | u8 type, u32 channels, u8 page, u8 duration); |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * FIXME: these should become the part of PIB/MIB interface. | 98 | * FIXME: these should become the part of PIB/MIB interface. |
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7c5c0f79168a..15b492a9aa79 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -22,6 +22,12 @@ | |||
22 | #include <net/flow.h> | 22 | #include <net/flow.h> |
23 | #include <net/netlink.h> | 23 | #include <net/netlink.h> |
24 | 24 | ||
25 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | ||
26 | #define FIB6_TABLE_HASHSZ 256 | ||
27 | #else | ||
28 | #define FIB6_TABLE_HASHSZ 1 | ||
29 | #endif | ||
30 | |||
25 | struct rt6_info; | 31 | struct rt6_info; |
26 | 32 | ||
27 | struct fib6_config | 33 | struct fib6_config |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index bbae1e87efcd..98978e73f666 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -99,47 +99,47 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
99 | return &buf[*idx - len]; | 99 | return &buf[*idx - len]; |
100 | } | 100 | } |
101 | 101 | ||
102 | #define IP_VS_DBG_BUF(level, msg...) \ | 102 | #define IP_VS_DBG_BUF(level, msg, ...) \ |
103 | do { \ | 103 | do { \ |
104 | char ip_vs_dbg_buf[160]; \ | 104 | char ip_vs_dbg_buf[160]; \ |
105 | int ip_vs_dbg_idx = 0; \ | 105 | int ip_vs_dbg_idx = 0; \ |
106 | if (level <= ip_vs_get_debug_level()) \ | 106 | if (level <= ip_vs_get_debug_level()) \ |
107 | printk(KERN_DEBUG "IPVS: " msg); \ | 107 | printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \ |
108 | } while (0) | 108 | } while (0) |
109 | #define IP_VS_ERR_BUF(msg...) \ | 109 | #define IP_VS_ERR_BUF(msg...) \ |
110 | do { \ | 110 | do { \ |
111 | char ip_vs_dbg_buf[160]; \ | 111 | char ip_vs_dbg_buf[160]; \ |
112 | int ip_vs_dbg_idx = 0; \ | 112 | int ip_vs_dbg_idx = 0; \ |
113 | printk(KERN_ERR "IPVS: " msg); \ | 113 | pr_err(msg); \ |
114 | } while (0) | 114 | } while (0) |
115 | 115 | ||
116 | /* Only use from within IP_VS_DBG_BUF() or IP_VS_ERR_BUF macros */ | 116 | /* Only use from within IP_VS_DBG_BUF() or IP_VS_ERR_BUF macros */ |
117 | #define IP_VS_DBG_ADDR(af, addr) \ | 117 | #define IP_VS_DBG_ADDR(af, addr) \ |
118 | ip_vs_dbg_addr(af, ip_vs_dbg_buf, \ | 118 | ip_vs_dbg_addr(af, ip_vs_dbg_buf, \ |
119 | sizeof(ip_vs_dbg_buf), addr, \ | 119 | sizeof(ip_vs_dbg_buf), addr, \ |
120 | &ip_vs_dbg_idx) | 120 | &ip_vs_dbg_idx) |
121 | 121 | ||
122 | #define IP_VS_DBG(level, msg...) \ | 122 | #define IP_VS_DBG(level, msg, ...) \ |
123 | do { \ | 123 | do { \ |
124 | if (level <= ip_vs_get_debug_level()) \ | 124 | if (level <= ip_vs_get_debug_level()) \ |
125 | printk(KERN_DEBUG "IPVS: " msg); \ | 125 | printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \ |
126 | } while (0) | 126 | } while (0) |
127 | #define IP_VS_DBG_RL(msg...) \ | 127 | #define IP_VS_DBG_RL(msg, ...) \ |
128 | do { \ | 128 | do { \ |
129 | if (net_ratelimit()) \ | 129 | if (net_ratelimit()) \ |
130 | printk(KERN_DEBUG "IPVS: " msg); \ | 130 | printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \ |
131 | } while (0) | 131 | } while (0) |
132 | #define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \ | 132 | #define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \ |
133 | do { \ | 133 | do { \ |
134 | if (level <= ip_vs_get_debug_level()) \ | 134 | if (level <= ip_vs_get_debug_level()) \ |
135 | pp->debug_packet(pp, skb, ofs, msg); \ | 135 | pp->debug_packet(pp, skb, ofs, msg); \ |
136 | } while (0) | 136 | } while (0) |
137 | #define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \ | 137 | #define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \ |
138 | do { \ | 138 | do { \ |
139 | if (level <= ip_vs_get_debug_level() && \ | 139 | if (level <= ip_vs_get_debug_level() && \ |
140 | net_ratelimit()) \ | 140 | net_ratelimit()) \ |
141 | pp->debug_packet(pp, skb, ofs, msg); \ | 141 | pp->debug_packet(pp, skb, ofs, msg); \ |
142 | } while (0) | 142 | } while (0) |
143 | #else /* NO DEBUGGING at ALL */ | 143 | #else /* NO DEBUGGING at ALL */ |
144 | #define IP_VS_DBG_BUF(level, msg...) do {} while (0) | 144 | #define IP_VS_DBG_BUF(level, msg...) do {} while (0) |
145 | #define IP_VS_ERR_BUF(msg...) do {} while (0) | 145 | #define IP_VS_ERR_BUF(msg...) do {} while (0) |
@@ -150,29 +150,27 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, | |||
150 | #endif | 150 | #endif |
151 | 151 | ||
152 | #define IP_VS_BUG() BUG() | 152 | #define IP_VS_BUG() BUG() |
153 | #define IP_VS_ERR(msg...) printk(KERN_ERR "IPVS: " msg) | 153 | #define IP_VS_ERR_RL(msg, ...) \ |
154 | #define IP_VS_INFO(msg...) printk(KERN_INFO "IPVS: " msg) | 154 | do { \ |
155 | #define IP_VS_WARNING(msg...) \ | 155 | if (net_ratelimit()) \ |
156 | printk(KERN_WARNING "IPVS: " msg) | 156 | pr_err(msg, ##__VA_ARGS__); \ |
157 | #define IP_VS_ERR_RL(msg...) \ | 157 | } while (0) |
158 | do { \ | ||
159 | if (net_ratelimit()) \ | ||
160 | printk(KERN_ERR "IPVS: " msg); \ | ||
161 | } while (0) | ||
162 | 158 | ||
163 | #ifdef CONFIG_IP_VS_DEBUG | 159 | #ifdef CONFIG_IP_VS_DEBUG |
164 | #define EnterFunction(level) \ | 160 | #define EnterFunction(level) \ |
165 | do { \ | 161 | do { \ |
166 | if (level <= ip_vs_get_debug_level()) \ | 162 | if (level <= ip_vs_get_debug_level()) \ |
167 | printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ | 163 | printk(KERN_DEBUG \ |
168 | __func__, __FILE__, __LINE__); \ | 164 | pr_fmt("Enter: %s, %s line %i\n"), \ |
169 | } while (0) | 165 | __func__, __FILE__, __LINE__); \ |
170 | #define LeaveFunction(level) \ | 166 | } while (0) |
171 | do { \ | 167 | #define LeaveFunction(level) \ |
172 | if (level <= ip_vs_get_debug_level()) \ | 168 | do { \ |
173 | printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ | 169 | if (level <= ip_vs_get_debug_level()) \ |
174 | __func__, __FILE__, __LINE__); \ | 170 | printk(KERN_DEBUG \ |
175 | } while (0) | 171 | pr_fmt("Leave: %s, %s line %i\n"), \ |
172 | __func__, __FILE__, __LINE__); \ | ||
173 | } while (0) | ||
176 | #else | 174 | #else |
177 | #define EnterFunction(level) do {} while (0) | 175 | #define EnterFunction(level) do {} while (0) |
178 | #define LeaveFunction(level) do {} while (0) | 176 | #define LeaveFunction(level) do {} while (0) |
@@ -740,7 +738,8 @@ extern void ip_vs_protocol_cleanup(void); | |||
740 | extern void ip_vs_protocol_timeout_change(int flags); | 738 | extern void ip_vs_protocol_timeout_change(int flags); |
741 | extern int *ip_vs_create_timeout_table(int *table, int size); | 739 | extern int *ip_vs_create_timeout_table(int *table, int size); |
742 | extern int | 740 | extern int |
743 | ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to); | 741 | ip_vs_set_state_timeout(int *table, int num, const char *const *names, |
742 | const char *name, int to); | ||
744 | extern void | 743 | extern void |
745 | ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, | 744 | ip_vs_tcpudp_debug_packet(struct ip_vs_protocol *pp, const struct sk_buff *skb, |
746 | int offset, const char *msg); | 745 | int offset, const char *msg); |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index f27fd83d67d8..ad9a51130254 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -441,6 +441,18 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add | |||
441 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); | 441 | return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); |
442 | } | 442 | } |
443 | 443 | ||
444 | static __inline__ void ipv6_select_ident(struct frag_hdr *fhdr) | ||
445 | { | ||
446 | static u32 ipv6_fragmentation_id = 1; | ||
447 | static DEFINE_SPINLOCK(ip6_id_lock); | ||
448 | |||
449 | spin_lock_bh(&ip6_id_lock); | ||
450 | fhdr->identification = htonl(ipv6_fragmentation_id); | ||
451 | if (++ipv6_fragmentation_id == 0) | ||
452 | ipv6_fragmentation_id = 1; | ||
453 | spin_unlock_bh(&ip6_id_lock); | ||
454 | } | ||
455 | |||
444 | /* | 456 | /* |
445 | * Prototypes exported by ipv6 | 457 | * Prototypes exported by ipv6 |
446 | */ | 458 | */ |
diff --git a/include/net/irda/ircomm_event.h b/include/net/irda/ircomm_event.h index c290447872d1..bc0c6f31f1c6 100644 --- a/include/net/irda/ircomm_event.h +++ b/include/net/irda/ircomm_event.h | |||
@@ -74,7 +74,7 @@ struct ircomm_info { | |||
74 | struct qos_info *qos; | 74 | struct qos_info *qos; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | extern char *ircomm_state[]; | 77 | extern const char *const ircomm_state[]; |
78 | 78 | ||
79 | struct ircomm_cb; /* Forward decl. */ | 79 | struct ircomm_cb; /* Forward decl. */ |
80 | 80 | ||
diff --git a/include/net/irda/ircomm_tty_attach.h b/include/net/irda/ircomm_tty_attach.h index f91a5695aa44..0a63bbb972d7 100644 --- a/include/net/irda/ircomm_tty_attach.h +++ b/include/net/irda/ircomm_tty_attach.h | |||
@@ -66,8 +66,8 @@ struct ircomm_tty_info { | |||
66 | __u8 dlsap_sel; | 66 | __u8 dlsap_sel; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | extern char *ircomm_state[]; | 69 | extern const char *const ircomm_state[]; |
70 | extern char *ircomm_tty_state[]; | 70 | extern const char *const ircomm_tty_state[]; |
71 | 71 | ||
72 | int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, | 72 | int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, |
73 | struct sk_buff *skb, struct ircomm_tty_info *info); | 73 | struct sk_buff *skb, struct ircomm_tty_info *info); |
diff --git a/include/net/irda/irlap_event.h b/include/net/irda/irlap_event.h index 2ae2e119ef4b..4c90824c50fb 100644 --- a/include/net/irda/irlap_event.h +++ b/include/net/irda/irlap_event.h | |||
@@ -120,7 +120,7 @@ typedef enum { /* FIXME check the two first reason codes */ | |||
120 | LAP_PRIMARY_CONFLICT, | 120 | LAP_PRIMARY_CONFLICT, |
121 | } LAP_REASON; | 121 | } LAP_REASON; |
122 | 122 | ||
123 | extern const char *irlap_state[]; | 123 | extern const char *const irlap_state[]; |
124 | 124 | ||
125 | void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | 125 | void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, |
126 | struct sk_buff *skb, struct irlap_info *info); | 126 | struct sk_buff *skb, struct irlap_info *info); |
diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h index e03ae4ae3963..9e4ec17a7449 100644 --- a/include/net/irda/irlmp_event.h +++ b/include/net/irda/irlmp_event.h | |||
@@ -79,8 +79,8 @@ typedef enum { | |||
79 | LM_LAP_IDLE_TIMEOUT, | 79 | LM_LAP_IDLE_TIMEOUT, |
80 | } IRLMP_EVENT; | 80 | } IRLMP_EVENT; |
81 | 81 | ||
82 | extern const char *irlmp_state[]; | 82 | extern const char *const irlmp_state[]; |
83 | extern const char *irlsap_state[]; | 83 | extern const char *const irlsap_state[]; |
84 | 84 | ||
85 | void irlmp_watchdog_timer_expired(void *data); | 85 | void irlmp_watchdog_timer_expired(void *data); |
86 | void irlmp_discovery_timer_expired(void *data); | 86 | void irlmp_discovery_timer_expired(void *data); |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 51b9a37de991..e9054a283fde 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -416,13 +416,13 @@ struct iw_spy_data | |||
416 | * data (i.e. valid as long as struct net_device exist, same locking rules). | 416 | * data (i.e. valid as long as struct net_device exist, same locking rules). |
417 | */ | 417 | */ |
418 | /* Forward declaration */ | 418 | /* Forward declaration */ |
419 | struct ieee80211_device; | 419 | struct libipw_device; |
420 | /* The struct */ | 420 | /* The struct */ |
421 | struct iw_public_data { | 421 | struct iw_public_data { |
422 | /* Driver enhanced spy support */ | 422 | /* Driver enhanced spy support */ |
423 | struct iw_spy_data * spy_data; | 423 | struct iw_spy_data * spy_data; |
424 | /* Structure managed by the in-kernel IEEE 802.11 layer */ | 424 | /* Legacy structure managed by the ipw2x00-specific IEEE 802.11 layer */ |
425 | struct ieee80211_device * ieee80211; | 425 | struct libipw_device * libipw; |
426 | }; | 426 | }; |
427 | 427 | ||
428 | /**************************** PROTOTYPES ****************************/ | 428 | /**************************** PROTOTYPES ****************************/ |
@@ -443,7 +443,7 @@ extern int dev_get_wireless_info(char * buffer, char **start, off_t offset, | |||
443 | extern void wireless_send_event(struct net_device * dev, | 443 | extern void wireless_send_event(struct net_device * dev, |
444 | unsigned int cmd, | 444 | unsigned int cmd, |
445 | union iwreq_data * wrqu, | 445 | union iwreq_data * wrqu, |
446 | char * extra); | 446 | const char * extra); |
447 | 447 | ||
448 | /* We may need a function to send a stream of events to user space. | 448 | /* We may need a function to send a stream of events to user space. |
449 | * More on that later... */ | 449 | * More on that later... */ |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index c06104476973..466859b285e1 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -73,6 +73,21 @@ | |||
73 | */ | 73 | */ |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * DOC: mac80211 workqueue | ||
77 | * | ||
78 | * mac80211 provides its own workqueue for drivers and internal mac80211 use. | ||
79 | * The workqueue is a single threaded workqueue and can only be accessed by | ||
80 | * helpers for sanity checking. Drivers must ensure all work added onto the | ||
81 | * mac80211 workqueue should be cancelled on the driver stop() callback. | ||
82 | * | ||
83 | * mac80211 will flushed the workqueue upon interface removal and during | ||
84 | * suspend. | ||
85 | * | ||
86 | * All work performed on the mac80211 workqueue must not acquire the RTNL lock. | ||
87 | * | ||
88 | */ | ||
89 | |||
90 | /** | ||
76 | * enum ieee80211_max_queues - maximum number of queues | 91 | * enum ieee80211_max_queues - maximum number of queues |
77 | * | 92 | * |
78 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. | 93 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. |
@@ -224,7 +239,14 @@ struct ieee80211_bss_conf { | |||
224 | * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU | 239 | * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU |
225 | * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211. | 240 | * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211. |
226 | * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted | 241 | * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted |
227 | * because the destination STA was in powersave mode. | 242 | * because the destination STA was in powersave mode. Note that to |
243 | * avoid race conditions, the filter must be set by the hardware or | ||
244 | * firmware upon receiving a frame that indicates that the station | ||
245 | * went to sleep (must be done on device to filter frames already on | ||
246 | * the queue) and may only be unset after mac80211 gives the OK for | ||
247 | * that by setting the IEEE80211_TX_CTL_CLEAR_PS_FILT (see above), | ||
248 | * since only then is it guaranteed that no more frames are in the | ||
249 | * hardware queue. | ||
228 | * @IEEE80211_TX_STAT_ACK: Frame was acknowledged | 250 | * @IEEE80211_TX_STAT_ACK: Frame was acknowledged |
229 | * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status | 251 | * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status |
230 | * is for the whole aggregation. | 252 | * is for the whole aggregation. |
@@ -241,6 +263,15 @@ struct ieee80211_bss_conf { | |||
241 | * it can be sent out. | 263 | * it can be sent out. |
242 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, | 264 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, |
243 | * used to indicate that a frame was already retried due to PS | 265 | * used to indicate that a frame was already retried due to PS |
266 | * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, | ||
267 | * used to indicate frame should not be encrypted | ||
268 | * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) | ||
269 | * This frame is a response to a PS-poll frame and should be sent | ||
270 | * although the station is in powersave mode. | ||
271 | * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the | ||
272 | * transmit function after the current frame, this can be used | ||
273 | * by drivers to kick the DMA queue only if unset or when the | ||
274 | * queue gets full. | ||
244 | */ | 275 | */ |
245 | enum mac80211_tx_control_flags { | 276 | enum mac80211_tx_control_flags { |
246 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 277 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -259,6 +290,9 @@ enum mac80211_tx_control_flags { | |||
259 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | 290 | IEEE80211_TX_INTFL_RCALGO = BIT(13), |
260 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 291 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
261 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 292 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
293 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | ||
294 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), | ||
295 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), | ||
262 | }; | 296 | }; |
263 | 297 | ||
264 | /** | 298 | /** |
@@ -316,6 +350,21 @@ enum mac80211_rate_control_flags { | |||
316 | * | 350 | * |
317 | * When used for transmit status reporting, the driver should | 351 | * When used for transmit status reporting, the driver should |
318 | * always report the rate along with the flags it used. | 352 | * always report the rate along with the flags it used. |
353 | * | ||
354 | * &struct ieee80211_tx_info contains an array of these structs | ||
355 | * in the control information, and it will be filled by the rate | ||
356 | * control algorithm according to what should be sent. For example, | ||
357 | * if this array contains, in the format { <idx>, <count> } the | ||
358 | * information | ||
359 | * { 3, 2 }, { 2, 2 }, { 1, 4 }, { -1, 0 }, { -1, 0 } | ||
360 | * then this means that the frame should be transmitted | ||
361 | * up to twice at rate 3, up to twice at rate 2, and up to four | ||
362 | * times at rate 1 if it doesn't get acknowledged. Say it gets | ||
363 | * acknowledged by the peer after the fifth attempt, the status | ||
364 | * information should then contain | ||
365 | * { 3, 2 }, { 2, 2 }, { 1, 1 }, { -1, 0 } ... | ||
366 | * since it was transmitted twice at rate 3, twice at rate 2 | ||
367 | * and once at rate 1 after which we received an acknowledgement. | ||
319 | */ | 368 | */ |
320 | struct ieee80211_tx_rate { | 369 | struct ieee80211_tx_rate { |
321 | s8 idx; | 370 | s8 idx; |
@@ -397,6 +446,11 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | |||
397 | return (struct ieee80211_tx_info *)skb->cb; | 446 | return (struct ieee80211_tx_info *)skb->cb; |
398 | } | 447 | } |
399 | 448 | ||
449 | static inline struct ieee80211_rx_status *IEEE80211_SKB_RXCB(struct sk_buff *skb) | ||
450 | { | ||
451 | return (struct ieee80211_rx_status *)skb->cb; | ||
452 | } | ||
453 | |||
400 | /** | 454 | /** |
401 | * ieee80211_tx_info_clear_status - clear TX status | 455 | * ieee80211_tx_info_clear_status - clear TX status |
402 | * | 456 | * |
@@ -478,7 +532,7 @@ enum mac80211_rx_flags { | |||
478 | * | 532 | * |
479 | * The low-level driver should provide this information (the subset | 533 | * The low-level driver should provide this information (the subset |
480 | * supported by hardware) to the 802.11 code with each received | 534 | * supported by hardware) to the 802.11 code with each received |
481 | * frame. | 535 | * frame, in the skb's control buffer (cb). |
482 | * | 536 | * |
483 | * @mactime: value in microseconds of the 64-bit Time Synchronization Function | 537 | * @mactime: value in microseconds of the 64-bit Time Synchronization Function |
484 | * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. | 538 | * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. |
@@ -529,7 +583,6 @@ enum ieee80211_conf_flags { | |||
529 | /** | 583 | /** |
530 | * enum ieee80211_conf_changed - denotes which configuration changed | 584 | * enum ieee80211_conf_changed - denotes which configuration changed |
531 | * | 585 | * |
532 | * @_IEEE80211_CONF_CHANGE_RADIO_ENABLED: DEPRECATED | ||
533 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed | 586 | * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed |
534 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 587 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed |
535 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed | 588 | * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed |
@@ -539,7 +592,6 @@ enum ieee80211_conf_flags { | |||
539 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed | 592 | * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed |
540 | */ | 593 | */ |
541 | enum ieee80211_conf_changed { | 594 | enum ieee80211_conf_changed { |
542 | _IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), | ||
543 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), | 595 | IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2), |
544 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), | 596 | IEEE80211_CONF_CHANGE_RADIOTAP = BIT(3), |
545 | IEEE80211_CONF_CHANGE_PS = BIT(4), | 597 | IEEE80211_CONF_CHANGE_PS = BIT(4), |
@@ -549,14 +601,6 @@ enum ieee80211_conf_changed { | |||
549 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), | 601 | IEEE80211_CONF_CHANGE_IDLE = BIT(8), |
550 | }; | 602 | }; |
551 | 603 | ||
552 | static inline __deprecated enum ieee80211_conf_changed | ||
553 | __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | ||
554 | { | ||
555 | return _IEEE80211_CONF_CHANGE_RADIO_ENABLED; | ||
556 | } | ||
557 | #define IEEE80211_CONF_CHANGE_RADIO_ENABLED \ | ||
558 | __IEEE80211_CONF_CHANGE_RADIO_ENABLED() | ||
559 | |||
560 | /** | 604 | /** |
561 | * struct ieee80211_conf - configuration of the device | 605 | * struct ieee80211_conf - configuration of the device |
562 | * | 606 | * |
@@ -564,9 +608,6 @@ __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | |||
564 | * | 608 | * |
565 | * @flags: configuration flags defined above | 609 | * @flags: configuration flags defined above |
566 | * | 610 | * |
567 | * @radio_enabled: when zero, driver is required to switch off the radio. | ||
568 | * @beacon_int: DEPRECATED, DO NOT USE | ||
569 | * | ||
570 | * @listen_interval: listen interval in units of beacon interval | 611 | * @listen_interval: listen interval in units of beacon interval |
571 | * @max_sleep_period: the maximum number of beacon intervals to sleep for | 612 | * @max_sleep_period: the maximum number of beacon intervals to sleep for |
572 | * before checking the beacon for a TIM bit (managed mode only); this | 613 | * before checking the beacon for a TIM bit (managed mode only); this |
@@ -590,13 +631,11 @@ __IEEE80211_CONF_CHANGE_RADIO_ENABLED(void) | |||
590 | * number of transmissions not the number of retries | 631 | * number of transmissions not the number of retries |
591 | */ | 632 | */ |
592 | struct ieee80211_conf { | 633 | struct ieee80211_conf { |
593 | int __deprecated beacon_int; | ||
594 | u32 flags; | 634 | u32 flags; |
595 | int power_level, dynamic_ps_timeout; | 635 | int power_level, dynamic_ps_timeout; |
596 | int max_sleep_period; | 636 | int max_sleep_period; |
597 | 637 | ||
598 | u16 listen_interval; | 638 | u16 listen_interval; |
599 | bool __deprecated radio_enabled; | ||
600 | 639 | ||
601 | u8 long_frame_max_tx_count, short_frame_max_tx_count; | 640 | u8 long_frame_max_tx_count, short_frame_max_tx_count; |
602 | 641 | ||
@@ -901,12 +940,6 @@ enum ieee80211_hw_flags { | |||
901 | * | 940 | * |
902 | * @conf: &struct ieee80211_conf, device configuration, don't use. | 941 | * @conf: &struct ieee80211_conf, device configuration, don't use. |
903 | * | 942 | * |
904 | * @workqueue: single threaded workqueue available for driver use, | ||
905 | * allocated by mac80211 on registration and flushed when an | ||
906 | * interface is removed. | ||
907 | * NOTICE: All work performed on this workqueue must not | ||
908 | * acquire the RTNL lock. | ||
909 | * | ||
910 | * @priv: pointer to private area that was allocated for driver use | 943 | * @priv: pointer to private area that was allocated for driver use |
911 | * along with this structure. | 944 | * along with this structure. |
912 | * | 945 | * |
@@ -942,7 +975,6 @@ enum ieee80211_hw_flags { | |||
942 | struct ieee80211_hw { | 975 | struct ieee80211_hw { |
943 | struct ieee80211_conf conf; | 976 | struct ieee80211_conf conf; |
944 | struct wiphy *wiphy; | 977 | struct wiphy *wiphy; |
945 | struct workqueue_struct *workqueue; | ||
946 | const char *rate_control_algorithm; | 978 | const char *rate_control_algorithm; |
947 | void *priv; | 979 | void *priv; |
948 | u32 flags; | 980 | u32 flags; |
@@ -1172,10 +1204,13 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1172 | * the driver's configure_filter() function which frames should be | 1204 | * the driver's configure_filter() function which frames should be |
1173 | * passed to mac80211 and which should be filtered out. | 1205 | * passed to mac80211 and which should be filtered out. |
1174 | * | 1206 | * |
1175 | * The configure_filter() callback is invoked with the parameters | 1207 | * Before configure_filter() is invoked, the prepare_multicast() |
1176 | * @mc_count and @mc_list for the combined multicast address list | 1208 | * callback is invoked with the parameters @mc_count and @mc_list |
1177 | * of all virtual interfaces, @changed_flags telling which flags | 1209 | * for the combined multicast address list of all virtual interfaces. |
1178 | * were changed and @total_flags with the new flag states. | 1210 | * It's use is optional, and it returns a u64 that is passed to |
1211 | * configure_filter(). Additionally, configure_filter() has the | ||
1212 | * arguments @changed_flags telling which flags were changed and | ||
1213 | * @total_flags with the new flag states. | ||
1179 | * | 1214 | * |
1180 | * If your device has no multicast address filters your driver will | 1215 | * If your device has no multicast address filters your driver will |
1181 | * need to check both the %FIF_ALLMULTI flag and the @mc_count | 1216 | * need to check both the %FIF_ALLMULTI flag and the @mc_count |
@@ -1224,10 +1259,13 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1224 | * mac80211 needs to do and the amount of CPU wakeups, so you should | 1259 | * mac80211 needs to do and the amount of CPU wakeups, so you should |
1225 | * honour this flag if possible. | 1260 | * honour this flag if possible. |
1226 | * | 1261 | * |
1227 | * @FIF_CONTROL: pass control frames, if PROMISC_IN_BSS is not set then | 1262 | * @FIF_CONTROL: pass control frames (except for PS Poll), if PROMISC_IN_BSS |
1228 | * only those addressed to this station | 1263 | * is not set then only those addressed to this station. |
1229 | * | 1264 | * |
1230 | * @FIF_OTHER_BSS: pass frames destined to other BSSes | 1265 | * @FIF_OTHER_BSS: pass frames destined to other BSSes |
1266 | * | ||
1267 | * @FIF_PSPOLL: pass PS Poll frames, if PROMISC_IN_BSS is not set then only | ||
1268 | * those addressed to this station. | ||
1231 | */ | 1269 | */ |
1232 | enum ieee80211_filter_flags { | 1270 | enum ieee80211_filter_flags { |
1233 | FIF_PROMISC_IN_BSS = 1<<0, | 1271 | FIF_PROMISC_IN_BSS = 1<<0, |
@@ -1237,6 +1275,7 @@ enum ieee80211_filter_flags { | |||
1237 | FIF_BCN_PRBRESP_PROMISC = 1<<4, | 1275 | FIF_BCN_PRBRESP_PROMISC = 1<<4, |
1238 | FIF_CONTROL = 1<<5, | 1276 | FIF_CONTROL = 1<<5, |
1239 | FIF_OTHER_BSS = 1<<6, | 1277 | FIF_OTHER_BSS = 1<<6, |
1278 | FIF_PSPOLL = 1<<7, | ||
1240 | }; | 1279 | }; |
1241 | 1280 | ||
1242 | /** | 1281 | /** |
@@ -1289,7 +1328,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1289 | * is disabled. This should turn off the hardware (at least | 1328 | * is disabled. This should turn off the hardware (at least |
1290 | * it must turn off frame reception.) | 1329 | * it must turn off frame reception.) |
1291 | * May be called right after add_interface if that rejects | 1330 | * May be called right after add_interface if that rejects |
1292 | * an interface. | 1331 | * an interface. If you added any work onto the mac80211 workqueue |
1332 | * you should ensure to cancel it on this callback. | ||
1293 | * Must be implemented. | 1333 | * Must be implemented. |
1294 | * | 1334 | * |
1295 | * @add_interface: Called when a netdevice attached to the hardware is | 1335 | * @add_interface: Called when a netdevice attached to the hardware is |
@@ -1323,9 +1363,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1323 | * for association indication. The @changed parameter indicates which | 1363 | * for association indication. The @changed parameter indicates which |
1324 | * of the bss parameters has changed when a call is made. | 1364 | * of the bss parameters has changed when a call is made. |
1325 | * | 1365 | * |
1366 | * @prepare_multicast: Prepare for multicast filter configuration. | ||
1367 | * This callback is optional, and its return value is passed | ||
1368 | * to configure_filter(). This callback must be atomic. | ||
1369 | * | ||
1326 | * @configure_filter: Configure the device's RX filter. | 1370 | * @configure_filter: Configure the device's RX filter. |
1327 | * See the section "Frame filtering" for more information. | 1371 | * See the section "Frame filtering" for more information. |
1328 | * This callback must be implemented and atomic. | 1372 | * This callback must be implemented. |
1329 | * | 1373 | * |
1330 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit | 1374 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit |
1331 | * must be set or cleared for a given STA. Must be atomic. | 1375 | * must be set or cleared for a given STA. Must be atomic. |
@@ -1411,6 +1455,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1411 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also | 1455 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also |
1412 | * need to set wiphy->rfkill_poll to %true before registration, | 1456 | * need to set wiphy->rfkill_poll to %true before registration, |
1413 | * and need to call wiphy_rfkill_set_hw_state() in the callback. | 1457 | * and need to call wiphy_rfkill_set_hw_state() in the callback. |
1458 | * | ||
1459 | * @testmode_cmd: Implement a cfg80211 test mode command. | ||
1414 | */ | 1460 | */ |
1415 | struct ieee80211_ops { | 1461 | struct ieee80211_ops { |
1416 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1462 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1425,10 +1471,12 @@ struct ieee80211_ops { | |||
1425 | struct ieee80211_vif *vif, | 1471 | struct ieee80211_vif *vif, |
1426 | struct ieee80211_bss_conf *info, | 1472 | struct ieee80211_bss_conf *info, |
1427 | u32 changed); | 1473 | u32 changed); |
1474 | u64 (*prepare_multicast)(struct ieee80211_hw *hw, | ||
1475 | int mc_count, struct dev_addr_list *mc_list); | ||
1428 | void (*configure_filter)(struct ieee80211_hw *hw, | 1476 | void (*configure_filter)(struct ieee80211_hw *hw, |
1429 | unsigned int changed_flags, | 1477 | unsigned int changed_flags, |
1430 | unsigned int *total_flags, | 1478 | unsigned int *total_flags, |
1431 | int mc_count, struct dev_addr_list *mc_list); | 1479 | u64 multicast); |
1432 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, | 1480 | int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, |
1433 | bool set); | 1481 | bool set); |
1434 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, | 1482 | int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, |
@@ -1461,6 +1509,9 @@ struct ieee80211_ops { | |||
1461 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1509 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
1462 | 1510 | ||
1463 | void (*rfkill_poll)(struct ieee80211_hw *hw); | 1511 | void (*rfkill_poll)(struct ieee80211_hw *hw); |
1512 | #ifdef CONFIG_NL80211_TESTMODE | ||
1513 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); | ||
1514 | #endif | ||
1464 | }; | 1515 | }; |
1465 | 1516 | ||
1466 | /** | 1517 | /** |
@@ -1606,10 +1657,6 @@ void ieee80211_free_hw(struct ieee80211_hw *hw); | |||
1606 | */ | 1657 | */ |
1607 | void ieee80211_restart_hw(struct ieee80211_hw *hw); | 1658 | void ieee80211_restart_hw(struct ieee80211_hw *hw); |
1608 | 1659 | ||
1609 | /* trick to avoid symbol clashes with the ieee80211 subsystem */ | ||
1610 | void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | ||
1611 | struct ieee80211_rx_status *status); | ||
1612 | |||
1613 | /** | 1660 | /** |
1614 | * ieee80211_rx - receive frame | 1661 | * ieee80211_rx - receive frame |
1615 | * | 1662 | * |
@@ -1624,14 +1671,8 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1624 | * | 1671 | * |
1625 | * @hw: the hardware this frame came in on | 1672 | * @hw: the hardware this frame came in on |
1626 | * @skb: the buffer to receive, owned by mac80211 after this call | 1673 | * @skb: the buffer to receive, owned by mac80211 after this call |
1627 | * @status: status of this frame; the status pointer need not be valid | ||
1628 | * after this function returns | ||
1629 | */ | 1674 | */ |
1630 | static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | 1675 | void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); |
1631 | struct ieee80211_rx_status *status) | ||
1632 | { | ||
1633 | __ieee80211_rx(hw, skb, status); | ||
1634 | } | ||
1635 | 1676 | ||
1636 | /** | 1677 | /** |
1637 | * ieee80211_rx_irqsafe - receive frame | 1678 | * ieee80211_rx_irqsafe - receive frame |
@@ -1644,13 +1685,8 @@ static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1644 | * | 1685 | * |
1645 | * @hw: the hardware this frame came in on | 1686 | * @hw: the hardware this frame came in on |
1646 | * @skb: the buffer to receive, owned by mac80211 after this call | 1687 | * @skb: the buffer to receive, owned by mac80211 after this call |
1647 | * @status: status of this frame; the status pointer need not be valid | ||
1648 | * after this function returns and is not freed by mac80211, | ||
1649 | * it is recommended that it points to a stack area | ||
1650 | */ | 1688 | */ |
1651 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, | 1689 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); |
1652 | struct sk_buff *skb, | ||
1653 | struct ieee80211_rx_status *status); | ||
1654 | 1690 | ||
1655 | /** | 1691 | /** |
1656 | * ieee80211_tx_status - transmit status callback | 1692 | * ieee80211_tx_status - transmit status callback |
@@ -1917,6 +1953,31 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | |||
1917 | void *data); | 1953 | void *data); |
1918 | 1954 | ||
1919 | /** | 1955 | /** |
1956 | * ieee80211_queue_work - add work onto the mac80211 workqueue | ||
1957 | * | ||
1958 | * Drivers and mac80211 use this to add work onto the mac80211 workqueue. | ||
1959 | * This helper ensures drivers are not queueing work when they should not be. | ||
1960 | * | ||
1961 | * @hw: the hardware struct for the interface we are adding work for | ||
1962 | * @work: the work we want to add onto the mac80211 workqueue | ||
1963 | */ | ||
1964 | void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work); | ||
1965 | |||
1966 | /** | ||
1967 | * ieee80211_queue_delayed_work - add work onto the mac80211 workqueue | ||
1968 | * | ||
1969 | * Drivers and mac80211 use this to queue delayed work onto the mac80211 | ||
1970 | * workqueue. | ||
1971 | * | ||
1972 | * @hw: the hardware struct for the interface we are adding work for | ||
1973 | * @dwork: delayable work to queue onto the mac80211 workqueue | ||
1974 | * @delay: number of jiffies to wait before queueing | ||
1975 | */ | ||
1976 | void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | ||
1977 | struct delayed_work *dwork, | ||
1978 | unsigned long delay); | ||
1979 | |||
1980 | /** | ||
1920 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1981 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1921 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1982 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1922 | * @ra: receiver address of the BA session recipient | 1983 | * @ra: receiver address of the BA session recipient |
@@ -2090,6 +2151,29 @@ static inline int rate_supported(struct ieee80211_sta *sta, | |||
2090 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); | 2151 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); |
2091 | } | 2152 | } |
2092 | 2153 | ||
2154 | /** | ||
2155 | * rate_control_send_low - helper for drivers for management/no-ack frames | ||
2156 | * | ||
2157 | * Rate control algorithms that agree to use the lowest rate to | ||
2158 | * send management frames and NO_ACK data with the respective hw | ||
2159 | * retries should use this in the beginning of their mac80211 get_rate | ||
2160 | * callback. If true is returned the rate control can simply return. | ||
2161 | * If false is returned we guarantee that sta and sta and priv_sta is | ||
2162 | * not null. | ||
2163 | * | ||
2164 | * Rate control algorithms wishing to do more intelligent selection of | ||
2165 | * rate for multicast/broadcast frames may choose to not use this. | ||
2166 | * | ||
2167 | * @sta: &struct ieee80211_sta pointer to the target destination. Note | ||
2168 | * that this may be null. | ||
2169 | * @priv_sta: private rate control structure. This may be null. | ||
2170 | * @txrc: rate control information we sholud populate for mac80211. | ||
2171 | */ | ||
2172 | bool rate_control_send_low(struct ieee80211_sta *sta, | ||
2173 | void *priv_sta, | ||
2174 | struct ieee80211_tx_rate_control *txrc); | ||
2175 | |||
2176 | |||
2093 | static inline s8 | 2177 | static inline s8 |
2094 | rate_lowest_index(struct ieee80211_supported_band *sband, | 2178 | rate_lowest_index(struct ieee80211_supported_band *sband, |
2095 | struct ieee80211_sta *sta) | 2179 | struct ieee80211_sta *sta) |
@@ -2106,6 +2190,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband, | |||
2106 | return 0; | 2190 | return 0; |
2107 | } | 2191 | } |
2108 | 2192 | ||
2193 | static inline | ||
2194 | bool rate_usable_index_exists(struct ieee80211_supported_band *sband, | ||
2195 | struct ieee80211_sta *sta) | ||
2196 | { | ||
2197 | unsigned int i; | ||
2198 | |||
2199 | for (i = 0; i < sband->n_bitrates; i++) | ||
2200 | if (rate_supported(sta, sband->band, i)) | ||
2201 | return true; | ||
2202 | return false; | ||
2203 | } | ||
2109 | 2204 | ||
2110 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | 2205 | int ieee80211_rate_control_register(struct rate_control_ops *ops); |
2111 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | 2206 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index d8d790e56d3d..3817fda82a80 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <linux/err.h> | 25 | #include <linux/err.h> |
26 | #include <linux/sysctl.h> | 26 | #include <linux/sysctl.h> |
27 | #include <linux/workqueue.h> | ||
27 | #include <net/rtnetlink.h> | 28 | #include <net/rtnetlink.h> |
28 | 29 | ||
29 | /* | 30 | /* |
@@ -117,7 +118,7 @@ struct neighbour | |||
117 | int (*output)(struct sk_buff *skb); | 118 | int (*output)(struct sk_buff *skb); |
118 | struct sk_buff_head arp_queue; | 119 | struct sk_buff_head arp_queue; |
119 | struct timer_list timer; | 120 | struct timer_list timer; |
120 | struct neigh_ops *ops; | 121 | const struct neigh_ops *ops; |
121 | u8 primary_key[0]; | 122 | u8 primary_key[0]; |
122 | }; | 123 | }; |
123 | 124 | ||
@@ -167,7 +168,7 @@ struct neigh_table | |||
167 | int gc_thresh2; | 168 | int gc_thresh2; |
168 | int gc_thresh3; | 169 | int gc_thresh3; |
169 | unsigned long last_flush; | 170 | unsigned long last_flush; |
170 | struct timer_list gc_timer; | 171 | struct delayed_work gc_work; |
171 | struct timer_list proxy_timer; | 172 | struct timer_list proxy_timer; |
172 | struct sk_buff_head proxy_queue; | 173 | struct sk_buff_head proxy_queue; |
173 | atomic_t entries; | 174 | atomic_t entries; |
@@ -178,7 +179,6 @@ struct neigh_table | |||
178 | struct neighbour **hash_buckets; | 179 | struct neighbour **hash_buckets; |
179 | unsigned int hash_mask; | 180 | unsigned int hash_mask; |
180 | __u32 hash_rnd; | 181 | __u32 hash_rnd; |
181 | unsigned int hash_chain_gc; | ||
182 | struct pneigh_entry **phash_buckets; | 182 | struct pneigh_entry **phash_buckets; |
183 | }; | 183 | }; |
184 | 184 | ||
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index ded434b032a4..a1202841aadd 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -26,6 +26,7 @@ struct net_device; | |||
26 | struct sock; | 26 | struct sock; |
27 | struct ctl_table_header; | 27 | struct ctl_table_header; |
28 | struct net_generic; | 28 | struct net_generic; |
29 | struct sock; | ||
29 | 30 | ||
30 | struct net { | 31 | struct net { |
31 | atomic_t count; /* To decided when the network | 32 | atomic_t count; /* To decided when the network |
@@ -57,6 +58,7 @@ struct net { | |||
57 | spinlock_t rules_mod_lock; | 58 | spinlock_t rules_mod_lock; |
58 | 59 | ||
59 | struct sock *rtnl; /* rtnetlink socket */ | 60 | struct sock *rtnl; /* rtnetlink socket */ |
61 | struct sock *genl_sock; | ||
60 | 62 | ||
61 | struct netns_core core; | 63 | struct netns_core core; |
62 | struct netns_mib mib; | 64 | struct netns_mib mib; |
@@ -78,6 +80,9 @@ struct net { | |||
78 | #ifdef CONFIG_XFRM | 80 | #ifdef CONFIG_XFRM |
79 | struct netns_xfrm xfrm; | 81 | struct netns_xfrm xfrm; |
80 | #endif | 82 | #endif |
83 | #ifdef CONFIG_WIRELESS_EXT | ||
84 | struct sk_buff_head wext_nlevents; | ||
85 | #endif | ||
81 | struct net_generic *gen; | 86 | struct net_generic *gen; |
82 | }; | 87 | }; |
83 | 88 | ||
@@ -106,6 +111,8 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | |||
106 | 111 | ||
107 | extern struct list_head net_namespace_list; | 112 | extern struct list_head net_namespace_list; |
108 | 113 | ||
114 | extern struct net *get_net_ns_by_pid(pid_t pid); | ||
115 | |||
109 | #ifdef CONFIG_NET_NS | 116 | #ifdef CONFIG_NET_NS |
110 | extern void __put_net(struct net *net); | 117 | extern void __put_net(struct net *net); |
111 | 118 | ||
@@ -208,6 +215,9 @@ static inline struct net *read_pnet(struct net * const *pnet) | |||
208 | #define for_each_net(VAR) \ | 215 | #define for_each_net(VAR) \ |
209 | list_for_each_entry(VAR, &net_namespace_list, list) | 216 | list_for_each_entry(VAR, &net_namespace_list, list) |
210 | 217 | ||
218 | #define for_each_net_rcu(VAR) \ | ||
219 | list_for_each_entry_rcu(VAR, &net_namespace_list, list) | ||
220 | |||
211 | #ifdef CONFIG_NET_NS | 221 | #ifdef CONFIG_NET_NS |
212 | #define __net_init | 222 | #define __net_init |
213 | #define __net_exit | 223 | #define __net_exit |
@@ -229,13 +239,15 @@ struct pernet_operations { | |||
229 | * needs per network namespace operations use device pernet operations, | 239 | * needs per network namespace operations use device pernet operations, |
230 | * otherwise use pernet subsys operations. | 240 | * otherwise use pernet subsys operations. |
231 | * | 241 | * |
232 | * This is critically important. Most of the network code cleanup | 242 | * Network interfaces need to be removed from a dying netns _before_ |
233 | * runs with the assumption that dev_remove_pack has been called so no | 243 | * subsys notifiers can be called, as most of the network code cleanup |
234 | * new packets will arrive during and after the cleanup functions have | 244 | * (which is done from subsys notifiers) runs with the assumption that |
235 | * been called. dev_remove_pack is not per namespace so instead the | 245 | * dev_remove_pack has been called so no new packets will arrive during |
236 | * guarantee of no more packets arriving in a network namespace is | 246 | * and after the cleanup functions have been called. dev_remove_pack |
237 | * provided by ensuring that all network devices and all sockets have | 247 | * is not per namespace so instead the guarantee of no more packets |
238 | * left the network namespace before the cleanup methods are called. | 248 | * arriving in a network namespace is provided by ensuring that all |
249 | * network devices and all sockets have left the network namespace | ||
250 | * before the cleanup methods are called. | ||
239 | * | 251 | * |
240 | * For the longest time the ipv4 icmp code was registered as a pernet | 252 | * For the longest time the ipv4 icmp code was registered as a pernet |
241 | * device which caused kernel oops, and panics during network | 253 | * device which caused kernel oops, and panics during network |
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index 58684066388c..33602ab66190 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
@@ -31,6 +31,6 @@ struct nlattr; | |||
31 | extern int | 31 | extern int |
32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, | 32 | (*nfnetlink_parse_nat_setup_hook)(struct nf_conn *ct, |
33 | enum nf_nat_manip_type manip, | 33 | enum nf_nat_manip_type manip, |
34 | struct nlattr *attr); | 34 | const struct nlattr *attr); |
35 | 35 | ||
36 | #endif /* _NF_NAT_CORE_H */ | 36 | #endif /* _NF_NAT_CORE_H */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 007bdb07dabb..a63b2192ac1c 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -365,7 +365,7 @@ static inline struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining) | |||
365 | * | 365 | * |
366 | * See nla_parse() | 366 | * See nla_parse() |
367 | */ | 367 | */ |
368 | static inline int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, | 368 | static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen, |
369 | struct nlattr *tb[], int maxtype, | 369 | struct nlattr *tb[], int maxtype, |
370 | const struct nla_policy *policy) | 370 | const struct nla_policy *policy) |
371 | { | 371 | { |
@@ -414,7 +414,7 @@ static inline int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, | |||
414 | * | 414 | * |
415 | * Returns 1 if a report back to the application is requested. | 415 | * Returns 1 if a report back to the application is requested. |
416 | */ | 416 | */ |
417 | static inline int nlmsg_report(struct nlmsghdr *nlh) | 417 | static inline int nlmsg_report(const struct nlmsghdr *nlh) |
418 | { | 418 | { |
419 | return !!(nlh->nlmsg_flags & NLM_F_ECHO); | 419 | return !!(nlh->nlmsg_flags & NLM_F_ECHO); |
420 | } | 420 | } |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index afab4e4cbac7..dfeb2d7c425b 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #ifndef __NETNS_IPV6_H__ | 7 | #ifndef __NETNS_IPV6_H__ |
8 | #define __NETNS_IPV6_H__ | 8 | #define __NETNS_IPV6_H__ |
9 | #include <net/dst_ops.h> | ||
9 | 10 | ||
10 | struct ctl_table_header; | 11 | struct ctl_table_header; |
11 | 12 | ||
@@ -42,7 +43,7 @@ struct netns_ipv6 { | |||
42 | struct timer_list ip6_fib_timer; | 43 | struct timer_list ip6_fib_timer; |
43 | struct hlist_head *fib_table_hash; | 44 | struct hlist_head *fib_table_hash; |
44 | struct fib6_table *fib6_main_tbl; | 45 | struct fib6_table *fib6_main_tbl; |
45 | struct dst_ops *ip6_dst_ops; | 46 | struct dst_ops ip6_dst_ops; |
46 | unsigned int ip6_rt_gc_expire; | 47 | unsigned int ip6_rt_gc_expire; |
47 | unsigned long ip6_rt_last_gc; | 48 | unsigned long ip6_rt_last_gc; |
48 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 49 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h index 9554a644a8f8..591db7d657a3 100644 --- a/include/net/netns/x_tables.h +++ b/include/net/netns/x_tables.h | |||
@@ -8,8 +8,11 @@ struct ebt_table; | |||
8 | 8 | ||
9 | struct netns_xt { | 9 | struct netns_xt { |
10 | struct list_head tables[NFPROTO_NUMPROTO]; | 10 | struct list_head tables[NFPROTO_NUMPROTO]; |
11 | #if defined(CONFIG_BRIDGE_NF_EBTABLES) || \ | ||
12 | defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE) | ||
11 | struct ebt_table *broute_table; | 13 | struct ebt_table *broute_table; |
12 | struct ebt_table *frame_filter; | 14 | struct ebt_table *frame_filter; |
13 | struct ebt_table *frame_nat; | 15 | struct ebt_table *frame_nat; |
16 | #endif | ||
14 | }; | 17 | }; |
15 | #endif | 18 | #endif |
diff --git a/include/net/nl802154.h b/include/net/nl802154.h new file mode 100644 index 000000000000..99d2ba1c7e03 --- /dev/null +++ b/include/net/nl802154.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * nl802154.h | ||
3 | * | ||
4 | * Copyright (C) 2007, 2008, 2009 Siemens AG | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | * | ||
19 | */ | ||
20 | |||
21 | #ifndef IEEE802154_NL_H | ||
22 | #define IEEE802154_NL_H | ||
23 | |||
24 | struct net_device; | ||
25 | struct ieee802154_addr; | ||
26 | |||
27 | /** | ||
28 | * ieee802154_nl_assoc_indic - Notify userland of an association request. | ||
29 | * @dev: The network device on which this association request was | ||
30 | * received. | ||
31 | * @addr: The address of the device requesting association. | ||
32 | * @cap: The capability information field from the device. | ||
33 | * | ||
34 | * This informs a userland coordinator of a device requesting to | ||
35 | * associate with the PAN controlled by the coordinator. | ||
36 | * | ||
37 | * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document. | ||
38 | */ | ||
39 | int ieee802154_nl_assoc_indic(struct net_device *dev, | ||
40 | struct ieee802154_addr *addr, u8 cap); | ||
41 | |||
42 | /** | ||
43 | * ieee802154_nl_assoc_confirm - Notify userland of association. | ||
44 | * @dev: The device which has completed association. | ||
45 | * @short_addr: The short address assigned to the device. | ||
46 | * @status: The status of the association. | ||
47 | * | ||
48 | * Inform userland of the result of an association request. If the | ||
49 | * association request included asking the coordinator to allocate | ||
50 | * a short address then it is returned in @short_addr. | ||
51 | * | ||
52 | * Note: This is in section 7.3.2 of the IEEE 802.15.4 document. | ||
53 | */ | ||
54 | int ieee802154_nl_assoc_confirm(struct net_device *dev, | ||
55 | u16 short_addr, u8 status); | ||
56 | |||
57 | /** | ||
58 | * ieee802154_nl_disassoc_indic - Notify userland of disassociation. | ||
59 | * @dev: The device on which disassociation was indicated. | ||
60 | * @addr: The device which is disassociating. | ||
61 | * @reason: The reason for the disassociation. | ||
62 | * | ||
63 | * Inform userland that a device has disassociated from the network. | ||
64 | * | ||
65 | * Note: This is in section 7.3.3 of the IEEE 802.15.4 document. | ||
66 | */ | ||
67 | int ieee802154_nl_disassoc_indic(struct net_device *dev, | ||
68 | struct ieee802154_addr *addr, u8 reason); | ||
69 | |||
70 | /** | ||
71 | * ieee802154_nl_disassoc_confirm - Notify userland of disassociation | ||
72 | * completion. | ||
73 | * @dev: The device on which disassociation was ordered. | ||
74 | * @status: The result of the disassociation. | ||
75 | * | ||
76 | * Inform userland of the result of requesting that a device | ||
77 | * disassociate, or the result of requesting that we disassociate from | ||
78 | * a PAN managed by another coordinator. | ||
79 | * | ||
80 | * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document. | ||
81 | */ | ||
82 | int ieee802154_nl_disassoc_confirm(struct net_device *dev, | ||
83 | u8 status); | ||
84 | |||
85 | /** | ||
86 | * ieee802154_nl_scan_confirm - Notify userland of completion of scan. | ||
87 | * @dev: The device which was instructed to scan. | ||
88 | * @status: The status of the scan operation. | ||
89 | * @scan_type: What type of scan was performed. | ||
90 | * @unscanned: Any channels that the device was unable to scan. | ||
91 | * @edl: The energy levels (if a passive scan). | ||
92 | * | ||
93 | * | ||
94 | * Note: This is in section 7.1.11 of the IEEE 802.15.4 document. | ||
95 | * Note: This API does not permit the return of an active scan result. | ||
96 | */ | ||
97 | int ieee802154_nl_scan_confirm(struct net_device *dev, | ||
98 | u8 status, u8 scan_type, u32 unscanned, u8 page, | ||
99 | u8 *edl/*, struct list_head *pan_desc_list */); | ||
100 | |||
101 | /** | ||
102 | * ieee802154_nl_beacon_indic - Notify userland of a received beacon. | ||
103 | * @dev: The device on which a beacon was received. | ||
104 | * @panid: The PAN of the coordinator. | ||
105 | * @coord_addr: The short address of the coordinator on that PAN. | ||
106 | * | ||
107 | * Note: This is in section 7.1.5 of the IEEE 802.15.4 document. | ||
108 | * Note: This API does not provide extended information such as what | ||
109 | * channel the PAN is on or what the LQI of the beacon frame was on | ||
110 | * receipt. | ||
111 | * Note: This API cannot indicate a beacon frame for a coordinator | ||
112 | * operating in long addressing mode. | ||
113 | */ | ||
114 | int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid, | ||
115 | u16 coord_addr); | ||
116 | |||
117 | /** | ||
118 | * ieee802154_nl_start_confirm - Notify userland of completion of start. | ||
119 | * @dev: The device which was instructed to scan. | ||
120 | * @status: The status of the scan operation. | ||
121 | * | ||
122 | * Note: This is in section 7.1.14 of the IEEE 802.15.4 document. | ||
123 | */ | ||
124 | int ieee802154_nl_start_confirm(struct net_device *dev, u8 status); | ||
125 | |||
126 | #endif | ||
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index 29d126736611..44c923c9e21d 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -49,4 +49,6 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr); | |||
49 | 49 | ||
50 | #define PN_NO_ADDR 0xff | 50 | #define PN_NO_ADDR 0xff |
51 | 51 | ||
52 | extern const struct file_operations pn_sock_seq_fops; | ||
53 | |||
52 | #endif | 54 | #endif |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 82a3191375f5..f911ec7598ef 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -87,6 +87,9 @@ extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, | |||
87 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); | 87 | extern void qdisc_put_rtab(struct qdisc_rate_table *tab); |
88 | extern void qdisc_put_stab(struct qdisc_size_table *tab); | 88 | extern void qdisc_put_stab(struct qdisc_size_table *tab); |
89 | extern void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); | 89 | extern void qdisc_warn_nonwc(char *txt, struct Qdisc *qdisc); |
90 | extern int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, | ||
91 | struct net_device *dev, struct netdev_queue *txq, | ||
92 | spinlock_t *root_lock); | ||
90 | 93 | ||
91 | extern void __qdisc_run(struct Qdisc *q); | 94 | extern void __qdisc_run(struct Qdisc *q); |
92 | 95 | ||
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 3c1895e54b7f..c3aa044d3fc3 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h | |||
@@ -14,7 +14,7 @@ extern void rtnl_register(int protocol, int msgtype, | |||
14 | extern int rtnl_unregister(int protocol, int msgtype); | 14 | extern int rtnl_unregister(int protocol, int msgtype); |
15 | extern void rtnl_unregister_all(int protocol); | 15 | extern void rtnl_unregister_all(int protocol); |
16 | 16 | ||
17 | static inline int rtnl_msg_family(struct nlmsghdr *nlh) | 17 | static inline int rtnl_msg_family(const struct nlmsghdr *nlh) |
18 | { | 18 | { |
19 | if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) | 19 | if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg)) |
20 | return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family; | 20 | return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family; |
@@ -70,6 +70,9 @@ struct rtnl_link_ops { | |||
70 | size_t (*get_xstats_size)(const struct net_device *dev); | 70 | size_t (*get_xstats_size)(const struct net_device *dev); |
71 | int (*fill_xstats)(struct sk_buff *skb, | 71 | int (*fill_xstats)(struct sk_buff *skb, |
72 | const struct net_device *dev); | 72 | const struct net_device *dev); |
73 | int (*get_tx_queues)(struct net *net, struct nlattr *tb[], | ||
74 | unsigned int *tx_queues, | ||
75 | unsigned int *real_tx_queues); | ||
73 | }; | 76 | }; |
74 | 77 | ||
75 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); | 78 | extern int __rtnl_link_register(struct rtnl_link_ops *ops); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 5482e9582f55..88eb9de095de 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -45,6 +45,8 @@ struct Qdisc | |||
45 | #define TCQ_F_BUILTIN 1 | 45 | #define TCQ_F_BUILTIN 1 |
46 | #define TCQ_F_THROTTLED 2 | 46 | #define TCQ_F_THROTTLED 2 |
47 | #define TCQ_F_INGRESS 4 | 47 | #define TCQ_F_INGRESS 4 |
48 | #define TCQ_F_CAN_BYPASS 8 | ||
49 | #define TCQ_F_MQROOT 16 | ||
48 | #define TCQ_F_WARN_NONWC (1 << 16) | 50 | #define TCQ_F_WARN_NONWC (1 << 16) |
49 | int padded; | 51 | int padded; |
50 | struct Qdisc_ops *ops; | 52 | struct Qdisc_ops *ops; |
@@ -79,6 +81,7 @@ struct Qdisc | |||
79 | struct Qdisc_class_ops | 81 | struct Qdisc_class_ops |
80 | { | 82 | { |
81 | /* Child qdisc manipulation */ | 83 | /* Child qdisc manipulation */ |
84 | unsigned int (*select_queue)(struct Qdisc *, struct tcmsg *); | ||
82 | int (*graft)(struct Qdisc *, unsigned long cl, | 85 | int (*graft)(struct Qdisc *, unsigned long cl, |
83 | struct Qdisc *, struct Qdisc **); | 86 | struct Qdisc *, struct Qdisc **); |
84 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); | 87 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); |
@@ -121,6 +124,7 @@ struct Qdisc_ops | |||
121 | void (*reset)(struct Qdisc *); | 124 | void (*reset)(struct Qdisc *); |
122 | void (*destroy)(struct Qdisc *); | 125 | void (*destroy)(struct Qdisc *); |
123 | int (*change)(struct Qdisc *, struct nlattr *arg); | 126 | int (*change)(struct Qdisc *, struct nlattr *arg); |
127 | void (*attach)(struct Qdisc *); | ||
124 | 128 | ||
125 | int (*dump)(struct Qdisc *, struct sk_buff *); | 129 | int (*dump)(struct Qdisc *, struct sk_buff *); |
126 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); | 130 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); |
@@ -182,6 +186,11 @@ struct qdisc_skb_cb { | |||
182 | char data[]; | 186 | char data[]; |
183 | }; | 187 | }; |
184 | 188 | ||
189 | static inline int qdisc_qlen(struct Qdisc *q) | ||
190 | { | ||
191 | return q->q.qlen; | ||
192 | } | ||
193 | |||
185 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) | 194 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) |
186 | { | 195 | { |
187 | return (struct qdisc_skb_cb *)skb->cb; | 196 | return (struct qdisc_skb_cb *)skb->cb; |
@@ -249,6 +258,8 @@ static inline void sch_tree_unlock(struct Qdisc *q) | |||
249 | 258 | ||
250 | extern struct Qdisc noop_qdisc; | 259 | extern struct Qdisc noop_qdisc; |
251 | extern struct Qdisc_ops noop_qdisc_ops; | 260 | extern struct Qdisc_ops noop_qdisc_ops; |
261 | extern struct Qdisc_ops pfifo_fast_ops; | ||
262 | extern struct Qdisc_ops mq_qdisc_ops; | ||
252 | 263 | ||
253 | struct Qdisc_class_common | 264 | struct Qdisc_class_common |
254 | { | 265 | { |
@@ -296,6 +307,8 @@ extern void dev_init_scheduler(struct net_device *dev); | |||
296 | extern void dev_shutdown(struct net_device *dev); | 307 | extern void dev_shutdown(struct net_device *dev); |
297 | extern void dev_activate(struct net_device *dev); | 308 | extern void dev_activate(struct net_device *dev); |
298 | extern void dev_deactivate(struct net_device *dev); | 309 | extern void dev_deactivate(struct net_device *dev); |
310 | extern struct Qdisc *dev_graft_qdisc(struct netdev_queue *dev_queue, | ||
311 | struct Qdisc *qdisc); | ||
299 | extern void qdisc_reset(struct Qdisc *qdisc); | 312 | extern void qdisc_reset(struct Qdisc *qdisc); |
300 | extern void qdisc_destroy(struct Qdisc *qdisc); | 313 | extern void qdisc_destroy(struct Qdisc *qdisc); |
301 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); | 314 | extern void qdisc_tree_decrease_qlen(struct Qdisc *qdisc, unsigned int n); |
@@ -387,13 +400,18 @@ static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) | |||
387 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; | 400 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; |
388 | } | 401 | } |
389 | 402 | ||
403 | static inline void __qdisc_update_bstats(struct Qdisc *sch, unsigned int len) | ||
404 | { | ||
405 | sch->bstats.bytes += len; | ||
406 | sch->bstats.packets++; | ||
407 | } | ||
408 | |||
390 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 409 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
391 | struct sk_buff_head *list) | 410 | struct sk_buff_head *list) |
392 | { | 411 | { |
393 | __skb_queue_tail(list, skb); | 412 | __skb_queue_tail(list, skb); |
394 | sch->qstats.backlog += qdisc_pkt_len(skb); | 413 | sch->qstats.backlog += qdisc_pkt_len(skb); |
395 | sch->bstats.bytes += qdisc_pkt_len(skb); | 414 | __qdisc_update_bstats(sch, qdisc_pkt_len(skb)); |
396 | sch->bstats.packets++; | ||
397 | 415 | ||
398 | return NET_XMIT_SUCCESS; | 416 | return NET_XMIT_SUCCESS; |
399 | } | 417 | } |
diff --git a/include/net/scm.h b/include/net/scm.h index f45bb6eca7d4..cf48c800e926 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -26,7 +26,6 @@ struct scm_cookie | |||
26 | #ifdef CONFIG_SECURITY_NETWORK | 26 | #ifdef CONFIG_SECURITY_NETWORK |
27 | u32 secid; /* Passed security ID */ | 27 | u32 secid; /* Passed security ID */ |
28 | #endif | 28 | #endif |
29 | unsigned long seq; /* Connection seqno */ | ||
30 | }; | 29 | }; |
31 | 30 | ||
32 | extern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm); | 31 | extern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm); |
@@ -59,7 +58,6 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | |||
59 | scm->creds.gid = current_gid(); | 58 | scm->creds.gid = current_gid(); |
60 | scm->creds.pid = task_tgid_vnr(p); | 59 | scm->creds.pid = task_tgid_vnr(p); |
61 | scm->fp = NULL; | 60 | scm->fp = NULL; |
62 | scm->seq = 0; | ||
63 | unix_get_peersec_dgram(sock, scm); | 61 | unix_get_peersec_dgram(sock, scm); |
64 | if (msg->msg_controllen <= 0) | 62 | if (msg->msg_controllen <= 0) |
65 | return 0; | 63 | return 0; |
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h index 3b966802e05d..8be5135ff7aa 100644 --- a/include/net/sctp/command.h +++ b/include/net/sctp/command.h | |||
@@ -106,6 +106,7 @@ typedef enum { | |||
106 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ | 106 | SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ |
107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ | 107 | SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */ |
108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ | 108 | SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */ |
109 | SCTP_CMD_SEND_MSG, /* Send the whole use message */ | ||
109 | SCTP_CMD_LAST | 110 | SCTP_CMD_LAST |
110 | } sctp_verb_t; | 111 | } sctp_verb_t; |
111 | 112 | ||
@@ -139,6 +140,7 @@ typedef union { | |||
139 | struct sctp_ulpevent *ulpevent; | 140 | struct sctp_ulpevent *ulpevent; |
140 | struct sctp_packet *packet; | 141 | struct sctp_packet *packet; |
141 | sctp_sackhdr_t *sackh; | 142 | sctp_sackhdr_t *sackh; |
143 | struct sctp_datamsg *msg; | ||
142 | } sctp_arg_t; | 144 | } sctp_arg_t; |
143 | 145 | ||
144 | /* We are simulating ML type constructors here. | 146 | /* We are simulating ML type constructors here. |
@@ -188,6 +190,7 @@ SCTP_ARG_CONSTRUCTOR(PEER_INIT, sctp_init_chunk_t *, init) | |||
188 | SCTP_ARG_CONSTRUCTOR(ULPEVENT, struct sctp_ulpevent *, ulpevent) | 190 | SCTP_ARG_CONSTRUCTOR(ULPEVENT, struct sctp_ulpevent *, ulpevent) |
189 | SCTP_ARG_CONSTRUCTOR(PACKET, struct sctp_packet *, packet) | 191 | SCTP_ARG_CONSTRUCTOR(PACKET, struct sctp_packet *, packet) |
190 | SCTP_ARG_CONSTRUCTOR(SACKH, sctp_sackhdr_t *, sackh) | 192 | SCTP_ARG_CONSTRUCTOR(SACKH, sctp_sackhdr_t *, sackh) |
193 | SCTP_ARG_CONSTRUCTOR(DATAMSG, struct sctp_datamsg *, msg) | ||
191 | 194 | ||
192 | typedef struct { | 195 | typedef struct { |
193 | sctp_arg_t obj; | 196 | sctp_arg_t obj; |
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index b05b0557211f..58f714a3b670 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -231,7 +231,7 @@ typedef enum { | |||
231 | SCTP_SS_LISTENING = TCP_LISTEN, | 231 | SCTP_SS_LISTENING = TCP_LISTEN, |
232 | SCTP_SS_ESTABLISHING = TCP_SYN_SENT, | 232 | SCTP_SS_ESTABLISHING = TCP_SYN_SENT, |
233 | SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, | 233 | SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, |
234 | SCTP_SS_DISCONNECTING = TCP_CLOSING, | 234 | SCTP_SS_CLOSING = TCP_CLOSING, |
235 | } sctp_sock_state_t; | 235 | } sctp_sock_state_t; |
236 | 236 | ||
237 | /* These functions map various type to printable names. */ | 237 | /* These functions map various type to printable names. */ |
@@ -241,7 +241,9 @@ const char *sctp_tname(const sctp_subtype_t); /* timeouts */ | |||
241 | const char *sctp_pname(const sctp_subtype_t); /* primitives */ | 241 | const char *sctp_pname(const sctp_subtype_t); /* primitives */ |
242 | 242 | ||
243 | /* This is a table of printable names of sctp_state_t's. */ | 243 | /* This is a table of printable names of sctp_state_t's. */ |
244 | extern const char *sctp_state_tbl[], *sctp_evttype_tbl[], *sctp_status_tbl[]; | 244 | extern const char *const sctp_state_tbl[]; |
245 | extern const char *const sctp_evttype_tbl[]; | ||
246 | extern const char *const sctp_status_tbl[]; | ||
245 | 247 | ||
246 | /* Maximum chunk length considering padding requirements. */ | 248 | /* Maximum chunk length considering padding requirements. */ |
247 | enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) }; | 249 | enum { SCTP_MAX_CHUNK_LEN = ((1<<16) - sizeof(__u32)) }; |
@@ -361,6 +363,13 @@ typedef enum { | |||
361 | SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ | 363 | SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */ |
362 | } sctp_scope_t; | 364 | } sctp_scope_t; |
363 | 365 | ||
366 | typedef enum { | ||
367 | SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */ | ||
368 | SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */ | ||
369 | SCTP_SCOPE_POLICY_PRIVATE, /* Follow draft but allow IPv4 private addresses */ | ||
370 | SCTP_SCOPE_POLICY_LINK, /* Follow draft but allow IPv4 link local addresses */ | ||
371 | } sctp_scope_policy_t; | ||
372 | |||
364 | /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, | 373 | /* Based on IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>, |
365 | * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, | 374 | * SCTP IPv4 unusable addresses: 0.0.0.0/8, 224.0.0.0/4, 198.18.0.0/24, |
366 | * 192.88.99.0/24. | 375 | * 192.88.99.0/24. |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d16a304cbed4..8a6d5297de16 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -486,15 +486,16 @@ static inline __s32 sctp_jitter(__u32 rto) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | /* Break down data chunks at this point. */ | 488 | /* Break down data chunks at this point. */ |
489 | static inline int sctp_frag_point(const struct sctp_sock *sp, int pmtu) | 489 | static inline int sctp_frag_point(const struct sctp_association *asoc, int pmtu) |
490 | { | 490 | { |
491 | struct sctp_sock *sp = sctp_sk(asoc->base.sk); | ||
491 | int frag = pmtu; | 492 | int frag = pmtu; |
492 | 493 | ||
493 | frag -= sp->pf->af->net_header_len; | 494 | frag -= sp->pf->af->net_header_len; |
494 | frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); | 495 | frag -= sizeof(struct sctphdr) + sizeof(struct sctp_data_chunk); |
495 | 496 | ||
496 | if (sp->user_frag) | 497 | if (asoc->user_frag) |
497 | frag = min_t(int, frag, sp->user_frag); | 498 | frag = min_t(int, frag, asoc->user_frag); |
498 | 499 | ||
499 | frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN); | 500 | frag = min_t(int, frag, SCTP_MAX_CHUNK_LEN); |
500 | 501 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index edfcacf3250e..42d00ced5eb8 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -219,6 +219,15 @@ extern struct sctp_globals { | |||
219 | /* Flag to idicate if SCTP-AUTH is enabled */ | 219 | /* Flag to idicate if SCTP-AUTH is enabled */ |
220 | int auth_enable; | 220 | int auth_enable; |
221 | 221 | ||
222 | /* | ||
223 | * Policy to control SCTP IPv4 address scoping | ||
224 | * 0 - Disable IPv4 address scoping | ||
225 | * 1 - Enable IPv4 address scoping | ||
226 | * 2 - Selectively allow only IPv4 private addresses | ||
227 | * 3 - Selectively allow only IPv4 link local address | ||
228 | */ | ||
229 | int ipv4_scope_policy; | ||
230 | |||
222 | /* Flag to indicate whether computing and verifying checksum | 231 | /* Flag to indicate whether computing and verifying checksum |
223 | * is disabled. */ | 232 | * is disabled. */ |
224 | int checksum_disable; | 233 | int checksum_disable; |
@@ -252,6 +261,7 @@ extern struct sctp_globals { | |||
252 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 261 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
253 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 262 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
254 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | 263 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) |
264 | #define sctp_scope_policy (sctp_globals.ipv4_scope_policy) | ||
255 | #define sctp_addip_enable (sctp_globals.addip_enable) | 265 | #define sctp_addip_enable (sctp_globals.addip_enable) |
256 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) | 266 | #define sctp_addip_noauth (sctp_globals.addip_noauth_enable) |
257 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 267 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
@@ -628,7 +638,7 @@ struct sctp_datamsg { | |||
628 | /* Chunks waiting to be submitted to lower layer. */ | 638 | /* Chunks waiting to be submitted to lower layer. */ |
629 | struct list_head chunks; | 639 | struct list_head chunks; |
630 | /* Chunks that have been transmitted. */ | 640 | /* Chunks that have been transmitted. */ |
631 | struct list_head track; | 641 | size_t msg_size; |
632 | /* Reference counting. */ | 642 | /* Reference counting. */ |
633 | atomic_t refcnt; | 643 | atomic_t refcnt; |
634 | /* When is this message no longer interesting to the peer? */ | 644 | /* When is this message no longer interesting to the peer? */ |
@@ -643,6 +653,7 @@ struct sctp_datamsg { | |||
643 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, | 653 | struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *, |
644 | struct sctp_sndrcvinfo *, | 654 | struct sctp_sndrcvinfo *, |
645 | struct msghdr *, int len); | 655 | struct msghdr *, int len); |
656 | void sctp_datamsg_free(struct sctp_datamsg *); | ||
646 | void sctp_datamsg_put(struct sctp_datamsg *); | 657 | void sctp_datamsg_put(struct sctp_datamsg *); |
647 | void sctp_chunk_fail(struct sctp_chunk *, int error); | 658 | void sctp_chunk_fail(struct sctp_chunk *, int error); |
648 | int sctp_chunk_abandoned(struct sctp_chunk *); | 659 | int sctp_chunk_abandoned(struct sctp_chunk *); |
@@ -811,22 +822,12 @@ struct sctp_packet { | |||
811 | /* pointer to the auth chunk for this packet */ | 822 | /* pointer to the auth chunk for this packet */ |
812 | struct sctp_chunk *auth; | 823 | struct sctp_chunk *auth; |
813 | 824 | ||
814 | /* This packet contains a COOKIE-ECHO chunk. */ | 825 | u8 has_cookie_echo:1, /* This packet contains a COOKIE-ECHO chunk. */ |
815 | __u8 has_cookie_echo; | 826 | has_sack:1, /* This packet contains a SACK chunk. */ |
816 | 827 | has_auth:1, /* This packet contains an AUTH chunk */ | |
817 | /* This packet contains a SACK chunk. */ | 828 | has_data:1, /* This packet contains at least 1 DATA chunk */ |
818 | __u8 has_sack; | 829 | ipfragok:1, /* So let ip fragment this packet */ |
819 | 830 | malloced:1; /* Is it malloced? */ | |
820 | /* This packet contains an AUTH chunk */ | ||
821 | __u8 has_auth; | ||
822 | |||
823 | /* This packet contains at least 1 DATA chunk */ | ||
824 | __u8 has_data; | ||
825 | |||
826 | /* SCTP cannot fragment this packet. So let ip fragment it. */ | ||
827 | __u8 ipfragok; | ||
828 | |||
829 | __u8 malloced; | ||
830 | }; | 831 | }; |
831 | 832 | ||
832 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, | 833 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, |
@@ -1567,13 +1568,13 @@ struct sctp_association { | |||
1567 | __u32 sack_cnt; | 1568 | __u32 sack_cnt; |
1568 | 1569 | ||
1569 | /* These are capabilities which our peer advertised. */ | 1570 | /* These are capabilities which our peer advertised. */ |
1570 | __u8 ecn_capable; /* Can peer do ECN? */ | 1571 | __u8 ecn_capable:1, /* Can peer do ECN? */ |
1571 | __u8 ipv4_address; /* Peer understands IPv4 addresses? */ | 1572 | ipv4_address:1, /* Peer understands IPv4 addresses? */ |
1572 | __u8 ipv6_address; /* Peer understands IPv6 addresses? */ | 1573 | ipv6_address:1, /* Peer understands IPv6 addresses? */ |
1573 | __u8 hostname_address;/* Peer understands DNS addresses? */ | 1574 | hostname_address:1, /* Peer understands DNS addresses? */ |
1574 | __u8 asconf_capable; /* Does peer support ADDIP? */ | 1575 | asconf_capable:1, /* Does peer support ADDIP? */ |
1575 | __u8 prsctp_capable; /* Can peer do PR-SCTP? */ | 1576 | prsctp_capable:1, /* Can peer do PR-SCTP? */ |
1576 | __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ | 1577 | auth_capable:1; /* Is peer doing SCTP-AUTH? */ |
1577 | 1578 | ||
1578 | __u32 adaptation_ind; /* Adaptation Code point. */ | 1579 | __u32 adaptation_ind; /* Adaptation Code point. */ |
1579 | 1580 | ||
@@ -1738,6 +1739,12 @@ struct sctp_association { | |||
1738 | */ | 1739 | */ |
1739 | __u32 rwnd_over; | 1740 | __u32 rwnd_over; |
1740 | 1741 | ||
1742 | /* Keeps treack of rwnd pressure. This happens when we have | ||
1743 | * a window, but not recevie buffer (i.e small packets). This one | ||
1744 | * is releases slowly (1 PMTU at a time ). | ||
1745 | */ | ||
1746 | __u32 rwnd_press; | ||
1747 | |||
1741 | /* This is the sndbuf size in use for the association. | 1748 | /* This is the sndbuf size in use for the association. |
1742 | * This corresponds to the sndbuf size for the association, | 1749 | * This corresponds to the sndbuf size for the association, |
1743 | * as specified in the sk->sndbuf. | 1750 | * as specified in the sk->sndbuf. |
@@ -1756,6 +1763,7 @@ struct sctp_association { | |||
1756 | 1763 | ||
1757 | /* The message size at which SCTP fragmentation will occur. */ | 1764 | /* The message size at which SCTP fragmentation will occur. */ |
1758 | __u32 frag_point; | 1765 | __u32 frag_point; |
1766 | __u32 user_frag; | ||
1759 | 1767 | ||
1760 | /* Counter used to count INIT errors. */ | 1768 | /* Counter used to count INIT errors. */ |
1761 | int init_err_counter; | 1769 | int init_err_counter; |
@@ -1905,11 +1913,8 @@ struct sctp_association { | |||
1905 | 1913 | ||
1906 | __u16 active_key_id; | 1914 | __u16 active_key_id; |
1907 | 1915 | ||
1908 | /* Need to send an ECNE Chunk? */ | 1916 | __u8 need_ecne:1, /* Need to send an ECNE Chunk? */ |
1909 | char need_ecne; | 1917 | temp:1; /* Is it a temporary association? */ |
1910 | |||
1911 | /* Is it a temporary association? */ | ||
1912 | char temp; | ||
1913 | }; | 1918 | }; |
1914 | 1919 | ||
1915 | 1920 | ||
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 1580c04f68bc..be2334aaf52e 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -210,12 +210,6 @@ enum sctp_sinfo_flags { | |||
210 | }; | 210 | }; |
211 | 211 | ||
212 | 212 | ||
213 | typedef union { | ||
214 | __u8 raw; | ||
215 | struct sctp_initmsg init; | ||
216 | struct sctp_sndrcvinfo sndrcv; | ||
217 | } sctp_cmsg_data_t; | ||
218 | |||
219 | /* These are cmsg_types. */ | 213 | /* These are cmsg_types. */ |
220 | typedef enum sctp_cmsg_type { | 214 | typedef enum sctp_cmsg_type { |
221 | SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ | 215 | SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 88af84306471..b71a446d58f6 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -469,6 +469,7 @@ extern void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, | |||
469 | int nonagle); | 469 | int nonagle); |
470 | extern int tcp_may_send_now(struct sock *sk); | 470 | extern int tcp_may_send_now(struct sock *sk); |
471 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | 471 | extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); |
472 | extern void tcp_retransmit_timer(struct sock *sk); | ||
472 | extern void tcp_xmit_retransmit_queue(struct sock *); | 473 | extern void tcp_xmit_retransmit_queue(struct sock *); |
473 | extern void tcp_simple_retransmit(struct sock *); | 474 | extern void tcp_simple_retransmit(struct sock *); |
474 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); | 475 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); |
@@ -521,6 +522,17 @@ extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | |||
521 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | 522 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); |
522 | extern void tcp_mtup_init(struct sock *sk); | 523 | extern void tcp_mtup_init(struct sock *sk); |
523 | 524 | ||
525 | static inline void tcp_bound_rto(const struct sock *sk) | ||
526 | { | ||
527 | if (inet_csk(sk)->icsk_rto > TCP_RTO_MAX) | ||
528 | inet_csk(sk)->icsk_rto = TCP_RTO_MAX; | ||
529 | } | ||
530 | |||
531 | static inline u32 __tcp_set_rto(const struct tcp_sock *tp) | ||
532 | { | ||
533 | return (tp->srtt >> 3) + tp->rttvar; | ||
534 | } | ||
535 | |||
524 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) | 536 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) |
525 | { | 537 | { |
526 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | | 538 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | |
@@ -1007,6 +1019,11 @@ static inline int keepalive_time_when(const struct tcp_sock *tp) | |||
1007 | return tp->keepalive_time ? : sysctl_tcp_keepalive_time; | 1019 | return tp->keepalive_time ? : sysctl_tcp_keepalive_time; |
1008 | } | 1020 | } |
1009 | 1021 | ||
1022 | static inline int keepalive_probes(const struct tcp_sock *tp) | ||
1023 | { | ||
1024 | return tp->keepalive_probes ? : sysctl_tcp_keepalive_probes; | ||
1025 | } | ||
1026 | |||
1010 | static inline int tcp_fin_time(const struct sock *sk) | 1027 | static inline int tcp_fin_time(const struct sock *sk) |
1011 | { | 1028 | { |
1012 | int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout; | 1029 | int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout; |
@@ -1169,7 +1186,7 @@ extern int tcp_v4_md5_do_del(struct sock *sk, | |||
1169 | #define tcp_twsk_md5_key(twsk) NULL | 1186 | #define tcp_twsk_md5_key(twsk) NULL |
1170 | #endif | 1187 | #endif |
1171 | 1188 | ||
1172 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); | 1189 | extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(struct sock *); |
1173 | extern void tcp_free_md5sig_pool(void); | 1190 | extern void tcp_free_md5sig_pool(void); |
1174 | 1191 | ||
1175 | extern struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu); | 1192 | extern struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu); |
@@ -1235,6 +1252,29 @@ static inline struct sk_buff *tcp_write_queue_prev(struct sock *sk, struct sk_bu | |||
1235 | #define tcp_for_write_queue_from_safe(skb, tmp, sk) \ | 1252 | #define tcp_for_write_queue_from_safe(skb, tmp, sk) \ |
1236 | skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp) | 1253 | skb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp) |
1237 | 1254 | ||
1255 | /* This function calculates a "timeout" which is equivalent to the timeout of a | ||
1256 | * TCP connection after "boundary" unsucessful, exponentially backed-off | ||
1257 | * retransmissions with an initial RTO of TCP_RTO_MIN. | ||
1258 | */ | ||
1259 | static inline bool retransmits_timed_out(const struct sock *sk, | ||
1260 | unsigned int boundary) | ||
1261 | { | ||
1262 | unsigned int timeout, linear_backoff_thresh; | ||
1263 | |||
1264 | if (!inet_csk(sk)->icsk_retransmits) | ||
1265 | return false; | ||
1266 | |||
1267 | linear_backoff_thresh = ilog2(TCP_RTO_MAX/TCP_RTO_MIN); | ||
1268 | |||
1269 | if (boundary <= linear_backoff_thresh) | ||
1270 | timeout = ((2 << boundary) - 1) * TCP_RTO_MIN; | ||
1271 | else | ||
1272 | timeout = ((2 << linear_backoff_thresh) - 1) * TCP_RTO_MIN + | ||
1273 | (boundary - linear_backoff_thresh) * TCP_RTO_MAX; | ||
1274 | |||
1275 | return (tcp_time_stamp - tcp_sk(sk)->retrans_stamp) >= timeout; | ||
1276 | } | ||
1277 | |||
1238 | static inline struct sk_buff *tcp_send_head(struct sock *sk) | 1278 | static inline struct sk_buff *tcp_send_head(struct sock *sk) |
1239 | { | 1279 | { |
1240 | return sk->sk_send_head; | 1280 | return sk->sk_send_head; |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index bfb240c6cf79..d65381cad0fc 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -51,7 +51,7 @@ extern int datagram_send_ctl(struct net *net, | |||
51 | /* | 51 | /* |
52 | * address family specific functions | 52 | * address family specific functions |
53 | */ | 53 | */ |
54 | extern struct inet_connection_sock_af_ops ipv4_specific; | 54 | extern const struct inet_connection_sock_af_ops ipv4_specific; |
55 | 55 | ||
56 | extern void inet6_destroy_sock(struct sock *sk); | 56 | extern void inet6_destroy_sock(struct sock *sk); |
57 | 57 | ||
diff --git a/include/net/udp.h b/include/net/udp.h index 90e6ce56be65..5fb029f817a3 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -207,4 +207,7 @@ extern void udp4_proc_exit(void); | |||
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | extern void udp_init(void); | 209 | extern void udp_init(void); |
210 | |||
211 | extern int udp4_ufo_send_check(struct sk_buff *skb); | ||
212 | extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, int features); | ||
210 | #endif /* _UDP_H */ | 213 | #endif /* _UDP_H */ |
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h new file mode 100644 index 000000000000..547b1e271ac9 --- /dev/null +++ b/include/net/wpan-phy.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007, 2008, 2009 Siemens AG | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along | ||
14 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Written by: | ||
18 | * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | ||
19 | */ | ||
20 | |||
21 | #ifndef WPAN_PHY_H | ||
22 | #define WPAN_PHY_H | ||
23 | |||
24 | #include <linux/netdevice.h> | ||
25 | #include <linux/mutex.h> | ||
26 | |||
27 | struct wpan_phy { | ||
28 | struct mutex pib_lock; | ||
29 | |||
30 | /* | ||
31 | * This is a PIB acording to 802.15.4-2006. | ||
32 | * We do not provide timing-related variables, as they | ||
33 | * aren't used outside of driver | ||
34 | */ | ||
35 | u8 current_channel; | ||
36 | u8 current_page; | ||
37 | u32 channels_supported; | ||
38 | u8 transmit_power; | ||
39 | u8 cca_mode; | ||
40 | |||
41 | struct device dev; | ||
42 | int idx; | ||
43 | |||
44 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | ||
45 | }; | ||
46 | |||
47 | struct wpan_phy *wpan_phy_alloc(size_t priv_size); | ||
48 | int wpan_phy_register(struct device *parent, struct wpan_phy *phy); | ||
49 | void wpan_phy_unregister(struct wpan_phy *phy); | ||
50 | void wpan_phy_free(struct wpan_phy *phy); | ||
51 | |||
52 | static inline void *wpan_phy_priv(struct wpan_phy *phy) | ||
53 | { | ||
54 | BUG_ON(!phy); | ||
55 | return &phy->priv; | ||
56 | } | ||
57 | |||
58 | struct wpan_phy *wpan_phy_find(const char *str); | ||
59 | static inline const char *wpan_phy_name(struct wpan_phy *phy) | ||
60 | { | ||
61 | return dev_name(&phy->dev); | ||
62 | } | ||
63 | #endif | ||
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 9e3a3f4c1f60..223e90a44824 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1280,7 +1280,7 @@ struct xfrm6_tunnel { | |||
1280 | }; | 1280 | }; |
1281 | 1281 | ||
1282 | extern void xfrm_init(void); | 1282 | extern void xfrm_init(void); |
1283 | extern void xfrm4_init(void); | 1283 | extern void xfrm4_init(int rt_hash_size); |
1284 | extern int xfrm_state_init(struct net *net); | 1284 | extern int xfrm_state_init(struct net *net); |
1285 | extern void xfrm_state_fini(struct net *net); | 1285 | extern void xfrm_state_fini(struct net *net); |
1286 | extern void xfrm4_state_init(void); | 1286 | extern void xfrm4_state_init(void); |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index e499863b9669..4b2be6dc76f0 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
6 | 6 | ||
7 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
8 | #include <linux/netdevice.h> | ||
8 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -34,6 +35,25 @@ TRACE_EVENT(kfree_skb, | |||
34 | __entry->skbaddr, __entry->protocol, __entry->location) | 35 | __entry->skbaddr, __entry->protocol, __entry->location) |
35 | ); | 36 | ); |
36 | 37 | ||
38 | TRACE_EVENT(skb_copy_datagram_iovec, | ||
39 | |||
40 | TP_PROTO(const struct sk_buff *skb, int len), | ||
41 | |||
42 | TP_ARGS(skb, len), | ||
43 | |||
44 | TP_STRUCT__entry( | ||
45 | __field( const void *, skbaddr ) | ||
46 | __field( int, len ) | ||
47 | ), | ||
48 | |||
49 | TP_fast_assign( | ||
50 | __entry->skbaddr = skb; | ||
51 | __entry->len = len; | ||
52 | ), | ||
53 | |||
54 | TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len) | ||
55 | ); | ||
56 | |||
37 | #endif /* _TRACE_SKB_H */ | 57 | #endif /* _TRACE_SKB_H */ |
38 | 58 | ||
39 | /* This part must be outside protection */ | 59 | /* This part must be outside protection */ |