Bluetooth: Rename BT_LE_ADV_ADDR_PUBLIC to BT_LE_ADV_ADDR_IDENTITY

In anticipation of supporting a local static random address in the
future it makes more sense to call BT_LE_ADV_ADDR_PUBLIC
BT_LE_ADV_ADDR_IDENTITY.

Change-Id: I4826f1dfb50b54e13a35cbe7ee74e28641c81ad1
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-02-01 18:15:52 +02:00 committed by Anas Nashif
commit 479d25d035
4 changed files with 10 additions and 7 deletions

View file

@ -146,7 +146,7 @@ static bool valid_adv_param(const struct bt_le_adv_param *param)
} }
switch (param->addr_type) { switch (param->addr_type) {
case BT_LE_ADV_ADDR_PUBLIC: case BT_LE_ADV_ADDR_IDENTITY:
case BT_LE_ADV_ADDR_NRPA: case BT_LE_ADV_ADDR_NRPA:
break; break;
default: default:

View file

@ -90,8 +90,11 @@ struct bt_data {
/** Local advertising address type */ /** Local advertising address type */
enum { enum {
/** Use local public address for advertising */ /** Use local identity address for advertising. Unless a static
BT_LE_ADV_ADDR_PUBLIC, * random address has been configured this will be the public
* address.
*/
BT_LE_ADV_ADDR_IDENTITY,
/** Use local Non-resolvable Private Address (NRPA) for advertising */ /** Use local Non-resolvable Private Address (NRPA) for advertising */
BT_LE_ADV_ADDR_NRPA, BT_LE_ADV_ADDR_NRPA,
@ -127,7 +130,7 @@ struct bt_le_adv_param {
.interval_max = (_int_max), \ .interval_max = (_int_max), \
}) })
#define BT_LE_ADV(t) BT_LE_ADV_PARAM(t, BT_LE_ADV_ADDR_PUBLIC, \ #define BT_LE_ADV(t) BT_LE_ADV_PARAM(t, BT_LE_ADV_ADDR_IDENTITY, \
BT_GAP_ADV_FAST_INT_MIN_2, \ BT_GAP_ADV_FAST_INT_MIN_2, \
BT_GAP_ADV_FAST_INT_MAX_2) BT_GAP_ADV_FAST_INT_MAX_2)

View file

@ -2302,7 +2302,7 @@ static bool valid_adv_param(const struct bt_le_adv_param *param)
} }
switch (param->addr_type) { switch (param->addr_type) {
case BT_LE_ADV_ADDR_PUBLIC: case BT_LE_ADV_ADDR_IDENTITY:
case BT_LE_ADV_ADDR_NRPA: case BT_LE_ADV_ADDR_NRPA:
break; break;
default: default:

View file

@ -575,12 +575,12 @@ static void cmd_advertise(int argc, char *argv[])
if (!strcmp(argv[1], "on")) { if (!strcmp(argv[1], "on")) {
param.type = BT_LE_ADV_IND; param.type = BT_LE_ADV_IND;
param.addr_type = BT_LE_ADV_ADDR_PUBLIC; param.addr_type = BT_LE_ADV_ADDR_IDENTITY;
scan_rsp = sd; scan_rsp = sd;
scan_rsp_len = ARRAY_SIZE(sd); scan_rsp_len = ARRAY_SIZE(sd);
} else if (!strcmp(argv[1], "scan")) { } else if (!strcmp(argv[1], "scan")) {
param.type = BT_LE_ADV_SCAN_IND; param.type = BT_LE_ADV_SCAN_IND;
param.addr_type = BT_LE_ADV_ADDR_PUBLIC; param.addr_type = BT_LE_ADV_ADDR_IDENTITY;
scan_rsp = sd; scan_rsp = sd;
scan_rsp_len = ARRAY_SIZE(sd); scan_rsp_len = ARRAY_SIZE(sd);
} else if (!strcmp(argv[1], "nconn")) { } else if (!strcmp(argv[1], "nconn")) {