Skip to content

Commit 031aa8c

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: controller: Ensure only initiating on selected PHY
Reset the scanning context for the PHY not selected in the Extended Create Connection command. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 0b04dd7 commit 031aa8c

File tree

1 file changed

+13
-5
lines changed
  • subsys/bluetooth/controller/hci

1 file changed

+13
-5
lines changed

subsys/bluetooth/controller/hci/hci.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,12 +3141,20 @@ static void le_ext_create_connection(struct net_buf *buf, struct net_buf **evt)
31413141
conn_latency,
31423142
supervision_timeout,
31433143
phy);
3144-
if (status) {
3145-
*evt = cmd_status(status);
3146-
return;
3147-
}
3148-
31493144
p++;
3145+
} else {
3146+
uint8_t type;
3147+
3148+
type = (phy << 1);
3149+
/* NOTE: Pass invalid interval value to not start
3150+
* scanning using this scan instance.
3151+
*/
3152+
status = ll_scan_params_set(type, 0, 0, 0, 0);
3153+
}
3154+
3155+
if (status) {
3156+
*evt = cmd_status(status);
3157+
return;
31503158
}
31513159

31523160
phys_bitmask &= (phys_bitmask - 1);

0 commit comments

Comments
 (0)