Bluetooth: L2CAP: always send from workqueue#67528
Merged
carlescufi merged 2 commits intozephyrproject-rtos:mainfrom Jan 17, 2024
Merged
Bluetooth: L2CAP: always send from workqueue#67528carlescufi merged 2 commits intozephyrproject-rtos:mainfrom
carlescufi merged 2 commits intozephyrproject-rtos:mainfrom
Conversation
This was referenced Jan 12, 2024
alwa-nordic
approved these changes
Jan 12, 2024
alwa-nordic
requested changes
Jan 12, 2024
02c2a86 to
479a92c
Compare
479a92c to
41d9d08
Compare
alwa-nordic
reviewed
Jan 15, 2024
alwa-nordic
reviewed
Jan 15, 2024
alwa-nordic
reviewed
Jan 15, 2024
41d9d08 to
6165d53
Compare
alwa-nordic
approved these changes
Jan 16, 2024
alwa-nordic
previously approved these changes
Jan 16, 2024
Separate most of the param checking in `bt_l2cap_chan_send()`, with the logic in `bt_l2cap_dyn_chan_send()`. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Always pull from the channel queue from the system workqueue context. This simplifies debugging. This also allows us to remove `sent` from the metadata struct. Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
6165d53 to
ab2dbeb
Compare
alwa-nordic
approved these changes
Jan 16, 2024
jhedberg
approved these changes
Jan 16, 2024
Thalley
approved these changes
Jan 16, 2024
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 2, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199). After \zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 2, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199). After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 2, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 3, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 3, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV
added a commit
to PavelVPV/zephyr
that referenced
this pull request
Apr 3, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
kartben
pushed a commit
that referenced
this pull request
Apr 7, 2025
`>= 0` was used when EATT support was implemented (#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR #67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
abrarnasirjaffari
pushed a commit
to abrarnasirjaffari/zephyr
that referenced
this pull request
Apr 9, 2025
`>= 0` was used when EATT support was implemented (zephyrproject-rtos#23199) because `bt_l2cap_chan_send` could return number of bytes sent. After PR zephyrproject-rtos#67528, `bt_l2cap_chan_send` doesn't return amount of bytes sent or any positive value, but either 0 or negative value. Thus `>= 0` is not needed. It also confusing when reading code, especially when the same check is not implemented in other cases where underlying function `chan_send` is used. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Always pull from the channel queue from the system workqueue context.
This simplifies debugging.
This also allows us to remove
sentfrom the metadata struct.Stacked on #67526