<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/bluetooth/btmtk.h, branch linux-7.1.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-7.1.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-04-13T13:18:16+00:00</updated>
<entry>
<title>Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support</title>
<updated>2026-04-13T13:18:16+00:00</updated>
<author>
<name>Javier Tia</name>
<email>floss@jetm.me</email>
</author>
<published>2026-03-30T20:39:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28b7c5a6db74e9305c6cbcbe52f259ff1cf85158'/>
<id>urn:sha1:28b7c5a6db74e9305c6cbcbe52f259ff1cf85158</id>
<content type='text'>
The MediaTek MT7927 (Filogic 380) combo WiFi 7 + BT 5.4 module uses
hardware variant 0x6639 for its Bluetooth subsystem. Without this patch,
the chip fails with "Unsupported hardware variant (00006639)" or hangs
during firmware download.

Three changes are needed to support MT6639:

1. CHIPID workaround: On some boards the BT USB MMIO register reads
   0x0000 for dev_id, causing the driver to skip the 0x6639 init path.
   Force dev_id to 0x6639 only when the USB VID/PID matches a known
   MT6639 device, avoiding misdetection if a future chip also reads
   zero. This follows the WiFi-side pattern that uses PCI device IDs
   to scope the same workaround.

2. Firmware naming: MT6639 uses firmware version prefix "2_1" instead of
   "1_1" used by MT7925 and other variants. The firmware path is
   mediatek/mt7927/BT_RAM_CODE_MT6639_2_1_hdr.bin, using the mt7927
   directory to match the WiFi firmware convention. The filename will
   likely change to use MT7927 once MediaTek submits a dedicated
   Linux firmware binary.

3. Section filtering: The MT6639 firmware binary contains 9 sections, but
   only sections with (dlmodecrctype &amp; 0xff) == 0x01 are Bluetooth-related.
   Sending the remaining WiFi/other sections causes an irreversible BT
   subsystem hang requiring a full power cycle. This matches the Windows
   driver behavior observed via USB captures.

