Bluetooth: L2CAP: Fix send LE flow credits in ACL link
authorZhang Chen <zhangchen01@kylinos.cn>
Thu, 19 Mar 2026 09:32:11 +0000 (17:32 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 25 Mar 2026 19:24:02 +0000 (15:24 -0400)
commitf39f905e55f529b036321220af1ba4f4085564a5
tree2be2ec1eb1fbc1cd4bf56c8026e8e476c64b127a
parentc4ea7d8907cf72b259bf70bd8c2e791e1c4ff70f
Bluetooth: L2CAP: Fix send LE flow credits in ACL link

When the L2CAP channel mode is L2CAP_MODE_ERTM/L2CAP_MODE_STREAMING,
l2cap_publish_rx_avail will be called and le flow credits will be sent in
l2cap_chan_rx_avail, even though the link type is ACL.

The logs in question as follows:
> ACL Data RX: Handle 129 flags 0x02 dlen 12
      L2CAP: Unknown (0x16) ident 4 len 4
        40 00 ed 05
< ACL Data TX: Handle 129 flags 0x00 dlen 10
      L2CAP: Command Reject (0x01) ident 4 len 2
        Reason: Command not understood (0x0000)

Bluetooth: Unknown BR/EDR signaling command 0x16
Bluetooth: Wrong link type (-22)

Fixes: ce60b9231b66 ("Bluetooth: compute LE flow credits based on recvbuf space")
Signed-off-by: Zhang Chen <zhangchen01@kylinos.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/l2cap_core.c