diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-11-21 13:03:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-21 13:03:00 -0500 |
commit | d2ff5ee919f0b1377595df80ba49c9921ce4ee62 (patch) | |
tree | e3e92aff76d158ee8f956a113b7f10b4ea145f87 /include/net | |
parent | b3117494772d8f906625905c6e203af745ee3530 (diff) | |
parent | 2b2fec4d08a0aabe20d2e749cb7978f04217af65 (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.h | 22 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 2 |
3 files changed, 26 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 6c414f4302fe..45eee08157bb 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -154,7 +154,7 @@ enum { | |||
154 | #define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ | 154 | #define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ |
155 | #define HCI_PAIRING_TIMEOUT msecs_to_jiffies(60000) /* 60 seconds */ | 155 | #define HCI_PAIRING_TIMEOUT msecs_to_jiffies(60000) /* 60 seconds */ |
156 | #define HCI_INIT_TIMEOUT msecs_to_jiffies(10000) /* 10 seconds */ | 156 | #define HCI_INIT_TIMEOUT msecs_to_jiffies(10000) /* 10 seconds */ |
157 | #define HCI_CMD_TIMEOUT msecs_to_jiffies(1000) /* 1 second */ | 157 | #define HCI_CMD_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ |
158 | #define HCI_ACL_TX_TIMEOUT msecs_to_jiffies(45000) /* 45 seconds */ | 158 | #define HCI_ACL_TX_TIMEOUT msecs_to_jiffies(45000) /* 45 seconds */ |
159 | #define HCI_AUTO_OFF_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ | 159 | #define HCI_AUTO_OFF_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ |
160 | 160 | ||
@@ -319,6 +319,9 @@ enum { | |||
319 | #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 | 319 | #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 |
320 | #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 | 320 | #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 |
321 | 321 | ||
322 | /* The core spec defines 127 as the "not available" value */ | ||
323 | #define HCI_TX_POWER_INVALID 127 | ||
324 | |||
322 | /* Extended Inquiry Response field types */ | 325 | /* Extended Inquiry Response field types */ |
323 | #define EIR_FLAGS 0x01 /* flags */ | 326 | #define EIR_FLAGS 0x01 /* flags */ |
324 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ | 327 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ |
@@ -335,6 +338,13 @@ enum { | |||
335 | #define EIR_SSP_RAND_R 0x0F /* Simple Pairing Randomizer R */ | 338 | #define EIR_SSP_RAND_R 0x0F /* Simple Pairing Randomizer R */ |
336 | #define EIR_DEVICE_ID 0x10 /* device ID */ | 339 | #define EIR_DEVICE_ID 0x10 /* device ID */ |
337 | 340 | ||
341 | /* Low Energy Advertising Flags */ | ||
342 | #define LE_AD_LIMITED 0x01 /* Limited Discoverable */ | ||
343 | #define LE_AD_GENERAL 0x02 /* General Discoverable */ | ||
344 | #define LE_AD_NO_BREDR 0x04 /* BR/EDR not supported */ | ||
345 | #define LE_AD_SIM_LE_BREDR_CTRL 0x08 /* Simultaneous LE & BR/EDR Controller */ | ||
346 | #define LE_AD_SIM_LE_BREDR_HOST 0x10 /* Simultaneous LE & BR/EDR Host */ | ||
347 | |||
338 | /* ----- HCI Commands ---- */ | 348 | /* ----- HCI Commands ---- */ |
339 | #define HCI_OP_NOP 0x0000 | 349 | #define HCI_OP_NOP 0x0000 |
340 | 350 | ||
@@ -939,6 +949,16 @@ struct hci_rp_le_read_adv_tx_power { | |||
939 | __s8 tx_power; | 949 | __s8 tx_power; |
940 | } __packed; | 950 | } __packed; |
941 | 951 | ||
952 | #define HCI_MAX_AD_LENGTH 31 | ||
953 | |||
954 | #define HCI_OP_LE_SET_ADV_DATA 0x2008 | ||
955 | struct hci_cp_le_set_adv_data { | ||
956 | __u8 length; | ||
957 | __u8 data[HCI_MAX_AD_LENGTH]; | ||
958 | } __packed; | ||
959 | |||
960 | #define HCI_OP_LE_SET_ADV_ENABLE 0x200a | ||
961 | |||
942 | #define HCI_OP_LE_SET_SCAN_PARAM 0x200b | 962 | #define HCI_OP_LE_SET_SCAN_PARAM 0x200b |
943 | struct hci_cp_le_set_scan_param { | 963 | struct hci_cp_le_set_scan_param { |
944 | __u8 type; | 964 | __u8 type; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ce6dbeb6dfb6..ef5b85dac3f7 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -279,6 +279,8 @@ struct hci_dev { | |||
279 | struct le_scan_params le_scan_params; | 279 | struct le_scan_params le_scan_params; |
280 | 280 | ||
281 | __s8 adv_tx_power; | 281 | __s8 adv_tx_power; |
282 | __u8 adv_data[HCI_MAX_AD_LENGTH]; | ||
283 | __u8 adv_data_len; | ||
282 | 284 | ||
283 | int (*open)(struct hci_dev *hdev); | 285 | int (*open)(struct hci_dev *hdev); |
284 | int (*close)(struct hci_dev *hdev); | 286 | int (*close)(struct hci_dev *hdev); |
@@ -734,6 +736,8 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash, | |||
734 | u8 *randomizer); | 736 | u8 *randomizer); |
735 | int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); | 737 | int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); |
736 | 738 | ||
739 | int hci_update_ad(struct hci_dev *hdev); | ||
740 | |||
737 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 741 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
738 | 742 | ||
739 | int hci_recv_frame(struct sk_buff *skb); | 743 | int hci_recv_frame(struct sk_buff *skb); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index d65db459c843..f57fab04e7c5 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -811,6 +811,6 @@ void l2cap_send_conn_req(struct l2cap_chan *chan); | |||
811 | void l2cap_move_start(struct l2cap_chan *chan); | 811 | void l2cap_move_start(struct l2cap_chan *chan); |
812 | void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan, | 812 | void l2cap_logical_cfm(struct l2cap_chan *chan, struct hci_chan *hchan, |
813 | u8 status); | 813 | u8 status); |
814 | void l2cap_physical_cfm(struct l2cap_chan *chan, int result); | 814 | void __l2cap_physical_cfm(struct l2cap_chan *chan, int result); |
815 | 815 | ||
816 | #endif /* __L2CAP_H */ | 816 | #endif /* __L2CAP_H */ |