<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.bluez.kernel">
    <title>gmane.linux.bluez.kernel</title>
    <link>http://blog.gmane.org/gmane.linux.bluez.kernel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36660"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36647"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36643"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36635"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36634"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36633"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36628"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36622"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36614"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36586"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36583"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36577"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36563"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36550"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36525"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36507"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36506"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36505"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36503"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.bluez.kernel/36494"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36660">
    <title>[PATCH 1/5] Bluetooth: Support for loading broadcom patchram firmware</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36660</link>
    <description>&lt;pre&gt;From: Wen-chien Jesse Sung &amp;lt;jesse.sung-Z7WLFzj8eWMS+FvcfC7Uqw&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

There is an user space firmware loading tool which can be found at
http://marc.info/?l=linux-bluetooth&amp;amp;m=132039175324993&amp;amp;w=2

The supported firmware is in hcd format, which is a collection of
hci commands. The download process would be:
1. reset command
2. download command
3. firmware image in hcd file
4. reset command

/sys/kernel/debug/usb/devices before loading firmware:
T:  Bus=01 Lev=02 Prnt=02 Port=04 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a5c ProdID=21d3 Rev= 1.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM43142A0
S:  SerialNumber=3859F9D6199A
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
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=ff(vend.) Sub=01 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

/sys/kernel/debug/usb/devices after loading firmware:
T:  Bus=01 Lev=02 Prnt=02 Port=04 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a5c ProdID=21d3 Rev= 1.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM43142A0
S:  SerialNumber=3859F9D6199A
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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=ff(vend.) 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
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

Signed-off-by: Wen-chien Jesse Sung &amp;lt;jesse.sung-Z7WLFzj8eWMS+FvcfC7Uqw&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/bluetooth/btusb.c | 76 +++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 73 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 7a7e5f8..8cab88c 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;linux/module.h&amp;gt;
 #include &amp;lt;linux/usb.h&amp;gt;
 #include &amp;lt;linux/firmware.h&amp;gt;
+#include &amp;lt;linux/delay.h&amp;gt;
 
 #include &amp;lt;net/bluetooth/bluetooth.h&amp;gt;
 #include &amp;lt;net/bluetooth/hci_core.h&amp;gt;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,6 +50,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct usb_driver btusb_driver;
 #define BTUSB_WRONG_SCO_MTU0x40
 #define BTUSB_ATH30120x80
 #define BTUSB_INTEL0x100
+#define BTUSB_BCM_PATCHRAM0x200
 
 static struct usb_device_id btusb_table[] = {
 /* Generic Bluetooth USB device */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -101,13 +103,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct usb_device_id btusb_table[] = {
 { USB_DEVICE(0x0b05, 0x17b5) },
 { USB_DEVICE(0x04ca, 0x2003) },
 { USB_DEVICE(0x0489, 0xe042) },
-{ USB_DEVICE(0x413c, 0x8197) },
+{ USB_DEVICE(0x413c, 0x8197), .driver_info = BTUSB_BCM_PATCHRAM },
 
 /* Foxconn - Hon Hai */
-{ USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01) },
+{ USB_VENDOR_AND_INTERFACE_INFO(0x0489, 0xff, 0x01, 0x01), .driver_info = BTUSB_BCM_PATCHRAM },
 
 /*Broadcom devices with vendor specific id */
-{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01) },
+{ USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01), .driver_info = BTUSB_BCM_PATCHRAM },
 
 { }/* Terminating entry */
 };
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1317,6 +1319,71 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; exit_mfg_deactivate:
 return 0;
 }
 
