Bluetooth: Remove 'own_addr' from advertising parameters
This was originally added as a work-around to avoid the heavy stack consumption of the TinyCrypt PRNG when generating NRPAs. This is no-longer an issue, and there are in fact no (in-tree) users of this. Remove it before it gains any wider users, since it was in many ways a hack/work-around to begin with. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7d4514a8b0
commit
ac133268a5
4 changed files with 1 additions and 17 deletions
|
@ -133,12 +133,6 @@ struct bt_le_adv_param {
|
|||
|
||||
/** Maximum Advertising Interval (N * 0.625) */
|
||||
u16_t interval_max;
|
||||
|
||||
/** Optional predefined (random) own address. Currently
|
||||
* the only permitted use of this is for NRPA with
|
||||
* non-connectable advertising.
|
||||
*/
|
||||
const bt_addr_t *own_addr;
|
||||
};
|
||||
|
||||
/** Helper to declare advertising parameters inline
|
||||
|
|
|
@ -4727,15 +4727,7 @@ int bt_le_adv_start(const struct bt_le_adv_param *param,
|
|||
|
||||
set_param.type = BT_LE_ADV_IND;
|
||||
} else {
|
||||
if (param->own_addr) {
|
||||
/* Only NRPA is allowed */
|
||||
if (!BT_ADDR_IS_NRPA(param->own_addr)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = set_random_address(param->own_addr);
|
||||
set_param.own_addr_type = BT_ADDR_LE_RANDOM;
|
||||
} else if (param->options & BT_LE_ADV_OPT_USE_IDENTITY) {
|
||||
if (param->options & BT_LE_ADV_OPT_USE_IDENTITY) {
|
||||
if (atomic_test_bit(bt_dev.flags,
|
||||
BT_DEV_ID_STATIC_RANDOM)) {
|
||||
err = set_random_address(&bt_dev.id_addr.a);
|
||||
|
|
|
@ -118,7 +118,6 @@ static inline void adv_send(struct net_buf *buf)
|
|||
param.options = 0;
|
||||
param.interval_min = ADV_SCAN_UNIT(adv_int);
|
||||
param.interval_max = param.interval_min;
|
||||
param.own_addr = NULL;
|
||||
|
||||
err = bt_le_adv_start(¶m, &ad, 1, NULL, 0);
|
||||
net_buf_unref(buf);
|
||||
|
|
|
@ -710,7 +710,6 @@ static int cmd_advertise(int argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
param.own_addr = NULL;
|
||||
param.interval_min = BT_GAP_ADV_FAST_INT_MIN_2;
|
||||
param.interval_max = BT_GAP_ADV_FAST_INT_MAX_2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue