diff options
Diffstat (limited to 'include')
45 files changed, 1181 insertions, 303 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/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/ethtool.h b/include/linux/ethtool.h index 9b660bd2e2b3..90c4a3616d94 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -368,6 +368,7 @@ struct net_device; | |||
368 | 368 | ||
369 | /* Some generic methods drivers may use in their ethtool_ops */ | 369 | /* Some generic methods drivers may use in their ethtool_ops */ |
370 | u32 ethtool_op_get_link(struct net_device *dev); | 370 | u32 ethtool_op_get_link(struct net_device *dev); |
371 | u32 ethtool_op_get_rx_csum(struct net_device *dev); | ||
371 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 372 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
372 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 373 | 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); | 374 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index a9173d5434d1..21556a2d9e7e 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -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_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_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/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..9f25ab2899de 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 |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index dbea93b694e5..cb3dc6027fd9 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 */ |
@@ -511,6 +542,44 @@ enum nl80211_commands { | |||
511 | * authorized by user space. Otherwise, port is marked authorized by | 542 | * authorized by user space. Otherwise, port is marked authorized by |
512 | * default in station mode. | 543 | * default in station mode. |
513 | * | 544 | * |
545 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | ||
546 | * We recommend using nested, driver-specific attributes within this. | ||
547 | * | ||
548 | * @NL80211_ATTR_DISCONNECTED_BY_AP: A flag indicating that the DISCONNECT | ||
549 | * event was due to the AP disconnecting the station, and not due to | ||
550 | * a local disconnect request. | ||
551 | * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT | ||
552 | * event (u16) | ||
553 | * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating | ||
554 | * that protected APs should be used. | ||
555 | * | ||
556 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to | ||
557 | * indicate which unicast key ciphers will be used with the connection | ||
558 | * (an array of u32). | ||
559 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate | ||
560 | * which group key cipher will be used with the connection (a u32). | ||
561 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate | ||
562 | * which WPA version(s) the AP we want to associate with is using | ||
563 | * (a u32 with flags from &enum nl80211_wpa_versions). | ||
564 | * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate | ||
565 | * which key management algorithm(s) to use (an array of u32). | ||
566 | * | ||
567 | * @NL80211_ATTR_REQ_IE: (Re)association request information elements as | ||
568 | * sent out by the card, for ROAM and successful CONNECT events. | ||
569 | * @NL80211_ATTR_RESP_IE: (Re)association response information elements as | ||
570 | * sent by peer, for ROAM and successful CONNECT events. | ||
571 | * | ||
572 | * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE | ||
573 | * commands to specify using a reassociate frame | ||
574 | * | ||
575 | * @NL80211_ATTR_KEY: key information in a nested attribute with | ||
576 | * %NL80211_KEY_* sub-attributes | ||
577 | * @NL80211_ATTR_KEYS: array of keys for static WEP keys for connect() | ||
578 | * and join_ibss(), key information is in a nested attribute each | ||
579 | * with %NL80211_KEY_* sub-attributes | ||
580 | * | ||
581 | * @NL80211_ATTR_PID: Process ID of a network namespace. | ||
582 | * | ||
514 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 583 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
515 | * @__NL80211_ATTR_AFTER_LAST: internal use | 584 | * @__NL80211_ATTR_AFTER_LAST: internal use |
516 | */ | 585 | */ |
@@ -619,6 +688,28 @@ enum nl80211_attrs { | |||
619 | 688 | ||
620 | NL80211_ATTR_CONTROL_PORT, | 689 | NL80211_ATTR_CONTROL_PORT, |
621 | 690 | ||
691 | NL80211_ATTR_TESTDATA, | ||
692 | |||
693 | NL80211_ATTR_PRIVACY, | ||
694 | |||
695 | NL80211_ATTR_DISCONNECTED_BY_AP, | ||
696 | NL80211_ATTR_STATUS_CODE, | ||
697 | |||
698 | NL80211_ATTR_CIPHER_SUITES_PAIRWISE, | ||
699 | NL80211_ATTR_CIPHER_SUITE_GROUP, | ||
700 | NL80211_ATTR_WPA_VERSIONS, | ||
701 | NL80211_ATTR_AKM_SUITES, | ||
702 | |||
703 | NL80211_ATTR_REQ_IE, | ||
704 | NL80211_ATTR_RESP_IE, | ||
705 | |||
706 | NL80211_ATTR_PREV_BSSID, | ||
707 | |||
708 | NL80211_ATTR_KEY, | ||
709 | NL80211_ATTR_KEYS, | ||
710 | |||
711 | NL80211_ATTR_PID, | ||
712 | |||
622 | /* add attributes here, update the policy in nl80211.c */ | 713 | /* add attributes here, update the policy in nl80211.c */ |
623 | 714 | ||
624 | __NL80211_ATTR_AFTER_LAST, | 715 | __NL80211_ATTR_AFTER_LAST, |
@@ -629,6 +720,7 @@ enum nl80211_attrs { | |||
629 | * Allow user space programs to use #ifdef on new attributes by defining them | 720 | * Allow user space programs to use #ifdef on new attributes by defining them |
630 | * here | 721 | * here |
631 | */ | 722 | */ |
723 | #define NL80211_CMD_CONNECT NL80211_CMD_CONNECT | ||
632 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY | 724 | #define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY |
633 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES | 725 | #define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES |
634 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS | 726 | #define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS |
@@ -642,6 +734,12 @@ enum nl80211_attrs { | |||
642 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | 734 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID |
643 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | 735 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE |
644 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | 736 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE |
737 | #define NL80211_ATTR_CIPHER_SUITES_PAIRWISE NL80211_ATTR_CIPHER_SUITES_PAIRWISE | ||
738 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP | ||
739 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS | ||
740 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES | ||
741 | #define NL80211_ATTR_KEY NL80211_ATTR_KEY | ||
742 | #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS | ||
645 | 743 | ||
646 | #define NL80211_MAX_SUPP_RATES 32 | 744 | #define NL80211_MAX_SUPP_RATES 32 |
647 | #define NL80211_MAX_SUPP_REG_RULES 32 | 745 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -650,6 +748,9 @@ enum nl80211_attrs { | |||
650 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 | 748 | #define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 |
651 | #define NL80211_HT_CAPABILITY_LEN 26 | 749 | #define NL80211_HT_CAPABILITY_LEN 26 |
652 | 750 | ||
751 | #define NL80211_MAX_NR_CIPHER_SUITES 5 | ||
752 | #define NL80211_MAX_NR_AKM_SUITES 2 | ||
753 | |||
653 | /** | 754 | /** |
654 | * enum nl80211_iftype - (virtual) interface types | 755 | * enum nl80211_iftype - (virtual) interface types |
655 | * | 756 | * |
@@ -1168,6 +1269,7 @@ enum nl80211_channel_type { | |||
1168 | * in mBm (100 * dBm) (s32) | 1269 | * in mBm (100 * dBm) (s32) |
1169 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1270 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1170 | * in unspecified units, scaled to 0..100 (u8) | 1271 | * in unspecified units, scaled to 0..100 (u8) |
1272 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | ||
1171 | * @__NL80211_BSS_AFTER_LAST: internal | 1273 | * @__NL80211_BSS_AFTER_LAST: internal |
1172 | * @NL80211_BSS_MAX: highest BSS attribute | 1274 | * @NL80211_BSS_MAX: highest BSS attribute |
1173 | */ | 1275 | */ |
@@ -1181,6 +1283,7 @@ enum nl80211_bss { | |||
1181 | NL80211_BSS_INFORMATION_ELEMENTS, | 1283 | NL80211_BSS_INFORMATION_ELEMENTS, |
1182 | NL80211_BSS_SIGNAL_MBM, | 1284 | NL80211_BSS_SIGNAL_MBM, |
1183 | NL80211_BSS_SIGNAL_UNSPEC, | 1285 | NL80211_BSS_SIGNAL_UNSPEC, |
1286 | NL80211_BSS_STATUS, | ||
1184 | 1287 | ||
1185 | /* keep last */ | 1288 | /* keep last */ |
1186 | __NL80211_BSS_AFTER_LAST, | 1289 | __NL80211_BSS_AFTER_LAST, |
@@ -1188,18 +1291,37 @@ enum nl80211_bss { | |||
1188 | }; | 1291 | }; |
1189 | 1292 | ||
1190 | /** | 1293 | /** |
1294 | * enum nl80211_bss_status - BSS "status" | ||
1295 | */ | ||
1296 | enum nl80211_bss_status { | ||
1297 | NL80211_BSS_STATUS_AUTHENTICATED, | ||
1298 | NL80211_BSS_STATUS_ASSOCIATED, | ||
1299 | NL80211_BSS_STATUS_IBSS_JOINED, | ||
1300 | }; | ||
1301 | |||
1302 | /** | ||
1191 | * enum nl80211_auth_type - AuthenticationType | 1303 | * enum nl80211_auth_type - AuthenticationType |
1192 | * | 1304 | * |
1193 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | 1305 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication |
1194 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | 1306 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) |
1195 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | 1307 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) |
1196 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | 1308 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) |
1309 | * @__NL80211_AUTHTYPE_NUM: internal | ||
1310 | * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm | ||
1311 | * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by | ||
1312 | * trying multiple times); this is invalid in netlink -- leave out | ||
1313 | * the attribute for this on CONNECT commands. | ||
1197 | */ | 1314 | */ |
1198 | enum nl80211_auth_type { | 1315 | enum nl80211_auth_type { |
1199 | NL80211_AUTHTYPE_OPEN_SYSTEM, | 1316 | NL80211_AUTHTYPE_OPEN_SYSTEM, |
1200 | NL80211_AUTHTYPE_SHARED_KEY, | 1317 | NL80211_AUTHTYPE_SHARED_KEY, |
1201 | NL80211_AUTHTYPE_FT, | 1318 | NL80211_AUTHTYPE_FT, |
1202 | NL80211_AUTHTYPE_NETWORK_EAP, | 1319 | NL80211_AUTHTYPE_NETWORK_EAP, |
1320 | |||
1321 | /* keep last */ | ||
1322 | __NL80211_AUTHTYPE_NUM, | ||
1323 | NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1, | ||
1324 | NL80211_AUTHTYPE_AUTOMATIC | ||
1203 | }; | 1325 | }; |
1204 | 1326 | ||
1205 | /** | 1327 | /** |
@@ -1224,4 +1346,39 @@ enum nl80211_mfp { | |||
1224 | NL80211_MFP_REQUIRED, | 1346 | NL80211_MFP_REQUIRED, |
1225 | }; | 1347 | }; |
1226 | 1348 | ||
1349 | enum nl80211_wpa_versions { | ||
1350 | NL80211_WPA_VERSION_1 = 1 << 0, | ||
1351 | NL80211_WPA_VERSION_2 = 1 << 1, | ||
1352 | }; | ||
1353 | |||
1354 | /** | ||
1355 | * enum nl80211_key_attributes - key attributes | ||
1356 | * @__NL80211_KEY_INVALID: invalid | ||
1357 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
1358 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
1359 | * keys | ||
1360 | * @NL80211_KEY_IDX: key ID (u8, 0-3) | ||
1361 | * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
1362 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
1363 | * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
1364 | * CCMP keys, each six bytes in little endian | ||
1365 | * @NL80211_KEY_DEFAULT: flag indicating default key | ||
1366 | * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key | ||
1367 | * @__NL80211_KEY_AFTER_LAST: internal | ||
1368 | * @NL80211_KEY_MAX: highest key attribute | ||
1369 | */ | ||
1370 | enum nl80211_key_attributes { | ||
1371 | __NL80211_KEY_INVALID, | ||
1372 | NL80211_KEY_DATA, | ||
1373 | NL80211_KEY_IDX, | ||
1374 | NL80211_KEY_CIPHER, | ||
1375 | NL80211_KEY_SEQ, | ||
1376 | NL80211_KEY_DEFAULT, | ||
1377 | NL80211_KEY_DEFAULT_MGMT, | ||
1378 | |||
1379 | /* keep last */ | ||
1380 | __NL80211_KEY_AFTER_LAST, | ||
1381 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | ||
1382 | }; | ||
1383 | |||
1227 | #endif /* __LINUX_NL80211_H */ | 1384 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 278777fa8a3a..21ca51bf4dd2 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -47,6 +47,7 @@ enum rfkill_type { | |||
47 | RFKILL_TYPE_UWB, | 47 | RFKILL_TYPE_UWB, |
48 | RFKILL_TYPE_WIMAX, | 48 | RFKILL_TYPE_WIMAX, |
49 | RFKILL_TYPE_WWAN, | 49 | RFKILL_TYPE_WWAN, |
50 | RFKILL_TYPE_GPS, | ||
50 | NUM_RFKILL_TYPES, | 51 | NUM_RFKILL_TYPES, |
51 | }; | 52 | }; |
52 | 53 | ||
@@ -82,6 +83,20 @@ struct rfkill_event { | |||
82 | __u8 soft, hard; | 83 | __u8 soft, hard; |
83 | } __packed; | 84 | } __packed; |
84 | 85 | ||
86 | /* | ||
87 | * We are planning to be backward and forward compatible with changes | ||
88 | * to the event struct, by adding new, optional, members at the end. | ||
89 | * When reading an event (whether the kernel from userspace or vice | ||
90 | * versa) we need to accept anything that's at least as large as the | ||
91 | * version 1 event size, but might be able to accept other sizes in | ||
92 | * the future. | ||
93 | * | ||
94 | * One exception is the kernel -- we already have two event sizes in | ||
95 | * that we've made the 'hard' member optional since our only option | ||
96 | * is to ignore it anyway. | ||
97 | */ | ||
98 | #define RFKILL_EVENT_SIZE_V1 8 | ||
99 | |||
85 | /* ioctl for turning off rfkill-input (if present) */ | 100 | /* ioctl for turning off rfkill-input (if present) */ |
86 | #define RFKILL_IOC_MAGIC 'R' | 101 | #define RFKILL_IOC_MAGIC 'R' |
87 | #define RFKILL_IOC_NOINPUT 1 | 102 | #define RFKILL_IOC_NOINPUT 1 |
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/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..de8b4b18961b 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -86,6 +86,7 @@ struct driver_info { | |||
86 | 86 | ||
87 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ | 87 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ |
88 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 88 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
89 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | ||
89 | 90 | ||
90 | 91 | ||
91 | /* init device ... can sleep, or cause probe() failure */ | 92 | /* init device ... can sleep, or cause probe() failure */ |
@@ -97,6 +98,9 @@ struct driver_info { | |||
97 | /* reset device ... can sleep */ | 98 | /* reset device ... can sleep */ |
98 | int (*reset)(struct usbnet *); | 99 | int (*reset)(struct usbnet *); |
99 | 100 | ||
101 | /* stop device ... can sleep */ | ||
102 | int (*stop)(struct usbnet *); | ||
103 | |||
100 | /* see if peer is connected ... can sleep */ | 104 | /* see if peer is connected ... can sleep */ |
101 | int (*check_connect)(struct usbnet *); | 105 | int (*check_connect)(struct usbnet *); |
102 | 106 | ||
@@ -118,9 +122,8 @@ struct driver_info { | |||
118 | * right after minidriver have initialized hardware. */ | 122 | * right after minidriver have initialized hardware. */ |
119 | int (*early_init)(struct usbnet *dev); | 123 | int (*early_init)(struct usbnet *dev); |
120 | 124 | ||
121 | /* called by minidriver when link state changes, state: 0=disconnect, | 125 | /* called by minidriver when receiving indication */ |
122 | * 1=connect */ | 126 | void (*indication)(struct usbnet *dev, void *ind, int indlen); |
123 | void (*link_change)(struct usbnet *dev, int state); | ||
124 | 127 | ||
125 | /* for new devices, use the descriptor-reading code instead */ | 128 | /* for new devices, use the descriptor-reading code instead */ |
126 | int in; /* rx endpoint */ | 129 | int in; /* rx endpoint */ |
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..0d78605fb1a6 100644 --- a/include/net/ieee802154/af_ieee802154.h +++ b/include/net/af_ieee802154.h | |||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index d1892d66701a..64df51d9a89f 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -538,11 +538,11 @@ struct cfg80211_ssid { | |||
538 | * @ssids: SSIDs to scan for (active scan only) | 538 | * @ssids: SSIDs to scan for (active scan only) |
539 | * @n_ssids: number of SSIDs | 539 | * @n_ssids: number of SSIDs |
540 | * @channels: channels to scan on. | 540 | * @channels: channels to scan on. |
541 | * @n_channels: number of channels for each band | 541 | * @n_channels: total number of channels to scan |
542 | * @ie: optional information element(s) to add into Probe Request or %NULL | 542 | * @ie: optional information element(s) to add into Probe Request or %NULL |
543 | * @ie_len: length of ie in octets | 543 | * @ie_len: length of ie in octets |
544 | * @wiphy: the wiphy this was for | 544 | * @wiphy: the wiphy this was for |
545 | * @ifidx: the interface index | 545 | * @dev: the interface |
546 | */ | 546 | */ |
547 | struct cfg80211_scan_request { | 547 | struct cfg80211_scan_request { |
548 | struct cfg80211_ssid *ssids; | 548 | struct cfg80211_ssid *ssids; |
@@ -554,7 +554,8 @@ struct cfg80211_scan_request { | |||
554 | 554 | ||
555 | /* internal */ | 555 | /* internal */ |
556 | struct wiphy *wiphy; | 556 | struct wiphy *wiphy; |
557 | int ifidx; | 557 | struct net_device *dev; |
558 | bool aborted; | ||
558 | }; | 559 | }; |
559 | 560 | ||
560 | /** | 561 | /** |
@@ -584,7 +585,6 @@ enum cfg80211_signal_type { | |||
584 | * is no guarantee that these are well-formed!) | 585 | * is no guarantee that these are well-formed!) |
585 | * @len_information_elements: total length of the information elements | 586 | * @len_information_elements: total length of the information elements |
586 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 587 | * @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 | 588 | * @free_priv: function pointer to free private data |
589 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 589 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
590 | */ | 590 | */ |
@@ -605,37 +605,59 @@ struct cfg80211_bss { | |||
605 | }; | 605 | }; |
606 | 606 | ||
607 | /** | 607 | /** |
608 | * ieee80211_bss_get_ie - find IE with given ID | ||
609 | * @bss: the bss to search | ||
610 | * @ie: the IE ID | ||
611 | * Returns %NULL if not found. | ||
612 | */ | ||
613 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie); | ||
614 | |||
615 | |||
616 | /** | ||
617 | * struct cfg80211_crypto_settings - Crypto settings | ||
618 | * @wpa_versions: indicates which, if any, WPA versions are enabled | ||
619 | * (from enum nl80211_wpa_versions) | ||
620 | * @cipher_group: group key cipher suite (or 0 if unset) | ||
621 | * @n_ciphers_pairwise: number of AP supported unicast ciphers | ||
622 | * @ciphers_pairwise: unicast key cipher suites | ||
623 | * @n_akm_suites: number of AKM suites | ||
624 | * @akm_suites: AKM suites | ||
625 | * @control_port: Whether user space controls IEEE 802.1X port, i.e., | ||
626 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is | ||
627 | * required to assume that the port is unauthorized until authorized by | ||
628 | * user space. Otherwise, port is marked authorized by default. | ||
629 | */ | ||
630 | struct cfg80211_crypto_settings { | ||
631 | u32 wpa_versions; | ||
632 | u32 cipher_group; | ||
633 | int n_ciphers_pairwise; | ||
634 | u32 ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES]; | ||
635 | int n_akm_suites; | ||
636 | u32 akm_suites[NL80211_MAX_NR_AKM_SUITES]; | ||
637 | bool control_port; | ||
638 | }; | ||
639 | |||
640 | /** | ||
608 | * struct cfg80211_auth_request - Authentication request data | 641 | * struct cfg80211_auth_request - Authentication request data |
609 | * | 642 | * |
610 | * This structure provides information needed to complete IEEE 802.11 | 643 | * This structure provides information needed to complete IEEE 802.11 |
611 | * authentication. | 644 | * authentication. |
612 | * NOTE: This structure will likely change when more code from mac80211 is | 645 | * |
613 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | 646 | * @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) | 647 | * @auth_type: Authentication type (algorithm) |
628 | * @ie: Extra IEs to add to Authentication frame or %NULL | 648 | * @ie: Extra IEs to add to Authentication frame or %NULL |
629 | * @ie_len: Length of ie buffer in octets | 649 | * @ie_len: Length of ie buffer in octets |
650 | * @key_len: length of WEP key for shared key authentication | ||
651 | * @key_idx: index of WEP key for shared key authentication | ||
652 | * @key: WEP key for shared key authentication | ||
630 | */ | 653 | */ |
631 | struct cfg80211_auth_request { | 654 | struct cfg80211_auth_request { |
632 | struct ieee80211_channel *chan; | 655 | 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; | 656 | const u8 *ie; |
638 | size_t ie_len; | 657 | size_t ie_len; |
658 | enum nl80211_auth_type auth_type; | ||
659 | const u8 *key; | ||
660 | u8 key_len, key_idx; | ||
639 | }; | 661 | }; |
640 | 662 | ||
641 | /** | 663 | /** |
@@ -643,35 +665,19 @@ struct cfg80211_auth_request { | |||
643 | * | 665 | * |
644 | * This structure provides information needed to complete IEEE 802.11 | 666 | * This structure provides information needed to complete IEEE 802.11 |
645 | * (re)association. | 667 | * (re)association. |
646 | * NOTE: This structure will likely change when more code from mac80211 is | 668 | * @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 | 669 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL |
659 | * @ie_len: Length of ie buffer in octets | 670 | * @ie_len: Length of ie buffer in octets |
660 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association | 671 | * @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., | 672 | * @crypto: crypto settings |
662 | * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is | 673 | * @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 | */ | 674 | */ |
666 | struct cfg80211_assoc_request { | 675 | struct cfg80211_assoc_request { |
667 | struct ieee80211_channel *chan; | 676 | struct cfg80211_bss *bss; |
668 | u8 *peer_addr; | 677 | const u8 *ie, *prev_bssid; |
669 | const u8 *ssid; | ||
670 | size_t ssid_len; | ||
671 | const u8 *ie; | ||
672 | size_t ie_len; | 678 | size_t ie_len; |
679 | struct cfg80211_crypto_settings crypto; | ||
673 | bool use_mfp; | 680 | bool use_mfp; |
674 | bool control_port; | ||
675 | }; | 681 | }; |
676 | 682 | ||
677 | /** | 683 | /** |
@@ -680,16 +686,16 @@ struct cfg80211_assoc_request { | |||
680 | * This structure provides information needed to complete IEEE 802.11 | 686 | * This structure provides information needed to complete IEEE 802.11 |
681 | * deauthentication. | 687 | * deauthentication. |
682 | * | 688 | * |
683 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | 689 | * @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 | 690 | * @ie: Extra IEs to add to Deauthentication frame or %NULL |
686 | * @ie_len: Length of ie buffer in octets | 691 | * @ie_len: Length of ie buffer in octets |
692 | * @reason_code: The reason code for the deauthentication | ||
687 | */ | 693 | */ |
688 | struct cfg80211_deauth_request { | 694 | struct cfg80211_deauth_request { |
689 | u8 *peer_addr; | 695 | struct cfg80211_bss *bss; |
690 | u16 reason_code; | ||
691 | const u8 *ie; | 696 | const u8 *ie; |
692 | size_t ie_len; | 697 | size_t ie_len; |
698 | u16 reason_code; | ||
693 | }; | 699 | }; |
694 | 700 | ||
695 | /** | 701 | /** |
@@ -698,16 +704,16 @@ struct cfg80211_deauth_request { | |||
698 | * This structure provides information needed to complete IEEE 802.11 | 704 | * This structure provides information needed to complete IEEE 802.11 |
699 | * disassocation. | 705 | * disassocation. |
700 | * | 706 | * |
701 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | 707 | * @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 | 708 | * @ie: Extra IEs to add to Disassociation frame or %NULL |
704 | * @ie_len: Length of ie buffer in octets | 709 | * @ie_len: Length of ie buffer in octets |
710 | * @reason_code: The reason code for the disassociation | ||
705 | */ | 711 | */ |
706 | struct cfg80211_disassoc_request { | 712 | struct cfg80211_disassoc_request { |
707 | u8 *peer_addr; | 713 | struct cfg80211_bss *bss; |
708 | u16 reason_code; | ||
709 | const u8 *ie; | 714 | const u8 *ie; |
710 | size_t ie_len; | 715 | size_t ie_len; |
716 | u16 reason_code; | ||
711 | }; | 717 | }; |
712 | 718 | ||
713 | /** | 719 | /** |
@@ -726,6 +732,8 @@ struct cfg80211_disassoc_request { | |||
726 | * @ie: information element(s) to include in the beacon | 732 | * @ie: information element(s) to include in the beacon |
727 | * @ie_len: length of that | 733 | * @ie_len: length of that |
728 | * @beacon_interval: beacon interval to use | 734 | * @beacon_interval: beacon interval to use |
735 | * @privacy: this is a protected network, keys will be configured | ||
736 | * after joining | ||
729 | */ | 737 | */ |
730 | struct cfg80211_ibss_params { | 738 | struct cfg80211_ibss_params { |
731 | u8 *ssid; | 739 | u8 *ssid; |
@@ -735,6 +743,42 @@ struct cfg80211_ibss_params { | |||
735 | u8 ssid_len, ie_len; | 743 | u8 ssid_len, ie_len; |
736 | u16 beacon_interval; | 744 | u16 beacon_interval; |
737 | bool channel_fixed; | 745 | bool channel_fixed; |
746 | bool privacy; | ||
747 | }; | ||
748 | |||
749 | /** | ||
750 | * struct cfg80211_connect_params - Connection parameters | ||
751 | * | ||
752 | * This structure provides information needed to complete IEEE 802.11 | ||
753 | * authentication and association. | ||
754 | * | ||
755 | * @channel: The channel to use or %NULL if not specified (auto-select based | ||
756 | * on scan results) | ||
757 | * @bssid: The AP BSSID or %NULL if not specified (auto-select based on scan | ||
758 | * results) | ||
759 | * @ssid: SSID | ||
760 | * @ssid_len: Length of ssid in octets | ||
761 | * @auth_type: Authentication type (algorithm) | ||
762 | * @assoc_ie: IEs for association request | ||
763 | * @assoc_ie_len: Length of assoc_ie in octets | ||
764 | * @privacy: indicates whether privacy-enabled APs should be used | ||
765 | * @crypto: crypto settings | ||
766 | * @key_len: length of WEP key for shared key authentication | ||
767 | * @key_idx: index of WEP key for shared key authentication | ||
768 | * @key: WEP key for shared key authentication | ||
769 | */ | ||
770 | struct cfg80211_connect_params { | ||
771 | struct ieee80211_channel *channel; | ||
772 | u8 *bssid; | ||
773 | u8 *ssid; | ||
774 | size_t ssid_len; | ||
775 | enum nl80211_auth_type auth_type; | ||
776 | u8 *ie; | ||
777 | size_t ie_len; | ||
778 | bool privacy; | ||
779 | struct cfg80211_crypto_settings crypto; | ||
780 | const u8 *key; | ||
781 | u8 key_len, key_idx; | ||
738 | }; | 782 | }; |
739 | 783 | ||
740 | /** | 784 | /** |
@@ -764,6 +808,26 @@ enum tx_power_setting { | |||
764 | TX_POWER_FIXED, | 808 | TX_POWER_FIXED, |
765 | }; | 809 | }; |
766 | 810 | ||
811 | /* | ||
812 | * cfg80211_bitrate_mask - masks for bitrate control | ||
813 | */ | ||
814 | struct cfg80211_bitrate_mask { | ||
815 | /* | ||
816 | * As discussed in Berlin, this struct really | ||
817 | * should look like this: | ||
818 | |||
819 | struct { | ||
820 | u32 legacy; | ||
821 | u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; | ||
822 | } control[IEEE80211_NUM_BANDS]; | ||
823 | |||
824 | * Since we can always fix in-kernel users, let's keep | ||
825 | * it simpler for now: | ||
826 | */ | ||
827 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | ||
828 | u32 maxrate; /* in kbps, 0 == no limit */ | ||
829 | }; | ||
830 | |||
767 | /** | 831 | /** |
768 | * struct cfg80211_ops - backend description for wireless configuration | 832 | * struct cfg80211_ops - backend description for wireless configuration |
769 | * | 833 | * |
@@ -781,7 +845,8 @@ enum tx_power_setting { | |||
781 | * @resume: wiphy device needs to be resumed | 845 | * @resume: wiphy device needs to be resumed |
782 | * | 846 | * |
783 | * @add_virtual_intf: create a new virtual interface with the given name, | 847 | * @add_virtual_intf: create a new virtual interface with the given name, |
784 | * must set the struct wireless_dev's iftype. | 848 | * must set the struct wireless_dev's iftype. Beware: You must create |
849 | * the new netdev in the wiphy's network namespace! | ||
785 | * | 850 | * |
786 | * @del_virtual_intf: remove the virtual interface determined by ifindex. | 851 | * @del_virtual_intf: remove the virtual interface determined by ifindex. |
787 | * | 852 | * |
@@ -841,6 +906,12 @@ enum tx_power_setting { | |||
841 | * @deauth: Request to deauthenticate from the specified peer | 906 | * @deauth: Request to deauthenticate from the specified peer |
842 | * @disassoc: Request to disassociate from the specified peer | 907 | * @disassoc: Request to disassociate from the specified peer |
843 | * | 908 | * |
909 | * @connect: Connect to the ESS with the specified parameters. When connected, | ||
910 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. | ||
911 | * If the connection fails for some reason, call cfg80211_connect_result() | ||
912 | * with the status from the AP. | ||
913 | * @disconnect: Disconnect from the BSS/ESS. | ||
914 | * | ||
844 | * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call | 915 | * @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 | 916 | * cfg80211_ibss_joined(), also call that function when changing BSSID due |
846 | * to a merge. | 917 | * to a merge. |
@@ -857,6 +928,8 @@ enum tx_power_setting { | |||
857 | * | 928 | * |
858 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting | 929 | * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting |
859 | * functions to adjust rfkill hw state | 930 | * functions to adjust rfkill hw state |
931 | * | ||
932 | * @testmode_cmd: run a test mode command | ||
860 | */ | 933 | */ |
861 | struct cfg80211_ops { | 934 | struct cfg80211_ops { |
862 | int (*suspend)(struct wiphy *wiphy); | 935 | int (*suspend)(struct wiphy *wiphy); |
@@ -865,8 +938,9 @@ struct cfg80211_ops { | |||
865 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, | 938 | int (*add_virtual_intf)(struct wiphy *wiphy, char *name, |
866 | enum nl80211_iftype type, u32 *flags, | 939 | enum nl80211_iftype type, u32 *flags, |
867 | struct vif_params *params); | 940 | struct vif_params *params); |
868 | int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); | 941 | int (*del_virtual_intf)(struct wiphy *wiphy, struct net_device *dev); |
869 | int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, | 942 | int (*change_virtual_intf)(struct wiphy *wiphy, |
943 | struct net_device *dev, | ||
870 | enum nl80211_iftype type, u32 *flags, | 944 | enum nl80211_iftype type, u32 *flags, |
871 | struct vif_params *params); | 945 | struct vif_params *params); |
872 | 946 | ||
@@ -939,9 +1013,16 @@ struct cfg80211_ops { | |||
939 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, | 1013 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, |
940 | struct cfg80211_assoc_request *req); | 1014 | struct cfg80211_assoc_request *req); |
941 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, | 1015 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, |
942 | struct cfg80211_deauth_request *req); | 1016 | struct cfg80211_deauth_request *req, |
1017 | void *cookie); | ||
943 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, | 1018 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, |
944 | struct cfg80211_disassoc_request *req); | 1019 | struct cfg80211_disassoc_request *req, |
1020 | void *cookie); | ||
1021 | |||
1022 | int (*connect)(struct wiphy *wiphy, struct net_device *dev, | ||
1023 | struct cfg80211_connect_params *sme); | ||
1024 | int (*disconnect)(struct wiphy *wiphy, struct net_device *dev, | ||
1025 | u16 reason_code); | ||
945 | 1026 | ||
946 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, | 1027 | int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, |
947 | struct cfg80211_ibss_params *params); | 1028 | struct cfg80211_ibss_params *params); |
@@ -953,7 +1034,23 @@ struct cfg80211_ops { | |||
953 | enum tx_power_setting type, int dbm); | 1034 | enum tx_power_setting type, int dbm); |
954 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); | 1035 | int (*get_tx_power)(struct wiphy *wiphy, int *dbm); |
955 | 1036 | ||
1037 | int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev, | ||
1038 | u8 *addr); | ||
1039 | |||
956 | void (*rfkill_poll)(struct wiphy *wiphy); | 1040 | void (*rfkill_poll)(struct wiphy *wiphy); |
1041 | |||
1042 | #ifdef CONFIG_NL80211_TESTMODE | ||
1043 | int (*testmode_cmd)(struct wiphy *wiphy, void *data, int len); | ||
1044 | #endif | ||
1045 | |||
1046 | int (*set_bitrate_mask)(struct wiphy *wiphy, | ||
1047 | struct net_device *dev, | ||
1048 | const u8 *peer, | ||
1049 | const struct cfg80211_bitrate_mask *mask); | ||
1050 | |||
1051 | /* some temporary stuff to finish wext */ | ||
1052 | int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, | ||
1053 | bool enabled, int timeout); | ||
957 | }; | 1054 | }; |
958 | 1055 | ||
959 | /* | 1056 | /* |
@@ -996,6 +1093,9 @@ struct cfg80211_ops { | |||
996 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); | 1093 | * @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold); |
997 | * -1 = fragmentation disabled, only odd values >= 256 used | 1094 | * -1 = fragmentation disabled, only odd values >= 256 used |
998 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1095 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1096 | * @net: the network namespace this wiphy currently lives in | ||
1097 | * @netnsok: if set to false, do not allow changing the netns of this | ||
1098 | * wiphy at all | ||
999 | */ | 1099 | */ |
1000 | struct wiphy { | 1100 | struct wiphy { |
1001 | /* assign these fields before you register the wiphy */ | 1101 | /* assign these fields before you register the wiphy */ |
@@ -1010,6 +1110,8 @@ struct wiphy { | |||
1010 | bool strict_regulatory; | 1110 | bool strict_regulatory; |
1011 | bool disable_beacon_hints; | 1111 | bool disable_beacon_hints; |
1012 | 1112 | ||
1113 | bool netnsok; | ||
1114 | |||
1013 | enum cfg80211_signal_type signal_type; | 1115 | enum cfg80211_signal_type signal_type; |
1014 | 1116 | ||
1015 | int bss_priv_size; | 1117 | int bss_priv_size; |
@@ -1048,9 +1150,35 @@ struct wiphy { | |||
1048 | /* dir in debugfs: ieee80211/<wiphyname> */ | 1150 | /* dir in debugfs: ieee80211/<wiphyname> */ |
1049 | struct dentry *debugfsdir; | 1151 | struct dentry *debugfsdir; |
1050 | 1152 | ||
1153 | #ifdef CONFIG_NET_NS | ||
1154 | /* the network namespace this phy lives in currently */ | ||
1155 | struct net *_net; | ||
1156 | #endif | ||
1157 | |||
1051 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); | 1158 | char priv[0] __attribute__((__aligned__(NETDEV_ALIGN))); |
1052 | }; | 1159 | }; |
1053 | 1160 | ||
1161 | #ifdef CONFIG_NET_NS | ||
1162 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1163 | { | ||
1164 | return wiphy->_net; | ||
1165 | } | ||
1166 | |||
1167 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1168 | { | ||
1169 | wiphy->_net = net; | ||
1170 | } | ||
1171 | #else | ||
1172 | static inline struct net *wiphy_net(struct wiphy *wiphy) | ||
1173 | { | ||
1174 | return &init_net; | ||
1175 | } | ||
1176 | |||
1177 | static inline void wiphy_net_set(struct wiphy *wiphy, struct net *net) | ||
1178 | { | ||
1179 | } | ||
1180 | #endif | ||
1181 | |||
1054 | /** | 1182 | /** |
1055 | * wiphy_priv - return priv from wiphy | 1183 | * wiphy_priv - return priv from wiphy |
1056 | * | 1184 | * |
@@ -1063,6 +1191,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy) | |||
1063 | } | 1191 | } |
1064 | 1192 | ||
1065 | /** | 1193 | /** |
1194 | * priv_to_wiphy - return the wiphy containing the priv | ||
1195 | * | ||
1196 | * @priv: a pointer previously returned by wiphy_priv | ||
1197 | */ | ||
1198 | static inline struct wiphy *priv_to_wiphy(void *priv) | ||
1199 | { | ||
1200 | BUG_ON(!priv); | ||
1201 | return container_of(priv, struct wiphy, priv); | ||
1202 | } | ||
1203 | |||
1204 | /** | ||
1066 | * set_wiphy_dev - set device pointer for wiphy | 1205 | * set_wiphy_dev - set device pointer for wiphy |
1067 | * | 1206 | * |
1068 | * @wiphy: The wiphy whose device to bind | 1207 | * @wiphy: The wiphy whose device to bind |
@@ -1134,6 +1273,13 @@ extern void wiphy_unregister(struct wiphy *wiphy); | |||
1134 | */ | 1273 | */ |
1135 | extern void wiphy_free(struct wiphy *wiphy); | 1274 | extern void wiphy_free(struct wiphy *wiphy); |
1136 | 1275 | ||
1276 | /* internal structs */ | ||
1277 | struct cfg80211_conn; | ||
1278 | struct cfg80211_internal_bss; | ||
1279 | struct cfg80211_cached_keys; | ||
1280 | |||
1281 | #define MAX_AUTH_BSSES 4 | ||
1282 | |||
1137 | /** | 1283 | /** |
1138 | * struct wireless_dev - wireless per-netdev state | 1284 | * struct wireless_dev - wireless per-netdev state |
1139 | * | 1285 | * |
@@ -1157,22 +1303,43 @@ struct wireless_dev { | |||
1157 | struct wiphy *wiphy; | 1303 | struct wiphy *wiphy; |
1158 | enum nl80211_iftype iftype; | 1304 | enum nl80211_iftype iftype; |
1159 | 1305 | ||
1160 | /* private to the generic wireless code */ | 1306 | /* the remainder of this struct should be private to cfg80211 */ |
1161 | struct list_head list; | 1307 | struct list_head list; |
1162 | struct net_device *netdev; | 1308 | struct net_device *netdev; |
1163 | 1309 | ||
1164 | /* currently used for IBSS - might be rearranged in the future */ | 1310 | struct mutex mtx; |
1165 | struct cfg80211_bss *current_bss; | 1311 | |
1166 | u8 bssid[ETH_ALEN]; | 1312 | /* currently used for IBSS and SME - might be rearranged later */ |
1167 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 1313 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
1168 | u8 ssid_len; | 1314 | u8 ssid_len; |
1315 | enum { | ||
1316 | CFG80211_SME_IDLE, | ||
1317 | CFG80211_SME_CONNECTING, | ||
1318 | CFG80211_SME_CONNECTED, | ||
1319 | } sme_state; | ||
1320 | struct cfg80211_conn *conn; | ||
1321 | struct cfg80211_cached_keys *connect_keys; | ||
1322 | |||
1323 | struct list_head event_list; | ||
1324 | spinlock_t event_lock; | ||
1325 | |||
1326 | struct cfg80211_internal_bss *authtry_bsses[MAX_AUTH_BSSES]; | ||
1327 | struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES]; | ||
1328 | struct cfg80211_internal_bss *current_bss; /* associated / joined */ | ||
1169 | 1329 | ||
1170 | #ifdef CONFIG_WIRELESS_EXT | 1330 | #ifdef CONFIG_WIRELESS_EXT |
1171 | /* wext data */ | 1331 | /* wext data */ |
1172 | struct { | 1332 | struct { |
1173 | struct cfg80211_ibss_params ibss; | 1333 | struct cfg80211_ibss_params ibss; |
1334 | struct cfg80211_connect_params connect; | ||
1335 | struct cfg80211_cached_keys *keys; | ||
1336 | u8 *ie; | ||
1337 | size_t ie_len; | ||
1174 | u8 bssid[ETH_ALEN]; | 1338 | u8 bssid[ETH_ALEN]; |
1339 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | ||
1175 | s8 default_key, default_mgmt_key; | 1340 | s8 default_key, default_mgmt_key; |
1341 | bool ps; | ||
1342 | int ps_timeout; | ||
1176 | } wext; | 1343 | } wext; |
1177 | #endif | 1344 | #endif |
1178 | }; | 1345 | }; |
@@ -1352,20 +1519,6 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb); | |||
1352 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); | 1519 | extern int regulatory_hint(struct wiphy *wiphy, const char *alpha2); |
1353 | 1520 | ||
1354 | /** | 1521 | /** |
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 | 1522 | * wiphy_apply_custom_regulatory - apply a custom driver regulatory domain |
1370 | * @wiphy: the wireless device we want to process the regulatory domain on | 1523 | * @wiphy: the wireless device we want to process the regulatory domain on |
1371 | * @regd: the custom regulatory domain to use for this wiphy | 1524 | * @regd: the custom regulatory domain to use for this wiphy |
@@ -1433,27 +1586,34 @@ int cfg80211_wext_siwmlme(struct net_device *dev, | |||
1433 | int cfg80211_wext_giwrange(struct net_device *dev, | 1586 | int cfg80211_wext_giwrange(struct net_device *dev, |
1434 | struct iw_request_info *info, | 1587 | struct iw_request_info *info, |
1435 | struct iw_point *data, char *extra); | 1588 | struct iw_point *data, char *extra); |
1436 | int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | 1589 | int cfg80211_wext_siwgenie(struct net_device *dev, |
1437 | struct iw_request_info *info, | 1590 | struct iw_request_info *info, |
1438 | struct iw_freq *freq, char *extra); | 1591 | struct iw_point *data, char *extra); |
1439 | int cfg80211_ibss_wext_giwfreq(struct net_device *dev, | 1592 | int cfg80211_wext_siwauth(struct net_device *dev, |
1440 | struct iw_request_info *info, | 1593 | struct iw_request_info *info, |
1441 | struct iw_freq *freq, char *extra); | 1594 | struct iw_param *data, char *extra); |
1442 | int cfg80211_ibss_wext_siwessid(struct net_device *dev, | 1595 | int cfg80211_wext_giwauth(struct net_device *dev, |
1443 | struct iw_request_info *info, | 1596 | struct iw_request_info *info, |
1444 | struct iw_point *data, char *ssid); | 1597 | 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 | 1598 | ||
1455 | struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, | 1599 | int cfg80211_wext_siwfreq(struct net_device *dev, |
1456 | struct iw_freq *freq); | 1600 | struct iw_request_info *info, |
1601 | struct iw_freq *freq, char *extra); | ||
1602 | int cfg80211_wext_giwfreq(struct net_device *dev, | ||
1603 | struct iw_request_info *info, | ||
1604 | struct iw_freq *freq, char *extra); | ||
1605 | int cfg80211_wext_siwessid(struct net_device *dev, | ||
1606 | struct iw_request_info *info, | ||
1607 | struct iw_point *data, char *ssid); | ||
1608 | int cfg80211_wext_giwessid(struct net_device *dev, | ||
1609 | struct iw_request_info *info, | ||
1610 | struct iw_point *data, char *ssid); | ||
1611 | int cfg80211_wext_siwrate(struct net_device *dev, | ||
1612 | struct iw_request_info *info, | ||
1613 | struct iw_param *rate, char *extra); | ||
1614 | int cfg80211_wext_giwrate(struct net_device *dev, | ||
1615 | struct iw_request_info *info, | ||
1616 | struct iw_param *rate, char *extra); | ||
1457 | 1617 | ||
1458 | int cfg80211_wext_siwrts(struct net_device *dev, | 1618 | int cfg80211_wext_siwrts(struct net_device *dev, |
1459 | struct iw_request_info *info, | 1619 | struct iw_request_info *info, |
@@ -1488,6 +1648,21 @@ int cfg80211_wext_siwtxpower(struct net_device *dev, | |||
1488 | int cfg80211_wext_giwtxpower(struct net_device *dev, | 1648 | int cfg80211_wext_giwtxpower(struct net_device *dev, |
1489 | struct iw_request_info *info, | 1649 | struct iw_request_info *info, |
1490 | union iwreq_data *data, char *keybuf); | 1650 | union iwreq_data *data, char *keybuf); |
1651 | struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev); | ||
1652 | |||
1653 | int cfg80211_wext_siwpower(struct net_device *dev, | ||
1654 | struct iw_request_info *info, | ||
1655 | struct iw_param *wrq, char *extra); | ||
1656 | int cfg80211_wext_giwpower(struct net_device *dev, | ||
1657 | struct iw_request_info *info, | ||
1658 | struct iw_param *wrq, char *extra); | ||
1659 | |||
1660 | int cfg80211_wext_siwap(struct net_device *dev, | ||
1661 | struct iw_request_info *info, | ||
1662 | struct sockaddr *ap_addr, char *extra); | ||
1663 | int cfg80211_wext_giwap(struct net_device *dev, | ||
1664 | struct iw_request_info *info, | ||
1665 | struct sockaddr *ap_addr, char *extra); | ||
1491 | 1666 | ||
1492 | /* | 1667 | /* |
1493 | * callbacks for asynchronous cfg80211 methods, notification | 1668 | * callbacks for asynchronous cfg80211 methods, notification |
@@ -1569,7 +1744,7 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | |||
1569 | * This function is called whenever an authentication has been processed in | 1744 | * This function is called whenever an authentication has been processed in |
1570 | * station mode. The driver is required to call either this function or | 1745 | * 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() | 1746 | * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() |
1572 | * call. | 1747 | * call. This function may sleep. |
1573 | */ | 1748 | */ |
1574 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | 1749 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); |
1575 | 1750 | ||
@@ -1577,6 +1752,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 | 1752 | * cfg80211_send_auth_timeout - notification of timed out authentication |
1578 | * @dev: network device | 1753 | * @dev: network device |
1579 | * @addr: The MAC address of the device with which the authentication timed out | 1754 | * @addr: The MAC address of the device with which the authentication timed out |
1755 | * | ||
1756 | * This function may sleep. | ||
1580 | */ | 1757 | */ |
1581 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); | 1758 | void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); |
1582 | 1759 | ||
@@ -1589,7 +1766,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 | 1766 | * This function is called whenever a (re)association response has been |
1590 | * processed in station mode. The driver is required to call either this | 1767 | * processed in station mode. The driver is required to call either this |
1591 | * function or cfg80211_send_assoc_timeout() to indicate the result of | 1768 | * function or cfg80211_send_assoc_timeout() to indicate the result of |
1592 | * cfg80211_ops::assoc() call. | 1769 | * cfg80211_ops::assoc() call. This function may sleep. |
1593 | */ | 1770 | */ |
1594 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | 1771 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); |
1595 | 1772 | ||
@@ -1597,6 +1774,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 | 1774 | * cfg80211_send_assoc_timeout - notification of timed out association |
1598 | * @dev: network device | 1775 | * @dev: network device |
1599 | * @addr: The MAC address of the device with which the association timed out | 1776 | * @addr: The MAC address of the device with which the association timed out |
1777 | * | ||
1778 | * This function may sleep. | ||
1600 | */ | 1779 | */ |
1601 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | 1780 | void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); |
1602 | 1781 | ||
@@ -1605,41 +1784,30 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); | |||
1605 | * @dev: network device | 1784 | * @dev: network device |
1606 | * @buf: deauthentication frame (header + body) | 1785 | * @buf: deauthentication frame (header + body) |
1607 | * @len: length of the frame data | 1786 | * @len: length of the frame data |
1787 | * @cookie: cookie from ->deauth if called within that callback, | ||
1788 | * %NULL otherwise | ||
1608 | * | 1789 | * |
1609 | * This function is called whenever deauthentication has been processed in | 1790 | * This function is called whenever deauthentication has been processed in |
1610 | * station mode. This includes both received deauthentication frames and | 1791 | * station mode. This includes both received deauthentication frames and |
1611 | * locally generated ones. | 1792 | * locally generated ones. This function may sleep. |
1612 | */ | 1793 | */ |
1613 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); | 1794 | void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, |
1795 | void *cookie); | ||
1614 | 1796 | ||
1615 | /** | 1797 | /** |
1616 | * cfg80211_send_disassoc - notification of processed disassociation | 1798 | * cfg80211_send_disassoc - notification of processed disassociation |
1617 | * @dev: network device | 1799 | * @dev: network device |
1618 | * @buf: disassociation response frame (header + body) | 1800 | * @buf: disassociation response frame (header + body) |
1619 | * @len: length of the frame data | 1801 | * @len: length of the frame data |
1802 | * @cookie: cookie from ->disassoc if called within that callback, | ||
1803 | * %NULL otherwise | ||
1620 | * | 1804 | * |
1621 | * This function is called whenever disassociation has been processed in | 1805 | * This function is called whenever disassociation has been processed in |
1622 | * station mode. This includes both received disassociation frames and locally | 1806 | * station mode. This includes both received disassociation frames and locally |
1623 | * generated ones. | 1807 | * 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 | */ | 1808 | */ |
1634 | void cfg80211_hold_bss(struct cfg80211_bss *bss); | 1809 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, |
1635 | 1810 | void *cookie); | |
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 | */ | ||
1642 | void cfg80211_unhold_bss(struct cfg80211_bss *bss); | ||
1643 | 1811 | ||
1644 | /** | 1812 | /** |
1645 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) | 1813 | * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) |
@@ -1648,6 +1816,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss); | |||
1648 | * @key_type: The key type that the received frame used | 1816 | * @key_type: The key type that the received frame used |
1649 | * @key_id: Key identifier (0..3) | 1817 | * @key_id: Key identifier (0..3) |
1650 | * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) | 1818 | * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) |
1819 | * @gfp: allocation flags | ||
1651 | * | 1820 | * |
1652 | * This function is called whenever the local MAC detects a MIC failure in a | 1821 | * This function is called whenever the local MAC detects a MIC failure in a |
1653 | * received frame. This matches with MLME-MICHAELMICFAILURE.indication() | 1822 | * received frame. This matches with MLME-MICHAELMICFAILURE.indication() |
@@ -1655,7 +1824,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss); | |||
1655 | */ | 1824 | */ |
1656 | void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, | 1825 | void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, |
1657 | enum nl80211_key_type key_type, int key_id, | 1826 | enum nl80211_key_type key_type, int key_id, |
1658 | const u8 *tsc); | 1827 | const u8 *tsc, gfp_t gfp); |
1659 | 1828 | ||
1660 | /** | 1829 | /** |
1661 | * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS | 1830 | * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS |
@@ -1692,4 +1861,137 @@ void wiphy_rfkill_start_polling(struct wiphy *wiphy); | |||
1692 | */ | 1861 | */ |
1693 | void wiphy_rfkill_stop_polling(struct wiphy *wiphy); | 1862 | void wiphy_rfkill_stop_polling(struct wiphy *wiphy); |
1694 | 1863 | ||
1864 | #ifdef CONFIG_NL80211_TESTMODE | ||
1865 | /** | ||
1866 | * cfg80211_testmode_alloc_reply_skb - allocate testmode reply | ||
1867 | * @wiphy: the wiphy | ||
1868 | * @approxlen: an upper bound of the length of the data that will | ||
1869 | * be put into the skb | ||
1870 | * | ||
1871 | * This function allocates and pre-fills an skb for a reply to | ||
1872 | * the testmode command. Since it is intended for a reply, calling | ||
1873 | * it outside of the @testmode_cmd operation is invalid. | ||
1874 | * | ||
1875 | * The returned skb (or %NULL if any errors happen) is pre-filled | ||
1876 | * with the wiphy index and set up in a way that any data that is | ||
1877 | * put into the skb (with skb_put(), nla_put() or similar) will end | ||
1878 | * up being within the %NL80211_ATTR_TESTDATA attribute, so all that | ||
1879 | * needs to be done with the skb is adding data for the corresponding | ||
1880 | * userspace tool which can then read that data out of the testdata | ||
1881 | * attribute. You must not modify the skb in any other way. | ||
1882 | * | ||
1883 | * When done, call cfg80211_testmode_reply() with the skb and return | ||
1884 | * its error code as the result of the @testmode_cmd operation. | ||
1885 | */ | ||
1886 | struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy, | ||
1887 | int approxlen); | ||
1888 | |||
1889 | /** | ||
1890 | * cfg80211_testmode_reply - send the reply skb | ||
1891 | * @skb: The skb, must have been allocated with | ||
1892 | * cfg80211_testmode_alloc_reply_skb() | ||
1893 | * | ||
1894 | * Returns an error code or 0 on success, since calling this | ||
1895 | * function will usually be the last thing before returning | ||
1896 | * from the @testmode_cmd you should return the error code. | ||
1897 | * Note that this function consumes the skb regardless of the | ||
1898 | * return value. | ||
1899 | */ | ||
1900 | int cfg80211_testmode_reply(struct sk_buff *skb); | ||
1901 | |||
1902 | /** | ||
1903 | * cfg80211_testmode_alloc_event_skb - allocate testmode event | ||
1904 | * @wiphy: the wiphy | ||
1905 | * @approxlen: an upper bound of the length of the data that will | ||
1906 | * be put into the skb | ||
1907 | * @gfp: allocation flags | ||
1908 | * | ||
1909 | * This function allocates and pre-fills an skb for an event on the | ||
1910 | * testmode multicast group. | ||
1911 | * | ||
1912 | * The returned skb (or %NULL if any errors happen) is set up in the | ||
1913 | * same way as with cfg80211_testmode_alloc_reply_skb() but prepared | ||
1914 | * for an event. As there, you should simply add data to it that will | ||
1915 | * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must | ||
1916 | * not modify the skb in any other way. | ||
1917 | * | ||
1918 | * When done filling the skb, call cfg80211_testmode_event() with the | ||
1919 | * skb to send the event. | ||
1920 | */ | ||
1921 | struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy, | ||
1922 | int approxlen, gfp_t gfp); | ||
1923 | |||
1924 | /** | ||
1925 | * cfg80211_testmode_event - send the event | ||
1926 | * @skb: The skb, must have been allocated with | ||
1927 | * cfg80211_testmode_alloc_event_skb() | ||
1928 | * @gfp: allocation flags | ||
1929 | * | ||
1930 | * This function sends the given @skb, which must have been allocated | ||
1931 | * by cfg80211_testmode_alloc_event_skb(), as an event. It always | ||
1932 | * consumes it. | ||
1933 | */ | ||
1934 | void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp); | ||
1935 | |||
1936 | #define CFG80211_TESTMODE_CMD(cmd) .testmode_cmd = (cmd), | ||
1937 | #else | ||
1938 | #define CFG80211_TESTMODE_CMD(cmd) | ||
1939 | #endif | ||
1940 | |||
1941 | /** | ||
1942 | * cfg80211_connect_result - notify cfg80211 of connection result | ||
1943 | * | ||
1944 | * @dev: network device | ||
1945 | * @bssid: the BSSID of the AP | ||
1946 | * @req_ie: association request IEs (maybe be %NULL) | ||
1947 | * @req_ie_len: association request IEs length | ||
1948 | * @resp_ie: association response IEs (may be %NULL) | ||
1949 | * @resp_ie_len: assoc response IEs length | ||
1950 | * @status: status code, 0 for successful connection, use | ||
1951 | * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you | ||
1952 | * the real status code for failures. | ||
1953 | * @gfp: allocation flags | ||
1954 | * | ||
1955 | * It should be called by the underlying driver whenever connect() has | ||
1956 | * succeeded. | ||
1957 | */ | ||
1958 | void cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | ||
1959 | const u8 *req_ie, size_t req_ie_len, | ||
1960 | const u8 *resp_ie, size_t resp_ie_len, | ||
1961 | u16 status, gfp_t gfp); | ||
1962 | |||
1963 | /** | ||
1964 | * cfg80211_roamed - notify cfg80211 of roaming | ||
1965 | * | ||
1966 | * @dev: network device | ||
1967 | * @bssid: the BSSID of the new AP | ||
1968 | * @req_ie: association request IEs (maybe be %NULL) | ||
1969 | * @req_ie_len: association request IEs length | ||
1970 | * @resp_ie: association response IEs (may be %NULL) | ||
1971 | * @resp_ie_len: assoc response IEs length | ||
1972 | * @gfp: allocation flags | ||
1973 | * | ||
1974 | * It should be called by the underlying driver whenever it roamed | ||
1975 | * from one AP to another while connected. | ||
1976 | */ | ||
1977 | void cfg80211_roamed(struct net_device *dev, const u8 *bssid, | ||
1978 | const u8 *req_ie, size_t req_ie_len, | ||
1979 | const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp); | ||
1980 | |||
1981 | /** | ||
1982 | * cfg80211_disconnected - notify cfg80211 that connection was dropped | ||
1983 | * | ||
1984 | * @dev: network device | ||
1985 | * @ie: information elements of the deauth/disassoc frame (may be %NULL) | ||
1986 | * @ie_len: length of IEs | ||
1987 | * @reason: reason code for the disconnection, set it to 0 if unknown | ||
1988 | * @gfp: allocation flags | ||
1989 | * | ||
1990 | * After it calls this function, the driver should enter an idle state | ||
1991 | * and not try to connect to any AP any more. | ||
1992 | */ | ||
1993 | void cfg80211_disconnected(struct net_device *dev, u16 reason, | ||
1994 | u8 *ie, size_t ie_len, gfp_t gfp); | ||
1995 | |||
1996 | |||
1695 | #endif /* __NET_CFG80211_H */ | 1997 | #endif /* __NET_CFG80211_H */ |
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..e2506af3e7c8 100644 --- a/include/net/ieee802154/netdevice.h +++ b/include/net/ieee802154_netdev.h | |||
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..2b3fbbb8669e 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -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..e2fb5767e1fa 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. |
@@ -241,6 +256,11 @@ struct ieee80211_bss_conf { | |||
241 | * it can be sent out. | 256 | * it can be sent out. |
242 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, | 257 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, |
243 | * used to indicate that a frame was already retried due to PS | 258 | * used to indicate that a frame was already retried due to PS |
259 | * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, | ||
260 | * used to indicate frame should not be encrypted | ||
261 | * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?) | ||
262 | * This frame is a response to a PS-poll frame and should be sent | ||
263 | * although the station is in powersave mode. | ||
244 | */ | 264 | */ |
245 | enum mac80211_tx_control_flags { | 265 | enum mac80211_tx_control_flags { |
246 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 266 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -259,6 +279,8 @@ enum mac80211_tx_control_flags { | |||
259 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | 279 | IEEE80211_TX_INTFL_RCALGO = BIT(13), |
260 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 280 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
261 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 281 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
282 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | ||
283 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), | ||
262 | }; | 284 | }; |
263 | 285 | ||
264 | /** | 286 | /** |
@@ -397,6 +419,11 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb) | |||
397 | return (struct ieee80211_tx_info *)skb->cb; | 419 | return (struct ieee80211_tx_info *)skb->cb; |
398 | } | 420 | } |
399 | 421 | ||
422 | static inline struct ieee80211_rx_status *IEEE80211_SKB_RXCB(struct sk_buff *skb) | ||
423 | { | ||
424 | return (struct ieee80211_rx_status *)skb->cb; | ||
425 | } | ||
426 | |||
400 | /** | 427 | /** |
401 | * ieee80211_tx_info_clear_status - clear TX status | 428 | * ieee80211_tx_info_clear_status - clear TX status |
402 | * | 429 | * |
@@ -478,7 +505,7 @@ enum mac80211_rx_flags { | |||
478 | * | 505 | * |
479 | * The low-level driver should provide this information (the subset | 506 | * The low-level driver should provide this information (the subset |
480 | * supported by hardware) to the 802.11 code with each received | 507 | * supported by hardware) to the 802.11 code with each received |
481 | * frame. | 508 | * frame, in the skb's control buffer (cb). |
482 | * | 509 | * |
483 | * @mactime: value in microseconds of the 64-bit Time Synchronization Function | 510 | * @mactime: value in microseconds of the 64-bit Time Synchronization Function |
484 | * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. | 511 | * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. |
@@ -901,12 +928,6 @@ enum ieee80211_hw_flags { | |||
901 | * | 928 | * |
902 | * @conf: &struct ieee80211_conf, device configuration, don't use. | 929 | * @conf: &struct ieee80211_conf, device configuration, don't use. |
903 | * | 930 | * |
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 | 931 | * @priv: pointer to private area that was allocated for driver use |
911 | * along with this structure. | 932 | * along with this structure. |
912 | * | 933 | * |
@@ -942,7 +963,6 @@ enum ieee80211_hw_flags { | |||
942 | struct ieee80211_hw { | 963 | struct ieee80211_hw { |
943 | struct ieee80211_conf conf; | 964 | struct ieee80211_conf conf; |
944 | struct wiphy *wiphy; | 965 | struct wiphy *wiphy; |
945 | struct workqueue_struct *workqueue; | ||
946 | const char *rate_control_algorithm; | 966 | const char *rate_control_algorithm; |
947 | void *priv; | 967 | void *priv; |
948 | u32 flags; | 968 | u32 flags; |
@@ -1224,10 +1244,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 | 1244 | * mac80211 needs to do and the amount of CPU wakeups, so you should |
1225 | * honour this flag if possible. | 1245 | * honour this flag if possible. |
1226 | * | 1246 | * |
1227 | * @FIF_CONTROL: pass control frames, if PROMISC_IN_BSS is not set then | 1247 | * @FIF_CONTROL: pass control frames (except for PS Poll), if PROMISC_IN_BSS |
1228 | * only those addressed to this station | 1248 | * is not set then only those addressed to this station. |
1229 | * | 1249 | * |
1230 | * @FIF_OTHER_BSS: pass frames destined to other BSSes | 1250 | * @FIF_OTHER_BSS: pass frames destined to other BSSes |
1251 | * | ||
1252 | * @FIF_PSPOLL: pass PS Poll frames, if PROMISC_IN_BSS is not set then only | ||
1253 | * those addressed to this station. | ||
1231 | */ | 1254 | */ |
1232 | enum ieee80211_filter_flags { | 1255 | enum ieee80211_filter_flags { |
1233 | FIF_PROMISC_IN_BSS = 1<<0, | 1256 | FIF_PROMISC_IN_BSS = 1<<0, |
@@ -1237,6 +1260,7 @@ enum ieee80211_filter_flags { | |||
1237 | FIF_BCN_PRBRESP_PROMISC = 1<<4, | 1260 | FIF_BCN_PRBRESP_PROMISC = 1<<4, |
1238 | FIF_CONTROL = 1<<5, | 1261 | FIF_CONTROL = 1<<5, |
1239 | FIF_OTHER_BSS = 1<<6, | 1262 | FIF_OTHER_BSS = 1<<6, |
1263 | FIF_PSPOLL = 1<<7, | ||
1240 | }; | 1264 | }; |
1241 | 1265 | ||
1242 | /** | 1266 | /** |
@@ -1289,7 +1313,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1289 | * is disabled. This should turn off the hardware (at least | 1313 | * is disabled. This should turn off the hardware (at least |
1290 | * it must turn off frame reception.) | 1314 | * it must turn off frame reception.) |
1291 | * May be called right after add_interface if that rejects | 1315 | * May be called right after add_interface if that rejects |
1292 | * an interface. | 1316 | * an interface. If you added any work onto the mac80211 workqueue |
1317 | * you should ensure to cancel it on this callback. | ||
1293 | * Must be implemented. | 1318 | * Must be implemented. |
1294 | * | 1319 | * |
1295 | * @add_interface: Called when a netdevice attached to the hardware is | 1320 | * @add_interface: Called when a netdevice attached to the hardware is |
@@ -1411,6 +1436,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1411 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also | 1436 | * @rfkill_poll: Poll rfkill hardware state. If you need this, you also |
1412 | * need to set wiphy->rfkill_poll to %true before registration, | 1437 | * need to set wiphy->rfkill_poll to %true before registration, |
1413 | * and need to call wiphy_rfkill_set_hw_state() in the callback. | 1438 | * and need to call wiphy_rfkill_set_hw_state() in the callback. |
1439 | * | ||
1440 | * @testmode_cmd: Implement a cfg80211 test mode command. | ||
1414 | */ | 1441 | */ |
1415 | struct ieee80211_ops { | 1442 | struct ieee80211_ops { |
1416 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); | 1443 | int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); |
@@ -1461,6 +1488,9 @@ struct ieee80211_ops { | |||
1461 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1488 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
1462 | 1489 | ||
1463 | void (*rfkill_poll)(struct ieee80211_hw *hw); | 1490 | void (*rfkill_poll)(struct ieee80211_hw *hw); |
1491 | #ifdef CONFIG_NL80211_TESTMODE | ||
1492 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); | ||
1493 | #endif | ||
1464 | }; | 1494 | }; |
1465 | 1495 | ||
1466 | /** | 1496 | /** |
@@ -1606,9 +1636,11 @@ void ieee80211_free_hw(struct ieee80211_hw *hw); | |||
1606 | */ | 1636 | */ |
1607 | void ieee80211_restart_hw(struct ieee80211_hw *hw); | 1637 | void ieee80211_restart_hw(struct ieee80211_hw *hw); |
1608 | 1638 | ||
1609 | /* trick to avoid symbol clashes with the ieee80211 subsystem */ | 1639 | /* |
1610 | void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | 1640 | * trick to avoid symbol clashes with the ieee80211 subsystem, |
1611 | struct ieee80211_rx_status *status); | 1641 | * use the inline below instead |
1642 | */ | ||
1643 | void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb); | ||
1612 | 1644 | ||
1613 | /** | 1645 | /** |
1614 | * ieee80211_rx - receive frame | 1646 | * ieee80211_rx - receive frame |
@@ -1624,13 +1656,10 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1624 | * | 1656 | * |
1625 | * @hw: the hardware this frame came in on | 1657 | * @hw: the hardware this frame came in on |
1626 | * @skb: the buffer to receive, owned by mac80211 after this call | 1658 | * @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 | */ | 1659 | */ |
1630 | static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | 1660 | static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) |
1631 | struct ieee80211_rx_status *status) | ||
1632 | { | 1661 | { |
1633 | __ieee80211_rx(hw, skb, status); | 1662 | __ieee80211_rx(hw, skb); |
1634 | } | 1663 | } |
1635 | 1664 | ||
1636 | /** | 1665 | /** |
@@ -1644,13 +1673,8 @@ static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1644 | * | 1673 | * |
1645 | * @hw: the hardware this frame came in on | 1674 | * @hw: the hardware this frame came in on |
1646 | * @skb: the buffer to receive, owned by mac80211 after this call | 1675 | * @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 | */ | 1676 | */ |
1651 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, | 1677 | void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); |
1652 | struct sk_buff *skb, | ||
1653 | struct ieee80211_rx_status *status); | ||
1654 | 1678 | ||
1655 | /** | 1679 | /** |
1656 | * ieee80211_tx_status - transmit status callback | 1680 | * ieee80211_tx_status - transmit status callback |
@@ -1917,6 +1941,31 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw, | |||
1917 | void *data); | 1941 | void *data); |
1918 | 1942 | ||
1919 | /** | 1943 | /** |
1944 | * ieee80211_queue_work - add work onto the mac80211 workqueue | ||
1945 | * | ||
1946 | * Drivers and mac80211 use this to add work onto the mac80211 workqueue. | ||
1947 | * This helper ensures drivers are not queueing work when they should not be. | ||
1948 | * | ||
1949 | * @hw: the hardware struct for the interface we are adding work for | ||
1950 | * @work: the work we want to add onto the mac80211 workqueue | ||
1951 | */ | ||
1952 | void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work); | ||
1953 | |||
1954 | /** | ||
1955 | * ieee80211_queue_delayed_work - add work onto the mac80211 workqueue | ||
1956 | * | ||
1957 | * Drivers and mac80211 use this to queue delayed work onto the mac80211 | ||
1958 | * workqueue. | ||
1959 | * | ||
1960 | * @hw: the hardware struct for the interface we are adding work for | ||
1961 | * @dwork: delayable work to queue onto the mac80211 workqueue | ||
1962 | * @delay: number of jiffies to wait before queueing | ||
1963 | */ | ||
1964 | void ieee80211_queue_delayed_work(struct ieee80211_hw *hw, | ||
1965 | struct delayed_work *dwork, | ||
1966 | unsigned long delay); | ||
1967 | |||
1968 | /** | ||
1920 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. | 1969 | * ieee80211_start_tx_ba_session - Start a tx Block Ack session. |
1921 | * @hw: pointer as obtained from ieee80211_alloc_hw(). | 1970 | * @hw: pointer as obtained from ieee80211_alloc_hw(). |
1922 | * @ra: receiver address of the BA session recipient | 1971 | * @ra: receiver address of the BA session recipient |
@@ -2090,6 +2139,29 @@ static inline int rate_supported(struct ieee80211_sta *sta, | |||
2090 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); | 2139 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); |
2091 | } | 2140 | } |
2092 | 2141 | ||
2142 | /** | ||
2143 | * rate_control_send_low - helper for drivers for management/no-ack frames | ||
2144 | * | ||
2145 | * Rate control algorithms that agree to use the lowest rate to | ||
2146 | * send management frames and NO_ACK data with the respective hw | ||
2147 | * retries should use this in the beginning of their mac80211 get_rate | ||
2148 | * callback. If true is returned the rate control can simply return. | ||
2149 | * If false is returned we guarantee that sta and sta and priv_sta is | ||
2150 | * not null. | ||
2151 | * | ||
2152 | * Rate control algorithms wishing to do more intelligent selection of | ||
2153 | * rate for multicast/broadcast frames may choose to not use this. | ||
2154 | * | ||
2155 | * @sta: &struct ieee80211_sta pointer to the target destination. Note | ||
2156 | * that this may be null. | ||
2157 | * @priv_sta: private rate control structure. This may be null. | ||
2158 | * @txrc: rate control information we sholud populate for mac80211. | ||
2159 | */ | ||
2160 | bool rate_control_send_low(struct ieee80211_sta *sta, | ||
2161 | void *priv_sta, | ||
2162 | struct ieee80211_tx_rate_control *txrc); | ||
2163 | |||
2164 | |||
2093 | static inline s8 | 2165 | static inline s8 |
2094 | rate_lowest_index(struct ieee80211_supported_band *sband, | 2166 | rate_lowest_index(struct ieee80211_supported_band *sband, |
2095 | struct ieee80211_sta *sta) | 2167 | struct ieee80211_sta *sta) |
@@ -2106,6 +2178,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband, | |||
2106 | return 0; | 2178 | return 0; |
2107 | } | 2179 | } |
2108 | 2180 | ||
2181 | static inline | ||
2182 | bool rate_usable_index_exists(struct ieee80211_supported_band *sband, | ||
2183 | struct ieee80211_sta *sta) | ||
2184 | { | ||
2185 | unsigned int i; | ||
2186 | |||
2187 | for (i = 0; i < sband->n_bitrates; i++) | ||
2188 | if (rate_supported(sta, sband->band, i)) | ||
2189 | return true; | ||
2190 | return false; | ||
2191 | } | ||
2109 | 2192 | ||
2110 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | 2193 | int ieee80211_rate_control_register(struct rate_control_ops *ops); |
2111 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | 2194 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index d8d790e56d3d..18b69b6cecaf 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 | /* |
@@ -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/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..6096096f6d7d --- /dev/null +++ b/include/net/nl802154.h | |||
@@ -0,0 +1,117 @@ | |||
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, | ||
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 | #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/sch_generic.h b/include/net/sch_generic.h index 964ffa0d8815..84b3fc2aef0f 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -45,6 +45,7 @@ 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 | ||
48 | #define TCQ_F_WARN_NONWC (1 << 16) | 49 | #define TCQ_F_WARN_NONWC (1 << 16) |
49 | int padded; | 50 | int padded; |
50 | struct Qdisc_ops *ops; | 51 | struct Qdisc_ops *ops; |
@@ -182,6 +183,11 @@ struct qdisc_skb_cb { | |||
182 | char data[]; | 183 | char data[]; |
183 | }; | 184 | }; |
184 | 185 | ||
186 | static inline int qdisc_qlen(struct Qdisc *q) | ||
187 | { | ||
188 | return q->q.qlen; | ||
189 | } | ||
190 | |||
185 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) | 191 | static inline struct qdisc_skb_cb *qdisc_skb_cb(struct sk_buff *skb) |
186 | { | 192 | { |
187 | return (struct qdisc_skb_cb *)skb->cb; | 193 | return (struct qdisc_skb_cb *)skb->cb; |
@@ -387,13 +393,18 @@ static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) | |||
387 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; | 393 | return qdisc_enqueue(skb, sch) & NET_XMIT_MASK; |
388 | } | 394 | } |
389 | 395 | ||
396 | static inline void __qdisc_update_bstats(struct Qdisc *sch, unsigned int len) | ||
397 | { | ||
398 | sch->bstats.bytes += len; | ||
399 | sch->bstats.packets++; | ||
400 | } | ||
401 | |||
390 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, | 402 | static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, |
391 | struct sk_buff_head *list) | 403 | struct sk_buff_head *list) |
392 | { | 404 | { |
393 | __skb_queue_tail(list, skb); | 405 | __skb_queue_tail(list, skb); |
394 | sch->qstats.backlog += qdisc_pkt_len(skb); | 406 | sch->qstats.backlog += qdisc_pkt_len(skb); |
395 | sch->bstats.bytes += qdisc_pkt_len(skb); | 407 | __qdisc_update_bstats(sch, qdisc_pkt_len(skb)); |
396 | sch->bstats.packets++; | ||
397 | 408 | ||
398 | return NET_XMIT_SUCCESS; | 409 | return NET_XMIT_SUCCESS; |
399 | } | 410 | } |
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/constants.h b/include/net/sctp/constants.h index b05b0557211f..8bc25f7b04ce 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h | |||
@@ -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)) }; |
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/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); |