diff mbox series

[BlueZ] shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel

Message ID 20230307211756.2581274-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 96ab7296cb92705de8aabcdc14d81386b564d452
Headers show
Series [BlueZ] shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Luiz Augusto von Dentz March 7, 2023, 9:17 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

BT_ATT_OP_MTU_REQ shall only be sent on the so called fixed channel
since EATT channels shall use L2CAP procedure to update its MTU.
---
 src/shared/att.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

bluez.test.bot@gmail.com March 7, 2023, 10:29 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=727615

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      26.32 seconds
BluezMake                     PASS      733.56 seconds
MakeCheck                     PASS      11.37 seconds
MakeDistcheck                 PASS      145.39 seconds
CheckValgrind                 PASS      237.76 seconds
CheckSmatch                   PASS      317.08 seconds
bluezmakeextell               PASS      95.08 seconds
IncrementalBuild              PASS      596.28 seconds
ScanBuild                     PASS      936.72 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org March 11, 2023, 12:40 a.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue,  7 Mar 2023 13:17:56 -0800 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> BT_ATT_OP_MTU_REQ shall only be sent on the so called fixed channel
> since EATT channels shall use L2CAP procedure to update its MTU.
> ---
>  src/shared/att.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Here is the summary with links:
  - [BlueZ] shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=96ab7296cb92

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index b90af93ccbf8..85feead77d0f 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -1588,6 +1588,14 @@  unsigned int bt_att_send(struct bt_att *att, uint8_t opcode,
 
 	op->id = att->next_send_id++;
 
+	/* Always use fixed channel for BT_ATT_OP_MTU_REQ */
+	if (opcode == BT_ATT_OP_MTU_REQ) {
+		struct bt_att_chan *chan = queue_peek_tail(att->chans);
+
+		result = queue_push_tail(chan->queue, op);
+		goto done;
+	}
+
 	/* Add the op to the correct queue based on its type */
 	switch (op->type) {
 	case ATT_OP_TYPE_REQ:
@@ -1606,6 +1614,7 @@  unsigned int bt_att_send(struct bt_att *att, uint8_t opcode,
 		break;
 	}
 
+done:
 	if (!result) {
 		free(op->pdu);
 		free(op);