diff options
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r-- | net/bluetooth/sco.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index b0d487e2db20..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) |
@@ -921,7 +926,7 @@ static const struct proto_ops sco_sock_ops = { | |||
921 | .sendmsg = sco_sock_sendmsg, | 926 | .sendmsg = sco_sock_sendmsg, |
922 | .recvmsg = bt_sock_recvmsg, | 927 | .recvmsg = bt_sock_recvmsg, |
923 | .poll = bt_sock_poll, | 928 | .poll = bt_sock_poll, |
924 | .ioctl = sock_no_ioctl, | 929 | .ioctl = bt_sock_ioctl, |
925 | .mmap = sock_no_mmap, | 930 | .mmap = sock_no_mmap, |
926 | .socketpair = sock_no_socketpair, | 931 | .socketpair = sock_no_socketpair, |
927 | .shutdown = sock_no_shutdown, | 932 | .shutdown = sock_no_shutdown, |
@@ -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); |