<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/bluetooth, branch v6.3</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=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-10T17:23:15Z</updated>
<entry>
<title>bluetooth: btbcm: Fix logic error in forming the board name.</title>
<updated>2023-04-10T17:23:15Z</updated>
<author>
<name>Sasha Finkelstein</name>
<email>fnkl.kernel@gmail.com</email>
</author>
<published>2023-03-10T10:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b76abe4648c1acc791a207e7c08d1719eb9f4ea8'/>
<id>urn:sha1:b76abe4648c1acc791a207e7c08d1719eb9f4ea8</id>
<content type='text'>
This patch fixes an incorrect loop exit condition in code that replaces
'/' symbols in the board name. There might also be a memory corruption
issue here, but it is unlikely to be a real problem.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Sasha Finkelstein &lt;fnkl.kernel@gmail.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition</title>
<updated>2023-04-10T17:23:01Z</updated>
<author>
<name>Zheng Wang</name>
<email>zyytlz.wz@163.com</email>
</author>
<published>2023-03-08T16:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73f7b171b7c09139eb3c6a5677c200dc1be5f318'/>
<id>urn:sha1:73f7b171b7c09139eb3c6a5677c200dc1be5f318</id>
<content type='text'>
In btsdio_probe, the data-&gt;work is bound with btsdio_work. It will be
started in btsdio_send_frame.

If the btsdio_remove runs with a unfinished work, there may be a race
condition that hdev is freed but used in btsdio_work. Fix it by
canceling the work before do cleanup in btsdio_remove.

Signed-off-by: Zheng Wang &lt;zyytlz.wz@163.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work</title>
<updated>2023-03-23T20:09:38Z</updated>
<author>
<name>Zheng Wang</name>
<email>zyytlz.wz@163.com</email>
</author>
<published>2023-03-09T08:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e9ac114c4428fdb7ff4635b45d4f46017e8916f'/>
<id>urn:sha1:1e9ac114c4428fdb7ff4635b45d4f46017e8916f</id>
<content type='text'>
In btsdio_probe, &amp;data-&gt;work was bound with btsdio_work.In
btsdio_send_frame, it was started by schedule_work.

If we call btsdio_remove with an unfinished job, there may
be a race condition and cause UAF bug on hdev.

Fixes: ddbaf13e3609 ("[Bluetooth] Add generic driver for Bluetooth SDIO devices")
Signed-off-by: Zheng Wang &lt;zyytlz.wz@163.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btqcomsmd: Fix command timeout after setting BD address</title>
<updated>2023-03-23T20:09:38Z</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan.gerhold@kernkonzept.com</email>
</author>
<published>2023-03-08T13:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d44ab9e204200a78ad55cdf185aa2bb109b5950'/>
<id>urn:sha1:5d44ab9e204200a78ad55cdf185aa2bb109b5950</id>
<content type='text'>
On most devices using the btqcomsmd driver (e.g. the DragonBoard 410c
and other devices based on the Qualcomm MSM8916/MSM8909/... SoCs)
the Bluetooth firmware seems to become unresponsive for a while after
setting the BD address. On recent kernel versions (at least 5.17+)
this often causes timeouts for subsequent commands, e.g. the HCI reset
sent by the Bluetooth core during initialization:

    Bluetooth: hci0: Opcode 0x c03 failed: -110

Unfortunately this behavior does not seem to be documented anywhere.
Experimentation suggests that the minimum necessary delay to avoid
the problem is ~150us. However, to be sure add a sleep for &gt; 1ms
in case it is a bit longer on other firmware versions.

Older kernel versions are likely also affected, although perhaps with
slightly different errors or less probability. Side effects can easily
hide the issue in most cases, e.g. unrelated incoming interrupts that
cause the necessary delay.

Fixes: 1511cc750c3d ("Bluetooth: Introduce Qualcomm WCNSS SMD based HCI driver")
Signed-off-by: Stephan Gerhold &lt;stephan.gerhold@kernkonzept.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btinel: Check ACPI handle for NULL before accessing</title>
<updated>2023-03-23T20:09:26Z</updated>
<author>
<name>Kiran K</name>
<email>kiran.k@intel.com</email>
</author>
<published>2023-03-08T07:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=902160cdb2bf4d23cd75f43ed0597ddf0134bb89'/>
<id>urn:sha1:902160cdb2bf4d23cd75f43ed0597ddf0134bb89</id>
<content type='text'>
Older platforms and Virtual platforms which doesn't have support for
bluetooth device in ACPI firmware will not have valid ACPI handle.
Check for validity of handle before accessing.

dmesg log from simics environment (virtual platform):

