aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-12-03 13:46:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-12-03 13:46:03 -0500
commit06ef5c4bbb9816e7a7eb44917f11c2e3375fb51a (patch)
treecac94ec09e789a6e5162d1925ee944075bf6eef6 /include/net
parent55cec505559dade9e7776de8f3d23fc3e54e091d (diff)
parent0b27a4b97cb1874503c78453c0903df53c0c86b2 (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci_core.h31
-rw-r--r--include/net/bluetooth/l2cap.h2
2 files changed, 26 insertions, 7 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ef5b85dac3f7..014a2eaa5389 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -376,7 +376,7 @@ extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt);
376extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, 376extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb,
377 u16 flags); 377 u16 flags);
378 378
379extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); 379extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags);
380extern void sco_connect_cfm(struct hci_conn *hcon, __u8 status); 380extern void sco_connect_cfm(struct hci_conn *hcon, __u8 status);
381extern void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason); 381extern void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason);
382extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb); 382extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb);
@@ -577,6 +577,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst);
577int hci_conn_del(struct hci_conn *conn); 577int hci_conn_del(struct hci_conn *conn);
578void hci_conn_hash_flush(struct hci_dev *hdev); 578void hci_conn_hash_flush(struct hci_dev *hdev);
579void hci_conn_check_pending(struct hci_dev *hdev); 579void hci_conn_check_pending(struct hci_dev *hdev);
580void hci_conn_accept(struct hci_conn *conn, int mask);
580 581
581struct hci_chan *hci_chan_create(struct hci_conn *conn); 582struct hci_chan *hci_chan_create(struct hci_conn *conn);
582void hci_chan_del(struct hci_chan *chan); 583void hci_chan_del(struct hci_chan *chan);
@@ -766,7 +767,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
766#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR) 767#define lmp_sniffsubr_capable(dev) ((dev)->features[5] & LMP_SNIFF_SUBR)
767#define lmp_pause_enc_capable(dev) ((dev)->features[5] & LMP_PAUSE_ENC) 768#define lmp_pause_enc_capable(dev) ((dev)->features[5] & LMP_PAUSE_ENC)
768#define lmp_ext_inq_capable(dev) ((dev)->features[6] & LMP_EXT_INQ) 769#define lmp_ext_inq_capable(dev) ((dev)->features[6] & LMP_EXT_INQ)
769#define lmp_le_br_capable(dev) ((dev)->features[6] & LMP_SIMUL_LE_BR) 770#define lmp_le_br_capable(dev) !!((dev)->features[6] & LMP_SIMUL_LE_BR)
770#define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR) 771#define lmp_ssp_capable(dev) ((dev)->features[6] & LMP_SIMPLE_PAIR)
771#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH) 772#define lmp_no_flush_capable(dev) ((dev)->features[6] & LMP_NO_FLUSH)
772#define lmp_lsto_capable(dev) ((dev)->features[7] & LMP_LSTO) 773#define lmp_lsto_capable(dev) ((dev)->features[7] & LMP_LSTO)
@@ -775,12 +776,30 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
775 776
776/* ----- Extended LMP capabilities ----- */ 777/* ----- Extended LMP capabilities ----- */
777#define lmp_host_ssp_capable(dev) ((dev)->host_features[0] & LMP_HOST_SSP) 778#define lmp_host_ssp_capable(dev) ((dev)->host_features[0] & LMP_HOST_SSP)
778#define lmp_host_le_capable(dev) ((dev)->host_features[0] & LMP_HOST_LE) 779#define lmp_host_le_capable(dev) !!((dev)->host_features[0] & LMP_HOST_LE)
779#define lmp_host_le_br_capable(dev) ((dev)->host_features[0] & LMP_HOST_LE_BREDR) 780#define lmp_host_le_br_capable(dev) !!((dev)->host_features[0] & LMP_HOST_LE_BREDR)
781
782/* returns true if at least one AMP active */
783static inline bool hci_amp_capable(void)
784{
785 struct hci_dev *hdev;
786 bool ret = false;
787
788 read_lock(&hci_dev_list_lock);
789 list_for_each_entry(hdev, &hci_dev_list, list)
790 if (hdev->amp_type == HCI_AMP &&
791 test_bit(HCI_UP, &hdev->flags))
792 ret = true;
793 read_unlock(&hci_dev_list_lock);
794
795 return ret;
796}
780 797
781/* ----- HCI protocols ----- */ 798/* ----- HCI protocols ----- */
799#define HCI_PROTO_DEFER 0x01
800
782static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, 801static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
783 __u8 type) 802 __u8 type, __u8 *flags)
784{ 803{
785 switch (type) { 804 switch (type) {
786 case ACL_LINK: 805 case ACL_LINK:
@@ -788,7 +807,7 @@ static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
788 807
789 case SCO_LINK: 808 case SCO_LINK:
790 case ESCO_LINK: 809 case ESCO_LINK:
791 return sco_connect_ind(hdev, bdaddr); 810 return sco_connect_ind(hdev, bdaddr, flags);
792 811
793 default: 812 default:
794 BT_ERR("unknown link type %d", type); 813 BT_ERR("unknown link type %d", type);
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index f57fab04e7c5..7588ef44ebaf 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -611,7 +611,7 @@ enum {
611 CONF_MTU_DONE, 611 CONF_MTU_DONE,
612 CONF_MODE_DONE, 612 CONF_MODE_DONE,
613 CONF_CONNECT_PEND, 613 CONF_CONNECT_PEND,
614 CONF_NO_FCS_RECV, 614 CONF_RECV_NO_FCS,
615 CONF_STATE2_DEVICE, 615 CONF_STATE2_DEVICE,
616 CONF_EWS_RECV, 616 CONF_EWS_RECV,
617 CONF_LOC_CONF_PEND, 617 CONF_LOC_CONF_PEND,