<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/bluetooth/hci_request.c, branch v4.10</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Bluetooth: Fix append max 11 bytes of name to scan rsp data</title>
<updated>2016-10-19T16:42:37+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-10-19T08:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f61851f64b171a684f5a1fa78325756dbbaadadc'/>
<id>f61851f64b171a684f5a1fa78325756dbbaadadc</id>
<content type='text'>
Append maximum of 10 + 1 bytes of name to scan response data.
Complete name is appended only if exists and is &lt;= 10 characters.
Else append short name if exists or shorten complete name if not.
This makes sure name is consistent across multiple advertising
instances.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Append maximum of 10 + 1 bytes of name to scan response data.
Complete name is appended only if exists and is &lt;= 10 characters.
Else append short name if exists or shorten complete name if not.
This makes sure name is consistent across multiple advertising
instances.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Refactor append name and appearance</title>
<updated>2016-10-06T09:52:29+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-10-05T10:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b422066658b7cc985fa020066b72d28159d858f'/>
<id>1b422066658b7cc985fa020066b72d28159d858f</id>
<content type='text'>
Use eir_append_data to remove code duplication.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use eir_append_data to remove code duplication.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add appearance to default scan rsp data</title>
<updated>2016-10-06T09:52:29+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-10-05T10:28:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7ddb30c7471ed69b75ae4c2601d45cbda5d390ff'/>
<id>7ddb30c7471ed69b75ae4c2601d45cbda5d390ff</id>
<content type='text'>
Add appearance value to beginning of scan rsp data for
default advertising instance if the value is not 0.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add appearance value to beginning of scan rsp data for
default advertising instance if the value is not 0.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix local name in scan rsp</title>
<updated>2016-10-06T09:52:29+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-10-05T10:28:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cecbf3e932c1fa6df45fd6cc4fc8081a4cb45bcd'/>
<id>cecbf3e932c1fa6df45fd6cc4fc8081a4cb45bcd</id>
<content type='text'>
Use complete name if it fits. If not and there is short name
check if it fits. If not then use shortened name as prefix
of complete name.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use complete name if it fits. If not and there is short name
check if it fits. If not then use shortened name as prefix
of complete name.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add support for appearance in scan rsp</title>
<updated>2016-09-19T18:19:34+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-09-18T10:50:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4960ecf2b09210930964ef2c05ce2590802ccf4'/>
<id>c4960ecf2b09210930964ef2c05ce2590802ccf4</id>
<content type='text'>
This patch enables prepending appearance value to scan response data.
It also adds support for setting appearance value through mgmt command.
If currently advertised instance has apperance flag set it is expired
immediately.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Szymon Janc &lt;szymon.janc@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables prepending appearance value to scan response data.
It also adds support for setting appearance value through mgmt command.
If currently advertised instance has apperance flag set it is expired
immediately.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Szymon Janc &lt;szymon.janc@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add support for local name in scan rsp</title>
<updated>2016-09-19T18:19:34+00:00</updated>
<author>
<name>Michał Narajowski</name>
<email>michal.narajowski@codecoup.pl</email>
</author>
<published>2016-09-18T10:50:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7c295c4801b2de24fc25687eb0cb73cf0c99d114'/>
<id>7c295c4801b2de24fc25687eb0cb73cf0c99d114</id>
<content type='text'>
This patch enables appending local name to scan response data. If
currently advertised instance has name flag set it is expired
immediately.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Szymon Janc &lt;szymon.janc@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables appending local name to scan response data. If
currently advertised instance has name flag set it is expired
immediately.

Signed-off-by: Michał Narajowski &lt;michal.narajowski@codecoup.pl&gt;
Signed-off-by: Szymon Janc &lt;szymon.janc@codecoup.pl&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix reason code used for rejecting SCO connections</title>
<updated>2016-09-19T18:19:34+00:00</updated>
<author>
<name>Frédéric Dalleau</name>
<email>frederic.dalleau@collabora.co.uk</email>
</author>
<published>2016-09-08T10:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c0975a7a1087add3bf873601f0270aa695d7616'/>
<id>3c0975a7a1087add3bf873601f0270aa695d7616</id>
<content type='text'>
A comment in the code states that SCO connection should be rejected
with the proper error value between 0xd-0xf. The code uses
HCI_ERROR_REMOTE_LOW_RESOURCES which is 0x14.

This led to following error:
&lt; HCI Command: Reject Synchronous Co.. (0x01|0x002a) plen 7
        Address: 34:51:C9:EF:02:CA (Apple, Inc.)
        Reason: Remote Device Terminated due to Low Resources (0x14)
&gt; HCI Event: Command Status (0x0f) plen 4
      Reject Synchronous Connection Request (0x01|0x002a) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Instead make use of HCI_ERROR_REJ_LIMITED_RESOURCES which is 0xd.

Signed-off-by: Frédéric Dalleau &lt;frederic.dalleau@collabora.co.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A comment in the code states that SCO connection should be rejected
with the proper error value between 0xd-0xf. The code uses
HCI_ERROR_REMOTE_LOW_RESOURCES which is 0x14.

This led to following error:
&lt; HCI Command: Reject Synchronous Co.. (0x01|0x002a) plen 7
        Address: 34:51:C9:EF:02:CA (Apple, Inc.)
        Reason: Remote Device Terminated due to Low Resources (0x14)
