diff options
Diffstat (limited to 'net/bluetooth/smp.h')
-rw-r--r-- | net/bluetooth/smp.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h index 796f4f45f92f..86a683a8b491 100644 --- a/net/bluetooth/smp.h +++ b/net/bluetooth/smp.h | |||
@@ -102,6 +102,8 @@ struct smp_cmd_security_req { | |||
102 | __u8 auth_req; | 102 | __u8 auth_req; |
103 | } __packed; | 103 | } __packed; |
104 | 104 | ||
105 | #define SMP_CMD_MAX 0x0b | ||
106 | |||
105 | #define SMP_PASSKEY_ENTRY_FAILED 0x01 | 107 | #define SMP_PASSKEY_ENTRY_FAILED 0x01 |
106 | #define SMP_OOB_NOT_AVAIL 0x02 | 108 | #define SMP_OOB_NOT_AVAIL 0x02 |
107 | #define SMP_AUTH_REQUIREMENTS 0x03 | 109 | #define SMP_AUTH_REQUIREMENTS 0x03 |
@@ -123,17 +125,23 @@ enum { | |||
123 | SMP_LTK_SLAVE, | 125 | SMP_LTK_SLAVE, |
124 | }; | 126 | }; |
125 | 127 | ||
128 | static inline u8 smp_ltk_sec_level(struct smp_ltk *key) | ||
129 | { | ||
130 | if (key->authenticated) | ||
131 | return BT_SECURITY_HIGH; | ||
132 | |||
133 | return BT_SECURITY_MEDIUM; | ||
134 | } | ||
135 | |||
126 | /* SMP Commands */ | 136 | /* SMP Commands */ |
127 | bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); | 137 | bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); |
128 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); | 138 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); |
129 | int smp_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb); | ||
130 | int smp_distribute_keys(struct l2cap_conn *conn); | ||
131 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); | 139 | int smp_user_confirm_reply(struct hci_conn *conn, u16 mgmt_op, __le32 passkey); |
132 | 140 | ||
133 | void smp_chan_destroy(struct l2cap_conn *conn); | 141 | bool smp_irk_matches(struct hci_dev *hdev, u8 irk[16], bdaddr_t *bdaddr); |
142 | int smp_generate_rpa(struct hci_dev *hdev, u8 irk[16], bdaddr_t *rpa); | ||
134 | 143 | ||
135 | bool smp_irk_matches(struct crypto_blkcipher *tfm, u8 irk[16], | 144 | int smp_register(struct hci_dev *hdev); |
136 | bdaddr_t *bdaddr); | 145 | void smp_unregister(struct hci_dev *hdev); |
137 | int smp_generate_rpa(struct crypto_blkcipher *tfm, u8 irk[16], bdaddr_t *rpa); | ||
138 | 146 | ||
139 | #endif /* __SMP_H */ | 147 | #endif /* __SMP_H */ |