@@ -5619,9 +5619,6 @@ static void le_ext_adv_legacy_report(struct pdu_data *pdu_data,
5619
5619
#if defined(CONFIG_BT_CTLR_PRIVACY )
5620
5620
uint8_t rl_idx ;
5621
5621
#endif /* CONFIG_BT_CTLR_PRIVACY */
5622
- #if defined(CONFIG_BT_CTLR_EXT_SCAN_FP )
5623
- uint8_t direct_report ;
5624
- #endif /* CONFIG_BT_CTLR_EXT_SCAN_FP */
5625
5622
5626
5623
if (!(event_mask & BT_EVT_MASK_LE_META_EVENT ) ||
5627
5624
!(le_event_mask & BT_EVT_MASK_LE_EXT_ADVERTISING_REPORT )) {
@@ -5635,10 +5632,6 @@ static void le_ext_adv_legacy_report(struct pdu_data *pdu_data,
5635
5632
rl_idx = node_rx -> hdr .rx_ftr .rl_idx ;
5636
5633
#endif /* CONFIG_BT_CTLR_PRIVACY */
5637
5634
5638
- #if defined(CONFIG_BT_CTLR_EXT_SCAN_FP )
5639
- direct_report = node_rx -> hdr .rx_ftr .direct ;
5640
- #endif /* CONFIG_BT_CTLR_EXT_SCAN_FP */
5641
-
5642
5635
#if defined(CONFIG_BT_CTLR_PRIVACY )
5643
5636
if (adv -> tx_addr ) {
5644
5637
/* Update current RPA */
@@ -5691,15 +5684,14 @@ static void le_ext_adv_legacy_report(struct pdu_data *pdu_data,
5691
5684
adv_info -> rssi = rssi ;
5692
5685
adv_info -> interval = 0U ;
5693
5686
5694
- adv_info -> direct_addr .type = adv -> rx_addr ;
5695
- #if defined(CONFIG_BT_CTLR_EXT_SCAN_FP )
5696
- if (direct_report ) {
5697
- memcpy (& adv_info -> direct_addr .a .val [0 ],
5698
- & adv -> direct_ind .tgt_addr [0 ], sizeof (bt_addr_t ));
5699
- } else
5700
- #endif /* CONFIG_BT_CTLR_EXT_SCAN_FP */
5701
- {
5702
- memset (& adv_info -> direct_addr .a .val [0 ], 0 , sizeof (bt_addr_t ));
5687
+ if (adv -> type == PDU_ADV_TYPE_DIRECT_IND ) {
5688
+ adv_info -> direct_addr .type = adv -> rx_addr ;
5689
+ bt_addr_copy (& adv_info -> direct_addr .a ,
5690
+ (void * )adv -> direct_ind .tgt_addr );
5691
+ } else {
5692
+ adv_info -> direct_addr .type = 0U ;
5693
+ (void )memset (adv_info -> direct_addr .a .val , 0U ,
5694
+ sizeof (adv_info -> direct_addr .a .val ));
5703
5695
}
5704
5696
5705
5697
adv_info -> length = data_len ;
0 commit comments