aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-04-25 15:46:37 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-25 15:46:37 -0400
commit345578d97c549995ddbcc178f16f710602cc06bb (patch)
treece05e39a01ffce847f6f7f65f19b1e8e20dbf0c2 /include
parentfe2a70eefa18a3e419dd9a23e16af14258b7cc20 (diff)
parentcfef6047c4027a8448ec8dafeaf2bb362cc882e4 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/nl80211.h34
-rw-r--r--include/linux/rfkill-regulator.h48
-rw-r--r--include/net/bluetooth/l2cap.h130
-rw-r--r--include/net/cfg80211.h33
-rw-r--r--include/net/mac80211.h16
5 files changed, 185 insertions, 76 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 1832c27c520c..216b1d8a862f 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -410,6 +410,16 @@
410 * notification. This event is used to indicate that an unprotected 410 * notification. This event is used to indicate that an unprotected
411 * disassociation frame was dropped when MFP is in use. 411 * disassociation frame was dropped when MFP is in use.
412 * 412 *
413 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
414 * beacon or probe response from a compatible mesh peer. This is only
415 * sent while no station information (sta_info) exists for the new peer
416 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On
417 * reception of this notification, userspace may decide to create a new
418 * station (@NL80211_CMD_NEW_STATION). To stop this notification from
419 * reoccurring, the userspace authentication daemon may want to create the
420 * new station with the AUTHENTICATED flag unset and maybe change it later
421 * depending on the authentication result.
422 *
413 * @NL80211_CMD_MAX: highest used command number 423 * @NL80211_CMD_MAX: highest used command number
414 * @__NL80211_CMD_AFTER_LAST: internal use 424 * @__NL80211_CMD_AFTER_LAST: internal use
415 */ 425 */
@@ -522,6 +532,8 @@ enum nl80211_commands {
522 NL80211_CMD_UNPROT_DEAUTHENTICATE, 532 NL80211_CMD_UNPROT_DEAUTHENTICATE,
523 NL80211_CMD_UNPROT_DISASSOCIATE, 533 NL80211_CMD_UNPROT_DISASSOCIATE,
524 534
535 NL80211_CMD_NEW_PEER_CANDIDATE,
536
525 /* add new commands above here */ 537 /* add new commands above here */
526 538
527 /* used to define NL80211_CMD_MAX below */ 539 /* used to define NL80211_CMD_MAX below */
@@ -545,6 +557,7 @@ enum nl80211_commands {
545/* source-level API compatibility */ 557/* source-level API compatibility */
546#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG 558#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
547#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG 559#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
560#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
548 561
549/** 562/**
550 * enum nl80211_attrs - nl80211 netlink attributes 563 * enum nl80211_attrs - nl80211 netlink attributes
@@ -886,6 +899,9 @@ enum nl80211_commands {
886 * changed once the mesh is active. 899 * changed once the mesh is active.
887 * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute 900 * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute
888 * containing attributes from &enum nl80211_meshconf_params. 901 * containing attributes from &enum nl80211_meshconf_params.
902 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
903 * allows auth frames in a mesh to be passed to userspace for processing via
904 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
889 * 905 *
890 * @NL80211_ATTR_MAX: highest attribute number currently defined 906 * @NL80211_ATTR_MAX: highest attribute number currently defined
891 * @__NL80211_ATTR_AFTER_LAST: internal use 907 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1074,6 +1090,8 @@ enum nl80211_attrs {
1074 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, 1090 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX,
1075 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, 1091 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX,
1076 1092
1093 NL80211_ATTR_SUPPORT_MESH_AUTH,
1094
1077 /* add attributes here, update the policy in nl80211.c */ 1095 /* add attributes here, update the policy in nl80211.c */
1078 1096
1079 __NL80211_ATTR_AFTER_LAST, 1097 __NL80211_ATTR_AFTER_LAST,
@@ -1168,6 +1186,7 @@ enum nl80211_iftype {
1168 * with short barker preamble 1186 * with short barker preamble
1169 * @NL80211_STA_FLAG_WME: station is WME/QoS capable 1187 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
1170 * @NL80211_STA_FLAG_MFP: station uses management frame protection 1188 * @NL80211_STA_FLAG_MFP: station uses management frame protection
1189 * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
1171 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined 1190 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
1172 * @__NL80211_STA_FLAG_AFTER_LAST: internal use 1191 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
1173 */ 1192 */
@@ -1177,6 +1196,7 @@ enum nl80211_sta_flags {
1177 NL80211_STA_FLAG_SHORT_PREAMBLE, 1196 NL80211_STA_FLAG_SHORT_PREAMBLE,
1178 NL80211_STA_FLAG_WME, 1197 NL80211_STA_FLAG_WME,
1179 NL80211_STA_FLAG_MFP, 1198 NL80211_STA_FLAG_MFP,
1199 NL80211_STA_FLAG_AUTHENTICATED,
1180 1200
1181 /* keep last */ 1201 /* keep last */
1182 __NL80211_STA_FLAG_AFTER_LAST, 1202 __NL80211_STA_FLAG_AFTER_LAST,
@@ -1277,6 +1297,7 @@ enum nl80211_sta_bss_param {
1277 * attribute, like NL80211_STA_INFO_TX_BITRATE. 1297 * attribute, like NL80211_STA_INFO_TX_BITRATE.
1278 * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute 1298 * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute
1279 * containing info as possible, see &enum nl80211_sta_bss_param 1299 * containing info as possible, see &enum nl80211_sta_bss_param
1300 * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
1280 * @__NL80211_STA_INFO_AFTER_LAST: internal 1301 * @__NL80211_STA_INFO_AFTER_LAST: internal
1281 * @NL80211_STA_INFO_MAX: highest possible station info attribute 1302 * @NL80211_STA_INFO_MAX: highest possible station info attribute
1282 */ 1303 */
@@ -1297,6 +1318,7 @@ enum nl80211_sta_info {
1297 NL80211_STA_INFO_SIGNAL_AVG, 1318 NL80211_STA_INFO_SIGNAL_AVG,
1298 NL80211_STA_INFO_RX_BITRATE, 1319 NL80211_STA_INFO_RX_BITRATE,
1299 NL80211_STA_INFO_BSS_PARAM, 1320 NL80211_STA_INFO_BSS_PARAM,
1321 NL80211_STA_INFO_CONNECTED_TIME,
1300 1322
1301 /* keep last */ 1323 /* keep last */
1302 __NL80211_STA_INFO_AFTER_LAST, 1324 __NL80211_STA_INFO_AFTER_LAST,
@@ -1719,9 +1741,12 @@ enum nl80211_meshconf_params {
1719 * vendor specific path metric or disable it to use the default Airtime 1741 * vendor specific path metric or disable it to use the default Airtime
1720 * metric. 1742 * metric.
1721 * 1743 *
1722 * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information 1744 * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a
1723 * element that vendors will use to identify the path selection methods and 1745 * robust security network ie, or a vendor specific information element that
1724 * metrics in use. 1746 * vendors will use to identify the path selection methods and metrics in use.
1747 *
1748 * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication
1749 * daemon will be authenticating mesh candidates.
1725 * 1750 *
1726 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 1751 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
1727 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 1752 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -1730,7 +1755,8 @@ enum nl80211_mesh_setup_params {
1730 __NL80211_MESH_SETUP_INVALID, 1755 __NL80211_MESH_SETUP_INVALID,
1731 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, 1756 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL,
1732 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, 1757 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC,
1733 NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, 1758 NL80211_MESH_SETUP_IE,
1759 NL80211_MESH_SETUP_USERSPACE_AUTH,
1734 1760
1735 /* keep last */ 1761 /* keep last */
1736 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 1762 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
diff --git a/include/linux/rfkill-regulator.h b/include/linux/rfkill-regulator.h
new file mode 100644
index 000000000000..aca36bc83315
--- /dev/null
+++ b/include/linux/rfkill-regulator.h
@@ -0,0 +1,48 @@
1/*
2 * rfkill-regulator.c - Regulator consumer driver for rfkill
3 *
4 * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com>
5 * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13#ifndef __LINUX_RFKILL_REGULATOR_H
14#define __LINUX_RFKILL_REGULATOR_H
15
16/*
17 * Use "vrfkill" as supply id when declaring the regulator consumer:
18 *
19 * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = {
20 * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" },
21 * };
22 *
23 * If you have several regulator driven rfkill, you can append a numerical id to
24 * .dev_name as done above, and use the same id when declaring the platform
25 * device:
26 *
27 * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = {
28 * .name = "ezx-bluetooth",
29 * .type = RFKILL_TYPE_BLUETOOTH,
30 * };
31 *
32 * static struct platform_device a910_rfkill = {
33 * .name = "rfkill-regulator",
34 * .id = 0,
35 * .dev = {
36 * .platform_data = &ezx_rfkill_bt_data,
37 * },
38 * };
39 */
40
41#include <linux/rfkill.h>
42
43struct rfkill_regulator_platform_data {
44 char *name; /* the name for the rfkill switch */
45 enum rfkill_type type; /* the type as specified in rfkill.h */
46};
47
48#endif /* __LINUX_RFKILL_REGULATOR_H */
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 2b9ca0d5c4a0..7a215a7f9e39 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -276,10 +276,52 @@ struct l2cap_conn_param_update_rsp {
276#define L2CAP_CONN_PARAM_ACCEPTED 0x0000 276#define L2CAP_CONN_PARAM_ACCEPTED 0x0000
277#define L2CAP_CONN_PARAM_REJECTED 0x0001 277#define L2CAP_CONN_PARAM_REJECTED 0x0001
278 278
279/* ----- L2CAP connections ----- */ 279/* ----- L2CAP channels and connections ----- */
280struct l2cap_chan_list { 280struct srej_list {
281 struct sock *head; 281 __u8 tx_seq;
282 rwlock_t lock; 282 struct list_head list;
283};
284
285struct l2cap_chan {
286 struct sock *sk;
287 __u8 ident;
288
289 __u8 conf_req[64];
290 __u8 conf_len;
291 __u8 num_conf_req;
292 __u8 num_conf_rsp;
293
294 __u16 conn_state;
295
296 __u8 next_tx_seq;
297 __u8 expected_ack_seq;
298 __u8 expected_tx_seq;
299 __u8 buffer_seq;
300 __u8 buffer_seq_srej;
301 __u8 srej_save_reqseq;
302 __u8 frames_sent;
303 __u8 unacked_frames;
304 __u8 retry_count;
305 __u8 num_acked;
306 __u16 sdu_len;
307 __u16 partial_sdu_len;
308 struct sk_buff *sdu;
309
310 __u8 remote_tx_win;
311 __u8 remote_max_tx;
312 __u16 remote_mps;
313
314 struct timer_list retrans_timer;
315 struct timer_list monitor_timer;
316 struct timer_list ack_timer;
317 struct sk_buff *tx_send_head;
318 struct sk_buff_head tx_q;
319 struct sk_buff_head srej_q;
320 struct sk_buff_head busy_q;
321 struct work_struct busy_work;
322 struct list_head srej_l;
323
324 struct list_head list;
283}; 325};
284 326
285struct l2cap_conn { 327struct l2cap_conn {
@@ -305,29 +347,16 @@ struct l2cap_conn {
305 347
306 __u8 disc_reason; 348 __u8 disc_reason;
307 349
308 struct l2cap_chan_list chan_list; 350 struct list_head chan_l;
309}; 351 rwlock_t chan_lock;
310
311struct sock_del_list {
312 struct sock *sk;
313 struct list_head list;
314}; 352};
315 353
316#define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 354#define L2CAP_INFO_CL_MTU_REQ_SENT 0x01
317#define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04 355#define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04
318#define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08 356#define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08
319 357
320/* ----- L2CAP channel and socket info ----- */ 358/* ----- L2CAP socket info ----- */
321#define l2cap_pi(sk) ((struct l2cap_pinfo *) sk) 359#define l2cap_pi(sk) ((struct l2cap_pinfo *) sk)
322#define TX_QUEUE(sk) (&l2cap_pi(sk)->tx_queue)
323#define SREJ_QUEUE(sk) (&l2cap_pi(sk)->srej_queue)
324#define BUSY_QUEUE(sk) (&l2cap_pi(sk)->busy_queue)
325#define SREJ_LIST(sk) (&l2cap_pi(sk)->srej_l.list)
326
327struct srej_list {
328 __u8 tx_seq;
329 struct list_head list;
330};
331 360
332struct l2cap_pinfo { 361struct l2cap_pinfo {
333 struct bt_sock bt; 362 struct bt_sock bt;
@@ -339,8 +368,6 @@ struct l2cap_pinfo {
339 __u16 omtu; 368 __u16 omtu;
340 __u16 flush_to; 369 __u16 flush_to;
341 __u8 mode; 370 __u8 mode;
342 __u8 num_conf_req;
343 __u8 num_conf_rsp;
344 371
345 __u8 fcs; 372 __u8 fcs;
346 __u8 sec_level; 373 __u8 sec_level;
@@ -348,49 +375,18 @@ struct l2cap_pinfo {
348 __u8 force_reliable; 375 __u8 force_reliable;
349 __u8 flushable; 376 __u8 flushable;
350 377
351 __u8 conf_req[64];
352 __u8 conf_len;
353 __u8 conf_state; 378 __u8 conf_state;
354 __u16 conn_state;
355
356 __u8 next_tx_seq;
357 __u8 expected_ack_seq;
358 __u8 expected_tx_seq;
359 __u8 buffer_seq;
360 __u8 buffer_seq_srej;
361 __u8 srej_save_reqseq;
362 __u8 frames_sent;
363 __u8 unacked_frames;
364 __u8 retry_count;
365 __u8 num_acked;
366 __u16 sdu_len;
367 __u16 partial_sdu_len;
368 struct sk_buff *sdu;
369
370 __u8 ident;
371 379
372 __u8 tx_win; 380 __u8 tx_win;
373 __u8 max_tx; 381 __u8 max_tx;
374 __u8 remote_tx_win;
375 __u8 remote_max_tx;
376 __u16 retrans_timeout; 382 __u16 retrans_timeout;
377 __u16 monitor_timeout; 383 __u16 monitor_timeout;
378 __u16 remote_mps;
379 __u16 mps; 384 __u16 mps;
380 385
381 __le16 sport; 386 __le16 sport;
382 387
383 struct timer_list retrans_timer;
384 struct timer_list monitor_timer;
385 struct timer_list ack_timer;
386 struct sk_buff_head tx_queue;
387 struct sk_buff_head srej_queue;
388 struct sk_buff_head busy_queue;
389 struct work_struct busy_work;
390 struct srej_list srej_l;
391 struct l2cap_conn *conn; 388 struct l2cap_conn *conn;
392 struct sock *next_c; 389 struct l2cap_chan *chan;
393 struct sock *prev_c;
394}; 390};
395 391
396#define L2CAP_CONF_REQ_SENT 0x01 392#define L2CAP_CONF_REQ_SENT 0x01
@@ -417,24 +413,23 @@ struct l2cap_pinfo {
417#define L2CAP_CONN_RNR_SENT 0x0200 413#define L2CAP_CONN_RNR_SENT 0x0200
418#define L2CAP_CONN_SAR_RETRY 0x0400 414#define L2CAP_CONN_SAR_RETRY 0x0400
419 415
420#define __mod_retrans_timer() mod_timer(&l2cap_pi(sk)->retrans_timer, \ 416#define __mod_retrans_timer() mod_timer(&chan->retrans_timer, \
421 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO)); 417 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_RETRANS_TO));
422#define __mod_monitor_timer() mod_timer(&l2cap_pi(sk)->monitor_timer, \ 418#define __mod_monitor_timer() mod_timer(&chan->monitor_timer, \
423 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO)); 419 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_MONITOR_TO));
424#define __mod_ack_timer() mod_timer(&l2cap_pi(sk)->ack_timer, \ 420#define __mod_ack_timer() mod_timer(&chan->ack_timer, \
425 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO)); 421 jiffies + msecs_to_jiffies(L2CAP_DEFAULT_ACK_TO));
426 422
427static inline int l2cap_tx_window_full(struct sock *sk) 423static inline int l2cap_tx_window_full(struct l2cap_chan *ch)
428{ 424{
429 struct l2cap_pinfo *pi = l2cap_pi(sk);
430 int sub; 425 int sub;
431 426
432 sub = (pi->next_tx_seq - pi->expected_ack_seq) % 64; 427 sub = (ch->next_tx_seq - ch->expected_ack_seq) % 64;
433 428
434 if (sub < 0) 429 if (sub < 0)
435 sub += 64; 430 sub += 64;
436 431
437 return sub == pi->remote_tx_win; 432 return sub == ch->remote_tx_win;
438} 433}
439 434
440#define __get_txseq(ctrl) (((ctrl) & L2CAP_CTRL_TXSEQ) >> 1) 435#define __get_txseq(ctrl) (((ctrl) & L2CAP_CTRL_TXSEQ) >> 1)
@@ -450,18 +445,17 @@ extern struct bt_sock_list l2cap_sk_list;
450int l2cap_init_sockets(void); 445int l2cap_init_sockets(void);
451void l2cap_cleanup_sockets(void); 446void l2cap_cleanup_sockets(void);
452 447
453u8 l2cap_get_ident(struct l2cap_conn *conn);
454void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data); 448void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 len, void *data);
455int l2cap_build_conf_req(struct sock *sk, void *data); 449void __l2cap_connect_rsp_defer(struct sock *sk);
456int __l2cap_wait_ack(struct sock *sk); 450int __l2cap_wait_ack(struct sock *sk);
457 451
458struct sk_buff *l2cap_create_connless_pdu(struct sock *sk, struct msghdr *msg, size_t len); 452struct sk_buff *l2cap_create_connless_pdu(struct sock *sk, struct msghdr *msg, size_t len);
459struct sk_buff *l2cap_create_basic_pdu(struct sock *sk, struct msghdr *msg, size_t len); 453struct sk_buff *l2cap_create_basic_pdu(struct sock *sk, struct msghdr *msg, size_t len);
460struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *msg, size_t len, u16 control, u16 sdulen); 454struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *msg, size_t len, u16 control, u16 sdulen);
461int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, size_t len); 455int l2cap_sar_segment_sdu(struct l2cap_chan *chan, struct msghdr *msg, size_t len);
462void l2cap_do_send(struct sock *sk, struct sk_buff *skb); 456void l2cap_do_send(struct sock *sk, struct sk_buff *skb);
463void l2cap_streaming_send(struct sock *sk); 457void l2cap_streaming_send(struct l2cap_chan *chan);
464int l2cap_ertm_send(struct sock *sk); 458int l2cap_ertm_send(struct l2cap_chan *chan);
465 459
466void l2cap_sock_set_timer(struct sock *sk, long timeout); 460void l2cap_sock_set_timer(struct sock *sk, long timeout);
467void l2cap_sock_clear_timer(struct sock *sk); 461void l2cap_sock_clear_timer(struct sock *sk);
@@ -470,8 +464,8 @@ void l2cap_sock_kill(struct sock *sk);
470void l2cap_sock_init(struct sock *sk, struct sock *parent); 464void l2cap_sock_init(struct sock *sk, struct sock *parent);
471struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock, 465struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
472 int proto, gfp_t prio); 466 int proto, gfp_t prio);
473void l2cap_send_disconn_req(struct l2cap_conn *conn, struct sock *sk, int err); 467void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *chan, int err);
474void l2cap_chan_del(struct sock *sk, int err); 468void l2cap_chan_del(struct l2cap_chan *chan, int err);
475int l2cap_do_connect(struct sock *sk); 469int l2cap_do_connect(struct sock *sk);
476 470
477#endif /* __L2CAP_H */ 471#endif /* __L2CAP_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ba7384acf4e0..d30eada7c6cd 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -423,6 +423,7 @@ struct station_parameters {
423 * @STATION_INFO_SIGNAL_AVG: @signal_avg filled 423 * @STATION_INFO_SIGNAL_AVG: @signal_avg filled
424 * @STATION_INFO_RX_BITRATE: @rxrate fields are filled 424 * @STATION_INFO_RX_BITRATE: @rxrate fields are filled
425 * @STATION_INFO_BSS_PARAM: @bss_param filled 425 * @STATION_INFO_BSS_PARAM: @bss_param filled
426 * @STATION_INFO_CONNECTED_TIME: @connected_time filled
426 */ 427 */
427enum station_info_flags { 428enum station_info_flags {
428 STATION_INFO_INACTIVE_TIME = 1<<0, 429 STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -441,6 +442,7 @@ enum station_info_flags {
441 STATION_INFO_SIGNAL_AVG = 1<<13, 442 STATION_INFO_SIGNAL_AVG = 1<<13,
442 STATION_INFO_RX_BITRATE = 1<<14, 443 STATION_INFO_RX_BITRATE = 1<<14,
443 STATION_INFO_BSS_PARAM = 1<<15, 444 STATION_INFO_BSS_PARAM = 1<<15,
445 STATION_INFO_CONNECTED_TIME = 1<<16
444}; 446};
445 447
446/** 448/**
@@ -511,6 +513,7 @@ struct sta_bss_parameters {
511 * Station information filled by driver for get_station() and dump_station. 513 * Station information filled by driver for get_station() and dump_station.
512 * 514 *
513 * @filled: bitflag of flags from &enum station_info_flags 515 * @filled: bitflag of flags from &enum station_info_flags
516 * @connected_time: time(in secs) since a station is last connected
514 * @inactive_time: time since last station activity (tx/rx) in milliseconds 517 * @inactive_time: time since last station activity (tx/rx) in milliseconds
515 * @rx_bytes: bytes received from this station 518 * @rx_bytes: bytes received from this station
516 * @tx_bytes: bytes transmitted to this station 519 * @tx_bytes: bytes transmitted to this station
@@ -533,6 +536,7 @@ struct sta_bss_parameters {
533 */ 536 */
534struct station_info { 537struct station_info {
535 u32 filled; 538 u32 filled;
539 u32 connected_time;
536 u32 inactive_time; 540 u32 inactive_time;
537 u32 rx_bytes; 541 u32 rx_bytes;
538 u32 tx_bytes; 542 u32 tx_bytes;
@@ -689,8 +693,9 @@ struct mesh_config {
689 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes 693 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes
690 * @path_sel_proto: which path selection protocol to use 694 * @path_sel_proto: which path selection protocol to use
691 * @path_metric: which metric to use 695 * @path_metric: which metric to use
692 * @vendor_ie: vendor information elements (optional) 696 * @ie: vendor information elements (optional)
693 * @vendor_ie_len: length of vendor information elements 697 * @ie_len: length of vendor information elements
698 * @is_secure: or not
694 * 699 *
695 * These parameters are fixed when the mesh is created. 700 * These parameters are fixed when the mesh is created.
696 */ 701 */
@@ -699,8 +704,9 @@ struct mesh_setup {
699 u8 mesh_id_len; 704 u8 mesh_id_len;
700 u8 path_sel_proto; 705 u8 path_sel_proto;
701 u8 path_metric; 706 u8 path_metric;
702 const u8 *vendor_ie; 707 const u8 *ie;
703 u8 vendor_ie_len; 708 u8 ie_len;
709 bool is_secure;
704}; 710};
705 711
706/** 712/**
@@ -1451,6 +1457,8 @@ struct cfg80211_ops {
1451 * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. 1457 * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.
1452 * @WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS: The device supports separate 1458 * @WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS: The device supports separate
1453 * unicast and multicast TX keys. 1459 * unicast and multicast TX keys.
1460 * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing
1461 * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH.
1454 */ 1462 */
1455enum wiphy_flags { 1463enum wiphy_flags {
1456 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), 1464 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
@@ -1463,6 +1471,7 @@ enum wiphy_flags {
1463 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7), 1471 WIPHY_FLAG_CONTROL_PORT_PROTOCOL = BIT(7),
1464 WIPHY_FLAG_IBSS_RSN = BIT(8), 1472 WIPHY_FLAG_IBSS_RSN = BIT(8),
1465 WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS= BIT(9), 1473 WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS= BIT(9),
1474 WIPHY_FLAG_MESH_AUTH = BIT(10),
1466}; 1475};
1467 1476
1468struct mac_address { 1477struct mac_address {
@@ -2484,6 +2493,22 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
2484void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp); 2493void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, gfp_t gfp);
2485 2494
2486/** 2495/**
2496 * cfg80211_notify_new_candidate - notify cfg80211 of a new mesh peer candidate
2497 *
2498 * @dev: network device
2499 * @macaddr: the MAC address of the new candidate
2500 * @ie: information elements advertised by the peer candidate
2501 * @ie_len: lenght of the information elements buffer
2502 * @gfp: allocation flags
2503 *
2504 * This function notifies cfg80211 that the mesh peer candidate has been
2505 * detected, most likely via a beacon or, less likely, via a probe response.
2506 * cfg80211 then sends a notification to userspace.
2507 */
2508void cfg80211_notify_new_peer_candidate(struct net_device *dev,
2509 const u8 *macaddr, const u8 *ie, u8 ie_len, gfp_t gfp);
2510
2511/**
2487 * DOC: RFkill integration 2512 * DOC: RFkill integration
2488 * 2513 *
2489 * RFkill integration in cfg80211 is almost invisible to drivers, 2514 * RFkill integration in cfg80211 is almost invisible to drivers,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 025d4cc7bbf8..d23dd6c1329c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1819,6 +1819,9 @@ enum ieee80211_ampdu_mlme_action {
1819 * @set_ringparam: Set tx and rx ring sizes. 1819 * @set_ringparam: Set tx and rx ring sizes.
1820 * 1820 *
1821 * @get_ringparam: Get tx and rx ring current and maximum sizes. 1821 * @get_ringparam: Get tx and rx ring current and maximum sizes.
1822 *
1823 * @tx_frames_pending: Check if there is any pending frame in the hardware
1824 * queues before entering power save.
1822 */ 1825 */
1823struct ieee80211_ops { 1826struct ieee80211_ops {
1824 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1827 void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1906,6 +1909,7 @@ struct ieee80211_ops {
1906 int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx); 1909 int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
1907 void (*get_ringparam)(struct ieee80211_hw *hw, 1910 void (*get_ringparam)(struct ieee80211_hw *hw,
1908 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); 1911 u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
1912 bool (*tx_frames_pending)(struct ieee80211_hw *hw);
1909}; 1913};
1910 1914
1911/** 1915/**
@@ -2223,6 +2227,18 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
2223#define IEEE80211_TX_STATUS_HEADROOM 13 2227#define IEEE80211_TX_STATUS_HEADROOM 13
2224 2228
2225/** 2229/**
2230 * ieee80211_sta_set_tim - set the TIM bit for a sleeping station
2231 *
2232 * If a driver buffers frames for a powersave station instead of passing
2233 * them back to mac80211 for retransmission, the station needs to be told
2234 * to wake up using the TIM bitmap in the beacon.
2235 *
2236 * This function sets the station's TIM bit - it will be cleared when the
2237 * station wakes up.
2238 */
2239void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
2240
2241/**
2226 * ieee80211_tx_status - transmit status callback 2242 * ieee80211_tx_status - transmit status callback
2227 * 2243 *
2228 * Call this function for all transmitted frames after they have been 2244 * Call this function for all transmitted frames after they have been