aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-05-29 13:03:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-05-29 13:03:47 -0400
commita5eb1aeb25df89c627248a162cc35ffb556dc486 (patch)
tree934fd6b18f17f72d5e57708b8e3a12b0071f1327 /include/net
parent737be10d8cb783d1cadb1868b061abb2b4314eae (diff)
parentd7b2545023ecfde94d3ea9c03c5480ac18da96c9 (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Conflicts: drivers/bluetooth/btusb.c
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h21
-rw-r--r--include/net/bluetooth/hci_core.h11
-rw-r--r--include/net/bluetooth/mgmt.h15
-rw-r--r--include/net/bluetooth/rfcomm.h6
4 files changed, 50 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 4261a67682c0..16587dcd6a91 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -1054,6 +1054,17 @@ struct hci_cp_write_page_scan_activity {
1054 __le16 window; 1054 __le16 window;
1055} __packed; 1055} __packed;
1056 1056
1057#define HCI_OP_READ_TX_POWER 0x0c2d
1058struct hci_cp_read_tx_power {
1059 __le16 handle;
1060 __u8 type;
1061} __packed;
1062struct hci_rp_read_tx_power {
1063 __u8 status;
1064 __le16 handle;
1065 __s8 tx_power;
1066} __packed;
1067
1057#define HCI_OP_READ_PAGE_SCAN_TYPE 0x0c46 1068#define HCI_OP_READ_PAGE_SCAN_TYPE 0x0c46
1058struct hci_rp_read_page_scan_type { 1069struct hci_rp_read_page_scan_type {
1059 __u8 status; 1070 __u8 status;
@@ -1064,6 +1075,16 @@ struct hci_rp_read_page_scan_type {
1064 #define PAGE_SCAN_TYPE_STANDARD 0x00 1075 #define PAGE_SCAN_TYPE_STANDARD 0x00
1065 #define PAGE_SCAN_TYPE_INTERLACED 0x01 1076 #define PAGE_SCAN_TYPE_INTERLACED 0x01
1066 1077
1078#define HCI_OP_READ_RSSI 0x1405
1079struct hci_cp_read_rssi {
1080 __le16 handle;
1081} __packed;
1082struct hci_rp_read_rssi {
1083 __u8 status;
1084 __le16 handle;
1085 __s8 rssi;
1086} __packed;
1087
1067#define HCI_OP_READ_LOCAL_AMP_INFO 0x1409 1088#define HCI_OP_READ_LOCAL_AMP_INFO 0x1409
1068struct hci_rp_read_local_amp_info { 1089struct hci_rp_read_local_amp_info {
1069 __u8 status; 1090 __u8 status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index d73f41855ada..b386bf17e6c2 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -145,6 +145,10 @@ struct oob_data {
145/* Default LE RPA expiry time, 15 minutes */ 145/* Default LE RPA expiry time, 15 minutes */
146#define HCI_DEFAULT_RPA_TIMEOUT (15 * 60) 146#define HCI_DEFAULT_RPA_TIMEOUT (15 * 60)
147 147
148/* Default min/max age of connection information (1s/3s) */
149#define DEFAULT_CONN_INFO_MIN_AGE 1000
150#define DEFAULT_CONN_INFO_MAX_AGE 3000
151
148struct amp_assoc { 152struct amp_assoc {
149 __u16 len; 153 __u16 len;
150 __u16 offset; 154 __u16 offset;
@@ -200,6 +204,8 @@ struct hci_dev {
200 __u16 le_conn_min_interval; 204 __u16 le_conn_min_interval;
201 __u16 le_conn_max_interval; 205 __u16 le_conn_max_interval;
202 __u16 discov_interleaved_timeout; 206 __u16 discov_interleaved_timeout;
207 __u16 conn_info_min_age;
208 __u16 conn_info_max_age;
203 __u8 ssp_debug_mode; 209 __u8 ssp_debug_mode;
204 210
205 __u16 devid_source; 211 __u16 devid_source;
@@ -374,8 +380,13 @@ struct hci_conn {
374 __u16 setting; 380 __u16 setting;
375 __u16 le_conn_min_interval; 381 __u16 le_conn_min_interval;
376 __u16 le_conn_max_interval; 382 __u16 le_conn_max_interval;
383 __s8 rssi;
384 __s8 tx_power;
385 __s8 max_tx_power;
377 unsigned long flags; 386 unsigned long flags;
378 387
388 unsigned long conn_info_timestamp;
389
379 __u8 remote_cap; 390 __u8 remote_cap;
380 __u8 remote_auth; 391 __u8 remote_auth;
381 __u8 remote_id; 392 __u8 remote_id;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index d4b571c2f9fd..bcffc9ae0c89 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -181,6 +181,9 @@ struct mgmt_cp_load_link_keys {
181} __packed; 181} __packed;
182#define MGMT_LOAD_LINK_KEYS_SIZE 3 182#define MGMT_LOAD_LINK_KEYS_SIZE 3
183 183
184#define MGMT_LTK_UNAUTHENTICATED 0x00
185#define MGMT_LTK_AUTHENTICATED 0x01
186
184struct mgmt_ltk_info { 187struct mgmt_ltk_info {
185 struct mgmt_addr_info addr; 188 struct mgmt_addr_info addr;
186 __u8 type; 189 __u8 type;
@@ -409,6 +412,18 @@ struct mgmt_cp_load_irks {
409} __packed; 412} __packed;
410#define MGMT_LOAD_IRKS_SIZE 2 413#define MGMT_LOAD_IRKS_SIZE 2
411 414
415#define MGMT_OP_GET_CONN_INFO 0x0031
416struct mgmt_cp_get_conn_info {
417 struct mgmt_addr_info addr;
418} __packed;
419#define MGMT_GET_CONN_INFO_SIZE MGMT_ADDR_INFO_SIZE
420struct mgmt_rp_get_conn_info {
421 struct mgmt_addr_info addr;
422 __s8 rssi;
423 __s8 tx_power;
424 __s8 max_tx_power;
425} __packed;
426
412#define MGMT_EV_CMD_COMPLETE 0x0001 427#define MGMT_EV_CMD_COMPLETE 0x0001
413struct mgmt_ev_cmd_complete { 428struct mgmt_ev_cmd_complete {
414 __le16 opcode; 429 __le16 opcode;
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 2611cc389d7d..578b83127af1 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -173,7 +173,7 @@ struct rfcomm_dlc {
173 struct sk_buff_head tx_queue; 173 struct sk_buff_head tx_queue;
174 struct timer_list timer; 174 struct timer_list timer;
175 175
176 spinlock_t lock; 176 struct mutex lock;
177 unsigned long state; 177 unsigned long state;
178 unsigned long flags; 178 unsigned long flags;
179 atomic_t refcnt; 179 atomic_t refcnt;
@@ -244,8 +244,8 @@ int rfcomm_dlc_get_modem_status(struct rfcomm_dlc *d, u8 *v24_sig);
244void rfcomm_dlc_accept(struct rfcomm_dlc *d); 244void rfcomm_dlc_accept(struct rfcomm_dlc *d);
245struct rfcomm_dlc *rfcomm_dlc_exists(bdaddr_t *src, bdaddr_t *dst, u8 channel); 245struct rfcomm_dlc *rfcomm_dlc_exists(bdaddr_t *src, bdaddr_t *dst, u8 channel);
246 246
247#define rfcomm_dlc_lock(d) spin_lock(&d->lock) 247#define rfcomm_dlc_lock(d) mutex_lock(&d->lock)
248#define rfcomm_dlc_unlock(d) spin_unlock(&d->lock) 248#define rfcomm_dlc_unlock(d) mutex_unlock(&d->lock)
249 249
250static inline void rfcomm_dlc_hold(struct rfcomm_dlc *d) 250static inline void rfcomm_dlc_hold(struct rfcomm_dlc *d)
251{ 251{