Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport v3.7-branch] Bluetooth: L2CAP: Set NULL callback for PDUs #76770

Merged
merged 6 commits into from
Aug 9, 2024

Conversation

zephyrbot
Copy link
Collaborator

@zephyrbot zephyrbot commented Aug 7, 2024

Backport 1c65103~6..1c65103 from #76489.

Fixes #76738

Print user_data and callback pointers.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit d02a13d)
Werror fails the build on that function.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 5c6cd27)
Storing stuff in user_data? That's a paddlin'

We have been debugging issue after issue because ownership of this
"user" data is not clearly defined. Now it is. L2CAP owns the user_data
field entirely, as soon as `send()` is called.

Also add a warning and retval using CHECKIF.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit ea94499)
Modify the test so it checks that user_data is used and then cleared by
the stack.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 08706f9)
It's already done.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
(cherry picked from commit 8d7c1bc)
It was not being set, and thus if the user_data contained garbage from
before, then conn.c would attempt to call that garbage.

Static channels don't have this issue, as every "SDU" fits into one PDU.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Co-authored-by: Huajiang Zheng <nxf88597@lsv051208.swis.nl-cdc01.nxp.com>
(cherry picked from commit 1c65103)
@zephyrbot zephyrbot added Backport Backport PR and backport failure issues area: Bluetooth Host Bluetooth Host (excluding BR/EDR) platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim area: Bluetooth labels Aug 7, 2024
@nashif nashif merged commit a58f407 into v3.7-branch Aug 9, 2024
33 checks passed
@nashif nashif deleted the backport-76489-to-v3.7-branch branch August 9, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth Backport Backport PR and backport failure issues platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants