aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/bug.h10
-rw-r--r--include/linux/ieee80211.h1
-rw-r--r--include/linux/if_ether.h1
-rw-r--r--include/linux/ip_vs.h160
-rw-r--r--include/linux/nl80211.h37
-rw-r--r--include/linux/rfkill.h7
-rw-r--r--include/linux/ssb/ssb_regs.h19
-rw-r--r--include/net/cfg80211.h23
-rw-r--r--include/net/inet_connection_sock.h2
-rw-r--r--include/net/ip_vs.h2
-rw-r--r--include/net/mac80211.h31
-rw-r--r--include/net/netlink.h82
-rw-r--r--include/net/sock.h2
-rw-r--r--include/net/wireless.h3
14 files changed, 282 insertions, 98 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index a3f738cffdb6..edc6ba82e090 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -97,6 +97,16 @@ extern void warn_slowpath(const char *file, const int line,
97 unlikely(__ret_warn_once); \ 97 unlikely(__ret_warn_once); \
98}) 98})
99 99
100#define WARN_ONCE(condition, format...) ({ \
101 static int __warned; \
102 int __ret_warn_once = !!(condition); \
103 \
104 if (unlikely(__ret_warn_once)) \
105 if (WARN(!__warned, format)) \
106 __warned = 1; \
107 unlikely(__ret_warn_once); \
108})
109
100#define WARN_ON_RATELIMIT(condition, state) \ 110#define WARN_ON_RATELIMIT(condition, state) \
101 WARN_ON((condition) && __ratelimit(state)) 111 WARN_ON((condition) && __ratelimit(state))
102 112
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 7f4df7c7659d..be456450cd2e 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -714,6 +714,7 @@ struct ieee80211_ht_addt_info {
714#define IEEE80211_HT_CAP_SGI_40 0x0040 714#define IEEE80211_HT_CAP_SGI_40 0x0040
715#define IEEE80211_HT_CAP_DELAY_BA 0x0400 715#define IEEE80211_HT_CAP_DELAY_BA 0x0400
716#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 716#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
717#define IEEE80211_HT_CAP_DSSSCCK40 0x1000
717/* 802.11n HT capability AMPDU settings */ 718/* 802.11n HT capability AMPDU settings */
718#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 719#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03
719#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C 720#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index e157c1399b61..5028e0b6082b 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -74,6 +74,7 @@
74#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport 74#define ETH_P_ATMFATE 0x8884 /* Frame-based ATM Transport
75 * over Ethernet 75 * over Ethernet
76 */ 76 */
77#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
77#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ 78#define ETH_P_AOE 0x88A2 /* ATA over Ethernet */
78#define ETH_P_TIPC 0x88CA /* TIPC */ 79#define ETH_P_TIPC 0x88CA /* TIPC */
79 80
diff --git a/include/linux/ip_vs.h b/include/linux/ip_vs.h
index ec6eb49af2d8..0f434a28fb58 100644
--- a/include/linux/ip_vs.h
+++ b/include/linux/ip_vs.h
@@ -242,4 +242,164 @@ struct ip_vs_daemon_user {
242 int syncid; 242 int syncid;
243}; 243};
244 244
245/*
246 *
247 * IPVS Generic Netlink interface definitions
248 *
249 */
250
251/* Generic Netlink family info */
252
253#define IPVS_GENL_NAME "IPVS"
254#define IPVS_GENL_VERSION 0x1
255
256struct ip_vs_flags {
257 __be32 flags;
258 __be32 mask;
259};
260
261/* Generic Netlink command attributes */
262enum {
263 IPVS_CMD_UNSPEC = 0,
264
265 IPVS_CMD_NEW_SERVICE, /* add service */
266 IPVS_CMD_SET_SERVICE, /* modify service */
267 IPVS_CMD_DEL_SERVICE, /* delete service */
268 IPVS_CMD_GET_SERVICE, /* get service info */
269
270 IPVS_CMD_NEW_DEST, /* add destination */
271 IPVS_CMD_SET_DEST, /* modify destination */
272 IPVS_CMD_DEL_DEST, /* delete destination */
273 IPVS_CMD_GET_DEST, /* get destination info */
274
275 IPVS_CMD_NEW_DAEMON, /* start sync daemon */
276 IPVS_CMD_DEL_DAEMON, /* stop sync daemon */
277 IPVS_CMD_GET_DAEMON, /* get sync daemon status */
278
279 IPVS_CMD_SET_CONFIG, /* set config settings */
280 IPVS_CMD_GET_CONFIG, /* get config settings */
281
282 IPVS_CMD_SET_INFO, /* only used in GET_INFO reply */
283 IPVS_CMD_GET_INFO, /* get general IPVS info */
284
285 IPVS_CMD_ZERO, /* zero all counters and stats */
286 IPVS_CMD_FLUSH, /* flush services and dests */
287
288 __IPVS_CMD_MAX,
289};
290
291#define IPVS_CMD_MAX (__IPVS_CMD_MAX - 1)
292
293/* Attributes used in the first level of commands */
294enum {
295 IPVS_CMD_ATTR_UNSPEC = 0,
296 IPVS_CMD_ATTR_SERVICE, /* nested service attribute */
297 IPVS_CMD_ATTR_DEST, /* nested destination attribute */
298 IPVS_CMD_ATTR_DAEMON, /* nested sync daemon attribute */
299 IPVS_CMD_ATTR_TIMEOUT_TCP, /* TCP connection timeout */
300 IPVS_CMD_ATTR_TIMEOUT_TCP_FIN, /* TCP FIN wait timeout */
301 IPVS_CMD_ATTR_TIMEOUT_UDP, /* UDP timeout */
302 __IPVS_CMD_ATTR_MAX,
303};
304
305#define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
306
307/*
308 * Attributes used to describe a service
309 *
310 * Used inside nested attribute IPVS_CMD_ATTR_SERVICE
311 */
312enum {
313 IPVS_SVC_ATTR_UNSPEC = 0,
314 IPVS_SVC_ATTR_AF, /* address family */
315 IPVS_SVC_ATTR_PROTOCOL, /* virtual service protocol */
316 IPVS_SVC_ATTR_ADDR, /* virtual service address */
317 IPVS_SVC_ATTR_PORT, /* virtual service port */
318 IPVS_SVC_ATTR_FWMARK, /* firewall mark of service */
319
320 IPVS_SVC_ATTR_SCHED_NAME, /* name of scheduler */
321 IPVS_SVC_ATTR_FLAGS, /* virtual service flags */
322 IPVS_SVC_ATTR_TIMEOUT, /* persistent timeout */
323 IPVS_SVC_ATTR_NETMASK, /* persistent netmask */
324
325 IPVS_SVC_ATTR_STATS, /* nested attribute for service stats */
326 __IPVS_SVC_ATTR_MAX,
327};
328
329#define IPVS_SVC_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
330
331/*
332 * Attributes used to describe a destination (real server)
333 *
334 * Used inside nested attribute IPVS_CMD_ATTR_DEST
335 */
336enum {
337 IPVS_DEST_ATTR_UNSPEC = 0,
338 IPVS_DEST_ATTR_ADDR, /* real server address */
339 IPVS_DEST_ATTR_PORT, /* real server port */
340
341 IPVS_DEST_ATTR_FWD_METHOD, /* forwarding method */
342 IPVS_DEST_ATTR_WEIGHT, /* destination weight */
343
344 IPVS_DEST_ATTR_U_THRESH, /* upper threshold */
345 IPVS_DEST_ATTR_L_THRESH, /* lower threshold */
346
347 IPVS_DEST_ATTR_ACTIVE_CONNS, /* active connections */
348 IPVS_DEST_ATTR_INACT_CONNS, /* inactive connections */
349 IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */
350
351 IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */
352 __IPVS_DEST_ATTR_MAX,
353};
354
355#define IPVS_DEST_ATTR_MAX (__IPVS_DEST_ATTR_MAX - 1)
356
357/*
358 * Attributes describing a sync daemon
359 *
360 * Used inside nested attribute IPVS_CMD_ATTR_DAEMON
361 */
362enum {
363 IPVS_DAEMON_ATTR_UNSPEC = 0,
364 IPVS_DAEMON_ATTR_STATE, /* sync daemon state (master/backup) */
365 IPVS_DAEMON_ATTR_MCAST_IFN, /* multicast interface name */
366 IPVS_DAEMON_ATTR_SYNC_ID, /* SyncID we belong to */
367 __IPVS_DAEMON_ATTR_MAX,
368};
369
370#define IPVS_DAEMON_ATTR_MAX (__IPVS_DAEMON_ATTR_MAX - 1)
371
372/*
373 * Attributes used to describe service or destination entry statistics
374 *
375 * Used inside nested attributes IPVS_SVC_ATTR_STATS and IPVS_DEST_ATTR_STATS
376 */
377enum {
378 IPVS_STATS_ATTR_UNSPEC = 0,
379 IPVS_STATS_ATTR_CONNS, /* connections scheduled */
380 IPVS_STATS_ATTR_INPKTS, /* incoming packets */
381 IPVS_STATS_ATTR_OUTPKTS, /* outgoing packets */
382 IPVS_STATS_ATTR_INBYTES, /* incoming bytes */
383 IPVS_STATS_ATTR_OUTBYTES, /* outgoing bytes */
384
385 IPVS_STATS_ATTR_CPS, /* current connection rate */
386 IPVS_STATS_ATTR_INPPS, /* current in packet rate */
387 IPVS_STATS_ATTR_OUTPPS, /* current out packet rate */
388 IPVS_STATS_ATTR_INBPS, /* current in byte rate */
389 IPVS_STATS_ATTR_OUTBPS, /* current out byte rate */
390 __IPVS_STATS_ATTR_MAX,
391};
392
393#define IPVS_STATS_ATTR_MAX (__IPVS_STATS_ATTR_MAX - 1)
394
395/* Attributes used in response to IPVS_CMD_GET_INFO command */
396enum {
397 IPVS_INFO_ATTR_UNSPEC = 0,
398 IPVS_INFO_ATTR_VERSION, /* IPVS version number */
399 IPVS_INFO_ATTR_CONN_TAB_SIZE, /* size of connection hash table */
400 __IPVS_INFO_ATTR_MAX,
401};
402
403#define IPVS_INFO_ATTR_MAX (__IPVS_INFO_ATTR_MAX - 1)
404
245#endif /* _IP_VS_H */ 405#endif /* _IP_VS_H */
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 2be7c63bc0f2..5e51f4e7600b 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -89,6 +89,8 @@
89 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC 89 * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
90 * or, if no MAC address given, all mesh paths, on the interface identified 90 * or, if no MAC address given, all mesh paths, on the interface identified
91 * by %NL80211_ATTR_IFINDEX. 91 * by %NL80211_ATTR_IFINDEX.
92 * @NL80211_CMD_SET_BSS: Set BSS attributes for BSS identified by
93 * %NL80211_ATTR_IFINDEX.
92 * 94 *
93 * @NL80211_CMD_MAX: highest used command number 95 * @NL80211_CMD_MAX: highest used command number
94 * @__NL80211_CMD_AFTER_LAST: internal use 96 * @__NL80211_CMD_AFTER_LAST: internal use
@@ -127,6 +129,8 @@ enum nl80211_commands {
127 NL80211_CMD_NEW_MPATH, 129 NL80211_CMD_NEW_MPATH,
128 NL80211_CMD_DEL_MPATH, 130 NL80211_CMD_DEL_MPATH,
129 131
132 NL80211_CMD_SET_BSS,
133
130 /* add commands here */ 134 /* add commands here */
131 135
132 /* used to define NL80211_CMD_MAX below */ 136 /* used to define NL80211_CMD_MAX below */
@@ -134,6 +138,11 @@ enum nl80211_commands {
134 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 138 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
135}; 139};
136 140
141/*
142 * Allow user space programs to use #ifdef on new commands by defining them
143 * here
144 */
145#define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
137 146
138/** 147/**
139 * enum nl80211_attrs - nl80211 netlink attributes 148 * enum nl80211_attrs - nl80211 netlink attributes
@@ -192,6 +201,19 @@ enum nl80211_commands {
192 * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of 201 * @NL80211_ATTR_MNTR_FLAGS: flags, nested element with NLA_FLAG attributes of
193 * &enum nl80211_mntr_flags. 202 * &enum nl80211_mntr_flags.
194 * 203 *
204 * @NL80211_ATTR_BSS_CTS_PROT: whether CTS protection is enabled (u8, 0 or 1)
205 * @NL80211_ATTR_BSS_SHORT_PREAMBLE: whether short preamble is enabled
206 * (u8, 0 or 1)
207 * @NL80211_ATTR_BSS_SHORT_SLOT_TIME: whether short slot time enabled
208 * (u8, 0 or 1)
209 *
210 * @NL80211_ATTR_HT_CAPABILITY: HT Capability information element (from
211 * association request when used with NL80211_CMD_NEW_STATION)
212 *
213 * @NL80211_ATTR_SUPPORTED_IFTYPES: nested attribute containing all
214 * supported interface types, each a flag attribute with the number
215 * of the interface mode.
216 *
195 * @NL80211_ATTR_MAX: highest attribute number currently defined 217 * @NL80211_ATTR_MAX: highest attribute number currently defined
196 * @__NL80211_ATTR_AFTER_LAST: internal use 218 * @__NL80211_ATTR_AFTER_LAST: internal use
197 */ 219 */
@@ -235,16 +257,31 @@ enum nl80211_attrs {
235 NL80211_ATTR_MPATH_NEXT_HOP, 257 NL80211_ATTR_MPATH_NEXT_HOP,
236 NL80211_ATTR_MPATH_INFO, 258 NL80211_ATTR_MPATH_INFO,
237 259
260 NL80211_ATTR_BSS_CTS_PROT,
261 NL80211_ATTR_BSS_SHORT_PREAMBLE,
262 NL80211_ATTR_BSS_SHORT_SLOT_TIME,
263
264 NL80211_ATTR_HT_CAPABILITY,
265
266 NL80211_ATTR_SUPPORTED_IFTYPES,
267
238 /* add attributes here, update the policy in nl80211.c */ 268 /* add attributes here, update the policy in nl80211.c */
239 269
240 __NL80211_ATTR_AFTER_LAST, 270 __NL80211_ATTR_AFTER_LAST,
241 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 271 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
242}; 272};
243 273
274/*
275 * Allow user space programs to use #ifdef on new attributes by defining them
276 * here
277 */
278#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY
279
244#define NL80211_MAX_SUPP_RATES 32 280#define NL80211_MAX_SUPP_RATES 32
245#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0 281#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
246#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16 282#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
247#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 283#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
284#define NL80211_HT_CAPABILITY_LEN 26
248 285
249/** 286/**
250 * enum nl80211_iftype - (virtual) interface types 287 * enum nl80211_iftype - (virtual) interface types
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 741d1a62cc3f..4cd64b0d9825 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -49,6 +49,7 @@ enum rfkill_state {
49 RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */ 49 RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */
50 RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */ 50 RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */
51 RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */ 51 RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */
52 RFKILL_STATE_MAX, /* marker for last valid state */
52}; 53};
53 54
54/* 55/*
@@ -110,12 +111,14 @@ struct rfkill {
110}; 111};
111#define to_rfkill(d) container_of(d, struct rfkill, dev) 112#define to_rfkill(d) container_of(d, struct rfkill, dev)
112 113
113struct rfkill *rfkill_allocate(struct device *parent, enum rfkill_type type); 114struct rfkill * __must_check rfkill_allocate(struct device *parent,
115 enum rfkill_type type);
114void rfkill_free(struct rfkill *rfkill); 116void rfkill_free(struct rfkill *rfkill);
115int rfkill_register(struct rfkill *rfkill); 117int __must_check rfkill_register(struct rfkill *rfkill);
116void rfkill_unregister(struct rfkill *rfkill); 118void rfkill_unregister(struct rfkill *rfkill);
117 119
118int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state); 120int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state);
121int rfkill_set_default(enum rfkill_type type, enum rfkill_state state);
119 122
120/** 123/**
121 * rfkill_state_complement - return complementar state 124 * rfkill_state_complement - return complementar state
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index ebad0bac9801..99a0f991e850 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -245,8 +245,6 @@
245 245
246/* SPROM Revision 3 (inherits most data from rev 2) */ 246/* SPROM Revision 3 (inherits most data from rev 2) */
247#define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */ 247#define SSB_SPROM3_IL0MAC 0x104A /* 6 bytes MAC address for 802.11b/g */
248#define SSB_SPROM3_ET0MAC 0x1050 /* 6 bytes MAC address for Ethernet ?? */
249#define SSB_SPROM3_ET1MAC 0x1050 /* 6 bytes MAC address for 802.11a ?? */
250#define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */ 248#define SSB_SPROM3_OFDMAPO 0x102C /* A-PHY OFDM Mid Power Offset (4 bytes, BigEndian) */
251#define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */ 249#define SSB_SPROM3_OFDMALPO 0x1030 /* A-PHY OFDM Low Power Offset (4 bytes, BigEndian) */
252#define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */ 250#define SSB_SPROM3_OFDMAHPO 0x1034 /* A-PHY OFDM High Power Offset (4 bytes, BigEndian) */
@@ -267,8 +265,6 @@
267 265
268/* SPROM Revision 4 */ 266/* SPROM Revision 4 */
269#define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */ 267#define SSB_SPROM4_IL0MAC 0x104C /* 6 byte MAC address for a/b/g/n */
270#define SSB_SPROM4_ET0MAC 0x1018 /* 6 bytes MAC address for Ethernet ?? */
271#define SSB_SPROM4_ET1MAC 0x1018 /* 6 bytes MAC address for 802.11a ?? */
272#define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */ 268#define SSB_SPROM4_ETHPHY 0x105A /* Ethernet PHY settings ?? */
273#define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */ 269#define SSB_SPROM4_ETHPHY_ET0A 0x001F /* MII Address for enet0 */
274#define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */ 270#define SSB_SPROM4_ETHPHY_ET1A 0x03E0 /* MII Address for enet1 */
@@ -316,6 +312,21 @@
316#define SSB_SPROM4_PA1B1 0x1090 312#define SSB_SPROM4_PA1B1 0x1090
317#define SSB_SPROM4_PA1B2 0x1092 313#define SSB_SPROM4_PA1B2 0x1092
318 314
315/* SPROM Revision 5 (inherits most data from rev 4) */
316#define SSB_SPROM5_BFLLO 0x104A /* Boardflags (low 16 bits) */
317#define SSB_SPROM5_BFLHI 0x104C /* Board Flags Hi */
318#define SSB_SPROM5_IL0MAC 0x1052 /* 6 byte MAC address for a/b/g/n */
319#define SSB_SPROM5_CCODE 0x1044 /* Country Code (2 bytes) */
320#define SSB_SPROM5_GPIOA 0x1076 /* Gen. Purpose IO # 0 and 1 */
321#define SSB_SPROM5_GPIOA_P0 0x00FF /* Pin 0 */
322#define SSB_SPROM5_GPIOA_P1 0xFF00 /* Pin 1 */
323#define SSB_SPROM5_GPIOA_P1_SHIFT 8
324#define SSB_SPROM5_GPIOB 0x1078 /* Gen. Purpose IO # 2 and 3 */
325#define SSB_SPROM5_GPIOB_P2 0x00FF /* Pin 2 */
326#define SSB_SPROM5_GPIOB_P3 0xFF00 /* Pin 3 */
327#define SSB_SPROM5_GPIOB_P3_SHIFT 8
328
329
319/* Values for SSB_SPROM1_BINF_CCODE */ 330/* Values for SSB_SPROM1_BINF_CCODE */
320enum { 331enum {
321 SSB_SPROM1CCODE_WORLD = 0, 332 SSB_SPROM1CCODE_WORLD = 0,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index e00750836ba5..0a72d1e3d3ab 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -152,6 +152,7 @@ struct station_parameters {
152 u16 aid; 152 u16 aid;
153 u8 supported_rates_len; 153 u8 supported_rates_len;
154 u8 plink_action; 154 u8 plink_action;
155 struct ieee80211_ht_cap *ht_capa;
155}; 156};
156 157
157/** 158/**
@@ -268,6 +269,23 @@ struct mpath_info {
268 u8 flags; 269 u8 flags;
269}; 270};
270 271
272/**
273 * struct bss_parameters - BSS parameters
274 *
275 * Used to change BSS parameters (mainly for AP mode).
276 *
277 * @use_cts_prot: Whether to use CTS protection
278 * (0 = no, 1 = yes, -1 = do not change)
279 * @use_short_preamble: Whether the use of short preambles is allowed
280 * (0 = no, 1 = yes, -1 = do not change)
281 * @use_short_slot_time: Whether the use of short slot time is allowed
282 * (0 = no, 1 = yes, -1 = do not change)
283 */
284struct bss_parameters {
285 int use_cts_prot;
286 int use_short_preamble;
287 int use_short_slot_time;
288};
271 289
272/* from net/wireless.h */ 290/* from net/wireless.h */
273struct wiphy; 291struct wiphy;
@@ -318,6 +336,8 @@ struct wiphy;
318 * @change_station: Modify a given station. 336 * @change_station: Modify a given station.
319 * 337 *
320 * @set_mesh_cfg: set mesh parameters (by now, just mesh id) 338 * @set_mesh_cfg: set mesh parameters (by now, just mesh id)
339 *
340 * @change_bss: Modify parameters for a given BSS.
321 */ 341 */
322struct cfg80211_ops { 342struct cfg80211_ops {
323 int (*add_virtual_intf)(struct wiphy *wiphy, char *name, 343 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
@@ -370,6 +390,9 @@ struct cfg80211_ops {
370 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev, 390 int (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
371 int idx, u8 *dst, u8 *next_hop, 391 int idx, u8 *dst, u8 *next_hop,
372 struct mpath_info *pinfo); 392 struct mpath_info *pinfo);
393
394 int (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
395 struct bss_parameters *params);
373}; 396};
374 397
375#endif /* __NET_CFG80211_H */ 398#endif /* __NET_CFG80211_H */
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index 2ff545a56fb5..03cffd9f64e3 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -51,12 +51,14 @@ struct inet_connection_sock_af_ops {
51 char __user *optval, int optlen); 51 char __user *optval, int optlen);
52 int (*getsockopt)(struct sock *sk, int level, int optname, 52 int (*getsockopt)(struct sock *sk, int level, int optname,
53 char __user *optval, int __user *optlen); 53 char __user *optval, int __user *optlen);
54#ifdef CONFIG_COMPAT
54 int (*compat_setsockopt)(struct sock *sk, 55 int (*compat_setsockopt)(struct sock *sk,
55 int level, int optname, 56 int level, int optname,
56 char __user *optval, int optlen); 57 char __user *optval, int optlen);
57 int (*compat_getsockopt)(struct sock *sk, 58 int (*compat_getsockopt)(struct sock *sk,
58 int level, int optname, 59 int level, int optname,
59 char __user *optval, int __user *optlen); 60 char __user *optval, int __user *optlen);
61#endif
60 void (*addr2sockaddr)(struct sock *sk, struct sockaddr *); 62 void (*addr2sockaddr)(struct sock *sk, struct sockaddr *);
61 int (*bind_conflict)(const struct sock *sk, 63 int (*bind_conflict)(const struct sock *sk,
62 const struct inet_bind_bucket *tb); 64 const struct inet_bind_bucket *tb);
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 7312c3dd309f..a25ad243031d 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -683,6 +683,8 @@ extern void ip_vs_sync_conn(struct ip_vs_conn *cp);
683/* 683/*
684 * IPVS rate estimator prototypes (from ip_vs_est.c) 684 * IPVS rate estimator prototypes (from ip_vs_est.c)
685 */ 685 */
686extern int ip_vs_estimator_init(void);
687extern void ip_vs_estimator_cleanup(void);
686extern void ip_vs_new_estimator(struct ip_vs_stats *stats); 688extern void ip_vs_new_estimator(struct ip_vs_stats *stats);
687extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); 689extern void ip_vs_kill_estimator(struct ip_vs_stats *stats);
688extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); 690extern void ip_vs_zero_estimator(struct ip_vs_stats *stats);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ff137fd7714f..7c399a9c11da 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -158,12 +158,14 @@ struct ieee80211_low_level_stats {
158 * also implies a change in the AID. 158 * also implies a change in the AID.
159 * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed 159 * @BSS_CHANGED_ERP_CTS_PROT: CTS protection changed
160 * @BSS_CHANGED_ERP_PREAMBLE: preamble changed 160 * @BSS_CHANGED_ERP_PREAMBLE: preamble changed
161 * @BSS_CHANGED_ERP_SLOT: slot timing changed
161 * @BSS_CHANGED_HT: 802.11n parameters changed 162 * @BSS_CHANGED_HT: 802.11n parameters changed
162 */ 163 */
163enum ieee80211_bss_change { 164enum ieee80211_bss_change {
164 BSS_CHANGED_ASSOC = 1<<0, 165 BSS_CHANGED_ASSOC = 1<<0,
165 BSS_CHANGED_ERP_CTS_PROT = 1<<1, 166 BSS_CHANGED_ERP_CTS_PROT = 1<<1,
166 BSS_CHANGED_ERP_PREAMBLE = 1<<2, 167 BSS_CHANGED_ERP_PREAMBLE = 1<<2,
168 BSS_CHANGED_ERP_SLOT = 1<<3,
167 BSS_CHANGED_HT = 1<<4, 169 BSS_CHANGED_HT = 1<<4,
168}; 170};
169 171
@@ -177,6 +179,7 @@ enum ieee80211_bss_change {
177 * @aid: association ID number, valid only when @assoc is true 179 * @aid: association ID number, valid only when @assoc is true
178 * @use_cts_prot: use CTS protection 180 * @use_cts_prot: use CTS protection
179 * @use_short_preamble: use 802.11b short preamble 181 * @use_short_preamble: use 802.11b short preamble
182 * @use_short_slot: use short slot time (only relevant for ERP)
180 * @dtim_period: num of beacons before the next DTIM, for PSM 183 * @dtim_period: num of beacons before the next DTIM, for PSM
181 * @timestamp: beacon timestamp 184 * @timestamp: beacon timestamp
182 * @beacon_int: beacon interval 185 * @beacon_int: beacon interval
@@ -192,6 +195,7 @@ struct ieee80211_bss_conf {
192 /* erp related data */ 195 /* erp related data */
193 bool use_cts_prot; 196 bool use_cts_prot;
194 bool use_short_preamble; 197 bool use_short_preamble;
198 bool use_short_slot;
195 u8 dtim_period; 199 u8 dtim_period;
196 u16 beacon_int; 200 u16 beacon_int;
197 u16 assoc_capability; 201 u16 assoc_capability;
@@ -363,6 +367,7 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
363 * @RX_FLAG_TSFT: The timestamp passed in the RX status (@mactime field) 367 * @RX_FLAG_TSFT: The timestamp passed in the RX status (@mactime field)
364 * is valid. This is useful in monitor mode and necessary for beacon frames 368 * is valid. This is useful in monitor mode and necessary for beacon frames
365 * to enable IBSS merging. 369 * to enable IBSS merging.
370 * @RX_FLAG_SHORTPRE: Short preamble was used for this frame
366 */ 371 */
367enum mac80211_rx_flags { 372enum mac80211_rx_flags {
368 RX_FLAG_MMIC_ERROR = 1<<0, 373 RX_FLAG_MMIC_ERROR = 1<<0,
@@ -373,6 +378,7 @@ enum mac80211_rx_flags {
373 RX_FLAG_FAILED_FCS_CRC = 1<<5, 378 RX_FLAG_FAILED_FCS_CRC = 1<<5,
374 RX_FLAG_FAILED_PLCP_CRC = 1<<6, 379 RX_FLAG_FAILED_PLCP_CRC = 1<<6,
375 RX_FLAG_TSFT = 1<<7, 380 RX_FLAG_TSFT = 1<<7,
381 RX_FLAG_SHORTPRE = 1<<8
376}; 382};
377 383
378/** 384/**
@@ -418,6 +424,11 @@ struct ieee80211_rx_status {
418 * @IEEE80211_CONF_PS: Enable 802.11 power save mode 424 * @IEEE80211_CONF_PS: Enable 802.11 power save mode
419 */ 425 */
420enum ieee80211_conf_flags { 426enum ieee80211_conf_flags {
427 /*
428 * TODO: IEEE80211_CONF_SHORT_SLOT_TIME will be removed once drivers
429 * have been converted to use bss_info_changed() for slot time
430 * configuration
431 */
421 IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0), 432 IEEE80211_CONF_SHORT_SLOT_TIME = (1<<0),
422 IEEE80211_CONF_RADIOTAP = (1<<1), 433 IEEE80211_CONF_RADIOTAP = (1<<1),
423 IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2), 434 IEEE80211_CONF_SUPPORT_HT_MODE = (1<<2),
@@ -1557,16 +1568,6 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
1557unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); 1568unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
1558 1569
1559/** 1570/**
1560 * ieee80211_get_hdrlen - get header length from frame control
1561 *
1562 * This function returns the 802.11 header length in bytes (not including
1563 * encryption headers.)
1564 *
1565 * @fc: the frame control field (in CPU endianness)
1566 */
1567int ieee80211_get_hdrlen(u16 fc);
1568
1569/**
1570 * ieee80211_hdrlen - get header length in bytes from frame control 1571 * ieee80211_hdrlen - get header length in bytes from frame control
1571 * @fc: frame control field in little-endian format 1572 * @fc: frame control field in little-endian format
1572 */ 1573 */
@@ -1608,6 +1609,16 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);
1608void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); 1609void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
1609 1610
1610/** 1611/**
1612 * ieee80211_queue_stopped - test status of the queue
1613 * @hw: pointer as obtained from ieee80211_alloc_hw().
1614 * @queue: queue number (counted from zero).
1615 *
1616 * Drivers should use this function instead of netif_stop_queue.
1617 */
1618
1619int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue);
1620
1621/**
1611 * ieee80211_stop_queues - stop all queues 1622 * ieee80211_stop_queues - stop all queues
1612 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1623 * @hw: pointer as obtained from ieee80211_alloc_hw().
1613 * 1624 *
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 18024b8cecb8..76c43ff38f64 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -119,9 +119,6 @@
119 * Nested Attributes Construction: 119 * Nested Attributes Construction:
120 * nla_nest_start(skb, type) start a nested attribute 120 * nla_nest_start(skb, type) start a nested attribute
121 * nla_nest_end(skb, nla) finalize a nested attribute 121 * nla_nest_end(skb, nla) finalize a nested attribute
122 * nla_nest_compat_start(skb, type, start a nested compat attribute
123 * len, data)
124 * nla_nest_compat_end(skb, type) finalize a nested compat attribute
125 * nla_nest_cancel(skb, nla) cancel nested attribute construction 122 * nla_nest_cancel(skb, nla) cancel nested attribute construction
126 * 123 *
127 * Attribute Length Calculations: 124 * Attribute Length Calculations:
@@ -156,7 +153,6 @@
156 * nla_find_nested() find attribute in nested attributes 153 * nla_find_nested() find attribute in nested attributes
157 * nla_parse() parse and validate stream of attrs 154 * nla_parse() parse and validate stream of attrs
158 * nla_parse_nested() parse nested attribuets 155 * nla_parse_nested() parse nested attribuets
159 * nla_parse_nested_compat() parse nested compat attributes
160 * nla_for_each_attr() loop over all attributes 156 * nla_for_each_attr() loop over all attributes
161 * nla_for_each_nested() loop over the nested attributes 157 * nla_for_each_nested() loop over the nested attributes
162 *========================================================================= 158 *=========================================================================
@@ -752,39 +748,6 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
752} 748}
753 749
754/** 750/**
755 * nla_parse_nested_compat - parse nested compat attributes
756 * @tb: destination array with maxtype+1 elements
757 * @maxtype: maximum attribute type to be expected
758 * @nla: attribute containing the nested attributes
759 * @data: pointer to point to contained structure
760 * @len: length of contained structure
761 * @policy: validation policy
762 *
763 * Parse a nested compat attribute. The compat attribute contains a structure
764 * and optionally a set of nested attributes. On success the data pointer
765 * points to the nested data and tb contains the parsed attributes
766 * (see nla_parse).
767 */
768static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype,
769 struct nlattr *nla,
770 const struct nla_policy *policy,
771 int len)
772{
773 int nested_len = nla_len(nla) - NLA_ALIGN(len);
774
775 if (nested_len < 0)
776 return -EINVAL;
777 if (nested_len >= nla_attr_size(0))
778 return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
779 nested_len, policy);
780 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
781 return 0;
782}
783
784#define nla_parse_nested_compat(tb, maxtype, nla, policy, data, len) \
785({ data = nla_len(nla) >= len ? nla_data(nla) : NULL; \
786 __nla_parse_nested_compat(tb, maxtype, nla, policy, len); })
787/**
788 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer 751 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
789 * @skb: socket buffer to add attribute to 752 * @skb: socket buffer to add attribute to
790 * @attrtype: attribute type 753 * @attrtype: attribute type
@@ -1031,51 +994,6 @@ static inline int nla_nest_end(struct sk_buff *skb, struct nlattr *start)
1031} 994}
1032 995
1033/** 996/**
1034 * nla_nest_compat_start - Start a new level of nested compat attributes
1035 * @skb: socket buffer to add attributes to
1036 * @attrtype: attribute type of container
1037 * @attrlen: length of structure
1038 * @data: pointer to structure
1039 *
1040 * Start a nested compat attribute that contains both a structure and
1041 * a set of nested attributes.
1042 *
1043 * Returns the container attribute
1044 */
1045static inline struct nlattr *nla_nest_compat_start(struct sk_buff *skb,
1046 int attrtype, int attrlen,
1047 const void *data)
1048{
1049 struct nlattr *start = (struct nlattr *)skb_tail_pointer(skb);
1050
1051 if (nla_put(skb, attrtype, attrlen, data) < 0)
1052 return NULL;
1053 if (nla_nest_start(skb, attrtype) == NULL) {
1054 nlmsg_trim(skb, start);
1055 return NULL;
1056 }
1057 return start;
1058}
1059
1060/**
1061 * nla_nest_compat_end - Finalize nesting of compat attributes
1062 * @skb: socket buffer the attributes are stored in
1063 * @start: container attribute
1064 *
1065 * Corrects the container attribute header to include the all
1066 * appeneded attributes.
1067 *
1068 * Returns the total data length of the skb.
1069 */
1070static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start)
1071{
1072 struct nlattr *nest = (void *)start + NLMSG_ALIGN(start->nla_len);
1073
1074 start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start;
1075 return nla_nest_end(skb, nest);
1076}
1077
1078/**
1079 * nla_nest_cancel - Cancel nesting of attributes 997 * nla_nest_cancel - Cancel nesting of attributes
1080 * @skb: socket buffer the message is stored in 998 * @skb: socket buffer the message is stored in
1081 * @start: container attribute 999 * @start: container attribute
diff --git a/include/net/sock.h b/include/net/sock.h
index 06c5259aff30..75a312d3888a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -532,6 +532,7 @@ struct proto {
532 int (*getsockopt)(struct sock *sk, int level, 532 int (*getsockopt)(struct sock *sk, int level,
533 int optname, char __user *optval, 533 int optname, char __user *optval,
534 int __user *option); 534 int __user *option);
535#ifdef CONFIG_COMPAT
535 int (*compat_setsockopt)(struct sock *sk, 536 int (*compat_setsockopt)(struct sock *sk,
536 int level, 537 int level,
537 int optname, char __user *optval, 538 int optname, char __user *optval,
@@ -540,6 +541,7 @@ struct proto {
540 int level, 541 int level,
541 int optname, char __user *optval, 542 int optname, char __user *optval,
542 int __user *option); 543 int __user *option);
544#endif
543 int (*sendmsg)(struct kiocb *iocb, struct sock *sk, 545 int (*sendmsg)(struct kiocb *iocb, struct sock *sk,
544 struct msghdr *msg, size_t len); 546 struct msghdr *msg, size_t len);
545 int (*recvmsg)(struct kiocb *iocb, struct sock *sk, 547 int (*recvmsg)(struct kiocb *iocb, struct sock *sk,
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 9324f8dd183e..1dc8ec3daa2f 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -185,6 +185,9 @@ struct wiphy {
185 /* permanent MAC address */ 185 /* permanent MAC address */
186 u8 perm_addr[ETH_ALEN]; 186 u8 perm_addr[ETH_ALEN];
187 187
188 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
189 u16 interface_modes;
190
188 /* If multiple wiphys are registered and you're handed e.g. 191 /* If multiple wiphys are registered and you're handed e.g.
189 * a regular netdev with assigned ieee80211_ptr, you won't 192 * a regular netdev with assigned ieee80211_ptr, you won't
190 * know whether it points to a wiphy your driver has registered 193 * know whether it points to a wiphy your driver has registered