Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/5] android: Fix cutils/log.h stubs
From: Szymon Janc @ 2013-10-18 23:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc
In-Reply-To: <1382137302-17237-1-git-send-email-szymon.janc@gmail.com>

From: Szymon Janc <szymon.janc@tieto.com>

Provide dummy functions that will use macro parameters. This fix
build errors about set-but-not-used used local variables on linux.
---
 android/cutils/log.h | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/android/cutils/log.h b/android/cutils/log.h
index d87da72..7374add 100644
--- a/android/cutils/log.h
+++ b/android/cutils/log.h
@@ -17,11 +17,13 @@
 #ifndef _CUTILS_LOG_H
 #define _CUTILS_LOG_H
 
-#define ALOGV(...)
-#define ALOGD(...)
-#define ALOGI(...)
-#define ALOGW(...)
-#define ALOGE(...)
+static inline void dummy_printf(const char *fmt, ...) { }
+
+#define ALOGV(...) dummy_printf("", __VA_ARGS__)
+#define ALOGD(...) dummy_printf("", __VA_ARGS__)
+#define ALOGI(...) dummy_printf("", __VA_ARGS__)
+#define ALOGW(...) dummy_printf("", __VA_ARGS__)
+#define ALOGE(...) dummy_printf("", __VA_ARGS__)
 #define LOG_ALWAYS_FATAL(...)   do { ALOGE(__VA_ARGS__); exit(1); } while (0)
 
 #endif // _CUTILS_LOG_H
-- 
1.8.4.rc3


^ permalink raw reply related

* [PATCH 0/5] Initial Android IPC
From: Szymon Janc @ 2013-10-18 23:01 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

Hi,

This adds initial code for Android IPC
- only connection establishment
- connecting ipc from daemon to HAL after adapter is initialized
- daemon track HAL lib lifetime and shutdown if socket is closed
- HAL library starts daemon (via android init) and wait for it to
  connect
- HAL library is *not* yet tracking lifetime of daemon

-- 
BR
Szymon Janc

Szymon Janc (5):
  android: Fix cutils/log.h stubs
  android: Define path for HAL communication socket
  android: Connect daemon to HAL library
  android: Make HAL library wait for daemon to connect on init
  android: Remove not needed property_get function form cutils stubs

 android/cutils/log.h        |  12 ++--
 android/cutils/properties.h |  27 ---------
 android/hal-bluetooth.c     | 127 ++++++++++++++++++++++++++++++++++--------
 android/hal-msg.h           |   2 +
 android/main.c              | 133 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 246 insertions(+), 55 deletions(-)

-- 
1.8.4.rc3


^ permalink raw reply

* [PATCH] Bluetooth: Expose current list of long term keys via debugfs
From: Marcel Holtmann @ 2013-10-18 22:56 UTC (permalink / raw)
  To: linux-bluetooth

For debugging purposes expose the current list of long term keys
via debugfs. This file is read-only and limited to root access.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8710d1f..6b1844f 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -385,6 +385,36 @@ static const struct file_operations static_address_fops = {
 	.release	= single_release,
 };
 
+static int long_term_keys_show(struct seq_file *f, void *ptr)
+{
+	struct hci_dev *hdev = f->private;
+	struct list_head *p, *n;
+
+	hci_dev_lock(hdev);
+	list_for_each_safe(p, n, &hdev->link_keys) {
+		struct smp_ltk *ltk = list_entry(p, struct smp_ltk, list);
+		seq_printf(f, "%pMR (type %u) %u %u %u %.4x %*phN %*phN\\n",
+			   &ltk->bdaddr, ltk->bdaddr_type, ltk->authenticated,
+			   ltk->type, ltk->enc_size, __le16_to_cpu(ltk->ediv),
+			   8, ltk->rand, 16, ltk->val);
+	}
+	hci_dev_unlock(hdev);
+
+	return 0;
+}
+
+static int long_term_keys_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, long_term_keys_show, inode->i_private);
+}
+
+static const struct file_operations long_term_keys_fops = {
+	.open		= long_term_keys_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
 /* ---- HCI requests ---- */
 
 static void hci_req_sync_complete(struct hci_dev *hdev, u8 result)
@@ -1121,6 +1151,8 @@ static int __hci_init(struct hci_dev *hdev)
 				  &hdev->le_white_list_size);
 		debugfs_create_file("static_address", 0444, hdev->debugfs,
 				   hdev, &static_address_fops);
+		debugfs_create_file("long_term_keys", 0400, hdev->debugfs,
+				    hdev, &long_term_keys_fops);
 	}
 
 	return 0;
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH] Bluetooth: Expose white list size information in debugfs
From: Marcel Holtmann @ 2013-10-18 22:23 UTC (permalink / raw)
  To: linux-bluetooth

Knowing the white list size information is important for
debugging. So export it via debugfs.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ee946cb..8710d1f 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1116,9 +1116,12 @@ static int __hci_init(struct hci_dev *hdev)
 				    hdev, &sniff_max_interval_fops);
 	}
 
-	if (lmp_le_capable(hdev))
+	if (lmp_le_capable(hdev)) {
+		debugfs_create_u8("white_list_size", 0444, hdev->debugfs,
+				  &hdev->le_white_list_size);
 		debugfs_create_file("static_address", 0444, hdev->debugfs,
 				   hdev, &static_address_fops);
+	}
 
 	return 0;
 }
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH] Bluetooth: Remove bus attribute in favor of hierarchy
From: Marcel Holtmann @ 2013-10-18 19:39 UTC (permalink / raw)
  To: linux-bluetooth

The bus information are exposed in the actual hierarchy and should
not be exposed as attribute.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_sysfs.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 95fc5bb..0b61250 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -131,28 +131,6 @@ void hci_conn_del_sysfs(struct hci_conn *conn)
 	hci_dev_put(hdev);
 }
 
-static inline char *host_bustostr(int bus)
-{
-	switch (bus) {
-	case HCI_VIRTUAL:
-		return "VIRTUAL";
-	case HCI_USB:
-		return "USB";
-	case HCI_PCCARD:
-		return "PCCARD";
-	case HCI_UART:
-		return "UART";
-	case HCI_RS232:
-		return "RS232";
-	case HCI_PCI:
-		return "PCI";
-	case HCI_SDIO:
-		return "SDIO";
-	default:
-		return "UNKNOWN";
-	}
-}
-
 static inline char *host_typetostr(int type)
 {
 	switch (type) {
@@ -165,13 +143,6 @@ static inline char *host_typetostr(int type)
 	}
 }
 
