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
|
@ -124,8 +124,16 @@ enum {
|
|||
|
||||
/** LE Connection Info Structure */
|
||||
struct bt_conn_le_info {
|
||||
const bt_addr_le_t *src; /** Source (Local) Address */
|
||||
const bt_addr_le_t *dst; /** Destination (Remote) Address */
|
||||
/** Source (Local) Identity Address */
|
||||
const bt_addr_le_t *src;
|
||||
/** Destination (Remote) Identity Address or remote Resolvable Private
|
||||
* Address (RPA) before identity has been resolved.
|
||||
*/
|
||||
const bt_addr_le_t *dst;
|
||||
/** Local device address used during connection setup. */
|
||||
const bt_addr_le_t *local;
|
||||
/** Remote device address used during connection setup. */
|
||||
const bt_addr_le_t *remote;
|
||||
u16_t interval; /** Connection interval */
|
||||
u16_t latency; /** Connection slave latency */
|
||||
u16_t timeout; /** Connection supervision timeout */
|
||||
|
|
|
@ -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