From: Chris Lu <chris.lu@mediatek.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Luiz Von Dentz <luiz.dentz@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
Will Lee <will-cy.Lee@mediatek.com>, SS Wu <ss.wu@mediatek.com>,
Steve Lee <steve.lee@mediatek.com>,
Paul Menzel <pmenzel@molgen.mpg.de>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
Chris Lu <chris.lu@mediatek.com>
Subject: [PATCH v15 4/7] Bluetooth: btmtksdio: Remove redundant firmware filename override
Date: Fri, 17 Jul 2026 15:42:03 +0800 [thread overview]
Message-ID: <20260717074207.2869999-5-chris.lu@mediatek.com> (raw)
In-Reply-To: <20260717074207.2869999-1-chris.lu@mediatek.com>
btmtksdio_setup() calls btmtk_fw_get_filename() to generate the correct
firmware filename based on device ID and version, then immediately
overwrites it with snprintf() using a generic legacy format.
This redundant override causes newer chips (MT6639, MT7925, MT7928) to
request incorrect firmware filenames, leading to firmware load failures.
For example, MT6639 needs "mediatek/mt7927/BT_RAM_CODE_MT6639_2_1_hdr.bin"
but snprintf() generates "mediatek/BT_RAM_CODE_MT6639_1_1_hdr.bin".
Remove the redundant snprintf() override to use the correct filename
generated by btmtk_fw_get_filename(), matching USB driver behavior.
Fixes: 7f935b21bee4 ("Bluetooth: btmtk: apply the common btmtk_fw_get_filename")
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
---
drivers/bluetooth/btmtksdio.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index 1fdc24545e41..d895292103bb 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -1175,9 +1175,6 @@ static int btmtksdio_setup(struct hci_dev *hdev)
btmtk_fw_get_filename(fwname, sizeof(fwname), dev_id,
fw_version, 0);
- snprintf(fwname, sizeof(fwname),
- "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin",
- dev_id & 0xffff, (fw_version & 0xff) + 1);
err = mt79xx_setup(hdev, fwname, dev_id);
if (err < 0)
return err;
--
2.45.2
next prev parent reply other threads:[~2026-07-17 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 7:41 [PATCH v15 0/7] Bluetooth: btmtk: Add MT7928 support Chris Lu
2026-07-17 7:42 ` [PATCH v15 1/7] Bluetooth: btmtksdio: Fix SKB handling issues in TX path Chris Lu
2026-07-17 8:52 ` Bluetooth: btmtk: Add MT7928 support bluez.test.bot
2026-07-17 7:42 ` [PATCH v15 2/7] Bluetooth: btmtk: Add firmware size validation in btmtk_setup_firmware_79xx() Chris Lu
2026-07-17 7:42 ` [PATCH v15 3/7] Bluetooth: btmtksdio: Pass hardware dev_id to mt79xx_setup() Chris Lu
2026-07-17 7:42 ` Chris Lu [this message]
2026-07-17 7:42 ` [PATCH v15 5/7] Bluetooth: btmtk: Improve BT firmware logging Chris Lu
2026-07-17 7:42 ` [PATCH v15 6/7] Bluetooth: btmtk: Replace magic numbers with WMT packet flag enum Chris Lu
2026-07-17 7:42 ` [PATCH v15 7/7] Bluetooth: btmtk: Add MT7928 support Chris Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260717074207.2869999-5-chris.lu@mediatek.com \
--to=chris.lu@mediatek.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=pmenzel@molgen.mpg.de \
--cc=sean.wang@mediatek.com \
--cc=ss.wu@mediatek.com \
--cc=steve.lee@mediatek.com \
--cc=will-cy.Lee@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.