Also add 0x6639 to the reset register (CONNV3) and firmware setup switch
cases alongside the existing 0x7925 handling.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221096
Link: https://github.com/openwrt/mt76/issues/927
Reported-by: Ryan Gilbert &lt;xelnaga@gmail.com&gt;
Signed-off-by: Javier Tia &lt;floss@jetm.me&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: add MT7902 MCU support</title>
<updated>2026-04-10T14:24:37+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2026-02-24T06:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aab25984e55972e53f3e58821cb85a7101876056'/>
<id>urn:sha1:aab25984e55972e53f3e58821cb85a7101876056</id>
<content type='text'>
Add MT7902 device ID and firmware filename to enable MCU firmware
loading.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: Add reset mechanism if downloading firmware failed</title>
<updated>2026-04-10T14:21:39+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2026-02-03T06:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=679621a767bfa0a2cb77fbd8b664412e9e3f89cf'/>
<id>urn:sha1:679621a767bfa0a2cb77fbd8b664412e9e3f89cf</id>
<content type='text'>
Add a new flag 'BTMTK_FIRMWARE_DL_RETRY'.
If an error occurs during mt79xx firmware download process, this flag
will be set and cleared after a reset. If the flag is already set and
firmware still cannot be loaded successfully after a reset, no further
reset attempts will be made. In other words, if there is a problem during
firmware download, only one reset will be attempted.

Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: Mark all stub functions as inline</title>
<updated>2024-07-15T14:13:17+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2024-07-10T17:56:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23e88450bb04f6b44ce4cacbd76cd775e426a5b2'/>
<id>urn:sha1:23e88450bb04f6b44ce4cacbd76cd775e426a5b2</id>
<content type='text'>
Several recent patches added static stubs to btmtk.h without the inline
keyword, which causes instances of -Wunused-function when those stubs
are not used anywhere in a file that includes the header:

  In file included from drivers/bluetooth/btusb.c:28:
  drivers/bluetooth/btmtk.h:254:13: warning: 'btmtk_fw_get_filename' defined but not used [-Wunused-function]
    254 | static void btmtk_fw_get_filename(char *buf, size_t size, u32 dev_id,
        |             ^~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:249:12: warning: 'btmtk_process_coredump' defined but not used [-Wunused-function]
    249 | static int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
        |            ^~~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:243:12: warning: 'btmtk_register_coredump' defined but not used [-Wunused-function]
    243 | static int btmtk_register_coredump(struct hci_dev *hdev, const char *name,
        |            ^~~~~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:233:12: warning: 'btmtk_setup_firmware' defined but not used [-Wunused-function]
    233 | static int btmtk_setup_firmware(struct hci_dev *hdev, const char *fwname,
        |            ^~~~~~~~~~~~~~~~~~~~
  drivers/bluetooth/btmtk.h:227:12: warning: 'btmtk_setup_firmware_79xx' defined but not used [-Wunused-function]
    227 | static int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
        |            ^~~~~~~~~~~~~~~~~~~~~~~~~

Add inline to all the stubs in btmtk.h (even ones that do not currently
have any warnings associated with them) to ensure there are never unused
function warnings from these stubs, as is customary for the kernel.

Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: mediatek: add ISO data transmission functions</title>
<updated>2024-07-15T14:11:52+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ceac1cb0259de682d78f5c784ef8e0b13022e9d9'/>
<id>urn:sha1:ceac1cb0259de682d78f5c784ef8e0b13022e9d9</id>
<content type='text'>
This patch implements functions for ISO data send and receive in btusb
driver for MediaTek's controller.

MediaTek defines a specific interrupt endpoint for ISO data transmissin
because the characteristics of interrupt endpoint are similar to the
application of ISO data which can support guaranteed transmissin
bandwidth, enough maximum data length and error checking mechanism.

Driver sets up ISO interface and endpoints in btusb_mtk_setup and clears
the setup in btusb_mtk_shutdown. These flow can't move to btmtk.c due to
btusb_driver is only defined in btusb.c when claiming/relaesing interface.
ISO packet anchor stops when driver suspending and resubmit interrupt urb
for ISO data when driver resuming.

Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_recv_acl_mtk to btmtk.c</title>
<updated>2024-07-15T14:11:50+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6dc22ab9f085ae165e4ce89d61fb426f94e8a969'/>
<id>urn:sha1:6dc22ab9f085ae165e4ce89d61fb426f94e8a969</id>
<content type='text'>
Move btusb_recv_acl_mtk from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_mtk_[setup, shutdown] to btmtk.c</title>
<updated>2024-07-15T14:11:48+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c5e8c52e3cafaa6f71efd44a42a674271e5b3ad'/>
<id>urn:sha1:5c5e8c52e3cafaa6f71efd44a42a674271e5b3ad</id>
<content type='text'>
Move btusb_mtk_[setup, shutdown] and related function from
btusb.c to btmtk.c which holds vendor specific stuff and
would make btusb.c clean.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: move btusb_mtk_hci_wmt_sync to btmtk.c</title>
<updated>2024-07-15T14:11:46+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d019930b0049fc2648a6b279893d8ad330596e81'/>
<id>urn:sha1:d019930b0049fc2648a6b279893d8ad330596e81</id>
<content type='text'>
Move btusb_mtk_hci_wmt_sync from btusb.c to btmtk.c which holds
vendor specific stuff and would make btusb.c clean.

Add usb.h header to btmtksdio.c/btmtkuart.c for usb related element
defined in btmtk.h

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: rename btmediatek_data</title>
<updated>2024-07-15T14:11:42+00:00</updated>
<author>
<name>Chris Lu</name>
<email>chris.lu@mediatek.com</email>
</author>
<published>2024-07-04T06:01:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d3e6236053958a8f1c7c7a885d9cecdd383e4615'/>
<id>urn:sha1:d3e6236053958a8f1c7c7a885d9cecdd383e4615</id>
<content type='text'>
Rename btmediatek_data to have a consistent prefix throughout the driver.

Signed-off-by: Sean Wang &lt;sean.wang@mediatek.com&gt;
Signed-off-by: Chris Lu &lt;chris.lu@mediatek.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btmtk: add the function to get the fw name</title>
<updated>2024-07-15T01:33:26+00:00</updated>
<author>
<name>Sean Wang</name>
<email>sean.wang@mediatek.com</email>
</author>
<published>2024-05-15T23:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00f993fdec06c8f036a1b9c8ee6b004c17143bd1'/>
<id>urn:sha1:00f993fdec06c8f036a1b9c8ee6b004c17143bd1</id>
<content type='text'>
Include a shared function to get the firmware name, to prevent repeating
code for similar chipsets.

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