Bluetooth: L2CAP: Process channel with fixed PSM on RX thread
This leaves only channels on the dynamic range to be offloaded to the system queue so ATT and EATT handling are handling in the same context. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
f7586b0b04
commit
0473b436b5
1 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,8 @@
|
|||
#define L2CAP_LE_PSM_FIXED_END 0x007f
|
||||
#define L2CAP_LE_PSM_DYN_START 0x0080
|
||||
#define L2CAP_LE_PSM_DYN_END 0x00ff
|
||||
#define L2CAP_LE_PSM_IS_DYN(_psm) \
|
||||
(_psm >= L2CAP_LE_PSM_DYN_START && _psm <= L2CAP_LE_PSM_DYN_END)
|
||||
|
||||
#define L2CAP_CONN_TIMEOUT K_SECONDS(40)
|
||||
#define L2CAP_DISC_TIMEOUT K_SECONDS(2)
|
||||
|
@ -2178,6 +2180,12 @@ static void l2cap_chan_recv_queue(struct bt_l2cap_le_chan *chan,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!L2CAP_LE_PSM_IS_DYN(chan->chan.psm)) {
|
||||
l2cap_chan_le_recv(chan, buf);
|
||||
net_buf_unref(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
net_buf_put(&chan->rx_queue, buf);
|
||||
k_work_submit(&chan->rx_work);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue