Skip to contentSkip to conversation

shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Mar 7, 2023 – Mar 11, 2023 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel

From: Luiz Augusto von Dentz <[email protected]>

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(+)
src/shared/att.c +9 -0
index b90af93ccbf8..85feead77d0f 100644
@@ -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);
Signature · 1 line
2.39.2
#1 lore raw

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

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 7 lines · On Tue, 7 Mar 2023 13:17:56 -0800 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html