aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-04-09 15:47:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 15:47:49 -0400
commit41833af713457fe92f432a7354bc690587652879 (patch)
tree6f821f85bd33c1823d557d1482f8aa6216cde5b3 /include/net
parentf68e556e23d1a4176b563bcb25d8baf2c5313f91 (diff)
parent66f3b913e68e8e62bd2f9499495eeb6cc81b2662 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h3
-rw-r--r--include/net/bluetooth/hci_core.h12
-rw-r--r--include/net/bluetooth/mgmt.h2
3 files changed, 10 insertions, 7 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 344b0f972828..d47e523c9d83 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -92,6 +92,7 @@ enum {
92 HCI_SERVICE_CACHE, 92 HCI_SERVICE_CACHE,
93 HCI_LINK_KEYS, 93 HCI_LINK_KEYS,
94 HCI_DEBUG_KEYS, 94 HCI_DEBUG_KEYS,
95 HCI_UNREGISTER,
95 96
96 HCI_LE_SCAN, 97 HCI_LE_SCAN,
97 HCI_SSP_ENABLED, 98 HCI_SSP_ENABLED,
@@ -1327,8 +1328,8 @@ struct sockaddr_hci {
1327#define HCI_DEV_NONE 0xffff 1328#define HCI_DEV_NONE 0xffff
1328 1329
1329#define HCI_CHANNEL_RAW 0 1330#define HCI_CHANNEL_RAW 0
1330#define HCI_CHANNEL_CONTROL 1
1331#define HCI_CHANNEL_MONITOR 2 1331#define HCI_CHANNEL_MONITOR 2
1332#define HCI_CHANNEL_CONTROL 3
1332 1333
1333struct hci_filter { 1334struct hci_filter {
1334 unsigned long type_mask; 1335 unsigned long type_mask;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index daefaac51131..6822d2595aff 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -427,7 +427,7 @@ enum {
427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) 427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
428{ 428{
429 struct hci_dev *hdev = conn->hdev; 429 struct hci_dev *hdev = conn->hdev;
430 return (test_bit(HCI_SSP_ENABLED, &hdev->flags) && 430 return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) &&
431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); 431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags));
432} 432}
433 433
@@ -907,11 +907,13 @@ static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
907 907
908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) 908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
909{ 909{
910 u8 field_len; 910 size_t parsed = 0;
911 size_t parsed;
912 911
913 for (parsed = 0; parsed < data_len - 1; parsed += field_len) { 912 if (data_len < 2)
914 field_len = data[0]; 913 return false;
914
915 while (parsed < data_len - 1) {
916 u8 field_len = data[0];
915 917
916 if (field_len == 0) 918 if (field_len == 0)
917 break; 919 break;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index ffc1377e092e..ebfd91fc20f8 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -117,7 +117,7 @@ struct mgmt_mode {
117#define MGMT_OP_SET_DISCOVERABLE 0x0006 117#define MGMT_OP_SET_DISCOVERABLE 0x0006
118struct mgmt_cp_set_discoverable { 118struct mgmt_cp_set_discoverable {
119 __u8 val; 119 __u8 val;
120 __u16 timeout; 120 __le16 timeout;
121} __packed; 121} __packed;
122#define MGMT_SET_DISCOVERABLE_SIZE 3 122#define MGMT_SET_DISCOVERABLE_SIZE 3
123 123