BUG: unable to handle kernel NULL pointer dereference at
0000000000000018
IP: acpi_ns_walk_namespace+0x5c/0x278
PGD 0 P4D 0
Oops: 0000 [#1] SMP PTI
Modules linked in: bnep intel_powerclamp coretemp kvm_intel
kvm irqbypass intel_cstate input_leds joydev serio_raw mac_hid
btusb(OE) btintel(OE) bluetooth(OE) lpc_ich compat(OE) ecdh_generic
i7core_edac i5500_temp shpchp binfmt_misc sch_fq_codel parport_pc ppdev
lp parport ip_tables x_tables autofs4 hid_generic usbhid hid e1000e
psmouse ahci pata_acpi libahci ptp pps_core floppy
CPU: 0 PID: 35 Comm: kworker/u3:0 Tainted: G           OE
4.15.0-140-generic #144-Ubuntu
Hardware name: Simics Simics, BIOS Simics 01/01/2011
Workqueue: hci0 hci_power_on [bluetooth]
RIP: 0010:acpi_ns_walk_namespace+0x5c/0x278
RSP: 0000:ffffaa9c0049bba8 EFLAGS: 00010246
RAX: 0000000000000001 RBX: 0000000000001001 RCX: 0000000000000010
RDX: ffffffff92ea7e27 RSI: ffffffff92ea7e10 RDI: 00000000000000c8
RBP: ffffaa9c0049bbf8 R08: 0000000000000000 R09: ffffffffc05b39d0
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
R13: 0000000000000000 R14: ffffffffc05b39d0 R15: ffffaa9c0049bc70
FS:  0000000000000000(0000) GS:ffff8be73fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000018 CR3: 0000000075f0e000 CR4: 00000000000006f0

Fixes: 294d749b5df5 ("Bluetooth: btintel: Iterate only bluetooth device ACPI entries")
Signed-off-by: Kiran K &lt;kiran.k@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btintel: Iterate only bluetooth device ACPI entries</title>
<updated>2023-03-22T23:05:55Z</updated>
<author>
<name>Kiran K</name>
<email>kiran.k@intel.com</email>
</author>
<published>2023-02-28T11:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=294d749b5df5a22d17989833fb1a0a2cd1dfd243'/>
<id>urn:sha1:294d749b5df5a22d17989833fb1a0a2cd1dfd243</id>
<content type='text'>
Current flow interates over entire ACPI table entries looking for
Bluetooth Per Platform Antenna Gain(PPAG) entry. This patch iterates
over ACPI entries relvant to Bluetooth device only.

Fixes: c585a92b2f9c ("Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)")
Signed-off-by: Kiran K &lt;kiran.k@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Remove detection of ISO packets over bulk</title>
<updated>2023-03-22T23:05:55Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
<email>luiz.von.dentz@intel.com</email>
</author>
<published>2023-02-24T23:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=efe375b716c1c1c9b52a816f5b933a95421020a2'/>
<id>urn:sha1:efe375b716c1c1c9b52a816f5b933a95421020a2</id>
<content type='text'>
This removes the code introduced by
14202eff214e1e941fefa0366d4c3bc4b1a0d500 as hci_recv_frame is now able
to detect ACL packets that are in fact ISO packets.

Fixes: 14202eff214e ("Bluetooth: btusb: Detect if an ACL packet is in fact an ISO packet")
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btintel: Set Per Platform Antenna Gain(PPAG)</title>
<updated>2023-02-09T22:20:04Z</updated>
<author>
<name>Seema Sreemantha</name>
<email>seema.sreemantha@intel.com</email>
</author>
<published>2023-02-06T06:51:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c585a92b2f9c624b0b62b2af1eb0ea6d11cb5cac'/>
<id>urn:sha1:c585a92b2f9c624b0b62b2af1eb0ea6d11cb5cac</id>
<content type='text'>
Antenna gain is defined as the antenna’s ability to
increase the Tx power in a given direction. Intel
is certifying its products with fixed reference
antenna peak gain values (3/5dBi). The feature takes
into account the actual antenna gain, and increases
output power values, which results in a performance
improvement.

After firmware download is completed, driver reads from
ACPI table and configures PPAG as required. ACPI table
entry for PPAG is defined as below.

Name (PPAG, Package (0x02)
{
    0x00000001,
    Package (0x02)
    {
        0x00000012, /* Bluetooth Domain */
        0x00000001  /* 1 - Enable PPAG, 0 - Disable PPAG */
    }
})

btmon log:
&lt; HCI Command: Intel Configure Per Platform Antenna Gain (0x3f|0x0219) plen 12
        Mcc: 0x00000000
        Selector: Enable
        Delta: 0x00000000
&gt; HCI Event: Command Complete (0x0e) plen 4
      Intel Configure Per Platform Antenna Gain (0x3f|0x0219) ncmd 1
        Status: Success (0x00)

Signed-off-by: Kiran K &lt;kiran.k@intel.com&gt;
Signed-off-by: Seema Sreemantha &lt;seema.sreemantha@intel.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_qca: get wakeup status from serdev device handle</title>
<updated>2023-02-09T22:19:08Z</updated>
<author>
<name>Zhengping Jiang</name>
<email>jiangzp@google.com</email>
</author>
<published>2023-02-02T17:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03b0093f7b310493bc944a20f725228cfe0d3fea'/>
<id>urn:sha1:03b0093f7b310493bc944a20f725228cfe0d3fea</id>
<content type='text'>
Bluetooth controller attached via the UART is handled by the serdev driver.
Get the wakeup status from the device handle through serdev, instead of the
parent path.

Fixes: c1a74160eaf1 ("Bluetooth: hci_qca: Add device_may_wakeup support")
Signed-off-by: Zhengping Jiang &lt;jiangzp@google.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: qca: Fix sparse warnings</title>
<updated>2023-02-09T22:17:23Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
<email>luiz.von.dentz@intel.com</email>
</author>
<published>2023-01-05T23:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fec2972a3155b3f6deb6fa8f06fcd645695d6b49'/>
<id>urn:sha1:fec2972a3155b3f6deb6fa8f06fcd645695d6b49</id>
<content type='text'>
This fixes the following warnings:

drivers/bluetooth/hci_qca.c:1014:26: warning: cast to restricted __le16
drivers/bluetooth/hci_qca.c:1028:37: warning: cast to restricted __le32

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
</feed>
