diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-03-07 13:00:22 -0800 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-03-07 13:18:46 -0800 |
commit | 96ab7296cb92705de8aabcdc14d81386b564d452 (patch) | |
tree | b4d0325ac800d1c0afefe13081dbeaf852b724c5 /src | |
parent | 57f15616abdef2a7a300018c9d32c723b2f9f743 (diff) | |
download | bluez-96ab7296cb92705de8aabcdc14d81386b564d452.tar.gz |
shared/att: Always queue BT_ATT_OP_MTU_REQ on the fixed channel
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/att.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/att.c b/src/shared/att.c index b90af93cc..85feead77 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); |