aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-12-17 15:08:17 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-17 15:08:17 -0500
commit6ea09d8a096487b6418364c3b501c228f1889121 (patch)
tree26196cc04d23582fd65faba8db70249fdec2d2e6 /include/net
parentb80b376c4451cc0d671a2b2f2191ea3f9857bd9f (diff)
parentf647a52e1576f9c92cc9c02d5756cd0207295a2b (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next
John W. Linville says: ==================== Please pull this batch of updates for the 3.14 stream... For the Bluetooth bits, Gustavo says: "This is the first batch of patches intended for 3.14. There is nothing big here. Most of the code are refactors, clean up, small fixes, plus some new device id support." And... "More patches to 3.14. Here we have the support for Low Energy Connection Oriented Channels (LE CoC). Basically, as the name says, this adds supports for connection oriented channels in the same way we already have them for BR/EDR connections so profiles/protocols that work on top of BR/EDR can now work on LE plus a plenty of new possibilities for LE." For the ath10k bits, Kalle says: "Janusz and Marek implemented DFS support to ath10k, but the code is not enabled yet due to missing cfg80211/mac80211 patches (it will be enabled in the next pull request). Michal did some device reset fixes and made it possible for ath10k to share an interrupt with another device. And lots of smaller fixes from different people." For the iwlwifi bits, Emmanuel says: "I have here a big rework of the rate control by Eyal. This is obviously the biggest part of this batch. I also have enhancement of protection flags by Avri and a few bits for WoWLAN by Eliad and Luca. Johannes cleans up the debugfs plus a few fixes. I provided a few things for Bluetooth coexistence. Besides this we have an implementation for low priority scan." Along with all that, there are big batches of updates to mwifiex and ath9k, Jeff Kirsher's FSF address fix patches, and a handful of other bits here and there. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/bluetooth.h3
-rw-r--r--include/net/bluetooth/hci.h6
-rw-r--r--include/net/bluetooth/hci_core.h6
-rw-r--r--include/net/bluetooth/l2cap.h45
4 files changed, 60 insertions, 0 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 2a628b28249f..f4f9ee466791 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -115,6 +115,9 @@ struct bt_voice {
115#define BT_VOICE_TRANSPARENT 0x0003 115#define BT_VOICE_TRANSPARENT 0x0003
116#define BT_VOICE_CVSD_16BIT 0x0060 116#define BT_VOICE_CVSD_16BIT 0x0060
117 117
118#define BT_SNDMTU 12
119#define BT_RCVMTU 13
120
118__printf(1, 2) 121__printf(1, 2)
119int bt_info(const char *fmt, ...); 122int bt_info(const char *fmt, ...);
120__printf(1, 2) 123__printf(1, 2)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 1784c48699f0..cc2da73055fa 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -275,6 +275,12 @@ enum {
275#define LMP_EXTFEATURES 0x80 275#define LMP_EXTFEATURES 0x80
276 276
277/* Extended LMP features */ 277/* Extended LMP features */
278#define LMP_CSB_MASTER 0x01
279#define LMP_CSB_SLAVE 0x02
280#define LMP_SYNC_TRAIN 0x04
281#define LMP_SYNC_SCAN 0x08
282
283/* Host features */
278#define LMP_HOST_SSP 0x01 284#define LMP_HOST_SSP 0x01
279#define LMP_HOST_LE 0x02 285#define LMP_HOST_LE 0x02
280#define LMP_HOST_LE_BREDR 0x04 286#define LMP_HOST_LE_BREDR 0x04
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index f8555ad7b104..b796161fb04e 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -798,6 +798,12 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
798#define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT) 798#define lmp_transp_capable(dev) ((dev)->features[0][2] & LMP_TRANSPARENT)
799 799
800/* ----- Extended LMP capabilities ----- */ 800/* ----- Extended LMP capabilities ----- */
801#define lmp_csb_master_capable(dev) ((dev)->features[2][0] & LMP_CSB_MASTER)
802#define lmp_csb_slave_capable(dev) ((dev)->features[2][0] & LMP_CSB_SLAVE)
803#define lmp_sync_train_capable(dev) ((dev)->features[2][0] & LMP_SYNC_TRAIN)
804#define lmp_sync_scan_capable(dev) ((dev)->features[2][0] & LMP_SYNC_SCAN)
805
806/* ----- Host capabilities ----- */
801#define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP) 807#define lmp_host_ssp_capable(dev) ((dev)->features[1][0] & LMP_HOST_SSP)
802#define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE)) 808#define lmp_host_le_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE))
803#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR)) 809#define lmp_host_le_br_capable(dev) (!!((dev)->features[1][0] & LMP_HOST_LE_BREDR))
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index c853b16de4ef..e149e992fdae 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -112,6 +112,9 @@ struct l2cap_conninfo {
112#define L2CAP_MOVE_CHAN_CFM_RSP 0x11 112#define L2CAP_MOVE_CHAN_CFM_RSP 0x11
113#define L2CAP_CONN_PARAM_UPDATE_REQ 0x12 113#define L2CAP_CONN_PARAM_UPDATE_REQ 0x12
114#define L2CAP_CONN_PARAM_UPDATE_RSP 0x13 114#define L2CAP_CONN_PARAM_UPDATE_RSP 0x13
115#define L2CAP_LE_CONN_REQ 0x14
116#define L2CAP_LE_CONN_RSP 0x15
117#define L2CAP_LE_CREDITS 0x16
115 118
116/* L2CAP extended feature mask */ 119/* L2CAP extended feature mask */
117#define L2CAP_FEAT_FLOWCTL 0x00000001 120#define L2CAP_FEAT_FLOWCTL 0x00000001
@@ -249,6 +252,7 @@ struct l2cap_conn_rsp {
249#define L2CAP_CID_SMP 0x0006 252#define L2CAP_CID_SMP 0x0006
250#define L2CAP_CID_DYN_START 0x0040 253#define L2CAP_CID_DYN_START 0x0040
251#define L2CAP_CID_DYN_END 0xffff 254#define L2CAP_CID_DYN_END 0xffff
255#define L2CAP_CID_LE_DYN_END 0x007f
252 256
253/* connect/create channel results */ 257/* connect/create channel results */
254#define L2CAP_CR_SUCCESS 0x0000 258#define L2CAP_CR_SUCCESS 0x0000
@@ -257,6 +261,10 @@ struct l2cap_conn_rsp {
257#define L2CAP_CR_SEC_BLOCK 0x0003 261#define L2CAP_CR_SEC_BLOCK 0x0003
258#define L2CAP_CR_NO_MEM 0x0004 262#define L2CAP_CR_NO_MEM 0x0004
259#define L2CAP_CR_BAD_AMP 0x0005 263#define L2CAP_CR_BAD_AMP 0x0005
264#define L2CAP_CR_AUTHENTICATION 0x0005
265#define L2CAP_CR_AUTHORIZATION 0x0006
266#define L2CAP_CR_BAD_KEY_SIZE 0x0007
267#define L2CAP_CR_ENCRYPTION 0x0008
260 268
261/* connect/create channel status */ 269/* connect/create channel status */
262#define L2CAP_CS_NO_INFO 0x0000 270#define L2CAP_CS_NO_INFO 0x0000
@@ -321,6 +329,12 @@ struct l2cap_conf_rfc {
321#define L2CAP_MODE_ERTM 0x03 329#define L2CAP_MODE_ERTM 0x03
322#define L2CAP_MODE_STREAMING 0x04 330#define L2CAP_MODE_STREAMING 0x04
323 331
332/* Unlike the above this one doesn't actually map to anything that would
333 * ever be sent over the air. Therefore, use a value that's unlikely to
334 * ever be used in the BR/EDR configuration phase.
335 */
336#define L2CAP_MODE_LE_FLOWCTL 0x80
337
324struct l2cap_conf_efs { 338struct l2cap_conf_efs {
325 __u8 id; 339 __u8 id;
326 __u8 stype; 340 __u8 stype;
@@ -423,6 +437,30 @@ struct l2cap_conn_param_update_rsp {
423#define L2CAP_CONN_PARAM_ACCEPTED 0x0000 437#define L2CAP_CONN_PARAM_ACCEPTED 0x0000
424#define L2CAP_CONN_PARAM_REJECTED 0x0001 438#define L2CAP_CONN_PARAM_REJECTED 0x0001
425 439
440#define L2CAP_LE_MAX_CREDITS 10
441#define L2CAP_LE_DEFAULT_MPS 230
442
443struct l2cap_le_conn_req {
444 __le16 psm;
445 __le16 scid;
446 __le16 mtu;
447 __le16 mps;
448 __le16 credits;
449} __packed;
450
451struct l2cap_le_conn_rsp {
452 __le16 dcid;
453 __le16 mtu;
454 __le16 mps;
455 __le16 credits;
456 __le16 result;
457} __packed;
458
459struct l2cap_le_credits {
460 __le16 cid;
461 __le16 credits;
462} __packed;
463
426/* ----- L2CAP channels and connections ----- */ 464/* ----- L2CAP channels and connections ----- */
427struct l2cap_seq_list { 465struct l2cap_seq_list {
428 __u16 head; 466 __u16 head;
@@ -477,6 +515,9 @@ struct l2cap_chan {
477 __u16 monitor_timeout; 515 __u16 monitor_timeout;
478 __u16 mps; 516 __u16 mps;
479 517
518 __u16 tx_credits;
519 __u16 rx_credits;
520
480 __u8 tx_state; 521 __u8 tx_state;
481 __u8 rx_state; 522 __u8 rx_state;
482 523
@@ -553,6 +594,7 @@ struct l2cap_ops {
553 void (*ready) (struct l2cap_chan *chan); 594 void (*ready) (struct l2cap_chan *chan);
554 void (*defer) (struct l2cap_chan *chan); 595 void (*defer) (struct l2cap_chan *chan);
555 void (*resume) (struct l2cap_chan *chan); 596 void (*resume) (struct l2cap_chan *chan);
597 void (*suspend) (struct l2cap_chan *chan);
556 void (*set_shutdown) (struct l2cap_chan *chan); 598 void (*set_shutdown) (struct l2cap_chan *chan);
557 long (*get_sndtimeo) (struct l2cap_chan *chan); 599 long (*get_sndtimeo) (struct l2cap_chan *chan);
558 struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, 600 struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan,
@@ -654,6 +696,7 @@ enum {
654 FLAG_EXT_CTRL, 696 FLAG_EXT_CTRL,
655 FLAG_EFS_ENABLE, 697 FLAG_EFS_ENABLE,
656 FLAG_DEFER_SETUP, 698 FLAG_DEFER_SETUP,
699 FLAG_LE_CONN_REQ_SENT,
657}; 700};
658 701
659enum { 702enum {
@@ -809,11 +852,13 @@ static inline long l2cap_chan_no_get_sndtimeo(struct l2cap_chan *chan)
809} 852}
810 853
811extern bool disable_ertm; 854extern bool disable_ertm;
855extern bool enable_lecoc;
812 856
813int l2cap_init_sockets(void); 857int l2cap_init_sockets(void);
814void l2cap_cleanup_sockets(void); 858void l2cap_cleanup_sockets(void);
815bool l2cap_is_socket(struct socket *sock); 859bool l2cap_is_socket(struct socket *sock);
816 860
861void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan);
817void __l2cap_connect_rsp_defer(struct l2cap_chan *chan); 862void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
818 863
819int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm); 864int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);