mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-24 01:47:22 +00:00
nimble/ll: Do not check periodic sync on AUX_CHAIN_IND
SyncInfo is only allowed in AUX_ADV_IND so no need to parse it for each AUX_CHAIN_IND.
This commit is contained in:
@@ -97,12 +97,13 @@ struct ble_ll_scan_params
|
||||
#define BLE_LL_AUX_IS_MATCHED 0x08
|
||||
#define BLE_LL_AUX_IS_TARGETA_RESOLVED 0x10
|
||||
|
||||
#define BLE_LL_AUX_FLAG_AUX_RECEIVED 0x01
|
||||
#define BLE_LL_AUX_FLAG_HCI_SENT_ANY 0x02
|
||||
#define BLE_LL_AUX_FLAG_HCI_SENT_COMPLETED 0x04
|
||||
#define BLE_LL_AUX_FLAG_HCI_SENT_TRUNCATED 0x08
|
||||
#define BLE_LL_AUX_FLAG_SCAN_COMPLETE 0x10
|
||||
#define BLE_LL_AUX_FLAG_SCAN_ERROR 0x20
|
||||
#define BLE_LL_AUX_FLAG_AUX_ADV_RECEIVED 0x40
|
||||
#define BLE_LL_AUX_FLAG_AUX_CHAIN_RECEIVED 0x80
|
||||
|
||||
struct ble_ll_aux_data {
|
||||
uint8_t flags;
|
||||
|
||||
@@ -1631,7 +1631,11 @@ ble_ll_scan_update_aux_data(struct ble_mbuf_hdr *ble_hdr, uint8_t *rxbuf,
|
||||
|
||||
aux_data->aux_primary_phy = ble_hdr->rxinfo.phy;
|
||||
} else {
|
||||
aux_data->flags_isr |= BLE_LL_AUX_FLAG_AUX_RECEIVED;
|
||||
if (aux_data->flags_isr & BLE_LL_AUX_FLAG_AUX_ADV_RECEIVED) {
|
||||
aux_data->flags_isr |= BLE_LL_AUX_FLAG_AUX_CHAIN_RECEIVED;
|
||||
} else {
|
||||
aux_data->flags_isr |= BLE_LL_AUX_FLAG_AUX_ADV_RECEIVED;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now parse extended header... */
|
||||
@@ -3110,7 +3114,8 @@ ble_ll_scan_rx_pkt_in_on_aux(uint8_t pdu_type, struct os_mbuf *om,
|
||||
* regardless of scanner filtering. Just make sure we already have AdvA.
|
||||
*/
|
||||
if (ble_ll_sync_enabled() &&
|
||||
((rxbuf[2] >> 6) == BLE_LL_EXT_ADV_MODE_NON_CONN) && addrd->adva) {
|
||||
((rxbuf[2] >> 6) == BLE_LL_EXT_ADV_MODE_NON_CONN) && addrd->adva &&
|
||||
!(aux_data->flags_ll & BLE_LL_AUX_FLAG_AUX_CHAIN_RECEIVED)) {
|
||||
ble_ll_scan_check_periodic_sync(om, hdr, addrd->adva, addrd->adva_type,
|
||||
rxinfo->rpa_index);
|
||||
}
|
||||
@@ -3139,7 +3144,7 @@ ble_ll_scan_rx_pkt_in_on_aux(uint8_t pdu_type, struct os_mbuf *om,
|
||||
}
|
||||
|
||||
/* Ignore if this was just ADV_EXT_IND with AuxPtr, will process aux */
|
||||
if (!(aux_data->flags_ll & BLE_LL_AUX_FLAG_AUX_RECEIVED)) {
|
||||
if (!(aux_data->flags_ll & BLE_LL_AUX_FLAG_AUX_ADV_RECEIVED)) {
|
||||
goto scan_continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user