Bluetooth: Host: Add identity addresses to conn info object
Use the src and dst naming to refer to the identity addresses of the connection. Keep the device addresses used during connections but rename them to local and remote instead. Update documentation to be more descriptive. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
27109e6378
commit
54d9ae45a5
2 changed files with 16 additions and 6 deletions
|
@ -1778,12 +1778,14 @@ int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
|
|||
|
||||
switch (conn->type) {
|
||||
case BT_CONN_TYPE_LE:
|
||||
info->le.dst = &conn->le.dst;
|
||||
info->le.src = &bt_dev.id_addr[conn->id];
|
||||
if (conn->role == BT_HCI_ROLE_MASTER) {
|
||||
info->le.src = &conn->le.init_addr;
|
||||
info->le.dst = &conn->le.resp_addr;
|
||||
info->le.local = &conn->le.init_addr;
|
||||
info->le.remote = &conn->le.resp_addr;
|
||||
} else {
|
||||
info->le.src = &conn->le.resp_addr;
|
||||
info->le.dst = &conn->le.init_addr;
|
||||
info->le.local = &conn->le.resp_addr;
|
||||
info->le.remote = &conn->le.init_addr;
|
||||
}
|
||||
info->le.interval = conn->le.interval;
|
||||
info->le.latency = conn->le.latency;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue