Bluetooth: Allow ACL packets over USB in HCI_RAW mode
PATCH 1/1 Bluetooth: Allow ACL packets over USB in HCI_RAW mode
Removed tests which prevent transmission of ACL packets when the device is in HCI_RAW mode. These tests verified that there are ACL or LE links currently tracked by the HCI connection manager. However, a HCI_RAW mode device does not use the connection manager. In these circumstances, the connection counts will be zero, and thus, transmitted ACL packets dropped.
The acl_num test is actually a vestige of a previous bulk URB scheme that is no longer used by this driver (bulk URBs were not started until at least one ACL connection was created). This was incompatible with some endpoint implementations and was dropped - see commit 43c2e57f94.
The utility of these tests is marginal - currently, the hci tx scheduler cannot send an ACL or LE packet for an untracked connection (except if the device is in HCI_RAW mode).
Lastly, no other transport layer driver enforces these same tests.
--- drivers/bluetooth/btusb.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/bluetooth/btusb.c +1 -2
@@ -693,8 +693,7 @@ static int btusb_send_frame(struct sk_buff *skb)break ;case HCI_ACLDATA_PKT : -if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num <1 && - hdev->conn_hash.le_num <1 )) +if (!data->bulk_tx_ep)return -ENODEV ; urb =usb_alloc_urb (0 ,GFP_ATOMIC );
Signature · 1 line
1.7.4.1
Marcel Holtmann
maintainerHi Peter,
Quoted 13 lines
Removed tests which prevent transmission of ACL packets when the device is in
HCI_RAWmode. These tests verified that there are ACL or LE links currently tracked by the HCI connection manager. However, aHCI_RAWmode device does not use the connection manager. In these circumstances, the connection counts will be zero, and thus, transmitted ACL packets dropped.The
acl_numtest is actually a vestige of a previous bulk URB scheme that is no longer used by this driver (bulk URBs were not started until at least one ACL connection was created). This was incompatible with some endpoint implementations and was dropped - see commit43c2e57f94.
Quoted 5 lines
The utility of these tests is marginal - currently, the hci tx scheduler cannot send an ACL or LE packet for an untracked connection (except if the device is in
HCI_RAWmode).Lastly, no other transport layer driver enforces these same tests.
for kernel patches, we do require the Signed-off-by line.
Gustavo, I am fine with this btw. So Acked-by.
Regards
Marcel
Gustavo Padovan
AppliedHi Peter,
Quoted 13 lines · Peter Hurley
Removed tests which prevent transmission of ACL packets when the device is in
HCI_RAWmode. These tests verified that there are ACL or LE links currently tracked by the HCI connection manager. However, aHCI_RAWmode device does not use the connection manager. In these circumstances, the connection counts will be zero, and thus, transmitted ACL packets dropped.The
acl_numtest is actually a vestige of a previous bulk URB scheme that is no longer used by this driver (bulk URBs were not started until at least one ACL connection was created). This was incompatible with some endpoint implementations and was dropped - see commit43c2e57f94.
Quoted 8 lines
The utility of these tests is marginal - currently, the hci tx scheduler cannot send an ACL or LE packet for an untracked connection (except if the device is in
HCI_RAWmode).Lastly, no other transport layer driver enforces these same tests.
--- drivers/bluetooth/btusb.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Gustavo