drivers/nble: Export local address for bt_conn_get_info()

The bt_conn_get_info() API also needs the local address. For now
simply use an extern declaration to get access to the variable that
resides in gap.c.

Change-Id: I3ddb598785cfb6a5d07fc10621f6d20a610536be
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-02-15 12:53:25 +02:00
commit acdee60fa5
2 changed files with 6 additions and 3 deletions

View file

@ -26,6 +26,8 @@
#include "gap_internal.h"
#include "conn_internal.h"
extern bt_addr_le_t nble_bdaddr;
static struct bt_conn conns[CONFIG_BLUETOOTH_MAX_CONN];
static struct bt_conn_cb *callback_list;
@ -114,6 +116,7 @@ int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
info->type = BT_CONN_TYPE_LE;
info->role = conn->role;
info->le.dst = &conn->dst;
info->le.src = &nble_bdaddr;
info->le.interval = conn->interval;
info->le.latency = conn->latency;
info->le.timeout = conn->timeout;