Module Name: src
Committed By: plunky
Date: Thu Dec 20 11:13:54 UTC 2012
Modified Files:
src/sys/dev/bluetooth: bthidev.c btmagic.c
Log Message:
when no link-mode is specified, explicitly set a mode of (int)0
otherwise l2cap_setmode() will fail during connection setup
for bthidev.c, this fixes a problem with Microsoft Wedge Touch
mouse (which may not be able to authenticate)
for btmagic.c, include this fix in case somebody tries that
related to PR/47286
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/bluetooth/bthidev.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/bluetooth/btmagic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/bluetooth/bthidev.c
diff -u src/sys/dev/bluetooth/bthidev.c:1.22 src/sys/dev/bluetooth/bthidev.c:1.23
--- src/sys/dev/bluetooth/bthidev.c:1.22 Tue Apr 3 09:32:53 2012
+++ src/sys/dev/bluetooth/bthidev.c Thu Dec 20 11:13:53 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $ */
+/* $NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.22 2012/04/03 09:32:53 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.23 2012/12/20 11:13:53 plunky Exp $");
#include <sys/param.h>
#include <sys/condvar.h>
@@ -241,7 +241,8 @@ bthidev_attach(device_t parent, device_t
aprint_verbose(" %s %s", BTDEVmode,
prop_string_cstring_nocopy(obj));
- }
+ } else
+ sockopt_setint(&sc->sc_mode, 0);
obj = prop_dictionary_get(dict, BTHIDEVcontrolpsm);
if (prop_object_type(obj) == PROP_TYPE_NUMBER) {
Index: src/sys/dev/bluetooth/btmagic.c
diff -u src/sys/dev/bluetooth/btmagic.c:1.3 src/sys/dev/bluetooth/btmagic.c:1.4
--- src/sys/dev/bluetooth/btmagic.c:1.3 Sat Jun 2 21:36:43 2012
+++ src/sys/dev/bluetooth/btmagic.c Thu Dec 20 11:13:53 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: btmagic.c,v 1.3 2012/06/02 21:36:43 dsl Exp $ */
+/* $NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.3 2012/06/02 21:36:43 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btmagic.c,v 1.4 2012/12/20 11:13:53 plunky Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -306,7 +306,8 @@ btmagic_attach(device_t parent, device_t
aprint_verbose(" %s %s", BTDEVmode,
prop_string_cstring_nocopy(obj));
- }
+ } else
+ sockopt_setint(&sc->sc_mode, 0);
aprint_normal(": 3 buttons, W and Z dirs\n");
aprint_naive("\n");