+static int btusb_setup_patchram_packet(struct hci_dev *hdev, u16 opcode, u32 plen, const void *param)
+{
+struct sk_buff *skb;
+
+skb = __hci_cmd_sync(hdev, opcode, plen, param, HCI_INIT_TIMEOUT);
+if (IS_ERR(skb))
+return -PTR_ERR(skb);
+kfree_skb(skb);
+return 0;
+}
+
+#define PATCHRAM_NAME_LEN20
+
+static int btusb_setup_patchram(struct hci_dev *hdev)
+{
+struct btusb_data *data = hci_get_drvdata(hdev);
+struct usb_device *udev = data-&amp;gt;udev;
+size_t pos = 0;
+int err = 0;
+char filename[PATCHRAM_NAME_LEN];
+const struct firmware *fw;
+u8 val = 0x00;
+
+snprintf(filename, PATCHRAM_NAME_LEN, "fw-%04x_%04x.hcd",
+le16_to_cpu(udev-&amp;gt;descriptor.idVendor),
+le16_to_cpu(udev-&amp;gt;descriptor.idProduct));
+if (request_firmware(&amp;amp;fw, (const char *) filename, &amp;amp;udev-&amp;gt;dev) &amp;lt; 0) {
+BT_INFO("can't load firmware, may not work correctly");
+return 0;
+}
+
+err = btusb_setup_patchram_packet(hdev, 0x0c03, 1, &amp;amp;val);
+if (err)
+goto out;
+
+err = btusb_setup_patchram_packet(hdev, 0xfc2e, 1, &amp;amp;val);
+if (err)
+goto out;
+
+msleep(1000);
+while (pos &amp;lt; fw-&amp;gt;size) {
+size_t len;
+len = fw-&amp;gt;data[pos + 2] + 3;
+if (pos + len &amp;gt; fw-&amp;gt;size) {
+err = -EINVAL;
+goto out;
+}
+err = btusb_setup_patchram_packet(hdev, le16_to_cpu(*(u16*)(fw-&amp;gt;data + pos)),
+fw-&amp;gt;data[pos + 2] , &amp;amp;fw-&amp;gt;data[pos + 3]);
+if (err)
+goto out;
+pos += len;
+}
+
+err = btusb_setup_patchram_packet(hdev, 0x0c03, 1, &amp;amp;val);
+out:
+release_firmware(fw);
+if (err) {
+BT_INFO("fail to load firmware");
+return err;
+}
+BT_INFO("firmware loaded");
+return 0;
+}
+
 static int btusb_probe(struct usb_interface *intf,
 const struct usb_device_id *id)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1425,6 +1492,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btusb_probe(struct usb_interface *intf,
 if (id-&amp;gt;driver_info &amp;amp; BTUSB_INTEL)
 hdev-&amp;gt;setup = btusb_setup_intel;
 
+if (id-&amp;gt;driver_info &amp;amp; BTUSB_BCM_PATCHRAM)
+hdev-&amp;gt;setup = btusb_setup_patchram;
+
 /* Interface numbers are hardcoded in the specification */
 data-&amp;gt;isoc = usb_ifnum_to_if(data-&amp;gt;udev, 1);
 
&lt;/pre&gt;</description>
    <dc:creator>Jesse Sung</dc:creator>
    <dc:date>2013-06-19T15:28:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36647">
    <title>I am newbie, question : how to check bluetooth version on my android phone</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36647</link>
    <description>&lt;pre&gt;here is the hciconfig output: bluez 4.93 in phone

hciconfig hci0 version
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 00:A0:C6:29:94:B4  ACL MTU: 1024:5  SCO MTU: 60:8
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0xc
        Manufacturer: Qualcomm (29)

does this enough to get version? and via LMP Version, seems it is Bluetooth Core
Specification 4.0.

but as I know Google officially announced LE feature is not supported
yet, see it:
http://www.theverge.com/2013/5/15/4334882/google-adopts-bluetooth-smart-hints-android-update-within-two-months
&lt;/pre&gt;</description>
    <dc:creator>明</dc:creator>
    <dc:date>2013-06-19T02:06:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36643">
    <title>[PATCH BlueZ 1/5] build-sys: Don't build gdbus several times</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36643</link>
    <description>&lt;pre&gt;We are currently compiling gdbus 3 times: one for tests, one for
bluetoothd and another for obexd.

$ ls gdbus/*watch.o
gdbus/bluetoothd-watch.o  gdbus/obexd-watch.o  gdbus/watch.o

Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library.
---
 Makefile.am    | 16 +++++++++++-----
 Makefile.obexd |  4 ++--
 Makefile.tools | 25 ++++++++++++-------------
 3 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 9d570fb..19782ce 100644
--- a/Makefile.am
+++ b/Makefile.am
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -112,6 +112,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; builtin_nodist =
 
 include Makefile.plugins
 
+noinst_LTLIBRARIES += gdbus/libgdbus.la
+gdbus_libgdbus_la_SOURCES = $(gdbus_sources)
+gdbus_libgdbus_la_LDFLAGS = $(AM_LDFLAGS) &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt;
+gdbus_libgdbus_la_CFLAGS = $(AM_CFLAGS) &amp;lt; at &amp;gt;DBUS_CFLAGS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;GLIB_CFLAGS&amp;lt; at &amp;gt;
+
 if MAINTAINER_MODE
 plugin_LTLIBRARIES += plugins/external-dummy.la
 plugins_external_dummy_la_SOURCES = plugins/external-dummy.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -122,7 +127,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; endif
 
 libexec_PROGRAMS += src/bluetoothd
 
-src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
+src_bluetoothd_SOURCES = $(builtin_sources) \
 $(attrib_sources) $(btio_sources) \
 src/bluetooth.ver \
 src/main.c src/log.h src/log.c \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -148,8 +153,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; src_bluetoothd_SOURCES = $(gdbus_sources) $(builtin_sources) \
 src/eir.h src/eir.c \
 src/shared/util.h src/shared/util.c \
 src/shared/mgmt.h src/shared/mgmt.c
-src_bluetoothd_LDADD = lib/libbluetooth-private.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; \
--ldl -lrt
+src_bluetoothd_LDADD = lib/libbluetooth-private.la gdbus/libgdbus.la \
+&amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; \
+-ldl -lrt
 src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \
 -Wl,--version-script=$(srcdir)/src/bluetooth.ver
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,8 +251,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; unit_test_sdp_LDADD = lib/libbluetooth-private.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt;
 
 unit_tests += unit/test-gdbus-client
 
-unit_test_gdbus_client_SOURCES = $(gdbus_sources) unit/test-gdbus-client.c
-unit_test_gdbus_client_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
+unit_test_gdbus_client_SOURCES = unit/test-gdbus-client.c
+unit_test_gdbus_client_LDADD = gdbus/libgdbus.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
 
 unit_tests += unit/test-gobex-header unit/test-gobex-packet unit/test-gobex \
 unit/test-gobex-transfer unit/test-gobex-apparam
diff --git a/Makefile.obexd b/Makefile.obexd
index 5824e0a..37aa2d9 100644
--- a/Makefile.obexd
+++ b/Makefile.obexd
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -54,7 +54,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obexd_builtin_sources += obexd/client/mns.c obexd/src/map_ap.h \
 
 libexec_PROGRAMS += obexd/src/obexd
 
-obexd_src_obexd_SOURCES = $(gdbus_sources) $(btio_sources) $(gobex_sources) \
+obexd_src_obexd_SOURCES = $(btio_sources) $(gobex_sources) \
 $(obexd_builtin_sources) \
 obexd/src/main.c obexd/src/obexd.h \
 obexd/src/plugin.h obexd/src/plugin.c \
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,7 +78,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; obexd_src_obexd_SOURCES = $(gdbus_sources) $(btio_sources) $(gobex_sources) \
 obexd/client/dbus.h obexd/client/dbus.c \
 obexd/client/driver.h obexd/client/driver.c \
 obexd/src/map_ap.h
-obexd_src_obexd_LDADD = lib/libbluetooth-private.la \
+obexd_src_obexd_LDADD = gdbus/libgdbus.la lib/libbluetooth-private.la \
 &amp;lt; at &amp;gt;ICAL_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; -ldl
 
 obexd_src_obexd_LDFLAGS = -Wl,--export-dynamic
diff --git a/Makefile.tools b/Makefile.tools
index 8f245e0..cc0d8ee 100644
--- a/Makefile.tools
+++ b/Makefile.tools
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2,11 +2,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 if CLIENT
 bin_PROGRAMS += client/bluetoothctl
 
-client_bluetoothctl_SOURCES = $(gdbus_sources) client/main.c \
+client_bluetoothctl_SOURCES = client/main.c \
 client/display.h client/display.c \
 client/agent.h client/agent.c \
 monitor/uuid.h monitor/uuid.c
-client_bluetoothctl_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; -lreadline
+client_bluetoothctl_LDADD = gdbus/libgdbus.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; \
+-lreadline
 endif
 
 if MONITOR
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -57,14 +58,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tools_l2cap_tester_SOURCES = tools/l2cap-tester.c monitor/bt.h \
 src/shared/tester.h src/shared/tester.c
 tools_l2cap_tester_LDADD = lib/libbluetooth-private.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt;
 
-tools_gap_tester_SOURCES = $(gdbus_sources) \
-tools/gap-tester.c monitor/bt.h \
+tools_gap_tester_SOURCES = tools/gap-tester.c monitor/bt.h \
 emulator/btdev.h emulator/btdev.c \
 emulator/bthost.h emulator/bthost.c \
 src/shared/hciemu.h src/shared/hciemu.c \
 src/shared/tester.h src/shared/tester.c
-
-tools_gap_tester_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
+tools_gap_tester_LDADD = gdbus/libgdbus.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
 endif
 
 if TOOLS
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -188,8 +187,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; tools_btmgmt_LDADD = lib/libbluetooth-private.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt;
 tools_btiotest_SOURCES = tools/btiotest.c btio/btio.h btio/btio.c
 tools_btiotest_LDADD = lib/libbluetooth-private.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt;
 
-tools_mpris_player_SOURCES = $(gdbus_sources) tools/mpris-player.c
-tools_mpris_player_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
+tools_mpris_player_SOURCES = tools/mpris-player.c
+tools_mpris_player_LDADD = gdbus/libgdbus.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
 
 tools_bluetooth_player_SOURCES = $(gdbus_sources) tools/bluetooth-player.c \
 client/display.h client/display.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -222,8 +221,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; endif
 if EXPERIMENTAL
 noinst_PROGRAMS += profiles/iap/iapd
 
-profiles_iap_iapd_SOURCES = $(gdbus_sources) profiles/iap/main.c
-profiles_iap_iapd_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
+profiles_iap_iapd_SOURCES = profiles/iap/main.c
+profiles_iap_iapd_LDADD = gdbus/libgdbus.la &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
 endif
 
 if CUPS
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -231,14 +230,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cupsdir = $(libdir)/cups/backend
 
 cups_PROGRAMS = profiles/cups/bluetooth
 
-profiles_cups_bluetooth_SOURCES = $(gdbus_sources) profiles/cups/main.c \
+profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
 profiles/cups/cups.h \
 profiles/cups/sdp.c \
 profiles/cups/spp.c \
 profiles/cups/hcrp.c
 
-profiles_cups_bluetooth_LDADD = &amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt; \
-lib/libbluetooth-private.la
+profiles_cups_bluetooth_LDADD = gdbus/libgdbus.la lib/libbluetooth-private.la \
+&amp;lt; at &amp;gt;GLIB_LIBS&amp;lt; at &amp;gt; &amp;lt; at &amp;gt;DBUS_LIBS&amp;lt; at &amp;gt;
 endif
 
 test_scripts += test/sap_client.py test/bluezutils.py \
&lt;/pre&gt;</description>
    <dc:creator>Lucas De Marchi</dc:creator>
    <dc:date>2013-06-18T20:13:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36635">
    <title>[PATCH BlueZ 1/3] audio/media: Fix notifying settings changed incorrectly</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36635</link>
    <description>&lt;pre&gt;From: Luiz Augusto von Dentz &amp;lt;luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

We should notify only the setting that has changed not all of them.
---
 profiles/audio/avrcp.c | 30 +++++++++++++-----------------
 profiles/audio/avrcp.h |  3 ++-
 profiles/audio/media.c |  7 +------
 3 files changed, 16 insertions(+), 24 deletions(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 730f061..f0554fe 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -612,13 +612,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int play_status_to_val(const char *status)
 return -EINVAL;
 }
 
-void avrcp_player_event(struct avrcp_player *player, uint8_t id, void *data)
+void avrcp_player_event(struct avrcp_player *player, uint8_t id,
+const void *data)
 {
 uint8_t buf[AVRCP_HEADER_LENGTH + 9];
 struct avrcp_header *pdu = (void *) buf;
 uint16_t size;
 GSList *l;
-GList *settings;
+int attr;
+int val;
 
 if (player-&amp;gt;sessions == NULL)
 return;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -649,24 +651,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void avrcp_player_event(struct avrcp_player *player, uint8_t id, void *data)
 break;
 case AVRCP_EVENT_SETTINGS_CHANGED:
 size = 2;
-settings = data;
-pdu-&amp;gt;params[1] = g_list_length(settings);
-for (; settings; settings = settings-&amp;gt;next) {
-const char *key = settings-&amp;gt;data;
-int attr;
-int val;
+pdu-&amp;gt;params[1] = 1;
 
-attr = attr_to_val(key);
-if (attr &amp;lt; 0)
-continue;
+attr = attr_to_val(data);
+if (attr &amp;lt; 0)
+return;
 
-val = player_get_setting(player, attr);
-if (val &amp;lt; 0)
-continue;
+val = player_get_setting(player, attr);
+if (val &amp;lt; 0)
+return;
 
-pdu-&amp;gt;params[++size] = attr;
-pdu-&amp;gt;params[++size] = val;
-}
+pdu-&amp;gt;params[++size] = attr;
+pdu-&amp;gt;params[++size] = val;
 break;
 default:
 error("Unknown event %u", id);
diff --git a/profiles/audio/avrcp.h b/profiles/audio/avrcp.h
index 3b1963f..6a435e6 100644
--- a/profiles/audio/avrcp.h
+++ b/profiles/audio/avrcp.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -115,7 +115,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
 GDestroyNotify destroy);
 void avrcp_unregister_player(struct avrcp_player *player);
 
-void avrcp_player_event(struct avrcp_player *player, uint8_t id, void *data);
+void avrcp_player_event(struct avrcp_player *player, uint8_t id,
+const void *data);
 
 
 size_t avrcp_handle_vendor_reject(uint8_t *code, uint8_t *operands);
diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index eb5ea81..45dfe53 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1470,7 +1470,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean set_property(struct media_player *mp, const char *key,
 const char *value)
 {
 const char *curval;
-GList *settings;
 
 curval = g_hash_table_lookup(mp-&amp;gt;settings, key);
 if (g_strcmp0(curval, value) == 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1480,11 +1479,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean set_property(struct media_player *mp, const char *key,
 
 g_hash_table_replace(mp-&amp;gt;settings, g_strdup(key), g_strdup(value));
 
-settings = list_settings(mp);
-
-avrcp_player_event(mp-&amp;gt;player, AVRCP_EVENT_SETTINGS_CHANGED, settings);
-
-g_list_free(settings);
+avrcp_player_event(mp-&amp;gt;player, AVRCP_EVENT_SETTINGS_CHANGED, key);
 
 return TRUE;
 }
&lt;/pre&gt;</description>
    <dc:creator>Luiz Augusto von Dentz</dc:creator>
    <dc:date>2013-06-18T08:09:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36634">
    <title>[PATCH BlueZ] core: Fix crash when a duplicated record is found</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36634</link>
    <description>&lt;pre&gt;From: Luiz Augusto von Dentz &amp;lt;luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

 Invalid read of size 8
    at 0x470101: update_bredr_services (device.c:2784)
    by 0x470591: browse_cb (device.c:2975)
    by 0x458B0E: search_completed_cb (sdp-client.c:186)
    by 0x47C154: sdp_process (sdp.c:4343)
    by 0x458954: search_process_cb (sdp-client.c:205)
    by 0x3F31A47A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
    by 0x3F31A47D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
    by 0x3F31A48181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
    by 0x40A265: main (main.c:595)
  Address 0x0 is not stack'd, malloc'd or (recently) free'd
---
 src/device.c | 65 +++++++++++++++++++++++++++++++++++-------------------------
 1 file changed, 38 insertions(+), 27 deletions(-)

diff --git a/src/device.c b/src/device.c
index 0f75c60..c324764 100644
--- a/src/device.c
+++ b/src/device.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2677,6 +2677,40 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int rec_cmp(const void *a, const void *b)
 return r1-&amp;gt;handle - r2-&amp;gt;handle;
 }
 
+static int update_record(struct browse_req *req, const char *uuid,
+sdp_record_t *rec)
+{
+GSList *l;
+
+/* Check for duplicates */
+if (sdp_list_find(req-&amp;gt;records, rec, rec_cmp))
+return -EALREADY;
+
+/* Copy record */
+req-&amp;gt;records = sdp_list_append(req-&amp;gt;records, sdp_copy_record(rec));
+
+/* Check if UUID is duplicated */
+l = g_slist_find_custom(req-&amp;gt;device-&amp;gt;uuids, uuid, bt_uuid_strcmp);
+if (l == NULL) {
+l = g_slist_find_custom(req-&amp;gt;profiles_added, uuid,
+bt_uuid_strcmp);
+if (l == NULL)
+return 0;
+req-&amp;gt;profiles_added = g_slist_append(req-&amp;gt;profiles_added,
+g_strdup(uuid));
+return 0;
+}
+
+l = g_slist_find_custom(req-&amp;gt;profiles_removed, uuid, bt_uuid_strcmp);
+if (l == NULL)
+return 0;
+
+g_free(l-&amp;gt;data);
+req-&amp;gt;profiles_removed = g_slist_delete_link(req-&amp;gt;profiles_removed, l);
+
+return 0;
+}
+
 static void update_bredr_services(struct browse_req *req, sdp_list_t *recs)
 {
 struct btd_device *device = req-&amp;gt;device;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2712,7 +2746,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void update_bredr_services(struct browse_req *req, sdp_list_t *recs)
 sdp_record_t *rec = (sdp_record_t *) seq-&amp;gt;data;
 sdp_list_t *svcclass = NULL;
 char *profile_uuid;
-GSList *l;
 
 if (!rec)
 break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2754,12 +2787,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void update_bredr_services(struct browse_req *req, sdp_list_t *recs)
 product, version);
 }
 
