<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/bluetooth, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-05-20T14:30:33Z</updated>
<entry>
<title>Bluetooth: Consolidate encryption handling in hci_encrypt_cfm</title>
<updated>2020-05-20T14:30:33Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
<email>luiz.von.dentz@intel.com</email>
</author>
<published>2020-05-19T20:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ca44c16b0dcc764b641ee4ac226909f5c421aa3'/>
<id>urn:sha1:3ca44c16b0dcc764b641ee4ac226909f5c421aa3</id>
<content type='text'>
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: L2CAP: Replace zero-length array with flexible-array</title>
<updated>2020-05-18T07:57:41Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-05-13T17:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=631512f868a4a49a48bda753752d085621c68112'/>
<id>urn:sha1:631512f868a4a49a48bda753752d085621c68112</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

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

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

sizeof(flexible-array-member) triggers a warning because flexible array
members have incomplete type[1]. There are some instances of code in
which the sizeof operator is being incorrectly/erroneously applied to
zero-length arrays and the result is zero. Such instances may be hiding
some bugs. So, this work (flexible-array member conversions) will also
help to get completely rid of those sorts of issues.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Add hook for driver to prevent wake from suspend</title>
<updated>2020-05-13T07:12:04Z</updated>
<author>
<name>Abhishek Pandit-Subedi</name>
<email>abhishekpandit@chromium.org</email>
</author>
<published>2020-05-13T02:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81dafad53c67abe4f09b0b04131fe490e76e5602'/>
<id>urn:sha1:81dafad53c67abe4f09b0b04131fe490e76e5602</id>
<content type='text'>
Let drivers have a hook to disable configuring scanning during suspend.
Drivers should use the device_may_wakeup function call to determine
whether hci should be configured for wakeup.

For example, an implementation for btusb may look like the following:

  bool btusb_prevent_wake(struct hci_dev *hdev)
  {
        struct btusb_data *data = hci_get_drvdata(hdev);
        return !device_may_wakeup(&amp;data-&gt;udev-&gt;dev);
  }

Signed-off-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Reviewed-by: Alain Michaud &lt;alainm@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Rename BT_SUSPEND_COMPLETE</title>
<updated>2020-05-13T07:12:04Z</updated>
<author>
<name>Abhishek Pandit-Subedi</name>
<email>abhishekpandit@chromium.org</email>
</author>
<published>2020-05-13T02:19:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d2c9825e46d45f8a520135c9c791b5c73a165ab'/>
<id>urn:sha1:0d2c9825e46d45f8a520135c9c791b5c73a165ab</id>
<content type='text'>
Renamed BT_SUSPEND_COMPLETE to BT_SUSPEND_CONFIGURE_WAKE since it sets
up the event filter and whitelist for wake-up.

Signed-off-by: Abhishek Pandit-Subedi &lt;abhishekpandit@chromium.org&gt;
Reviewed-by: Alain Michaud &lt;alainm@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Introduce debug feature when dynamic debug is disabled</title>
<updated>2020-05-11T10:16:27Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2020-05-06T07:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e625e50ceee18bc1e3fb1a6375e089405a797a4d'/>
<id>urn:sha1:e625e50ceee18bc1e3fb1a6375e089405a797a4d</id>
<content type='text'>
In case dynamic debug is disabled, this feature allows a vendor platform
to provide debug statement printing.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Add support for experimental features configuration</title>
<updated>2020-05-11T10:13:38Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2020-05-06T07:57:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a10c907ce0e5e138c3da091fcb7c3d109a15aec5'/>
<id>urn:sha1:a10c907ce0e5e138c3da091fcb7c3d109a15aec5</id>
<content type='text'>
To enable platform specific experimental features, introduce this new set of
management commands and events.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Introduce HCI_MGMT_HDEV_OPTIONAL option</title>
<updated>2020-05-11T10:13:38Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2020-05-06T07:57:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5cc6626b33780699c7a4986f3521361306862fe'/>
<id>urn:sha1:d5cc6626b33780699c7a4986f3521361306862fe</id>
<content type='text'>
When setting HCI_MGMT_HDEV_OPTIONAL it is possible to target a specific
conntroller or a global interface.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: replace zero-length array with flexible-array member</title>
<updated>2020-05-11T10:13:38Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2020-05-06T07:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14a81bf021fb428d1df484dba37bea155e8eec0f'/>
<id>urn:sha1:14a81bf021fb428d1df484dba37bea155e8eec0f</id>
<content type='text'>
The current codebase makes use of the zero-length array language extension
to the C90 standard, but the preferred mechanism to declare variable-length
types such as these ones is a flexible array member.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Adding driver and quirk defs for multi-role LE</title>
<updated>2020-04-28T09:49:01Z</updated>
<author>
<name>Alain Michaud</name>
<email>alainm@chromium.org</email>
</author>
<published>2020-04-23T14:43:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=220915857e29795ae5ba4222806268b4a99c19c1'/>
<id>urn:sha1:220915857e29795ae5ba4222806268b4a99c19c1</id>
<content type='text'>
This change adds the relevant driver and quirk to allow drivers to
report the le_states as being trustworthy.

This has historically been disabled as controllers did not reliably
support this. In particular, this will be used to relax this condition
for controllers that have been well tested and reliable.

	/* Most controller will fail if we try to create new connections
	 * while we have an existing one in slave role.
	 */
	if (hdev-&gt;conn_hash.le_num_slave &gt; 0)
		return NULL;

Signed-off-by: Alain Michaud &lt;alainm@chromium.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Clear HCI_LL_RPA_RESOLUTION flag on reset</title>
<updated>2020-04-15T13:51:07Z</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2020-04-09T06:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2eb71a3a68c387274cfc1bc43eac25138add528d'/>
<id>urn:sha1:2eb71a3a68c387274cfc1bc43eac25138add528d</id>
<content type='text'>
When the controller is being reset or power cycled, then the flag
HCI_LL_RPA_RESOLUTION which indicates if controller based address
resolution is active needs to be also reset.

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