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.
Signed-off-by: Miao-chen Chou <firstname.lastname@example.org>
Reviewed-by: Sonny Sasaka <email@example.com>
Reviewed-by: Dmitry Grinberg <firstname.lastname@example.org>
1 file changed