<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/bluetooth/btmtkuart.c, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-01-25T23:35:29+00:00</updated>
<entry>
<title>Bluetooth: btmtkuart: fix recv_buf() return value</title>
<updated>2024-01-25T23:35:29+00:00</updated>
<author>
<name>Francesco Dolcini</name>
<email>francesco.dolcini@toradex.com</email>
</author>
<published>2023-12-11T16:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f37a5c9d3666a66649508ccec1aed95a54510bc'/>
<id>urn:sha1:0f37a5c9d3666a66649508ccec1aed95a54510bc</id>
<content type='text'>
[ Upstream commit 64057f051f20c2a2184b9db7f8037d928d68a4f4 ]

Serdev recv_buf() callback is supposed to return the amount of bytes
consumed, therefore an int in between 0 and count.

Do not return negative number in case of issue, just print an error and
return count. This fixes a WARN in ttyport_receive_buf().

Link: https://lore.kernel.org/all/087be419-ec6b-47ad-851a-5e1e3ea5cfcc@kernel.org/
Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices")
Signed-off-by: Francesco Dolcini &lt;francesco.dolcini@toradex.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>bluetooth: Explicitly include correct DT includes</title>
<updated>2023-08-11T18:50:24+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e15f44fb9cb26168a1171a3e8f7f44d11a2727b8'/>
<id>urn:sha1:e15f44fb9cb26168a1171a3e8f7f44d11a2727b8</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: mark OF related data as maybe unused</title>
<updated>2023-04-24T04:49:47+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2023-03-11T11:13:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a88ea43b73f109e446f6027df237c8f868127a78'/>
<id>urn:sha1:a88ea43b73f109e446f6027df237c8f868127a78</id>
<content type='text'>
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/bluetooth/btmtkuart.c:971:36: error: ‘mt7668_data’ defined
  but not used [-Werror=unused-const-variable=]
  drivers/bluetooth/btmtkuart.c:966:36: error: ‘mt7663_data’ defined
  but not used [-Werror=unused-const-variable=]
  drivers/bluetooth/btmtkuart.c:962:36: error: ‘mt7622_data’ defined
  but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: fix error handling in mtk_hci_wmt_sync()</title>
<updated>2022-03-18T16:12:08+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-03-17T07:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a76d269a4e86cfd7d4441e40adccfa67808fe6fa'/>
<id>urn:sha1:a76d269a4e86cfd7d4441e40adccfa67808fe6fa</id>
<content type='text'>
This code has an uninitialized variable warning:

    drivers/bluetooth/btmtkuart.c:184 mtk_hci_wmt_sync()
    error: uninitialized symbol 'wc'.

But it also has error paths which have memory leaks.

Fixes: 8f550f55b155 ("Bluetooth: btmtkuart: rely on BT_MTK module")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: fix the conflict between mtk and msft vendor event</title>
<updated>2022-03-18T16:12:07+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-03-09T00:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ac034a76aa230c1acb5bce4442d47310b5aa2f3'/>
<id>urn:sha1:6ac034a76aa230c1acb5bce4442d47310b5aa2f3</id>
<content type='text'>
There is a conflict between MediaTek wmt event and msft vendor extension
logic in the core layer since 145373cb1b1f ("Bluetooth: Add framework for
Microsoft vendor extension") was introduced because we changed the type of
mediatek wmt event to the type of msft vendor event in the driver.

But the purpose we reported mediatek event to the core layer is for the
diagnostic purpose with that we are able to see the full packet trace via
monitoring socket with btmon. Thus, it is harmless we keep the original
type of mediatek vendor event here to avoid breaking the msft extension
function especially they can be supported by Mediatek future devices.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: add .set_bdaddr support</title>
<updated>2022-03-18T16:12:07+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-03-09T00:03:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3640e7f4cb35353b39596816379def67ec9c58f4'/>
<id>urn:sha1:3640e7f4cb35353b39596816379def67ec9c58f4</id>
<content type='text'>
add .set_bdaddr support

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: rely on BT_MTK module</title>
<updated>2022-03-18T16:12:07+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2022-03-09T00:03:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5c3f98946e37a1f7ca07a6c6ab33b1223661aec'/>
<id>urn:sha1:f5c3f98946e37a1f7ca07a6c6ab33b1223661aec</id>
<content type='text'>
Rely on btmtk module to reduce duplicated code

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: fix a memleak in mtk_hci_wmt_sync</title>
<updated>2021-09-22T14:15:54+00:00</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2021-09-22T13:49:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3e5f2d90c28f9454e421108554707620bc23269d'/>
<id>urn:sha1:3e5f2d90c28f9454e421108554707620bc23269d</id>
<content type='text'>
bdev-&gt;evt_skb will get freed in the normal path and one error path
of mtk_hci_wmt_sync, while the other error paths do not free it,
which may cause a memleak. This bug is suggested by a static analysis
tool, please advise.

Fixes: e0b67035a90b ("Bluetooth: mediatek: update the common setup between MT7622 and other devices")
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: using pm_runtime_resume_and_get instead of pm_runtime_get_sync</title>
<updated>2021-06-26T05:12:38+00:00</updated>
<author>
<name>Zhang Qilong</name>
<email>zhangqilong3@huawei.com</email>
</author>
<published>2021-05-31T14:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1b2fdf97f3659948d83ff491abbab73e591c982'/>
<id>urn:sha1:a1b2fdf97f3659948d83ff491abbab73e591c982</id>
<content type='text'>
Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Signed-off-by: Zhang Qilong &lt;zhangqilong3@huawei.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtkuart: Use serdev_device_write_buf() instead of serdev_device_write()</title>
<updated>2020-06-01T06:05:07+00:00</updated>
<author>
<name>Zijun Hu</name>
<email>zijuhu@codeaurora.org</email>
</author>
<published>2020-05-29T15:58:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3a0fe6b0988241c64ef4f6a1045423cc79a612a'/>
<id>urn:sha1:d3a0fe6b0988241c64ef4f6a1045423cc79a612a</id>
<content type='text'>
serdev_device_write() is not appropriate at here because
serdev_device_write_wakeup() is not used to release completion hold
by the former at @write_wakeup member of struct serdev_device_ops.

Fix by using serdev_device_write_buf() instead of serdev_device_write().

Signed-off-by: Zijun Hu &lt;zijuhu@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