-/* Check for duplicates */
-if (sdp_list_find(req-&amp;gt;records, rec, rec_cmp)) {
-g_free(profile_uuid);
-sdp_list_free(svcclass, free);
-continue;
-}
+if (update_record(req, profile_uuid, rec) &amp;lt; 0)
+goto next;
 
 if (sdp_key_file)
 store_sdp_record(sdp_key_file, rec);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2767,26 +2796,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void update_bredr_services(struct browse_req *req, sdp_list_t *recs)
 if (att_key_file)
 store_primaries_from_sdp_record(att_key_file, rec);
 
-/* Copy record */
-req-&amp;gt;records = sdp_list_append(req-&amp;gt;records,
-sdp_copy_record(rec));
-
-l = g_slist_find_custom(device-&amp;gt;uuids, profile_uuid,
-bt_uuid_strcmp);
-if (!l)
-req-&amp;gt;profiles_added =
-g_slist_append(req-&amp;gt;profiles_added,
-profile_uuid);
-else {
-l = g_slist_find_custom(req-&amp;gt;profiles_removed,
-profile_uuid,
-bt_uuid_strcmp);
-g_free(l-&amp;gt;data);
-req-&amp;gt;profiles_removed =
-g_slist_delete_link(req-&amp;gt;profiles_removed, l);
-g_free(profile_uuid);
-}
-
+next:
+g_free(profile_uuid);
 sdp_list_free(svcclass, free);
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Luiz Augusto von Dentz</dc:creator>
    <dc:date>2013-06-18T08:08:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36633">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36633</link>
    <description>&lt;pre&gt;


Loan Syndicacion

Am AFG Guaranty Trust Bank, zu strukturieren wir Kreditlinien treffen Sie
unsere
Kunden spezifischen geschäftlichen Anforderungen und einen deutlichen
Mehrwert für unsere
Kunden Unternehmen.
eine Division der AFG Finance und Private Bank plc.

Wenn Sie erwägen, eine große Akquisition oder ein Großprojekt sind, können
Sie
brauchen eine erhebliche Menge an Kredit. AFG Guaranty Trust Bank setzen
können
zusammen das Syndikat, das die gesamte Kredit schnürt für
Sie.


Als Bank mit internationaler Reichweite, sind wir gekommen, um Darlehen zu
identifizieren
Syndizierungen als Teil unseres Kerngeschäfts und durch spitzte diese Zeile
aggressiv sind wir an einem Punkt, wo wir kommen, um als erkannt haben
Hauptakteur in diesem Bereich.


öffnen Sie ein Girokonto heute mit einem Minimum Bankguthaben von 500 £ und
Getup zu £ 10.000 als Darlehen und auch den Hauch einer Chance und gewann
die Sterne
Preis von £ 500.000 in die sparen und gewinnen promo in may.aply jetzt.


mit dem Folowing Informationen über Rechtsanwalt steven lee das Konto
Offizier.


FULL NAME;


Wohnadresse;


E-MAIL-ADRESSE;

Telefonnummer;

Nächsten KINS;

MUTTER MAIDEN NAME;


Familienstand;


BÜROADRESSE;

ALTERNATIVE Telefonnummer;

TO &amp;lt; at &amp;gt; yahoo.com bar.stevenlee
NOTE; ALLE Darlehen sind für 10JAHRE RATE VALID
ANGEBOT ENDET BALD SO JETZT HURRY

&lt;/pre&gt;</description>
    <dc:creator>AFG GTBANK LOAN</dc:creator>
    <dc:date>2013-06-17T19:28:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36628">
    <title>[PATCH 1/4] obexd: Fix handling error cases in setpath</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36628</link>
    <description>&lt;pre&gt;From: Christian Fetzer &amp;lt;christian.fetzer-98C5kh4wR6ohFhg+JK9F0w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

This adds a setpath_op_complete callback, that unpacks the user data and
finally calls the user callback. The callback is now used for success and error
cases.

The previous implementation was using setpath_complete which did not
work for error cases, because it was called with incorrect user data.
This was leading to a crash, that can be reproduced by disconnecting PBAP
after trying to select a non existing phone book.

  0  setpath_complete (session=0x66bd90, transfer=0x0, err=0x69b370,
     user_data=0x69a810) at obexd/client/session.c:912
  1  0x000000000042d100 in obc_session_shutdown (session=0x66bd90)
     at obexd/client/session.c:537
  2  0x000000000040f227 in service_filter (connection=0x664b20,
     message=&amp;lt;optimized out&amp;gt;, user_data=0x66bed0) at gdbus/watch.c:486
  3  0x000000000040f49b in message_filter (connection=0x664b20,
     message=0x66ba30, user_data=&amp;lt;optimized out&amp;gt;) at gdbus/watch.c:554
  4  0x00007ffff72f40a6 in dbus_connection_dispatch ()
     from /usr/lib/libdbus-1.so.3
  5  0x000000000040e148 in message_dispatch (data=0x664b20)
     at gdbus/mainloop.c:76
  6  0x00007ffff702e9a3 in ?? () from /usr/lib/libglib-2.0.so.0
  7  0x00007ffff702de46 in g_main_context_dispatch ()
     from /usr/lib/libglib-2.0.so.0
  8  0x00007ffff702e198 in ?? () from /usr/lib/libglib-2.0.so.0
  9  0x00007ffff702e59a in g_main_loop_run () from
     /usr/lib/libglib-2.0.so.0
  10 0x000000000040dd72 in main (argc=1, argv=0x7fffffffddc8)
     at obexd/src/main.c:319
---
 obexd/client/session.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/obexd/client/session.c b/obexd/client/session.c
index f1915db..eda3412 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -907,10 +907,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void setpath_complete(struct obc_session *session,
 GError *err, void *user_data)
 {
 struct pending_request *p = user_data;
-struct setpath_data *data = p-&amp;gt;data;
 
-if (data-&amp;gt;func)
-data-&amp;gt;func(session, NULL, err, data-&amp;gt;user_data);
+if (p-&amp;gt;func)
+p-&amp;gt;func(session, NULL, err, p-&amp;gt;data);
 
 if (session-&amp;gt;p == p)
 session-&amp;gt;p = NULL;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -920,6 +919,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void setpath_complete(struct obc_session *session,
 session_process_queue(session);
 }
 
+static void setpath_op_complete(struct obc_session *session,
+struct obc_transfer *transfer,
+GError *err, void *user_data)
+{
+struct setpath_data *data = user_data;
+
+if (data-&amp;gt;func)
+data-&amp;gt;func(session, NULL, err, data-&amp;gt;user_data);
+}
+
 static void setpath_cb(GObex *obex, GError *err, GObexPacket *rsp,
 gpointer user_data)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1005,7 +1014,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; guint obc_session_setpath(struct obc_session *session, const char *path,
 data-&amp;gt;remaining = g_strsplit(strlen(path) ? path : "/", "/", 0);
 
 p = pending_request_new(session, session_process_setpath, NULL,
-setpath_complete, data, setpath_data_free);
+setpath_op_complete, data, setpath_data_free);
 session_queue(p);
 return p-&amp;gt;id;
 }
&lt;/pre&gt;</description>
    <dc:creator>Christian Fetzer</dc:creator>
    <dc:date>2013-06-17T12:10:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36622">
    <title>[PATCH v2 0/6] MAP client: Add notification dispatching</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36622</link>
    <description>&lt;pre&gt;From: Christian Fetzer &amp;lt;christian.fetzer-98C5kh4wR6ohFhg+JK9F0w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Changelog:
v2:
  - Implement dispatching in map-event.c
  - Rename map_acquire_mns to map_register_event_handler
  - Pass obc_session directly instead of copying address
--

This patch set completes the two patch sets "Add Message Notification Service
(MNS) server" and "Read MASInstanceID for the current connection".

The notification dispatcher component dispatches event reports that are
received by the MNS server to the correct MAS client instance.

The message access part of every client instance registers a notification
handler function. The MNS will call the associated handler for all received
event reports.

For now, the handler will only print a log message for the received
notifications. This is the starting point where we can add the necessary
DBus API parts.

Christian Fetzer (6):
  obexd: Add function to get the destination from the obc_session
  obexd: Add MAP notification dispatching
  build: Add support for building MAP notification dispatcher
  obexd: Register notification handler in the MAP client
  obexd: Notify registered notification handlers in MNS
  obexd: Fix crash when retrieving multiple MAP event reports

 Makefile.obexd           |   1 +
 obexd/client/map-event.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++
 obexd/client/map-event.h |  29 ++++++++++++
 obexd/client/map.c       |  25 +++++++++++
 obexd/client/mns.c       |  18 ++++----
 obexd/client/session.c   |   5 +++
 obexd/client/session.h   |   1 +
 7 files changed, 181 insertions(+), 10 deletions(-)
 create mode 100644 obexd/client/map-event.c

&lt;/pre&gt;</description>
    <dc:creator>Christian Fetzer</dc:creator>
    <dc:date>2013-06-17T08:35:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36614">
    <title>[PATCH BlueZ 1/3] audio/media: Fix notifying settings changed incorrectly</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36614</link>
    <description>&lt;pre&gt;From: Luiz Augusto von Dentz &amp;lt;luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

We should notify only the setting that has changed not all of them.
---
 profiles/audio/media.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index eb5ea81..69139a7 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1480,7 +1480,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static gboolean set_property(struct media_player *mp, const char *key,
 
 g_hash_table_replace(mp-&amp;gt;settings, g_strdup(key), g_strdup(value));
 
-settings = list_settings(mp);
+settings = g_list_prepend(NULL, (char *) key);
 
 avrcp_player_event(mp-&amp;gt;player, AVRCP_EVENT_SETTINGS_CHANGED, settings);
 
&lt;/pre&gt;</description>
    <dc:creator>Luiz Augusto von Dentz</dc:creator>
    <dc:date>2013-06-16T17:01:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36586">
    <title>[PATCH v3 BlueZ 00/16] MediaFolder and MediaItem implementation</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36586</link>
    <description>&lt;pre&gt;From: Luiz Augusto von Dentz &amp;lt;luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

v2: Fixes ChangeFolder not working for subfolders past /Filesystem
v3: Add Search implementation, fix not forwarding errors properly and add
patch to create current item if it doesn't exist.

This set of patches implements most of the functionality of MediaFolder and
MediaItem interfaces.

Some remarks:

- ChangeFolder can only change one level at time, this perhaps gonna be
  changed in the future but for now this matches the limitation of AVRCP
  itself.
- ListItems returns the items in the correct order but GetManagedObjects
  does the reverse order due to use of g_slist_prepend.
- PlayItem and AddToNowPlaying works fine with iPhone but with WP8 is not
  working probably because the UIDCounter changes more frequently
  which needs some new notifications that are currently not implemented.

This can be tested using tools/mpris-player which will browse the NowPlaying
list and show which item is currently being played, but the gnome extention
itself needs patching which can be found here:

https://github.com/Vudentz/gnome-shell-extensions-mediaplayer

Or use the command line tool: tools/bluetooth-player

Luiz Augusto von Dentz (16):
  audio/player: Split item creation
  audio/AVRCP: Add browsed flag to player
  audio/AVRCP: Add support for GetFolderItems command
  audio/player: Add implementation of MediaFolder.ListItems
  audio/player: Add support for setting current Item object
  audio/player: Add function media_item_set_playable
  audio/player: Add support for MediaItem.Metadata property
  audio/AVRCP: Add support for ChangePath command
  audio/player: Add implementation of MediaFolder.ChangeFolder
  audio/AVRCP: Add support for PlayItem command
  audio/player: Add implementation of MediaItem.Play
  audio/AVRCP: Add support for AddToNowPlaying command
  audio/player: Add implementation of MediaItem.AddToNowPlaying
  audio/AVRCP: Add support for Search command
  audio/player: Add implementation of MediaFolder.Search
  audio/player: Create item on media_player_set_playlist_item

 profiles/audio/avrcp.c  | 488 ++++++++++++++++++++++++++++-
 profiles/audio/player.c | 804 ++++++++++++++++++++++++++++++++++++++++--------
 profiles/audio/player.h |  35 ++-
 3 files changed, 1187 insertions(+), 140 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Luiz Augusto von Dentz</dc:creator>
    <dc:date>2013-06-14T12:41:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36583">
    <title>[Bug 59701] New: Bluetooth device is recognize, but doesn't work</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36583</link>
    <description>&lt;pre&gt;https://bugzilla.kernel.org/show_bug.cgi?id=59701

           Summary: Bluetooth device is recognize, but doesn't work
           Product: Drivers
           Version: 2.5
    Kernel Version: 3.10-rc5
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Bluetooth
        AssignedTo: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA&amp;lt; at &amp;gt;public.gmane.org
        ReportedBy: jkp-X3B1VOXEql0&amp;lt; at &amp;gt;public.gmane.org
        Regression: No


Transferred from https://bugzilla.kernel.org/show_bug.cgi?id=49201

Hardware: asus transformer book tx300 (4005)

Device is found, hciconfig shows bytes sent and received when searching for
other devices, but hcitool scan doesn't show devices. When I try to search for
the computer with a phone, byte count is not increased, so the sent &amp;amp; received
counters may not reflect actual radio traffic.

lsusb -v:

Bus 001 Device 003: ID 13d3:3402 IMC Networks 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x13d3 IMC Networks
  idProduct          0x3402 
  bcdDevice            0.01
  iManufacturer           1 Atheros Communications
  iProduct                2 Bluetooth USB Host Controller
  iSerial                 3 Alaska Day 2006
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          177
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 BT HCI
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2013-06-14T05:54:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36577">
    <title>pull request: bluetooth 2013-06-13</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36577</link>
    <description>&lt;pre&gt;Hi John,

A few important fixes to 3.10. The first one is a crash fix and talks by itself.
Then we have the support for a device id, it should be fine if you want to
remove this. Next there are two btmrvl fixes, one for a potential race
condition that could make its main thread never stop and the other to fix the
return code when a memory allocation fails. It was returning 0 instead of
-ENOMEM. Last is a fix to an issue that affects at least some Thinkpad X60,
Initialization on those laptops were failing due by unsupported cmd we were
sending to the device. The patch fixes this by checking if the cmd is
supported first.

Please pull or let me know of any concerns you may have.

Gustavo

---
The following changes since commit d90b9e29ec5fe7a08eb7965386ebb47615306584:

  Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (2013-06-12 14:28:21 -0400)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth master

for you to fetch changes up to 0e1aba9361bf292fbdca781d419dca67d6b9911f:

  Bluetooth: btmrvl: fix thread stopping race (2013-06-13 11:48:38 +0100)

----------------------------------------------------------------
Anderson Lizardo (1):
      Bluetooth: Fix crash in l2cap_build_cmd() with small MTU

Cho, Yu-Chen (1):
      Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]

Daniel Drake (1):
      Bluetooth: btmrvl: fix thread stopping race

Johan Hedberg (1):
      Bluetooth: Fix conditions for HCI_Delete_Stored_Link_Key

Wei Yongjun (1):
      Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()

 drivers/bluetooth/btmrvl_main.c |  9 ++++-----
 drivers/bluetooth/btmrvl_sdio.c |  1 +
 drivers/bluetooth/btusb.c       |  3 +++
 net/bluetooth/hci_core.c        | 15 ++++++++++-----
 net/bluetooth/l2cap_core.c      |  3 +++
 5 files changed, 21 insertions(+), 10 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Gustavo Padovan</dc:creator>
    <dc:date>2013-06-13T11:22:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36563">
    <title>[PATCH] Bluetooth: Fix conditions for HCI_Delete_Stored_Link_Key</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36563</link>
    <description>&lt;pre&gt;From: Johan Hedberg &amp;lt;johan.hedberg-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Even though the HCI_Delete_Stored_Link_Key command is mandatory for 1.1
and later controllers some controllers do not seem to support it
properly as was witnessed by one Broadcom based controller:

&amp;lt; HCI Command: Delete Stored Link Key (0x03|0x0012) plen 7
    bdaddr 00:00:00:00:00:00 all 1
    Delete Stored Link Key (0x03|0x0012) ncmd 1
    status 0x11 deleted 0
    Error: Unsupported Feature or Parameter Value

Luckily this same controller also doesn't list the command in its
supported commands bit mask (counting from 0 bit 7 of octet 6):

&amp;lt; HCI Command: Read Local Supported Commands (0x04|0x0002) plen 0
    Read Local Supported Commands (0x04|0x0002) ncmd 1
    status 0x00
    Commands: ffffffffffff1ffffffffffff30fffff3f

Therefore, it makes sense to move sending of HCI_Delete_Stored_Link_Key
to after receiving the supported commands response and to only send it
if its respective bit in the mask is set. The downside of this is that
we no longer send the HCI_Delete_Stored_Link_Key command for Bluetooth
1.1 controllers since HCI_Read_Local_Supported_Command was introduced in
version 1.2, but this is an acceptable penalty as the command in
question shouldn't affect critical behavior.

Reported-by: Pavel Machek &amp;lt;pavel-+ZI9xUNit7I&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Signed-off-by: Johan Hedberg &amp;lt;johan.hedberg-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 net/bluetooth/hci_core.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index d817c93..d68425c 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -341,7 +341,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void hci_init1_req(struct hci_request *req, unsigned long opt)
 
 static void bredr_setup(struct hci_request *req)
 {
-struct hci_cp_delete_stored_link_key cp;
 __le16 param;
 __u8 flt_type;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -365,10 +364,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void bredr_setup(struct hci_request *req)
 param = __constant_cpu_to_le16(0x7d00);
 hci_req_add(req, HCI_OP_WRITE_CA_TIMEOUT, 2, &amp;amp;param);
 
-bacpy(&amp;amp;cp.bdaddr, BDADDR_ANY);
-cp.delete_all = 0x01;
-hci_req_add(req, HCI_OP_DELETE_STORED_LINK_KEY, sizeof(cp), &amp;amp;cp);
-
 /* Read page scan parameters */
 if (req-&amp;gt;hdev-&amp;gt;hci_ver &amp;gt; BLUETOOTH_VER_1_1) {
 hci_req_add(req, HCI_OP_READ_PAGE_SCAN_ACTIVITY, 0, NULL);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -602,6 +597,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void hci_init3_req(struct hci_request *req, unsigned long opt)
 struct hci_dev *hdev = req-&amp;gt;hdev;
 u8 p;
 
+if (hdev-&amp;gt;commands[6] &amp;amp; 0x80) {
+struct hci_cp_delete_stored_link_key cp;
+
+bacpy(&amp;amp;cp.bdaddr, BDADDR_ANY);
+cp.delete_all = 0x01;
+hci_req_add(req, HCI_OP_DELETE_STORED_LINK_KEY,
+    sizeof(cp), &amp;amp;cp);
+}
+
 if (hdev-&amp;gt;commands[5] &amp;amp; 0x10)
 hci_setup_link_policy(req);
 
&lt;/pre&gt;</description>
    <dc:creator>Johan Hedberg</dc:creator>
    <dc:date>2013-06-13T08:01:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36550">
    <title>[RFC BlueZ 00/35] More discovery tests</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36550</link>
    <description>&lt;pre&gt;This series implements more complex discovery tests and all necessary support
in the emulator. It is rather long because it required many modifications to
the emulation layer in order to support these tests.

Patches 1-11 implement basic LE support on emulator. The main features are:
- Set LE advertising data
- Set advertising enable command
- Set LE advertising parameters
- Send LE advertising report
- LE create connection command (Basic support for multiple connections).
NOTE: support for multiple connections is not necessary for discovery tests.

Patches 12-19 implement hook mechanism.
The hook mechanism is a way to run custom code from tests before/after
processing HCI commands and building events. It is also possible to "cancel"
events if the post event hook returns false. To simplify implementation,
default_cmd() was split in two parts: the command response (command
status/complete events) was kept in default_cmd() and "extra" events were moved
to default_cmd completion().

There are four hooks types:
- pre command: before default_cmd() function.
- post command: before sending packet in command status and command complete.
- pre event: before default_cmd_completion() function.
- post event: in send_event() function, before sending the packet.
They can used in external applications like tools/mgmt-tester.

Patches 20-25 and 28-35 implement discovery tests.
For start discovery, we have:
- Start BR/EDR Discovery and wait for Device Found event from BR/EDR device.
- Start LE-only Discovery and wait for Device Found event from LE device.
For stop discovery:
- Stop BR/EDR Discovery during Inquiry (no devices found).
- Wait for Device Found event from BR/EDR device and stop BR/EDR Discovery during:
  - Inquiry.
  - Name Resolving.
- Wait for Device Found event from LE device and stop interleaved discovery
  during LE scanning.
- Wait for Device Found event from BR/EDR device and stop interleaved discovery
  during:
  - Inquiry.
  - Name Resolving.
- Wait for Device Found event from LE device and stop LE-only Discovery during
  LE scanning.

NOTE: currently, bluetoothd should not be running during tests because it will
try to change EIR data for the second virtual controller (which represents the
remote device) and thus will not match the data statically declared on the
tests.

Patch 26 adds support for saving a packet cancelled by a post event hook, so it
can be sent later.

Patch 27 contains a fix already sent to the mailing list (with some
modifications to apply upstream):
 emulator: Fix Remote Name Request Cancel command complete

Comments and suggestions are welcome.

BR,
Bruna Moreira.

Anderson Lizardo (1):
  emulator: Fix Remote Name Request Cancel command complete

Bruna Moreira (16):
  emulator: Add remove operation in HCI hook callback
  emulator: Add new function for running all hooks
  tools/mgmt-tester: Add stop discovery for BR/EDR only
  tools/mgmt-tester: Add support for second controller
  tools/mgmt-tester: BR/EDR Start discovery (Device Found)
  tools/mgmt-tester: LE only Start discovery (Device Found)
  tools/mgmt-tester: Split test_command_generic()
  tools/mgmt-tester: BR/EDR Stop discovery (Device Found)
  btdev: Add function to send an aborted packet
  tools/mgmt-tester: Move command_generic_callback()
  tools/mgmt-tester: BR/EDR Stop discovery (Name Resolving)
  tools/mgmt-tester: Add support to set emulator type
  tools/mgmt-tester: Interleaved stop discovery (LE dev. found)
  tools/mgmt-tester: Increase timeout for dual mode controller
  tools/mgmt-tester: Interleaved stop discovery (BR/EDR dev. found)
  tools/mgmt-tester: Interleaved Stop discovery (Name Resolving)

Eder Ruiz Maria (7):
  emulator: Add support for pre/post command/event hooks
  emulator: Add hook only if there aren't other with same type and
    opcode
  emulator: Export command and event hooks for hciemu user
  emulator: Add support for delete a hook
  emulator: Split default_cmd() for better command and event handler
  emulator: cmd_status() using send_packet() for run hooks easily
  tools/mgmt-tester: LE Stop discovery (Device Found)

Jefferson Delfes (11):
  emulator: Add support for multiple connections
  emulator: Store LE advertising data length in btdev
  emulator: Implement basic LE set adv enable command
  emulator: Store LE scan state of virtual controller
  emulator: Search virtual devices in LE advertising mode
  emulator: Search virtual devices in LE scan mode
  emulator: Implement LE advertising report
  emulator: Implement basic LE create connection
  emulator: Dummy LE set advertising parameters
  emulator: Disallow LE set scan params command when scan is enabled
  emulator: Set LE supported states

 emulator/btdev.c    |  619 +++++++++++++++++++++++++++++++++++++++------
 emulator/btdev.h    |   20 ++
 monitor/bt.h        |   17 ++
 src/shared/hciemu.c |   87 ++++++-
 src/shared/hciemu.h |   22 +-
 tools/mgmt-tester.c |  690 ++++++++++++++++++++++++++++++++++++++++++++++++---
 6 files changed, 1338 insertions(+), 117 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Bruna Moreira</dc:creator>
    <dc:date>2013-06-12T12:56:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36525">
    <title>[PATCH BlueZ] core: Only page device once per connect attempt</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36525</link>
    <description>&lt;pre&gt;From: Luiz Augusto von Dentz &amp;lt;luiz.von.dentz-ral2JQCrhuEAvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

In case of EHOSTDOWN/page timeout the code should not proceed with the
next profile as it is very likely it will fail again, moreover the page
timeout is configurable and should be enough for getting a response from
the remote device in a reasonable time.
---
 src/device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/device.c b/src/device.c
index 5cb5460..0f75c60 100644
--- a/src/device.c
+++ b/src/device.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1164,6 +1164,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void device_profile_connected(struct btd_device *dev,
 if (dev-&amp;gt;pending == NULL)
 return;
 
+if (!dev-&amp;gt;connected &amp;amp;&amp;amp; err == -EHOSTDOWN)
+goto done;
+
 pending = dev-&amp;gt;pending-&amp;gt;data;
 l = find_service_with_profile(dev-&amp;gt;pending, profile);
 if (l != NULL)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1179,6 +1182,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void device_profile_connected(struct btd_device *dev,
 if (connect_next(dev) == 0)
 return;
 
+done:
 if (!dev-&amp;gt;connect)
 return;
 
&lt;/pre&gt;</description>
    <dc:creator>Luiz Augusto von Dentz</dc:creator>
    <dc:date>2013-06-12T12:13:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36507">
    <title>[RFC BlueZ v2 00/13] Add experimental org.bluez.Service1</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36507</link>
    <description>&lt;pre&gt;From: Mikel Astiz &amp;lt;mikel.astiz-98C5kh4wR6ohFhg+JK9F0w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Changes from v1:
- A redundante call to service_unregister() removed as pointed out by Gustavo.
- 'connecting' state exposed in D-Bus.

From original cover-letter:

Beyond the desktop use-cases, some users (e.g. GENIVI) are interested in having profile-specific information and control interfaces exposed in D-Bus. Such APIs did exist in BlueZ 4 but were dropped for BlueZ 5 in favor of simpler API simplicity. This service-specific interfaces had a fairly low priority for BlueZ 5 and therefore the discussion was postponed.

This patchset proposes org.bluez.Service1 as an attempt to cover these needs. As compared to the former Device.ConnectProfile()/DisconnectProfile(), the approach has the following advantages:
- Multiple instances of the same UUID can be exposed.
- The state of each service can be exposed, without hackish lists like Device.ConnectedProfiles.
- It's ObjectManager-centric.
- The design should scale better if new properties are required in the future (supported features, service handle, etc.)

Mikel Astiz (13):
  test: Remove obsolete test script
  test: Add UUID alias table to bluezutils.py
  test: Support human-friendly UUIDs in test-device
  test: Show human-friendly UUIDs in list-devices
  dbus: Add new org.bluez.Service1
  dbus: Add Device property to org.bluez.Service1
  dbus: Add UUID property to org.bluez.Service1
  dbus: Add state property to org.bluez.Service1
  dbus: Add Connect/Disconnect to org.bluez.Service1
  doc: Add API documentation for org.bluez.Service1
  dbus: Deprecate old profile-connecting API
  test: Add test-service script
  test: Add --uuid to test-service

 Makefile.am         |   2 +-
 Makefile.tools      |   2 +-
 doc/device-api.txt  |   4 +-
 doc/service-api.txt |  53 ++++++++++++++
 src/device.c        |  14 ++--
 src/service.c       | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/service.h       |   2 +-
 test/bluezutils.py  |  84 ++++++++++++++++++++++
 test/list-devices   |   6 +-
 test/simple-service | 128 ----------------------------------
 test/test-device    |   4 +-
 test/test-service   | 175 ++++++++++++++++++++++++++++++++++++++++++++++
 12 files changed, 530 insertions(+), 141 deletions(-)
 create mode 100644 doc/service-api.txt
 delete mode 100755 test/simple-service
 create mode 100755 test/test-service

&lt;/pre&gt;</description>
    <dc:creator>Mikel Astiz</dc:creator>
    <dc:date>2013-06-12T07:06:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36506">
    <title>[PATCH BlueZ] audio: Fix memory leak while creating SDP records</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36506</link>
    <description>&lt;pre&gt;Fix these leaks:

==674== 8 bytes in 1 blocks are definitely lost in loss record 45 of 201
==674==    at 0x402BE68: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==674==    by 0x80DF653: sdp_list_append (sdp.c:1742)
==674==    by 0x8063974: avrcp_ct_record (avrcp.c:297)
==674==    by 0x8068A6D: avrcp_remote_register (avrcp.c:3149)
==674==    by 0x805F31C: avrcp_remote_server_probe (manager.c:320)
==674==    by 0x80BCB4E: probe_profile (adapter.c:2629)
==674==    by 0x80C5880: btd_profile_foreach (profile.c:639)
==674==    by 0x80C3FD4: adapter_register (adapter.c:5619)
==674==    by 0x80C4A01: read_info_complete (adapter.c:5894)
==674==    by 0x80D489A: request_complete (mgmt.c:221)
==674==    by 0x80D4BA8: received_data (mgmt.c:319)
==674==    by 0x40BF17D: ??? (in
/lib/i386-linux-gnu/libglib-2.0.so.0.3200.3)
==674==
==674== 32 bytes in 1 blocks are definitely lost in loss record 127 of
201
==674==    at 0x402BE68: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==674==    by 0x80DCE49: sdp_data_alloc_with_length (sdp.c:360)
==674==    by 0x80DD33F: sdp_data_alloc (sdp.c:497)
==674==    by 0x806379D: avrcp_ct_record (avrcp.c:272)
==674==    by 0x8068A6D: avrcp_remote_register (avrcp.c:3149)
==674==    by 0x805F31C: avrcp_remote_server_probe (manager.c:320)
==674==    by 0x80BCB4E: probe_profile (adapter.c:2629)
==674==    by 0x80C5880: btd_profile_foreach (profile.c:639)
==674==    by 0x80C3FD4: adapter_register (adapter.c:5619)
==674==    by 0x80C4A01: read_info_complete (adapter.c:5894)
==674==    by 0x80D489A: request_complete (mgmt.c:221)
==674==    by 0x80D4BA8: received_data (mgmt.c:319)
---
 profiles/audio/avrcp.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 715ab8f..e6d0e72 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -245,7 +245,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static sdp_record_t *avrcp_ct_record(void)
 sdp_profile_desc_t profile[1];
 sdp_list_t *aproto, *aproto1, *proto[2], *proto1[2];
 sdp_record_t *record;
-sdp_data_t *psm, *version, *features;
+sdp_data_t *psm[2], *version, *features;
 uint16_t lp = AVCTP_CONTROL_PSM, ap = AVCTP_BROWSING_PSM;
 uint16_t avrcp_ver = 0x0105, avctp_ver = 0x0103;
 uint16_t feat = ( AVRCP_FEATURE_CATEGORY_1 |
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -269,8 +269,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static sdp_record_t *avrcp_ct_record(void)
 /* Protocol Descriptor List */
 sdp_uuid16_create(&amp;amp;l2cap, L2CAP_UUID);
 proto[0] = sdp_list_append(0, &amp;amp;l2cap);
-psm = sdp_data_alloc(SDP_UINT16, &amp;amp;lp);
-proto[0] = sdp_list_append(proto[0], psm);
+psm[0] = sdp_data_alloc(SDP_UINT16, &amp;amp;lp);
+proto[0] = sdp_list_append(proto[0], psm[0]);
 apseq = sdp_list_append(0, proto[0]);
 
 sdp_uuid16_create(&amp;amp;avctp, AVCTP_UUID);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -285,8 +285,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static sdp_record_t *avrcp_ct_record(void)
 /* Additional Protocol Descriptor List */
 sdp_uuid16_create(&amp;amp;l2cap, L2CAP_UUID);
 proto1[0] = sdp_list_append(0, &amp;amp;l2cap);
-psm = sdp_data_alloc(SDP_UINT16, &amp;amp;ap);
-proto1[0] = sdp_list_append(proto1[0], psm);
+psm[1] = sdp_data_alloc(SDP_UINT16, &amp;amp;ap);
+proto1[0] = sdp_list_append(proto1[0], psm[1]);
 apseq1 = sdp_list_append(0, proto1[0]);
 
 sdp_uuid16_create(&amp;amp;avctp, AVCTP_UUID);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -308,13 +308,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static sdp_record_t *avrcp_ct_record(void)
 
 sdp_set_info_attr(record, "AVRCP CT", 0, 0);
 
-free(psm);
+free(psm[0]);
+free(psm[1]);
 free(version);
 sdp_list_free(proto[0], 0);
 sdp_list_free(proto[1], 0);
 sdp_list_free(apseq, 0);
 sdp_list_free(proto1[0], 0);
 sdp_list_free(proto1[1], 0);
+sdp_list_free(aproto1, 0);
 sdp_list_free(apseq1, 0);
 sdp_list_free(pfseq, 0);
 sdp_list_free(aproto, 0);
&lt;/pre&gt;</description>
    <dc:creator>Anderson Lizardo</dc:creator>
    <dc:date>2013-06-12T00:06:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36505">
    <title>[PATCH] lib: Fix two size constants</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36505</link>
    <description>&lt;pre&gt;Fixes the value of RESET_FAILED_CONTACT_COUNTER_RP_SIZE and
RESET_FAILED_CONTACT_COUNTER_RP_SIZE macros to respect the
associated struct.
---

Hi! I was playing with the libbluetooth and found these two constants
wrongly defined. I actually checked with the Core spec that the structs
are fine... but I still have a very very naive question:

Why don't you use sizeof(some_struct) and be happy???

Thanks!
Alex.

 lib/hci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/hci.h b/lib/hci.h
index 56c9316..898cf52 100644
--- a/lib/hci.h
+++ b/lib/hci.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1350,7 +1350,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct {
 uint8_tstatus;
 uint16_thandle;
 } __attribute__ ((packed)) reset_failed_contact_counter_rp;
-#define RESET_FAILED_CONTACT_COUNTER_RP_SIZE 4
+#define RESET_FAILED_CONTACT_COUNTER_RP_SIZE 3
 
 #define OCF_READ_LINK_QUALITY0x0003
 typedef struct {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1764,7 +1764,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef struct {
 uint16_thandle;
 uint8_tencrypt;
 } __attribute__ ((packed)) evt_encrypt_change;
-#define EVT_ENCRYPT_CHANGE_SIZE 5
+#define EVT_ENCRYPT_CHANGE_SIZE 4
 
 #define EVT_CHANGE_CONN_LINK_KEY_COMPLETE0x09
 typedef struct {
&lt;/pre&gt;</description>
    <dc:creator>Alex Deymo</dc:creator>
    <dc:date>2013-06-11T21:16:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36503">
    <title>[PATCH] Bluetooth: btmrvl: fix thread stopping race</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36503</link>
    <description>&lt;pre&gt;There is currently a race condition in the btmrvl_remove_card() which
is causing hangs on suspend for OLPC. When the race occurs,
kthread_stop() never returns.

The problem is that btmrvl_service_main_thread() calls kthread_should_stop()
and then does a fair number of things before restarting the loop and
sleeping.

If the thread gets stopped after kthread_should_stop() is checked, but
before the sleep happens, the thread will go to sleep and won't necessarily
be woken up.

Move the kthread_should_stop() check into a race-free place.

Signed-off-by: Daniel Drake &amp;lt;dsd-2X9k7bc8m7Mdnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/bluetooth/btmrvl_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 3a4343b..9a9f518 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -498,6 +498,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btmrvl_service_main_thread(void *data)
 add_wait_queue(&amp;amp;thread-&amp;gt;wait_q, &amp;amp;wait);
 
 set_current_state(TASK_INTERRUPTIBLE);
+if (kthread_should_stop()) {
+BT_DBG("main_thread: break from main thread");
+break;
+}
 
 if (adapter-&amp;gt;wakeup_tries ||
 ((!adapter-&amp;gt;int_count) &amp;amp;&amp;amp;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -513,11 +517,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btmrvl_service_main_thread(void *data)
 
 BT_DBG("main_thread woke up");
 
-if (kthread_should_stop()) {
-BT_DBG("main_thread: break from main thread");
-break;
-}
-
 spin_lock_irqsave(&amp;amp;priv-&amp;gt;driver_lock, flags);
 if (adapter-&amp;gt;int_count) {
 adapter-&amp;gt;int_count = 0;
&lt;/pre&gt;</description>
    <dc:creator>Daniel Drake</dc:creator>
    <dc:date>2013-06-11T19:40:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36494">
    <title>[PATCH 1/9] adapter: fix setting of discoverable timeout</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36494</link>
    <description>&lt;pre&gt;From: Gustavo Padovan &amp;lt;gustavo.padovan-ZGY8ohtN/8pPYcu2f3hruQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

The mgmt_cp_set_discoverable struct was getting reset for no reason after
we set up the discoverable timeout value.
---
 src/adapter.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 1250966..af3e3ea 100644
--- a/src/adapter.c
+++ b/src/adapter.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1907,9 +1907,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
 goto failed;
 }
 
-memset(&amp;amp;cp, 0, sizeof(cp));
-cp.val = (enable == TRUE) ? 0x01 : 0x00;
-
 DBG("sending %s command for index %u", mgmt_opstr(opcode),
 adapter-&amp;gt;dev_id);
 
&lt;/pre&gt;</description>
    <dc:creator>Gustavo Padovan</dc:creator>
    <dc:date>2013-06-11T10:56:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.bluez.kernel/36480">
    <title>[RFC v1 1/9] adapter: fix setting of discoverable timeout</title>
    <link>http://comments.gmane.org/gmane.linux.bluez.kernel/36480</link>
    <description>&lt;pre&gt;From: Gustavo Padovan &amp;lt;gustavo.padovan-ZGY8ohtN/8pPYcu2f3hruQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

The mgmt_cp_set_discoverable struct was getting reset for no reason after
we set up the discoverable timeout value.
---
 src/adapter.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 1250966..af3e3ea 100644
--- a/src/adapter.c
+++ b/src/adapter.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1907,9 +1907,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
 goto failed;
 }
 
-memset(&amp;amp;cp, 0, sizeof(cp));
-cp.val = (enable == TRUE) ? 0x01 : 0x00;
-
 DBG("sending %s command for index %u", mgmt_opstr(opcode),
 adapter-&amp;gt;dev_id);
 
&lt;/pre&gt;</description>
    <dc:creator>Gustavo Padovan</dc:creator>
    <dc:date>2013-06-11T00:03:23</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.bluez.kernel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.bluez.kernel</link>
  </textinput>
</rdf:RDF>
