@@ -511,9 +511,7 @@ void hci_req_add_le_scan_disable(struct hci_request *req, bool rpa_le_conn)
511
511
}
512
512
513
513
/* Disable address resolution */
514
- if (use_ll_privacy (hdev ) &&
515
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY ) &&
516
- hci_dev_test_flag (hdev , HCI_LL_RPA_RESOLUTION ) && !rpa_le_conn ) {
514
+ if (hci_dev_test_flag (hdev , HCI_LL_RPA_RESOLUTION ) && !rpa_le_conn ) {
517
515
__u8 enable = 0x00 ;
518
516
519
517
hci_req_add (req , HCI_OP_LE_SET_ADDR_RESOLV_ENABLE , 1 , & enable );
@@ -532,8 +530,7 @@ static void del_from_accept_list(struct hci_request *req, bdaddr_t *bdaddr,
532
530
cp .bdaddr_type );
533
531
hci_req_add (req , HCI_OP_LE_DEL_FROM_ACCEPT_LIST , sizeof (cp ), & cp );
534
532
535
- if (use_ll_privacy (req -> hdev ) &&
536
- hci_dev_test_flag (req -> hdev , HCI_ENABLE_LL_PRIVACY )) {
533
+ if (use_ll_privacy (req -> hdev )) {
537
534
struct smp_irk * irk ;
538
535
539
536
irk = hci_find_irk_by_addr (req -> hdev , bdaddr , bdaddr_type );
@@ -586,8 +583,7 @@ static int add_to_accept_list(struct hci_request *req,
586
583
cp .bdaddr_type );
587
584
hci_req_add (req , HCI_OP_LE_ADD_TO_ACCEPT_LIST , sizeof (cp ), & cp );
588
585
589
- if (use_ll_privacy (hdev ) &&
590
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY )) {
586
+ if (use_ll_privacy (hdev )) {
591
587
struct smp_irk * irk ;
592
588
593
589
irk = hci_find_irk_by_addr (hdev , & params -> addr ,
@@ -626,8 +622,7 @@ static u8 update_accept_list(struct hci_request *req)
626
622
*/
627
623
bool allow_rpa = hdev -> suspended ;
628
624
629
- if (use_ll_privacy (hdev ) &&
630
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY ))
625
+ if (use_ll_privacy (hdev ))
631
626
allow_rpa = true;
632
627
633
628
/* Go through the current accept list programmed into the
@@ -716,9 +711,7 @@ static void hci_req_start_scan(struct hci_request *req, u8 type, u16 interval,
716
711
return ;
717
712
}
718
713
719
- if (use_ll_privacy (hdev ) &&
720
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY ) &&
721
- addr_resolv ) {
714
+ if (use_ll_privacy (hdev ) && addr_resolv ) {
722
715
u8 enable = 0x01 ;
723
716
724
717
hci_req_add (req , HCI_OP_LE_SET_ADDR_RESOLV_ENABLE , 1 , & enable );
@@ -1480,8 +1473,7 @@ void hci_req_disable_address_resolution(struct hci_dev *hdev)
1480
1473
struct hci_request req ;
1481
1474
__u8 enable = 0x00 ;
1482
1475
1483
- if (!use_ll_privacy (hdev ) &&
1484
- !hci_dev_test_flag (hdev , HCI_LL_RPA_RESOLUTION ))
1476
+ if (!hci_dev_test_flag (hdev , HCI_LL_RPA_RESOLUTION ))
1485
1477
return ;
1486
1478
1487
1479
hci_req_init (& req , hdev );
@@ -1624,8 +1616,7 @@ int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
1624
1616
/* If Controller supports LL Privacy use own address type is
1625
1617
* 0x03
1626
1618
*/
1627
- if (use_ll_privacy (hdev ) &&
1628
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY ))
1619
+ if (use_ll_privacy (hdev ))
1629
1620
* own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED ;
1630
1621
else
1631
1622
* own_addr_type = ADDR_LE_DEV_RANDOM ;
@@ -2092,8 +2083,7 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy,
2092
2083
/* If Controller supports LL Privacy use own address type is
2093
2084
* 0x03
2094
2085
*/
2095
- if (use_ll_privacy (hdev ) &&
2096
- hci_dev_test_flag (hdev , HCI_ENABLE_LL_PRIVACY ))
2086
+ if (use_ll_privacy (hdev ))
2097
2087
* own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED ;
2098
2088
else
2099
2089
* own_addr_type = ADDR_LE_DEV_RANDOM ;
0 commit comments