-static ssize_t show_bus(struct device *dev,
-			struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-	return sprintf(buf, "%s\n", host_bustostr(hdev->bus));
-}
-
 static ssize_t show_type(struct device *dev,
 			 struct device_attribute *attr, char *buf)
 {
@@ -200,13 +171,11 @@ static ssize_t show_address(struct device *dev,
 	return sprintf(buf, "%pMR\n", &hdev->bdaddr);
 }
 
-static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
 static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
 
 static struct attribute *bt_host_attrs[] = {
-	&dev_attr_bus.attr,
 	&dev_attr_type.attr,
 	&dev_attr_name.attr,
 	&dev_attr_address.attr,
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH] Bluetooth: ath3k: add support for 0930:021c
From: Robin Kreis @ 2013-10-18 19:20 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <C5C1D96A-A132-47FA-807A-88D4CF1948AC@holtmann.org>

Am Fri, 18 Oct 2013 18:53:25 +0200
schrieb Marcel Holtmann <marcel@holtmann.org>:

> Hi Robin,

Hi Marcel!

> as usual include the relevant parts
> from /sys/kernel/debug/usb/devices here.

There you go:

T:  Bus=03 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 4
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.11
S:  Manufacturer=Linux 3.11.5-1-ARCH xhci_hcd
S:  Product=xHCI Host Controller
S:  SerialNumber=0000:00:14.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  5 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0930 ProdID=021c Rev= 0.02
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

This is with patched ath3k and btusb modules (and working Bluetooth).

Best regards,
Robin

^ permalink raw reply

* [PATCH 7/7] Bluetooth: Expose current list of link keys via debugfs
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

For debugging purposes expose the current list of link keys via
debugfs. This file is read-only and limited to root access.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 3ef5fdd..ee946cb 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -187,6 +187,34 @@ static const struct file_operations inquiry_cache_fops = {
 	.release	= single_release,
 };
 
+static int link_keys_show(struct seq_file *f, void *ptr)
+{
+	struct hci_dev *hdev = f->private;
+	struct list_head *p, *n;
+
+	hci_dev_lock(hdev);
+	list_for_each_safe(p, n, &hdev->link_keys) {
+		struct link_key *key = list_entry(p, struct link_key, list);
+		seq_printf(f, "%pMR %u %*phN %u\n", &key->bdaddr, key->type,
+			   HCI_LINK_KEY_SIZE, key->val, key->pin_len);
+	}
+	hci_dev_unlock(hdev);
+
+	return 0;
+}
+
+static int link_keys_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, link_keys_show, inode->i_private);
+}
+
+static const struct file_operations link_keys_fops = {
+	.open		= link_keys_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
 static int dev_class_show(struct seq_file *f, void *ptr)
 {
 	struct hci_dev *hdev = f->private;
@@ -1067,6 +1095,8 @@ static int __hci_init(struct hci_dev *hdev)
 	if (lmp_bredr_capable(hdev)) {
 		debugfs_create_file("inquiry_cache", 0444, hdev->debugfs,
 				    hdev, &inquiry_cache_fops);
+		debugfs_create_file("link_keys", 0400, hdev->debugfs,
+				    hdev, &link_keys_fops);
 		debugfs_create_file("dev_class", 0444, hdev->debugfs,
 				    hdev, &dev_class_fops);
 		debugfs_create_file("voice_setting", 0444, hdev->debugfs,
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 6/7] Bluetooth: Move export of class of device information into hci_core.c
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

The class of device debugfs information should be directly exported
from hci_core.c and so move them over there.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c  | 26 ++++++++++++++++++++++++++
 net/bluetooth/hci_sysfs.c | 10 ----------
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 1d3c892..3ef5fdd 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -187,6 +187,30 @@ static const struct file_operations inquiry_cache_fops = {
 	.release	= single_release,
 };
 
+static int dev_class_show(struct seq_file *f, void *ptr)
+{
+	struct hci_dev *hdev = f->private;
+
+	hci_dev_lock(hdev);
+	seq_printf(f, "0x%.2x%.2x%.2x\n", hdev->dev_class[2],
+		   hdev->dev_class[1], hdev->dev_class[0]);
+	hci_dev_unlock(hdev);
+
+	return 0;
+}
+
+static int dev_class_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, dev_class_show, inode->i_private);
+}
+
+static const struct file_operations dev_class_fops = {
+	.open		= dev_class_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
 static int voice_setting_get(void *data, u64 *val)
 {
 	struct hci_dev *hdev = data;
@@ -1043,6 +1067,8 @@ static int __hci_init(struct hci_dev *hdev)
 	if (lmp_bredr_capable(hdev)) {
 		debugfs_create_file("inquiry_cache", 0444, hdev->debugfs,
 				    hdev, &inquiry_cache_fops);
+		debugfs_create_file("dev_class", 0444, hdev->debugfs,
+				    hdev, &dev_class_fops);
 		debugfs_create_file("voice_setting", 0444, hdev->debugfs,
 				    hdev, &voice_setting_fops);
 	}
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index acc6a2a..95fc5bb 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -193,14 +193,6 @@ static ssize_t show_name(struct device *dev,
 	return sprintf(buf, "%s\n", name);
 }
 
-static ssize_t show_class(struct device *dev,
-			  struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-	return sprintf(buf, "0x%.2x%.2x%.2x\n", hdev->dev_class[2],
-		       hdev->dev_class[1], hdev->dev_class[0]);
-}
-
 static ssize_t show_address(struct device *dev,
 			    struct device_attribute *attr, char *buf)
 {
@@ -211,14 +203,12 @@ static ssize_t show_address(struct device *dev,
 static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
 static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
-static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
 static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
 
 static struct attribute *bt_host_attrs[] = {
 	&dev_attr_bus.attr,
 	&dev_attr_type.attr,
 	&dev_attr_name.attr,
-	&dev_attr_class.attr,
 	&dev_attr_address.attr,
 	NULL
 };
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 5/7] Bluetooth: Store local version information only during setup phase
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

The local version information from the controller can not change
since they are static. So store them only once during setup
phase and not bother overwriting them every time this command
gets executed.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_event.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c171c07..8480452 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -468,14 +468,13 @@ static void hci_cc_read_local_version(struct hci_dev *hdev, struct sk_buff *skb)
 	if (rp->status)
 		return;
 
-	hdev->hci_ver = rp->hci_ver;
-	hdev->hci_rev = __le16_to_cpu(rp->hci_rev);
-	hdev->lmp_ver = rp->lmp_ver;
-	hdev->manufacturer = __le16_to_cpu(rp->manufacturer);
-	hdev->lmp_subver = __le16_to_cpu(rp->lmp_subver);
-
-	BT_DBG("%s manufacturer 0x%4.4x hci ver %d:%d", hdev->name,
-	       hdev->manufacturer, hdev->hci_ver, hdev->hci_rev);
+	if (test_bit(HCI_SETUP, &hdev->dev_flags)) {
+		hdev->hci_ver = rp->hci_ver;
+		hdev->hci_rev = __le16_to_cpu(rp->hci_rev);
+		hdev->lmp_ver = rp->lmp_ver;
+		hdev->manufacturer = __le16_to_cpu(rp->manufacturer);
+		hdev->lmp_subver = __le16_to_cpu(rp->lmp_subver);
+	}
 }
 
 static void hci_cc_read_local_commands(struct hci_dev *hdev,
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 4/7] Bluetooth: Move manufacturer, hci_ver and hci_rev into hci_core.c
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

Move the debugfs entries for manufacturer, hci_ver and hci_rev into
hci_core.c and use the new helpers for static entries that will not
change at runtime. Once passed the setup procedure, they will stay
fixed.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c  |  4 ++++
 net/bluetooth/hci_sysfs.c | 27 ---------------------------
 2 files changed, 4 insertions(+), 27 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e445f35..1d3c892 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1032,6 +1032,10 @@ static int __hci_init(struct hci_dev *hdev)
 
 	debugfs_create_file("features", 0444, hdev->debugfs, hdev,
 			    &features_fops);
+	debugfs_create_u16("manufacturer", 0444, hdev->debugfs,
+			   &hdev->manufacturer);
+	debugfs_create_u8("hci_version", 0444, hdev->debugfs, &hdev->hci_ver);
+	debugfs_create_u16("hci_revision", 0444, hdev->debugfs, &hdev->hci_rev);
 	debugfs_create_file("blacklist", 0444, hdev->debugfs, hdev,
 			    &blacklist_fops);
 	debugfs_create_file("uuids", 0444, hdev->debugfs, hdev, &uuids_fops);
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index c5aa42f..acc6a2a 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -208,35 +208,11 @@ static ssize_t show_address(struct device *dev,
 	return sprintf(buf, "%pMR\n", &hdev->bdaddr);
 }
 
-static ssize_t show_manufacturer(struct device *dev,
-				 struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-	return sprintf(buf, "%d\n", hdev->manufacturer);
-}
-
-static ssize_t show_hci_version(struct device *dev,
-				struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-	return sprintf(buf, "%d\n", hdev->hci_ver);
-}
-
-static ssize_t show_hci_revision(struct device *dev,
-				 struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-	return sprintf(buf, "%d\n", hdev->hci_rev);
-}
-
 static DEVICE_ATTR(bus, S_IRUGO, show_bus, NULL);
 static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
 static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
-static DEVICE_ATTR(manufacturer, S_IRUGO, show_manufacturer, NULL);
-static DEVICE_ATTR(hci_version, S_IRUGO, show_hci_version, NULL);
-static DEVICE_ATTR(hci_revision, S_IRUGO, show_hci_revision, NULL);
 
 static struct attribute *bt_host_attrs[] = {
 	&dev_attr_bus.attr,
@@ -244,9 +220,6 @@ static struct attribute *bt_host_attrs[] = {
 	&dev_attr_name.attr,
 	&dev_attr_class.attr,
 	&dev_attr_address.attr,
-	&dev_attr_manufacturer.attr,
-	&dev_attr_hci_version.attr,
-	&dev_attr_hci_revision.attr,
 	NULL
 };
 
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 3/7] Bluetooth: Remove debug entry for connection features
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

The debug entry for connection features is incomplete and also does
not work with AMP controllers and physical links. So just remove it.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_sysfs.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 90142ae..c5aa42f 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -37,29 +37,15 @@ static ssize_t show_link_address(struct device *dev,
 	return sprintf(buf, "%pMR\n", &conn->dst);
 }
 
-static ssize_t show_link_features(struct device *dev,
-				  struct device_attribute *attr, char *buf)
-{
-	struct hci_conn *conn = to_hci_conn(dev);
-
-	return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
-		       conn->features[0][0], conn->features[0][1],
-		       conn->features[0][2], conn->features[0][3],
-		       conn->features[0][4], conn->features[0][5],
-		       conn->features[0][6], conn->features[0][7]);
-}
-
 #define LINK_ATTR(_name, _mode, _show, _store) \
 struct device_attribute link_attr_##_name = __ATTR(_name, _mode, _show, _store)
 
 static LINK_ATTR(type, S_IRUGO, show_link_type, NULL);
 static LINK_ATTR(address, S_IRUGO, show_link_address, NULL);
-static LINK_ATTR(features, S_IRUGO, show_link_features, NULL);
 
 static struct attribute *bt_link_attrs[] = {
 	&link_attr_type.attr,
 	&link_attr_address.attr,
-	&link_attr_features.attr,
 	NULL
 };
 
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 2/7] Bluetooth: Add workaround for buggy max_page features page value
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

Some controllers list the max_page value from the extended features
response as 0 when SSP has not yet been enabled. To workaround this
issue, force the max_page value to 1 when SSP support has been
detected.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c  | 8 ++++++++
 net/bluetooth/hci_event.c | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 47fcb49..e445f35 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -834,6 +834,14 @@ static void hci_init2_req(struct hci_request *req, unsigned long opt)
 		hci_req_add(req, HCI_OP_READ_LOCAL_COMMANDS, 0, NULL);
 
 	if (lmp_ssp_capable(hdev)) {
+		/* When SSP is available, then the host features page
+		 * should also be available as well. However some
+		 * controllers list the max_page as 0 as long as SSP
+		 * has not been enabled. To achieve proper debugging
+		 * output, force the minimum max_page to 1 at least.
+		 */
+		hdev->max_page = 0x01;
+
 		if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
 			u8 mode = 0x01;
 			hci_req_add(req, HCI_OP_WRITE_SSP_MODE,
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index e43de98..c171c07 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -555,7 +555,8 @@ static void hci_cc_read_local_ext_features(struct hci_dev *hdev,
 	if (rp->status)
 		return;
 
-	hdev->max_page = rp->max_page;
+	if (hdev->max_page < rp->max_page)
+		hdev->max_page = rp->max_page;
 
 	if (rp->page < HCI_MAX_PAGES)
 		memcpy(hdev->features[rp->page], rp->features, 8);
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH 1/7] Bluetooth: Move HCI device features into hci_core.c
From: Marcel Holtmann @ 2013-10-18 19:04 UTC (permalink / raw)
  To: linux-bluetooth

Move the handling of HCI device features debugfs into hci_core.c and
also extend it with handling of multiple feature pages.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c  | 34 +++++++++++++++++++++++++++++++++-
 net/bluetooth/hci_sysfs.c | 14 --------------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index e8058c3..47fcb49 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -58,6 +58,37 @@ static void hci_notify(struct hci_dev *hdev, int event)
 
 /* ---- HCI debugfs entries ---- */
 
+static int features_show(struct seq_file *f, void *ptr)
+{
+	struct hci_dev *hdev = f->private;
+	u8 p;
+
+	hci_dev_lock(hdev);
+	for (p = 0; p < HCI_MAX_PAGES && p <= hdev->max_page; p++) {
+		seq_printf(f, "Page %u: 0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x "
+			   "0x%2.2x 0x%2.2x 0x%2.2x 0x%2.2x\n", p,
+			   hdev->features[p][0], hdev->features[p][1],
+			   hdev->features[p][2], hdev->features[p][3],
+			   hdev->features[p][4], hdev->features[p][5],
+			   hdev->features[p][6], hdev->features[p][7]);
+	}
+	hci_dev_unlock(hdev);
+
+	return 0;
+}
+
+static int features_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, features_show, inode->i_private);
+}
+
+static const struct file_operations features_fops = {
+	.open		= features_open,
+	.read		= seq_read,
+	.llseek		= seq_lseek,
+	.release	= single_release,
+};
+
 static int blacklist_show(struct seq_file *f, void *p)
 {
 	struct hci_dev *hdev = f->private;
@@ -991,9 +1022,10 @@ static int __hci_init(struct hci_dev *hdev)
 	if (!test_bit(HCI_SETUP, &hdev->dev_flags))
 		return 0;
 
+	debugfs_create_file("features", 0444, hdev->debugfs, hdev,
+			    &features_fops);
 	debugfs_create_file("blacklist", 0444, hdev->debugfs, hdev,
 			    &blacklist_fops);
-
 	debugfs_create_file("uuids", 0444, hdev->debugfs, hdev, &uuids_fops);
 
 	if (lmp_bredr_capable(hdev)) {
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 4fac57c..90142ae 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -222,18 +222,6 @@ static ssize_t show_address(struct device *dev,
 	return sprintf(buf, "%pMR\n", &hdev->bdaddr);
 }
 
-static ssize_t show_features(struct device *dev,
-			     struct device_attribute *attr, char *buf)
-{
-	struct hci_dev *hdev = to_hci_dev(dev);
-
-	return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n",
-		       hdev->features[0][0], hdev->features[0][1],
-		       hdev->features[0][2], hdev->features[0][3],
-		       hdev->features[0][4], hdev->features[0][5],
-		       hdev->features[0][6], hdev->features[0][7]);
-}
-
 static ssize_t show_manufacturer(struct device *dev,
 				 struct device_attribute *attr, char *buf)
 {
@@ -260,7 +248,6 @@ static DEVICE_ATTR(type, S_IRUGO, show_type, NULL);
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
 static DEVICE_ATTR(class, S_IRUGO, show_class, NULL);
 static DEVICE_ATTR(address, S_IRUGO, show_address, NULL);
-static DEVICE_ATTR(features, S_IRUGO, show_features, NULL);
 static DEVICE_ATTR(manufacturer, S_IRUGO, show_manufacturer, NULL);
 static DEVICE_ATTR(hci_version, S_IRUGO, show_hci_version, NULL);
 static DEVICE_ATTR(hci_revision, S_IRUGO, show_hci_revision, NULL);
@@ -271,7 +258,6 @@ static struct attribute *bt_host_attrs[] = {
 	&dev_attr_name.attr,
 	&dev_attr_class.attr,
 	&dev_attr_address.attr,
-	&dev_attr_features.attr,
 	&dev_attr_manufacturer.attr,
 	&dev_attr_hci_version.attr,
 	&dev_attr_hci_revision.attr,
-- 
1.8.3.1


^ permalink raw reply related

* Re: pull request: bluetooth-next 2013-10-14
From: John W. Linville @ 2013-10-18 17:56 UTC (permalink / raw)
  To: Gustavo Padovan, linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20131014235218.GE2305@joana>

On Mon, Oct 14, 2013 at 08:52:18PM -0300, Gustavo Padovan wrote:
> Hi John,
> 
> More patches for 3.12, busy times for Bluetooth. More than a 100 commits since
> the last pull. The bulk of work comes from Johan and Marcel, they are doing
> fixes and improvements all over the Bluetooth subsystem, as the diffstat can
> show.
> 
> Please pull or let me know of any problems! Thanks.
> 
> 	Gustavo
> --
> The following changes since commit 4f3e219d95a3c31b916dcd5e2631c4e440736f79:
> 
>   Bluetooth: Only one command per L2CAP LE signalling is supported (2013-10-03 16:09:59 +0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next for-upstream
> 
> for you to fetch changes up to 4b836f393bd8ed111857a6ee1865e44627266ec6:
> 
>   Bluetooth: Read current IAC LAP on controller setup (2013-10-14 19:31:18 -0300)

Pulling now...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: [PATCH] Bluetooth: ath3k: add support for 0930:021c
From: Marcel Holtmann @ 2013-10-18 16:53 UTC (permalink / raw)
  To: Robin Kreis; +Cc: linux-bluetooth
In-Reply-To: <20131018173536.6f17d7a7@sat>

Hi Robin,

> This is needed for my Toshiba C850-1K0 (AR9462 chip) to discover any
> Bluetooth devices.

as usual include the relevant parts from /sys/kernel/debug/usb/devices here.

> 
> ---
> drivers/bluetooth/ath3k.c | 2 ++
> drivers/bluetooth/btusb.c | 1 +
> 2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 0a327f4..23b813a 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -87,6 +87,7 @@ static struct usb_device_id ath3k_table[] = {
> 	{ USB_DEVICE(0x0CF3, 0xE004) },
> 	{ USB_DEVICE(0x0CF3, 0xE005) },
> 	{ USB_DEVICE(0x0930, 0x0219) },
> +	{ USB_DEVICE(0x0930, 0x021c) },
> 	{ USB_DEVICE(0x0489, 0xe057) },
> 	{ USB_DEVICE(0x13d3, 0x3393) },
> 	{ USB_DEVICE(0x0489, 0xe04e) },
> @@ -129,6 +130,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
> 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
> +	{ USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index f3dfc0a..92fe3c00 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -154,6 +154,7 @@ static struct usb_device_id blacklist_table[] = {
> 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
> +	{ USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
> 	{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },

Regards

Marcel


^ permalink raw reply

* [PATCH] Bluetooth: ath3k: add support for 0930:021c
From: Robin Kreis @ 2013-10-18 15:35 UTC (permalink / raw)
  To: linux-bluetooth

This is needed for my Toshiba C850-1K0 (AR9462 chip) to discover any
Bluetooth devices.

---
 drivers/bluetooth/ath3k.c | 2 ++
 drivers/bluetooth/btusb.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 0a327f4..23b813a 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -87,6 +87,7 @@ static struct usb_device_id ath3k_table[] = {
 	{ USB_DEVICE(0x0CF3, 0xE004) },
 	{ USB_DEVICE(0x0CF3, 0xE005) },
 	{ USB_DEVICE(0x0930, 0x0219) },
+	{ USB_DEVICE(0x0930, 0x021c) },
 	{ USB_DEVICE(0x0489, 0xe057) },
 	{ USB_DEVICE(0x13d3, 0x3393) },
 	{ USB_DEVICE(0x0489, 0xe04e) },
@@ -129,6 +130,7 @@ static struct usb_device_id ath3k_blist_tbl[] = {
 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index f3dfc0a..92fe3c00 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -154,6 +154,7 @@ static struct usb_device_id blacklist_table[] = {
 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x0930, 0x021c), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 },
-- 
1.8.4.1

^ permalink raw reply related

* Re: [PATCH] wiimote: add new documented device IDs
From: Johan Hedberg @ 2013-10-18 14:26 UTC (permalink / raw)
  To: David Herrmann; +Cc: linux-bluetooth
In-Reply-To: <1382105627-22344-1-git-send-email-dh.herrmann@gmail.com>

Hi David,

On Fri, Oct 18, 2013, David Herrmann wrote:
> Add some new device IDs for the LEGO wiimote and Wii U Pro Controllers.
> Also add comments for each ID so we can track them better.
> ---
>  plugins/wiimote.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Applied. Thanks.

Johan

^ permalink raw reply

* Re: [RFC 06/15] Bluetooth: Background scanning
From: Andre Guedes @ 2013-10-18 14:26 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <CA624B73-F848-407A-B7DB-10D564049EAF@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:31 AM, Marcel Holtmann wrote:

> Hi Andre,
>=20
>> This patch adds helpers to trigger and untrigger the background
>> scanning. As long as the number of triggers are greater than zero,
>> we keep the background scanning running. Once the number of triggers
>> reaches zero, it is stopped.
>>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> include/net/bluetooth/hci_core.h |  7 ++++
>> net/bluetooth/hci_core.c         | 83 =
++++++++++++++++++++++++++++++++++++++++
>> 2 files changed, 90 insertions(+)
>>=20
>> diff --git a/include/net/bluetooth/hci_core.h =
b/include/net/bluetooth/hci_core.h
>> index 1e67da5..cb6458a 100644
>> --- a/include/net/bluetooth/hci_core.h
>> +++ b/include/net/bluetooth/hci_core.h
>> @@ -288,6 +288,10 @@ struct hci_dev {
>> 	__u8			scan_rsp_data[HCI_MAX_AD_LENGTH];
>> 	__u8			scan_rsp_data_len;
>>=20
>> +	/* This counter tracks the number of background scanning =
triggers
>> +	 */
>> +	atomic_t		background_scan_cnt;
>> +
>> 	int (*open)(struct hci_dev *hdev);
>> 	int (*close)(struct hci_dev *hdev);
>> 	int (*flush)(struct hci_dev *hdev);
>> @@ -1191,4 +1195,7 @@ void hci_le_start_enc(struct hci_conn *conn, =
__le16 ediv, __u8 rand[8],
>> #define SCO_AIRMODE_CVSD       0x0000
>> #define SCO_AIRMODE_TRANSP     0x0003
>>=20
>> +int hci_trigger_background_scan(struct hci_dev *hdev);
>> +int hci_untrigger_background_scan(struct hci_dev *hdev);
>> +
>=20
> instead of plastering the code with all these places it might be =
better to create a connection parameter hash that actually knows if it =
has any connection parameters stored that need require a passive scan =
now.
>=20
> So instead of trigger and intriguer, the code that adds or removes the =
actual data from our hash can be the trigger itself. Since it knows =
better. And checking after disconnection or other cases becomes a lot =
simpler since you just check the hash if you should be connecting.

I'll follow this approach in v2.

Regards,

Andre=

^ permalink raw reply

* Re: [RFC 07/15] Bluetooth: Refactor hci_disconn_complete_evt
From: Andre Guedes @ 2013-10-18 14:17 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <FDFC9B6A-260D-4A54-83B7-ACCA36DF7B42@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:33 AM, Marcel Holtmann wrote:

> Hi Andrei,
>=20
>> hci_disconn_complete_evt() logic is more complicated than what it
>> should be, making it hard to follow and add new features. This patch
>> does some code refactoring by letting the main flow of the function
>> in first level of function scope.
>>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> net/bluetooth/hci_event.c | 62 =
+++++++++++++++++++++++++----------------------
>> 1 file changed, 33 insertions(+), 29 deletions(-)
>=20
> why this is patch 7/15 is beyond me. These things should go first and =
with a clear commit message why they are are needed. Since if that is =
clear and easily to review, then you do not have to re-base them all the =
time.

I'll move this patch to the beginning of v2 patch set.

>=20
>>=20
>> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
>> index 6c3b193..edb2342 100644
>> --- a/net/bluetooth/hci_event.c
>> +++ b/net/bluetooth/hci_event.c
>> @@ -1781,6 +1781,8 @@ static void hci_disconn_complete_evt(struct =
hci_dev *hdev, struct sk_buff *skb)
>> {
>> 	struct hci_ev_disconn_complete *ev =3D (void *) skb->data;
>> 	struct hci_conn *conn;
>> +	u8 type;
>> +	bool send_mgmt_event =3D false;
>>=20
>> 	BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
>>=20
>> @@ -1790,44 +1792,46 @@ static void hci_disconn_complete_evt(struct =
hci_dev *hdev, struct sk_buff *skb)
>> 	if (!conn)
>> 		goto unlock;
>>=20
>> -	if (ev->status =3D=3D 0)
>> -		conn->state =3D BT_CLOSED;
>> -
>> 	if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags) &&
>> -	    (conn->type =3D=3D ACL_LINK || conn->type =3D=3D LE_LINK)) {
>> -		if (ev->status) {
>> +	    (conn->type =3D=3D ACL_LINK || conn->type =3D=3D LE_LINK))
>> +		send_mgmt_event =3D true;
>> +
>> +	if (ev->status) {
>> +		if (send_mgmt_event)
>> 			mgmt_disconnect_failed(hdev, &conn->dst, =
conn->type,
>> 					       conn->dst_type, =
ev->status);
>> -		} else {
>> -			u8 reason =3D hci_to_mgmt_reason(ev->reason);
>> -
>> -			mgmt_device_disconnected(hdev, &conn->dst, =
conn->type,
>> -						 conn->dst_type, =
reason);
>> -		}
>> +		return;
>> 	}
>=20
> Unfortunately this diff is hard to read. So you need to explain to me =
in plain English why we are doing this and how it is the same.

Yeah, diff is not good. I'll be more verbose on next version.

Regards,

Andre=

^ permalink raw reply

* [PATCH] wiimote: add new documented device IDs
From: David Herrmann @ 2013-10-18 14:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Johan Hedberg, David Herrmann

Add some new device IDs for the LEGO wiimote and Wii U Pro Controllers.
Also add comments for each ID so we can track them better.
---
 plugins/wiimote.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/plugins/wiimote.c b/plugins/wiimote.c
index beda307..6cc21ee 100644
--- a/plugins/wiimote.c
+++ b/plugins/wiimote.c
@@ -59,14 +59,16 @@
  */
 
 static uint16_t wii_ids[][2] = {
-	{ 0x057e, 0x0306 },
-	{ 0x057e, 0x0330 },
+	{ 0x057e, 0x0306 },		/* 1st gen */
+	{ 0x054c, 0x0306 },		/* LEGO wiimote */
+	{ 0x057e, 0x0330 },		/* 2nd gen */
 };
 
 static const char *wii_names[] = {
-	"Nintendo RVL-CNT-01",
-	"Nintendo RVL-CNT-01-TR",
-	"Nintendo RVL-WBC-01",
+	"Nintendo RVL-CNT-01",		/* 1st gen */
+	"Nintendo RVL-CNT-01-TR",	/* 2nd gen */
+	"Nintendo RVL-CNT-01-UC",	/* Wii U Pro Controller */
+	"Nintendo RVL-WBC-01",		/* Balance Board */
 };
 
 static ssize_t wii_pincb(struct btd_adapter *adapter, struct btd_device *device,
-- 
1.8.4


^ permalink raw reply related

* Re: [RFC 11/15] Bluetooth: Temporarily stop background scanning on connection
From: Andre Guedes @ 2013-10-18 14:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <A1459AED-62FA-4042-B021-7A3157823952@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:43 AM, Marcel Holtmann wrote:

> Hi Andre,
>=20
>> Some LE controllers don't support scanning and initiating a =
connection
>> at the same time. So, for those controllers, we should temporarily
>> stop the background scanning and start it again once the connection
>> attempt is finished (successfully or not).
>>=20
>> So this patch introduces the hci_check_background_scan() which checks
>> if the background scanning should be started.
>>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> include/net/bluetooth/hci_core.h |  1 +
>> net/bluetooth/hci_conn.c         | 25 +++++++++++++++++++++++++
>> net/bluetooth/hci_core.c         | 18 ++++++++++++++++++
>> net/bluetooth/hci_event.c        |  6 ++++++
>> 4 files changed, 50 insertions(+)
>>=20
>> diff --git a/include/net/bluetooth/hci_core.h =
b/include/net/bluetooth/hci_core.h
>> index db39eca..017decc 100644
>> --- a/include/net/bluetooth/hci_core.h
>> +++ b/include/net/bluetooth/hci_core.h
>> @@ -1201,5 +1201,6 @@ void hci_le_start_enc(struct hci_conn *conn, =
__le16 ediv, __u8 rand[8],
>>=20
>> int hci_trigger_background_scan(struct hci_dev *hdev);
>> int hci_untrigger_background_scan(struct hci_dev *hdev);
>> +void hci_check_background_scan(struct hci_dev *hdev);
>>=20
>> #endif /* __HCI_CORE_H */
>> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
>> index d64000e..6ae42c2 100644
>> --- a/net/bluetooth/hci_conn.c
>> +++ b/net/bluetooth/hci_conn.c
>> @@ -541,6 +541,18 @@ static void create_le_conn_complete(struct =
hci_dev *hdev, u8 status)
>>=20
>> done:
>> 	hci_dev_unlock(hdev);
>> +
>> +	/* Check the background scanning since it may have been =
temporarily
>> +	 * stopped if the controller doesn't support scanning and =
initiate
>> +	 * state combination.
>> +	 */
>> +	hci_check_background_scan(hdev);
>> +}
>=20
> so what I would do first is assume the controller can not scan while =
being in initiating state or being connected. Make the dead simple only =
a single connection at a time work perfectly. Get the basic =
infrastructure in place.

Ok, I'll do like that.

>=20
>> +
>> +/* Check if controller supports scanning and initiating states =
combination */
>> +static bool is_state_combination_supported(struct hci_dev *hdev)
>> +{
>> +        return (hdev->le_states[2] & BIT(6)) ? true : false;
>> }
>>=20
>=20
> Worst function name ever. Also this should use !!(hdev->le_states & x) =
style.

I'll come up with a better name for this helper and use the !! approach.

>=20
> Also we need this more generic anyway. So get the simple part working =
for dumb controllers and we deal with the rest when that part works.

Ok.

Regards,

Andre=

^ permalink raw reply

* Re: [RFC 07/15] Bluetooth: Refactor hci_disconn_complete_evt
From: Andre Guedes @ 2013-10-18 14:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <FDFC9B6A-260D-4A54-83B7-ACCA36DF7B42@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:33 AM, Marcel Holtmann wrote:

> Hi Andrei,
> 
>> hci_disconn_complete_evt() logic is more complicated than what it
>> should be, making it hard to follow and add new features. This patch
>> does some code refactoring by letting the main flow of the function
>> in first level of function scope.
>> 
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> net/bluetooth/hci_event.c | 62 +++++++++++++++++++++++++----------------------
>> 1 file changed, 33 insertions(+), 29 deletions(-)
> 
> why this is patch 7/15 is beyond me. These things should go first and with a clear commit message why they are are needed. Since if that is clear and easily to review, then you do not have to re-base them all the time.

I'll move this patch to the beginning of the patch set.

> 
>> 
>> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
>> index 6c3b193..edb2342 100644
>> --- a/net/bluetooth/hci_event.c
>> +++ b/net/bluetooth/hci_event.c
>> @@ -1781,6 +1781,8 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
>> {
>> 	struct hci_ev_disconn_complete *ev = (void *) skb->data;
>> 	struct hci_conn *conn;
>> +	u8 type;
>> +	bool send_mgmt_event = false;
>> 
>> 	BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
>> 
>> @@ -1790,44 +1792,46 @@ static void hci_disconn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
>> 	if (!conn)
>> 		goto unlock;
>> 
>> -	if (ev->status == 0)
>> -		conn->state = BT_CLOSED;
>> -
>> 	if (test_and_clear_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags) &&
>> -	    (conn->type == ACL_LINK || conn->type == LE_LINK)) {
>> -		if (ev->status) {
>> +	    (conn->type == ACL_LINK || conn->type == LE_LINK))
>> +		send_mgmt_event = true;
>> +
>> +	if (ev->status) {
>> +		if (send_mgmt_event)
>> 			mgmt_disconnect_failed(hdev, &conn->dst, conn->type,
>> 					       conn->dst_type, ev->status);
>> -		} else {
>> -			u8 reason = hci_to_mgmt_reason(ev->reason);
>> -
>> -			mgmt_device_disconnected(hdev, &conn->dst, conn->type,
>> -						 conn->dst_type, reason);
>> -		}
>> +		return;
>> 	}
> 
> Unfortunately this diff is hard to read. So you need to explain to me in plain English why we are doing this and how it is the same.

Yes, this diff is not good. I'll be more verbose in the commit message.

Regards,

Andre


^ permalink raw reply

* Re: [RFC 15/15] Bluetooth: Auto connection and power off/on
From: Andre Guedes @ 2013-10-18 14:08 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <2BA6ACEE-8390-48E0-883A-73738551FDDD@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 7:55 AM, Marcel Holtmann wrote:

> Hi Andre,
>=20
>> If hdev is closed (e.g. Mgmt power off command, RFKILL or controller =
is
>> reset), the established connections are dropped and no Disconnection
>> Complete Event is sent to host. This way, the background scan is not
>> triggered when devices configured with BT_AUTO_CONN_ALWAYS option
>> disconnect. To fix this issue, before dropping the LE connections, we
>> trigger the background scan for each connected device that requires
>> BT_AUTO_CONN_ALWAYS auto connection.
>>=20
>> Moreover, once the adapter is powered on, we should start the =
background
>> scan if we have triggers registered. This way, we keep the background
>> scan running after a power off and power on sequence.
>=20
> these are actually two independent patches.

I'll split this in two patches.

>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> net/bluetooth/hci_conn.c | 35 +++++++++++++++++++++++++++++++++++
>> net/bluetooth/hci_core.c |  2 ++
>> 2 files changed, 37 insertions(+)
>>=20
>> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
>> index 5caf13b..66823eb 100644
>> --- a/net/bluetooth/hci_conn.c
>> +++ b/net/bluetooth/hci_conn.c
>> @@ -954,6 +954,31 @@ timer:
>> 				   =
msecs_to_jiffies(hdev->idle_timeout));
>> }
>>=20
>> +static void le_conn_drop_fixup(struct hci_conn *conn)
>> +{
>> +	struct hci_dev *hdev =3D conn->hdev;
>> +	struct hci_conn_param *param;
>> +	int err;
>> +
>> +	param =3D hci_find_conn_param(hdev, &conn->dst, conn->dst_type);
>> +	if (!param)
>> +		return;
>> +
>> +	if (param->auto_connect !=3D BT_AUTO_CONN_ALWAYS)
>> +		goto done;
>> +
>> +	err =3D hci_trigger_background_scan(hdev);
>> +	if (err) {
>> +		BT_ERR("Failed to trigger background scanning: %d", =
err);
>> +		goto done;
>> +	}
>> +
>> +	param->bg_scan_triggered =3D true;
>> +
>> +done:
>> +	hci_conn_param_put(param);
>> +}
>> +
>> /* Drop all connection on the device */
>> void hci_conn_hash_flush(struct hci_dev *hdev)
>> {
>> @@ -963,6 +988,16 @@ void hci_conn_hash_flush(struct hci_dev *hdev)
>> 	BT_DBG("hdev %s", hdev->name);
>>=20
>> 	list_for_each_entry_safe(c, n, &h->list, list) {
>> +		/* If this is a LE connection in connected state we =
should do
>> +		 * some fixup before dropping this connection. Since no
>> +		 * Disconnection Complete Event will be sent to the =
host, we
>> +		 * have to trigger the background scan in case this is a
>> +		 * BT_AUTO_CONN_ALWAYS device. This is handled by the =
le_conn_
>> +		 * drop_fixup() helper.
>> +		 */
>> +		if (c->type =3D=3D LE_LINK && c->state =3D=3D =
BT_CONNECTED)
>> +			le_conn_drop_fixup(c);
>> +
>> 		c->state =3D BT_CLOSED;
>=20
> I do not like this part. We already have the case where we need to =
re-enable advertising after a connection drops. So this should be in a =
common place. I do not want to hack this in into all kinds of places.

Ok, I'll follow the same approach we have for re-enable advertising.

Regards,

Andre=

^ permalink raw reply

* Re: [RFC 05/15] Bluetooth: Use connection parameters if any
From: Andre Guedes @ 2013-10-18 14:07 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <06808003-600D-45E8-88FD-E8F766DCFBA4@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:27 AM, Marcel Holtmann wrote:

> Hi Andre,
>=20
>> This patch changes hci_create_le_conn() so it uses the connection
>> parameters specified by the user. If no parameters were configured,
>> we use the default values.
>>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> net/bluetooth/hci_conn.c | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>=20
>> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
>> index 4e72650..d64000e 100644
>> --- a/net/bluetooth/hci_conn.c
>> +++ b/net/bluetooth/hci_conn.c
>> @@ -548,6 +548,7 @@ static int hci_create_le_conn(struct hci_conn =
*conn)
>> 	struct hci_dev *hdev =3D conn->hdev;
>> 	struct hci_cp_le_create_conn cp;
>> 	struct hci_request req;
>> +	struct hci_conn_param *param;
>> 	int err;
>>=20
>> 	hci_req_init(&req, hdev);
>> @@ -558,11 +559,18 @@ static int hci_create_le_conn(struct hci_conn =
*conn)
>> 	bacpy(&cp.peer_addr, &conn->dst);
>> 	cp.peer_addr_type =3D conn->dst_type;
>> 	cp.own_address_type =3D conn->src_type;
>> -	cp.conn_interval_min =3D __constant_cpu_to_le16(0x0028);
>> -	cp.conn_interval_max =3D __constant_cpu_to_le16(0x0038);
>> 	cp.supervision_timeout =3D __constant_cpu_to_le16(0x002a);
>> 	cp.min_ce_len =3D __constant_cpu_to_le16(0x0000);
>> 	cp.max_ce_len =3D __constant_cpu_to_le16(0x0000);
>> +	param =3D hci_find_conn_param(hdev, &conn->dst, conn->dst_type);
>> +	if (param) {
>> +		cp.conn_interval_min =3D =
cpu_to_le16(param->min_conn_interval);
>> +		cp.conn_interval_max =3D =
cpu_to_le16(param->max_conn_interval);
>> +		hci_conn_param_put(param);
>> +	} else {
>> +		cp.conn_interval_min =3D __constant_cpu_to_le16(0x0028);
>> +		cp.conn_interval_max =3D __constant_cpu_to_le16(0x0038);
>> +	}
>> 	hci_req_add(&req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp);
>=20
> so this is part that I do not like at all. We already have the =
hci_conn connection object at this point. So why are these values not =
stored in there. In the end we are paying the price for code like this =
where we have to check if parameters exists, if they do apply them, if =
not use the defaults.

>=20
> I did change the code back from the check for public address and what =
own address type to use. Since it turned out that later on you actually =
need to what you where doing.
>=20
> And this is the same thing in the future. We actually want to know =
what connection parameters we current used. In case we have to update =
them or they change while the connection is on-going.

Sure, I'll save these parameters in hci_conn object.

Regards,

Andre=

^ permalink raw reply

* Re: [RFC 02/15] Bluetooth: Mgmt command for adding connection parameters
From: Andre Guedes @ 2013-10-18 14:07 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <BA029FAA-265C-47A8-953F-95E6B504941B@holtmann.org>

Hi Marcel,

On Oct 17, 2013, at 6:22 AM, Marcel Holtmann wrote:

> Hi Andre,
>=20
>> This patch introduces a new Mgmt command (MGMT_OP_ADD_CONN_PARAM) =
which
>> adds the connection parameters to controller's connection parameters
>> list. These parameters will be used by the kernel when it establishes =
a
>> connection with the given device.
>>=20
>> This patch also moves the 'auto_connect' enum from hci_core.h to
>> bluetooth.h since the will accessed used by userspace in order to
>> send the MGMT_OP_ADD_CONN_PARAM command.
>=20
> the comment about userspace makes no sense. And is not an argument to =
move the enum anywhere. Also if these are mgmt "modes" or "types" then =
they should be somewhere else and not in bluetooth.h.

Ok, so for now I'll leave these macros in hci_core.h.

>=20
>>=20
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>> include/net/bluetooth/bluetooth.h |  6 ++++++
>> include/net/bluetooth/hci_core.h  |  6 +-----
>> include/net/bluetooth/mgmt.h      |  9 +++++++++
>> net/bluetooth/mgmt.c              | 35 =
+++++++++++++++++++++++++++++++++++
>> 4 files changed, 51 insertions(+), 5 deletions(-)
>>=20
>> diff --git a/include/net/bluetooth/bluetooth.h =
b/include/net/bluetooth/bluetooth.h
>> index bf2ddff..8509520 100644
>> --- a/include/net/bluetooth/bluetooth.h
>> +++ b/include/net/bluetooth/bluetooth.h
>> @@ -354,4 +354,10 @@ void sco_exit(void);
>>=20
>> void bt_sock_reclassify_lock(struct sock *sk, int proto);
>>=20
>> +enum {
>> +	BT_AUTO_CONN_DISABLED,
>> +	BT_AUTO_CONN_ALWAYS,
>> +	BT_AUTO_CONN_LINK_LOSS,
>> +};
>> +
>> #endif /* __BLUETOOTH_H */
>> diff --git a/include/net/bluetooth/hci_core.h =
b/include/net/bluetooth/hci_core.h
>> index 5052bf0..98be273 100644
>> --- a/include/net/bluetooth/hci_core.h
>> +++ b/include/net/bluetooth/hci_core.h
>> @@ -376,11 +376,7 @@ struct hci_conn_param {
>> 	bdaddr_t addr;
>> 	u8 addr_type;
>>=20
>> -	enum {
>> -		HCI_AUTO_CONN_DISABLED,
>> -		HCI_AUTO_CONN_ALWAYS,
>> -		HCI_AUTO_CONN_LINK_LOSS,
>> -	} auto_connect;
>> +	u8 auto_connect;
>>=20
>> 	u16 min_conn_interval;
>> 	u16 max_conn_interval;
>> diff --git a/include/net/bluetooth/mgmt.h =
b/include/net/bluetooth/mgmt.h
>> index 518c5c8..ed689b5 100644
>> --- a/include/net/bluetooth/mgmt.h
>> +++ b/include/net/bluetooth/mgmt.h
>> @@ -369,6 +369,15 @@ struct mgmt_cp_set_scan_params {
>> } __packed;
>> #define MGMT_SET_SCAN_PARAMS_SIZE	4
>>=20
>> +#define MGMT_OP_ADD_CONN_PARAM		0x002D
>> +struct mgmt_cp_add_conn_param {
>> +	struct mgmt_addr_info addr;
>> +	__u8 auto_connect;
>> +	__le16 min_conn_interval;
>> +	__le16 max_conn_interval;
>> +} __packed;
>> +#define MGMT_ADD_CONN_PARAM_SIZE	(MGMT_ADDR_INFO_SIZE + 5)
>> +
>> #define MGMT_EV_CMD_COMPLETE		0x0001
>> struct mgmt_ev_cmd_complete {
>> 	__le16	opcode;
>> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
>> index a727b47..5d1a2e8 100644
>> --- a/net/bluetooth/mgmt.c
>> +++ b/net/bluetooth/mgmt.c
>> @@ -79,6 +79,7 @@ static const u16 mgmt_commands[] =3D {
>> 	MGMT_OP_SET_BREDR,
>> 	MGMT_OP_SET_STATIC_ADDRESS,
>> 	MGMT_OP_SET_SCAN_PARAMS,
>> +	MGMT_OP_ADD_CONN_PARAM,
>> };
>=20
> So my 2nd patch wouldn't have been the mgmt command. I would have put =
all the cleanup and infrastructure changes in first. And I would have =
turned the connect() into the first user with a mode of "connect once" =
and default connection parameters.
>=20
> This clearly shows later on where all this magic handling comes into =
place. But in the end, the connect() call is just a connect once type of =
passive scanning. And maybe with learned connection slave interval =
values from advertising data during the scanning.

In v2, I'll put this patch after the infrastructure changes.

I didn't know we want to change connect() behavior. What is the issue we =
are trying address with this changing?

>=20
> The other problem that I have is that we can never update the =
parameters for a device. We need to remove them and re-add them. That is =
just not a good idea since we will almost certainly learn about updated =
values here. And maybe even change the mode of a device.

These connection parameters and auto connection policy is pretty much =
static values. We know ahead configuring the kernel what profiles the =
device supports. And the profiles the device supports don't dynamically =
change.

>=20
> In general just having one Update Connection Parameters call might be =
better. The kernel can happily just expire values from connection once =
or disabled by itself. So this needs a bit more discussion. Doing the =
mgmt interface last would allow to get all the other patches merged. =
Otherwise you are stuck on the mgmt part until we figure that out.

Sure we need more discussion on this. As I said, I'll move this mgmt =
command patches to the end of this patch set.

>=20
>> static const u16 mgmt_events[] =3D {
>> @@ -4025,6 +4026,39 @@ static int load_long_term_keys(struct sock =
*sk, struct hci_dev *hdev,
>> 	return err;
>> }
>>=20
>> +static int add_conn_param(struct sock *sk, struct hci_dev *hdev, =
void *cp_data,
>> +			  u16 len)
>> +{
>> +	struct mgmt_cp_add_conn_param *cp =3D cp_data;
>> +	u8 status;
>> +	u8 addr_type;
>> +
>> +	if (cp->addr.type =3D=3D BDADDR_BREDR)
>> +		return cmd_complete(sk, hdev->id, =
MGMT_OP_ADD_CONN_PARAM,
>> +				    MGMT_STATUS_NOT_SUPPORTED, NULL, 0);
>=20
> Instead of checking for BDADDR_BREDR it would be better to check for =
!bdaddr_type_is_le().
>=20
> I really want everybody to get into the habit to do proper input =
validation. Not the half backed thing. That is why mgmt-tester can catch =
these kind of things easily and repeatedly.

I'll replace this with !bdaddr_type_is_le().

>=20
>> +
>> +	status =3D mgmt_le_support(hdev);
>> +	if (status)
>> +		return cmd_complete(sk, hdev->id, =
MGMT_OP_ADD_CONN_PARAM,
>> +				    status, NULL, 0);
>> +
>> +	if (cp->addr.type =3D=3D BDADDR_LE_PUBLIC)
>> +		addr_type =3D ADDR_LE_DEV_PUBLIC;
>> +	else
>> +		addr_type =3D ADDR_LE_DEV_RANDOM;
>> +
>> +	if (hci_add_conn_param(hdev, &cp->addr.bdaddr, addr_type,
>> +			       cp->auto_connect,
>> +			       __le16_to_cpu(cp->min_conn_interval),
>> +			       __le16_to_cpu(cp->max_conn_interval)))
>> +		status =3D MGMT_STATUS_FAILED;
>> +	else
>> +		status =3D MGMT_STATUS_SUCCESS;
>> +
>> +	return cmd_complete(sk, hdev->id, MGMT_OP_ADD_CONN_PARAM, =
status,
>> +			    NULL, 0);
>> +}
>> +
>> static const struct mgmt_handler {
>> 	int (*func) (struct sock *sk, struct hci_dev *hdev, void *data,
>> 		     u16 data_len);
>> @@ -4076,6 +4110,7 @@ static const struct mgmt_handler {
>> 	{ set_bredr,              false, MGMT_SETTING_SIZE },
>> 	{ set_static_address,     false, MGMT_SET_STATIC_ADDRESS_SIZE },
>> 	{ set_scan_params,        false, MGMT_SET_SCAN_PARAMS_SIZE },
>> +	{ add_conn_param,         false, MGMT_ADD_CONN_PARAM_SIZE },
>> };
>>=20
>=20
> And btw. it is always plural "params". It is not single parameter.

I'll fix it.

Regards,

Andre

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox