<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bluetooth, branch v5.1-rc5</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.1-rc5</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.1-rc5'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2019-02-26T09:08:26Z</updated>
<entry>
<title>Bluetooth: Add quirk for reading BD_ADDR from fwnode property</title>
<updated>2019-02-26T09:08:26Z</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2019-02-19T20:05:57Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=7a0e5b15ca458dd47e4c60b7fa9f22b84c7068c7'/>
<id>urn:sha1:7a0e5b15ca458dd47e4c60b7fa9f22b84c7068c7</id>
<content type='text'>
Add HCI_QUIRK_USE_BDADDR_PROPERTY to allow controllers to retrieve
the public Bluetooth address from the firmware node property
'local-bd-address'. If quirk is set and the property does not exist
or is invalid the controller is marked as unconfigured.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Tested-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: mgmt: Use struct_size() helper</title>
<updated>2019-02-26T08:46:49Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-25T19:11:37Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=4a67e5d4adbf3b419f17924322f468ac5cb8c14f'/>
<id>urn:sha1:4a67e5d4adbf3b419f17924322f468ac5cb8c14f</id>
<content type='text'>
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*rp) + (sizeof(rp-&gt;entry[0]) * count);

to :

struct_size(rp, entry, count)

Notice that, in this case, variable rp_len is not necessary, hence
it is removed.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next</title>
<updated>2019-02-25T06:27:19Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2019-02-25T06:27:19Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e8b47b53a172e74dd9907eb7810f02a1d09fb29b'/>
<id>urn:sha1:e8b47b53a172e74dd9907eb7810f02a1d09fb29b</id>
<content type='text'>
Johan Hedberg says:

====================
Here's the main bluetooth-next pull request for the 5.1 kernel.

 - Fixes &amp; improvements to mediatek, hci_qca, btrtl, and btmrvl HCI drivers
 - Fixes to parsing invalid L2CAP config option sizes
 - Locking fix to bt_accept_enqueue()
 - Add support for new Marvel sd8977 chipset
 - Various other smaller fixes &amp; cleanups
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: a2mp: Use struct_size() helper</title>
<updated>2019-02-18T13:01:59Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-08T00:28:17Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=3c97ce1f86851bff81876ec0ced73527d2f08a01'/>
<id>urn:sha1:3c97ce1f86851bff81876ec0ced73527d2f08a01</id>
<content type='text'>
One of the more common cases of allocation size calculations is finding
the size of a structure that has a zero-sized array at the end, along
with memory for some number of elements for that array. For example:

struct foo {
    int stuff;
    struct boo entry[];
};

size = sizeof(struct foo) + count * sizeof(struct boo);
instance = alloc(size, GFP_KERNEL)

Instead of leaving these open-coded and prone to type mistakes, we can
now use the new struct_size() helper:

size = struct_size(instance, entry, count);
instance = alloc(size, GFP_KERNEL)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_event: Use struct_size() helper</title>
<updated>2019-02-18T13:00:09Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-02-08T00:40:33Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=16e183423f1a3aeb603d7648d2ca3a578d5a9941'/>
<id>urn:sha1:16e183423f1a3aeb603d7648d2ca3a578d5a9941</id>
<content type='text'>
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*ev) + ev-&gt;num_hndl * sizeof(struct hci_comp_pkts_info)

 to :

struct_size(ev, handles, ev-&gt;num_hndl)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Fix decrementing reference count twice in releasing socket</title>
<updated>2019-02-04T14:43:46Z</updated>
<author>
<name>Myungho Jung</name>
<email>mhjungk@gmail.com</email>
</author>
<published>2019-02-03T00:56:36Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e20a2e9c42c9e4002d9e338d74e7819e88d77162'/>
<id>urn:sha1:e20a2e9c42c9e4002d9e338d74e7819e88d77162</id>
<content type='text'>
When releasing socket, it is possible to enter hci_sock_release() and
hci_sock_dev_event(HCI_DEV_UNREG) at the same time in different thread.
The reference count of hdev should be decremented only once from one of
them but if storing hdev to local variable in hci_sock_release() before
detached from socket and setting to NULL in hci_sock_dev_event(),
hci_dev_put(hdev) is unexpectedly called twice. This is resolved by
referencing hdev from socket after bt_sock_unlink() in
hci_sock_release().

Reported-by: syzbot+fdc00003f4efff43bc5b@syzkaller.appspotmail.com
Signed-off-by: Myungho Jung &lt;mhjungk@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>socket: Use old_timeval types for socket timestamps</title>
<updated>2019-02-03T19:17:30Z</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2019-02-02T15:34:48Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=13c6ee2a921683bae4bb4ba57b1f5b82f49e6b8a'/>
<id>urn:sha1:13c6ee2a921683bae4bb4ba57b1f5b82f49e6b8a</id>
<content type='text'>
As part of y2038 solution, all internal uses of
struct timeval are replaced by struct __kernel_old_timeval
and struct compat_timeval by struct old_timeval32.
Make socket timestamps use these new types.

This is mainly to be able to verify that the kernel build
is y2038 safe when such non y2038 safe types are not
supported anymore.

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Cc: isdn@linux-pingi.de
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Bluetooth: make hw_err static, reduces object code size</title>
<updated>2019-01-25T07:53:58Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-01-24T17:22:54Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1e4b6e91b46d26fdee2385f33a18115db2f0b490'/>
<id>urn:sha1:1e4b6e91b46d26fdee2385f33a18115db2f0b490</id>
<content type='text'>
Don't populate the const array hw_err on the stack but instead make
it static. Makes the object code smaller by 45 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
 100880	  21090	   1088	 123058	  1e0b2	linux/net/bluetooth/hci_core.o

After:
   text	   data	    bss	    dec	    hex	filename
 100739	  21186	   1088	 123013	  1e085	linux/net/bluetooth/hci_core.o

(gcc version 8.2.0 x86_64)

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Allow driver specific cmd timeout handling</title>
<updated>2019-01-25T07:46:32Z</updated>
<author>
<name>Rajat Jain</name>
<email>rajatja@google.com</email>
</author>
<published>2019-01-24T23:28:13Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e2bef3847e3d0d57dcf316de50c4b1a5a91816b7'/>
<id>urn:sha1:e2bef3847e3d0d57dcf316de50c4b1a5a91816b7</id>
<content type='text'>
Add a hook to allow the BT driver to do device or command specific
handling in case of timeouts. This is to be used by Intel driver to
reset the device after certain number of timeouts.

Signed-off-by: Rajat Jain &lt;rajatja@google.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Mark expected switch fall-throughs</title>
<updated>2019-01-23T17:27:16Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-01-23T07:20:31Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=6317950c1b9c3d2a64ccbdf1ab37650a48cb5009'/>
<id>urn:sha1:6317950c1b9c3d2a64ccbdf1ab37650a48cb5009</id>
<content type='text'>
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

This patch fixes the following warnings:

net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enabling
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