&gt; HCI Event: Command Status (0x0f) plen 4
      Reject Synchronous Connection Request (0x01|0x002a) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Instead make use of HCI_ERROR_REJ_LIMITED_RESOURCES which is 0xd.

Signed-off-by: Frédéric Dalleau &lt;frederic.dalleau@collabora.co.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: mgmt: Fix sending redundant event for Advertising Instance</title>
<updated>2016-09-19T18:19:34+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2016-08-28T17:53:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37d3a1fab50fa07ac706787646e61c60e7c520e0'/>
<id>37d3a1fab50fa07ac706787646e61c60e7c520e0</id>
<content type='text'>
When an Advertising Instance is removed, the Advertising Removed event
shouldn't be sent to the same socket that issued the Remove
Advertising command (it gets a command complete event instead). The
mgmt_advertising_removed() function already has a parameter for
skipping a specific socket, but there was no code to propagate the
right value to this parameter. This patch fixes the issue by making
sure the intermediate hci_req_clear_adv_instance() function gets the
socket pointer.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an Advertising Instance is removed, the Advertising Removed event
shouldn't be sent to the same socket that issued the Remove
Advertising command (it gets a command complete event instead). The
mgmt_advertising_removed() function already has a parameter for
skipping a specific socket, but there was no code to propagate the
right value to this parameter. This patch fixes the issue by making
sure the intermediate hci_req_clear_adv_instance() function gets the
socket pointer.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix memory leak at end of hci requests</title>
<updated>2016-08-24T14:49:29+00:00</updated>
<author>
<name>Frederic Dalleau</name>
<email>frederic.dalleau@collabora.co.uk</email>
</author>
<published>2016-08-23T05:59:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9afee94939e3eda4c8bf239f7727cb56e158c976'/>
<id>9afee94939e3eda4c8bf239f7727cb56e158c976</id>
<content type='text'>
In hci_req_sync_complete the event skb is referenced in hdev-&gt;req_skb.
It is used (via hci_req_run_skb) from either __hci_cmd_sync_ev which will
pass the skb to the caller, or __hci_req_sync which leaks.

unreferenced object 0xffff880005339a00 (size 256):
  comm "kworker/u3:1", pid 1011, jiffies 4294671976 (age 107.389s)
  backtrace:
    [&lt;ffffffff818d89d9&gt;] kmemleak_alloc+0x49/0xa0
    [&lt;ffffffff8116bba8&gt;] kmem_cache_alloc+0x128/0x180
    [&lt;ffffffff8167c1df&gt;] skb_clone+0x4f/0xa0
    [&lt;ffffffff817aa351&gt;] hci_event_packet+0xc1/0x3290
    [&lt;ffffffff8179a57b&gt;] hci_rx_work+0x18b/0x360
    [&lt;ffffffff810692ea&gt;] process_one_work+0x14a/0x440
    [&lt;ffffffff81069623&gt;] worker_thread+0x43/0x4d0
    [&lt;ffffffff8106ead4&gt;] kthread+0xc4/0xe0
    [&lt;ffffffff818dd38f&gt;] ret_from_fork+0x1f/0x40
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Frédéric Dalleau &lt;frederic.dalleau@collabora.co.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In hci_req_sync_complete the event skb is referenced in hdev-&gt;req_skb.
It is used (via hci_req_run_skb) from either __hci_cmd_sync_ev which will
pass the skb to the caller, or __hci_req_sync which leaks.

unreferenced object 0xffff880005339a00 (size 256):
  comm "kworker/u3:1", pid 1011, jiffies 4294671976 (age 107.389s)
  backtrace:
    [&lt;ffffffff818d89d9&gt;] kmemleak_alloc+0x49/0xa0
    [&lt;ffffffff8116bba8&gt;] kmem_cache_alloc+0x128/0x180
    [&lt;ffffffff8167c1df&gt;] skb_clone+0x4f/0xa0
    [&lt;ffffffff817aa351&gt;] hci_event_packet+0xc1/0x3290
    [&lt;ffffffff8179a57b&gt;] hci_rx_work+0x18b/0x360
    [&lt;ffffffff810692ea&gt;] process_one_work+0x14a/0x440
    [&lt;ffffffff81069623&gt;] worker_thread+0x43/0x4d0
    [&lt;ffffffff8106ead4&gt;] kthread+0xc4/0xe0
    [&lt;ffffffff818dd38f&gt;] ret_from_fork+0x1f/0x40
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: Frédéric Dalleau &lt;frederic.dalleau@collabora.co.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix setting NO_BREDR advertising flag</title>
<updated>2016-04-08T16:50:40+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2016-04-06T10:09:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f18ba58f538e44a701ad0b86d47bb57b917d7c0a'/>
<id>f18ba58f538e44a701ad0b86d47bb57b917d7c0a</id>
<content type='text'>
If we're dealing with a single-mode controller or BR/EDR is disable
for a dual-mode one, the NO_BREDR flag needs to be unconditionally
present in the advertising data. This patch moves it out from behind
an extra condition to be always set in the create_instance_adv_data()
function if BR/EDR is disabled.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we're dealing with a single-mode controller or BR/EDR is disable
for a dual-mode one, the NO_BREDR flag needs to be unconditionally
present in the advertising data. This patch moves it out from behind
an extra condition to be always set in the create_instance_adv_data()
function if BR/EDR is disabled.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
