zephyr/subsys/bluetooth
Joakim Andersson 8a32c2d967 Bluetooth: host: Fix disconnect priority event handling
Fix issue is host handling of connected and disconnected event.
Since the host wants the disconnected event to be processed as a
priority event as well as in reguler event context while the connected
event is always in reguler event context we can end up in a situation
where the disconnected priority event is processed before the connected
event.

Since the disconnected priority event is there to release unack'ed TX
pending on the connection in case the RX thread is blocked waiting
for TX resources, we need to keep this behavior. Otherwise this would
be a potential deadlock of the RX thread waiting for resources that can
only be released by the RX thread.
When this situation happens we know that there cannot be any pending TX
on this connection so we can safely skip releasing of unack'ed TX.

The second thing the disconnected priority event does is marking the TX
path on the connection as disconnected. We need to do the same in this
situation, so we make sure that the TX path is already marked
disconnected when providing the connected callback to the application.

This fixes a regression from 4be66bd33d.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-25 20:30:48 +03:00
..
audio Bluetooth: Audio: Move NULL check for conn in bt_vcs_discover 2021-05-20 13:02:56 +02:00
common Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
controller Bluetooth: controller: Fix initial empty flag for peripheral 2021-05-25 19:24:55 +02:00
host Bluetooth: host: Fix disconnect priority event handling 2021-05-25 20:30:48 +03:00
mesh Bluetooth: Mesh: Don't reset PB ADV reliable timer on retransmit 2021-05-19 15:54:20 +03:00
services Bluetooth: OTS: Update OTS to use correct reserve define 2021-05-06 14:56:18 +02:00
shell Bluetooth: Audio: Fix VCS client shell missing compile 2021-05-20 13:19:17 +02:00
CMakeLists.txt Bluetooth: Audio: Volume Offset Control Service and Client 2021-03-22 13:05:56 -04:00
Kconfig driver: esp32: add bluetooth support 2021-04-30 16:51:30 -04:00