linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kim B. Heino" <Kim.Heino@bluegiga.com>
To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] btusb: Raw mode and ACL/SCO data
Date: Wed, 7 Apr 2010 15:53:58 +0300	[thread overview]
Message-ID: <20100407155358.083823f9@bluegiga.com> (raw)

This patch allows sending ACL/SCO packets if device is in RAW mode.
Previously only command packets were allowed.

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>


diff -ur orig/drivers/bluetooth/btusb.c linux-2.6.33.2/drivers/bluetooth/btusb.c
--- orig/drivers/bluetooth/btusb.c	2010-04-02 02:02:33.000000000 +0300
+++ linux-2.6.33.2/drivers/bluetooth/btusb.c	2010-04-07 15:17:55.696672710 +0300
@@ -663,7 +663,9 @@
 		break;
 
 	case HCI_ACLDATA_PKT:
-		if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1)
+		if (!data->bulk_tx_ep ||
+		    (!test_bit(HCI_RAW, &hdev->flags) &&
+		     hdev->conn_hash.acl_num < 1))
 			return -ENODEV;
 
 		urb = usb_alloc_urb(0, GFP_ATOMIC);
@@ -680,7 +682,9 @@
 		break;
 
 	case HCI_SCODATA_PKT:
-		if (!data->isoc_tx_ep || hdev->conn_hash.sco_num < 1)
+		if (!data->isoc_tx_ep ||
+		    (!test_bit(HCI_RAW, &hdev->flags) &&
+		     hdev->conn_hash.sco_num < 1))
 			return -ENODEV;
 
 		urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_ATOMIC);

             reply	other threads:[~2010-04-07 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 12:53 Kim B. Heino [this message]
2010-04-08  4:08 ` [PATCH] btusb: Raw mode and ACL/SCO data Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100407155358.083823f9@bluegiga.com \
    --to=kim.heino@bluegiga.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).