zephyr/subsys/bluetooth/host
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
..
a2dp_internal.h
a2dp.c
addr.c
adv.c Bluetooth: host: Add check for already enabled in advertising set start 2021-05-25 19:26:23 +02:00
adv.h Bluetooth: host: Refactor out advertiser roles from hci_core to adv 2021-03-15 16:51:51 +02:00
aes_ccm.c Bluetooth: Crypto: Fix naming of params 2021-05-12 12:37:27 +03:00
at.c
at.h
att_internal.h Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
att.c Bluetooth: host: Update ATT to use the new delayable work API 2021-05-05 19:44:09 -04:00
avdtp_internal.h Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
avdtp.c Bluetooth: host: Update AVDTP to use new delayable work API 2021-05-05 19:44:09 -04:00
br.c coccinelle: Remove extra semicolon 2021-03-25 11:35:30 -05:00
br.h Bluetooth: host: Refactor out BR/EDR from hci_core to br 2021-03-15 16:51:51 +02:00
buf.c Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
CMakeLists.txt Bluetooth: Add option to log btsnoops over RTT 2021-05-05 16:03:38 +02:00
conn_internal.h Bluetooth: host: Fix disconnect priority event handling 2021-05-25 20:30:48 +03:00
conn.c Bluetooth: host: Fix disconnect priority event handling 2021-05-25 20:30:48 +03:00
crypto.c
crypto.h
direction_internal.h Bluetooth: host: Add handl HCI_LE_Connectionless_IQ_Report 2021-05-06 16:27:16 +02:00
direction.c Bluetooth: host: Add handl HCI_LE_Connectionless_IQ_Report 2021-05-06 16:27:16 +02:00
ecc.c Bluetooth: Fix callback handling in ECC Public Key generation 2021-04-09 13:27:24 +02:00
ecc.h Bluetooth: Fix callback handling in ECC Public Key generation 2021-04-09 13:27:24 +02:00
gatt_internal.h
gatt.c Bluetooth: host: Remove cancel sync from database hash commit 2021-05-24 23:29:52 -04:00
hci_common.c
hci_core.c Bluetooth: host: Fix disconnect priority event handling 2021-05-25 20:30:48 +03:00
hci_core.h Bluetooth: host: Fix multiple advertisers with different ID support 2021-05-25 19:25:05 +02:00
hci_ecc.c Bluetooth: host: Log security keys needed by sniffer 2021-03-04 14:20:25 +02:00
hci_ecc.h Bluetooth: Refactor ECC emulation supported commands bits 2021-02-18 13:50:22 +01:00
hci_raw_internal.h
hci_raw.c Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
hfp_hf.c
hfp_internal.h
id.c Bluetooth: host: Fix multiple advertisers with different ID support 2021-05-25 19:25:05 +02:00
id.h Bluetooth: host: Update RPA timer to new delayable work API 2021-05-05 19:44:09 -04:00
iso_internal.h Bluetooth: host: Validate big_handle before using it as an array index 2021-03-30 08:17:22 -04:00
iso.c Bluetooth: ISO: Additional text for setting unidir values for the CIG 2021-05-05 14:19:38 +02:00
Kconfig Bluetooth: host: Add option to enable connectionless CTE RX 2021-05-06 16:27:16 +02:00
Kconfig.gatt Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
Kconfig.l2cap Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
keys_br.c Bluetooth: host: Fix compilation error with BR/EDR enabled 2021-03-15 16:51:51 +02:00
keys.c Bluetooth: host: Log security keys needed by sniffer 2021-03-04 14:20:25 +02:00
keys.h Bluetooth: host: Log security keys needed by sniffer 2021-03-04 14:20:25 +02:00
l2cap_br.c Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
l2cap_internal.h Bluetooth: host: Add macros for calculating buffer sizes 2021-05-06 14:56:18 +02:00
l2cap.c Bluetooth: host: Fix L2CAP sent callback on disconnected channel 2021-05-25 19:26:32 +02:00
monitor.c Bluetooth: Add option to log btsnoops over RTT 2021-05-05 16:03:38 +02:00
monitor.h Bluetooth: Add option to log btsnoops over RTT 2021-05-05 16:03:38 +02:00
rfcomm_internal.h Bluetooth: host: Update RFCOMM to new delayable work API 2021-05-05 19:44:09 -04:00
rfcomm.c Bluetooth: Refactor bluetooth buffer configuration for simplification 2021-05-06 14:56:18 +02:00
scan.c bluetooth: Fix cte_type value in periodic adv sync report 2021-05-06 16:27:16 +02:00
scan.h Bluetoot: host: Make get_per_adv_sync to be global function 2021-05-06 16:27:16 +02:00
sdp_internal.h
sdp.c Bluetooth: Align error handling of send functions 2021-04-20 18:20:04 -04:00
settings.c
settings.h
smp_null.c Bluetooth: host: Fix buffer leak trying to send when disconnected 2021-05-03 16:45:53 +02:00
smp.c Bluetooth: host: Update SMP to use new delayable work API 2021-05-05 19:44:09 -04:00
smp.h Bluetooth: SMP: Adds Kconfig for minimum encryption key size 2021-04-02 16:46:18 +03:00
ssp.c Bluetooth: host: Align SSP HCI event handler function names 2021-03-15 16:51:51 +02:00
ssp.h
testing.c
testing.h
uuid.c