CHROMIUM: Bluetooth: Remove the assumption on the Adv state in connection event

This removes the assumption where ALL controllers will stop advertising
when initiating a LE connection.

A non-recoverable error would occur in the following scenario.
If kernel does not send a LE set advertise enable command with 0x00 before
sending a LE create connection command, the advertisement can be going
when initiating the connection. However, in the complete event of LE create
connection, the HCI_LE_ADV has been cleared based on the assumption that
controllers will always stop advertising upon establishing connection. So
that kernel ends up with the out-of-sync state due to mis-setting the
HCI_LE_ADV flag which cause the following advertising rescheduling to fail.

TEST=Intentionally skip adding the command to disable advertising before
LE create connection and verify that the HCI_LE_ADV flag does not go out
of sync with the actual advertising status.

Change-Id: I443619909cc3c61a800fcac64f5d715f0ed6438b
Signed-off-by: Miao-chen Chou <>
Reviewed-by: Sonny Sasaka <>
Reviewed-by: Dmitry Grinberg <>
1 file changed