aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index bcfc6da67a5c..1daa837da091 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4792,6 +4792,21 @@ void mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key)
4792 mgmt_event(MGMT_EV_NEW_LONG_TERM_KEY, hdev, &ev, sizeof(ev), NULL); 4792 mgmt_event(MGMT_EV_NEW_LONG_TERM_KEY, hdev, &ev, sizeof(ev), NULL);
4793} 4793}
4794 4794
4795void mgmt_new_irk(struct hci_dev *hdev, struct smp_irk *irk)
4796{
4797 struct mgmt_ev_new_irk ev;
4798
4799 memset(&ev, 0, sizeof(ev));
4800
4801 ev.store_hint = 0x01;
4802 bacpy(&ev.rpa, &irk->rpa);
4803 bacpy(&ev.irk.addr.bdaddr, &irk->bdaddr);
4804 ev.irk.addr.type = link_to_bdaddr(LE_LINK, irk->addr_type);
4805 memcpy(ev.irk.val, irk->val, sizeof(irk->val));
4806
4807 mgmt_event(MGMT_EV_NEW_IRK, hdev, &ev, sizeof(ev), NULL);
4808}
4809
4795static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, u8 *data, 4810static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, u8 *data,
4796 u8 data_len) 4811 u8 data_len)
4797{ 4812{