Bluetooth: Add missing HCI defines for LL privacy
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7762578de4
commit
a74feaaf55
2 changed files with 12 additions and 1 deletions
|
@ -215,6 +215,8 @@ struct bt_hci_cmd_hdr {
|
|||
BT_LE_FEAT_BIT_PHY_2M)
|
||||
#define BT_FEAT_LE_PHY_CODED(feat) BT_LE_FEAT_TEST(feat, \
|
||||
BT_LE_FEAT_BIT_PHY_CODED)
|
||||
#define BT_FEAT_LE_PRIVACY(feat) BT_LE_FEAT_TEST(feat, \
|
||||
BT_LE_FEAT_BIT_PRIVACY)
|
||||
|
||||
/* LE States */
|
||||
#define BT_LE_STATES_SLAVE_CONN_ADV(states) (states & 0x0000004000000000)
|
||||
|
@ -746,6 +748,10 @@ struct bt_hci_cp_le_set_adv_enable {
|
|||
#define BT_HCI_LE_SCAN_PASSIVE 0x00
|
||||
#define BT_HCI_LE_SCAN_ACTIVE 0x01
|
||||
|
||||
/* Special scan address types for LL privacy */
|
||||
#define BT_HCI_LE_SCAN_RPA_OR_PUBLIC 0x02
|
||||
#define BT_HCI_LE_SCAN_RPA_OR_RANDOM 0x03
|
||||
|
||||
struct bt_hci_cp_le_set_scan_param {
|
||||
u8_t scan_type;
|
||||
u16_t interval;
|
||||
|
|
|
@ -4355,7 +4355,12 @@ int bt_le_adv_start(const struct bt_le_adv_param *param,
|
|||
return err;
|
||||
}
|
||||
|
||||
set_param->own_addr_type = BT_ADDR_LE_RANDOM;
|
||||
if (BT_FEAT_LE_PRIVACY(bt_dev.le.features)) {
|
||||
set_param->own_addr_type =
|
||||
BT_HCI_OWN_ADDR_RPA_OR_RANDOM;
|
||||
} else {
|
||||
set_param->own_addr_type = BT_ADDR_LE_RANDOM;
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* If Static Random address is used as Identity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue