aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:53 -0400
committerMarcel Holtmann <marcel@holtmann.org>2008-07-14 14:13:53 -0400
commit7cb127d5b0e7af7a0afd23785722ca3edab4ceff (patch)
tree67293f99530de5a7c826656143477ee41251750e /net
parentec8dab36e0738d3059980d144e34f16a26bbda7d (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')
-rw-r--r--net/bluetooth/sco.c12
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
58static int disable_esco = 0;
57 59
58static const struct proto_ops sco_sock_ops; 60static 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)
994module_init(sco_init); 999module_init(sco_init);
995module_exit(sco_exit); 1000module_exit(sco_exit);
996 1001
1002module_param(disable_esco, bool, 0644);
1003MODULE_PARM_DESC(disable_esco, "Disable eSCO connection creation");
1004
997MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); 1005MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
998MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION); 1006MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION);
999MODULE_VERSION(VERSION); 1007MODULE_VERSION(VERSION);