bluetooth pull request for net:
- btusb: Always allow SCO packets for user channel - L2CAP: Fix L2CAP_ECRED_CONN_RSP response -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE7E6oRXp8w05ovYr/9JCA4xAyCykFAme4n/4ZHGx1aXoudm9u LmRlbnR6QGludGVsLmNvbQAKCRD0kIDjEDILKfkuD/95VYt/hpwdqsWsaUUqKkOt MrICrU4x8GqtUSN8I1wnaTQVpjrAPO3BIuBmuy/uzbazVUFp7UYnDgEe6+aCC1ly ZS8Qnppkyt51vFMXRqF6Yn6PM0obBTE99p5vWDih6TPH0cmOsXX0Tyld5txyD/5B XqOfU5+JIoylwRyyL3hlREKr/Va5Zcol93X/ZJSh8nCoTXeFeK04o/7SIGFakaxd h/9xAykAdVN9XU5og4gGE4Lg//2OXrS1oOQq3OpQXs98ftTPMYFJ5Ana2CwpOSS8 sB4ON3++lWPg5bm15D7SgRpfpMlAyKgSNk83gc9d3HwC1zPh4+TeLoDY4P2Zw8bI J7uLsIo3RLiyj1Ofu5HuWIfVbjTkZrB6/TRgsv17/+RC3rja1bDECrplPwS8XAUK sr9PT1Car51/mlW+nPK9QNjpPTsdgw7QRvE9Khlnw/6D6DGGXxFHMmXcUMhhlM/S YlQwYDtw9Caz6uubdkdiBhjnmOXqyxjzdPbmHo6yB1yMOHdqvXNU8wDqW2wAT3ni 36/+f1IFSa1RtNMu+yFjt5QB1ONaezHVMyJ6QwthrYaj+hcYuQxftsaFUBGAoFxu 2Zi/3l8C2hEKbEPrkF17UwFPQhK0lJFpYy2xlTj11ZerWYAcDknNq3SO6qpwlh0f lGPnkfYlQQhvCy+ZX2pdKA== =cRkn -----END PGP SIGNATURE----- Merge tag 'for-net-2025-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - btusb: Always allow SCO packets for user channel - L2CAP: Fix L2CAP_ECRED_CONN_RSP response * tag 'for-net-2025-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response Bluetooth: Always allow SCO packets for user channel ==================== Link: https://patch.msgid.link/20250221154941.2139043-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
fde9836c40
2 changed files with 11 additions and 4 deletions
|
@ -2102,7 +2102,8 @@ static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
|
|||
return submit_or_queue_tx_urb(hdev, urb);
|
||||
|
||||
case HCI_SCODATA_PKT:
|
||||
if (hci_conn_num(hdev, SCO_LINK) < 1)
|
||||
if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
|
||||
hci_conn_num(hdev, SCO_LINK) < 1)
|
||||
return -ENODEV;
|
||||
|
||||
urb = alloc_isoc_urb(hdev, skb);
|
||||
|
@ -2576,7 +2577,8 @@ static int btusb_send_frame_intel(struct hci_dev *hdev, struct sk_buff *skb)
|
|||
return submit_or_queue_tx_urb(hdev, urb);
|
||||
|
||||
case HCI_SCODATA_PKT:
|
||||
if (hci_conn_num(hdev, SCO_LINK) < 1)
|
||||
if (!hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
|
||||
hci_conn_num(hdev, SCO_LINK) < 1)
|
||||
return -ENODEV;
|
||||
|
||||
urb = alloc_isoc_urb(hdev, skb);
|
||||
|
|
|
@ -632,7 +632,8 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
|
|||
test_bit(FLAG_HOLD_HCI_CONN, &chan->flags))
|
||||
hci_conn_hold(conn->hcon);
|
||||
|
||||
list_add(&chan->list, &conn->chan_l);
|
||||
/* Append to the list since the order matters for ECRED */
|
||||
list_add_tail(&chan->list, &conn->chan_l);
|
||||
}
|
||||
|
||||
void l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan)
|
||||
|
@ -3771,7 +3772,11 @@ static void l2cap_ecred_rsp_defer(struct l2cap_chan *chan, void *data)
|
|||
struct l2cap_ecred_conn_rsp *rsp_flex =
|
||||
container_of(&rsp->pdu.rsp, struct l2cap_ecred_conn_rsp, hdr);
|
||||
|
||||
if (test_bit(FLAG_ECRED_CONN_REQ_SENT, &chan->flags))
|
||||
/* Check if channel for outgoing connection or if it wasn't deferred
|
||||
* since in those cases it must be skipped.
|
||||
*/
|
||||
if (test_bit(FLAG_ECRED_CONN_REQ_SENT, &chan->flags) ||
|
||||
!test_and_clear_bit(FLAG_DEFER_SETUP, &chan->flags))
|
||||
return;
|
||||
|
||||
/* Reset ident so only one response is sent */
|
||||
|
|
Loading…
Add table
Reference in a new issue