Skip to content

Commit

Permalink
[Bluetooth] Add option to disable eSCO connection creation
Browse files Browse the repository at this point in the history
It has been reported that some eSCO capable headsets are not able to
connect properly. The real reason for this is unclear at the moment. So
for easier testing add a module parameter to disable eSCO connection
creation.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Marcel Holtmann committed Jul 14, 2008
1 parent ec8dab3 commit 7cb127d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
#define BT_DBG(D...)
#endif

#define VERSION "0.5"
#define VERSION "0.6"

static int disable_esco = 0;

static const struct proto_ops sco_sock_ops;

Expand Down Expand Up @@ -193,7 +195,10 @@ static int sco_connect(struct sock *sk)

err = -ENOMEM;

type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK;
if (lmp_esco_capable(hdev) && !disable_esco)
type = ESCO_LINK;
else
type = SCO_LINK;

hcon = hci_connect(hdev, type, dst);
if (!hcon)
Expand Down Expand Up @@ -994,6 +999,9 @@ static void __exit sco_exit(void)
module_init(sco_init);
module_exit(sco_exit);

module_param(disable_esco, bool, 0644);
MODULE_PARM_DESC(disable_esco, "Disable eSCO connection creation");

MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION);
MODULE_VERSION(VERSION);
Expand Down

0 comments on commit 7cb127d

Please sign in to comment.