Skip to content

Commit c47396a

Browse files
andrzej-kaczmarekcarlescufi
authored andcommitted
Bluetooth: controller: Fix aux scanning for connectable ADV_EXT_IND
When in initiating state we need to handle ADV_EXT_IND as in regular scan sice we always want to scan AUX_ADV_IND in order to be able to connect. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent 37b79ff commit c47396a

File tree

1 file changed

+9
-1
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/lll

1 file changed

+9
-1
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,11 @@ static inline int isr_rx_pdu(struct lll_scan *lll, struct pdu_adv *pdu_adv_rx,
856856
if (0) {
857857
#if defined(CONFIG_BT_CENTRAL)
858858
/* Initiator */
859+
/* Note: connectable ADV_EXT_IND is handled as any other ADV_EXT_IND
860+
* because we need to receive AUX_ADV_IND anyway.
861+
*/
859862
} else if (lll->conn && !lll->conn->master.cancelled &&
863+
(pdu_adv_rx->type != PDU_ADV_TYPE_EXT_IND) &&
860864
isr_scan_init_check(lll, pdu_adv_rx, rl_idx)) {
861865
struct lll_conn *lll_conn;
862866
struct node_rx_ftr *ftr;
@@ -1113,7 +1117,11 @@ static inline int isr_rx_pdu(struct lll_scan *lll, struct pdu_adv *pdu_adv_rx,
11131117
isr_scan_rsp_adva_matches(pdu_adv_rx))) &&
11141118
(pdu_adv_rx->len != 0) &&
11151119
#if defined(CONFIG_BT_CENTRAL)
1116-
!lll->conn) {
1120+
/* Note: ADV_EXT_IND is allowed here even if initiating
1121+
* because we still need to get AUX_ADV_IND as for any
1122+
* other ADV_EXT_IND.
1123+
*/
1124+
(!lll->conn || (pdu_adv_rx->type == PDU_ADV_TYPE_EXT_IND))) {
11171125
#else /* !CONFIG_BT_CENTRAL */
11181126
1) {
11191127
#endif /* !CONFIG_BT_CENTRAL */

0 commit comments

Comments
 (0)