diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-01-07 12:16:11 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2015-01-07 13:13:27 +0200 |
commit | 4003a333dc4484dd68671ffecda894f57149ff07 (patch) | |
tree | 30ee605defc356fdfff066a8aacf1d7071987289 /emulator/bthost.c | |
parent | f5653c83e84d36b0745355d35a9741e0cb0c7901 (diff) | |
download | bluez-4003a333dc4484dd68671ffecda894f57149ff07.tar.gz |
emulator/bthost: Add support for triggering SMP over BR/EDR
Diffstat (limited to 'emulator/bthost.c')
-rw-r--r-- | emulator/bthost.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/emulator/bthost.c b/emulator/bthost.c index 7792a71f8..6c616e8f4 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1522,6 +1522,8 @@ static bool l2cap_info_rsp(struct bthost *bthost, struct btconn *conn, if (len < sizeof(*rsp) + 8) return false; conn->fixed_chan = get_le64(rsp->data); + if (conn->smp_data && conn->encr_mode) + smp_conn_encrypted(conn->smp_data, conn->encr_mode); break; default: break; @@ -2318,6 +2320,17 @@ void bthost_le_start_encrypt(struct bthost *bthost, uint16_t handle, send_command(bthost, BT_HCI_CMD_LE_START_ENCRYPT, &cmd, sizeof(cmd)); } +uint64_t bthost_conn_get_fixed_chan(struct bthost *bthost, uint16_t handle) +{ + struct btconn *conn; + + conn = bthost_find_conn(bthost, handle); + if (!conn) + return 0; + + return conn->fixed_chan; +} + void bthost_add_l2cap_server(struct bthost *bthost, uint16_t psm, bthost_l2cap_connect_cb func, void *user_data) { |