diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 14:13:53 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 14:13:53 -0400 |
commit | 7cb127d5b0e7af7a0afd23785722ca3edab4ceff (patch) | |
tree | 67293f99530de5a7c826656143477ee41251750e /net/bluetooth | |
parent | ec8dab36e0738d3059980d144e34f16a26bbda7d (diff) |
[Bluetooth] Add option to disable eSCO connection creation
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/sco.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 1ad226c9788c..8cda49874868 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -53,7 +53,9 @@ | |||
53 | #define BT_DBG(D...) | 53 | #define BT_DBG(D...) |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define VERSION "0.5" | 56 | #define VERSION "0.6" |
57 | |||
58 | static int disable_esco = 0; | ||
57 | 59 | ||
58 | static const struct proto_ops sco_sock_ops; | 60 | static const struct proto_ops sco_sock_ops; |
59 | 61 | ||
@@ -193,7 +195,10 @@ static int sco_connect(struct sock *sk) | |||
193 | 195 | ||
194 | err = -ENOMEM; | 196 | err = -ENOMEM; |
195 | 197 | ||
196 | type = lmp_esco_capable(hdev) ? ESCO_LINK : SCO_LINK; | 198 | if (lmp_esco_capable(hdev) && !disable_esco) |
199 | type = ESCO_LINK; | ||
200 | else | ||
201 | type = SCO_LINK; | ||
197 | 202 | ||
198 | hcon = hci_connect(hdev, type, dst); | 203 | hcon = hci_connect(hdev, type, dst); |
199 | if (!hcon) | 204 | if (!hcon) |
@@ -994,6 +999,9 @@ static void __exit sco_exit(void) | |||
994 | module_init(sco_init); | 999 | module_init(sco_init); |
995 | module_exit(sco_exit); | 1000 | module_exit(sco_exit); |
996 | 1001 | ||
1002 | module_param(disable_esco, bool, 0644); | ||
1003 | MODULE_PARM_DESC(disable_esco, "Disable eSCO connection creation"); | ||
1004 | |||
997 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 1005 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); |
998 | MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION); | 1006 | MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION); |
999 | MODULE_VERSION(VERSION); | 1007 | MODULE_VERSION(VERSION); |