From: Peter Tsao <peter.tsao@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>,
Deren Wu <deren.Wu@mediatek.com>,
Chris Lu <chris.lu@mediatek.com>,
Aaron Hou <aaron.hou@mediatek.com>,
"Steve Lee" <steve.lee@mediatek.com>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mediatek <linux-mediatek@lists.infradead.org>,
Peter Tsao <peter.tsao@mediatek.com>
Subject: [PATCH] Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921
Date: Mon, 15 Apr 2024 22:19:22 +0800 [thread overview]
Message-ID: <20240415141922.25055-1-peter.tsao@mediatek.com> (raw)
Because both MT7920 and MT7921 use the same chip ID.
We use the 8th bit of fw_flavor to distingush MT7920.
The original patch made a mistake to check whole fw_flavor,
that makes the condition both true (dev_id == 0x7961 && fw_flavor),
and makes MT7921 flow wrong.
In this patch, we correct the flow to get the 8th bit value for MT7920.
And the patch is verified pass with both MT7920 and MT7921.
Signed-off-by: Peter Tsao <peter.tsao@mediatek.com>
---
drivers/bluetooth/btusb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4c0cc13adb47..8bede0a33566 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3123,6 +3123,7 @@ static int btusb_mtk_setup(struct hci_dev *hdev)
bt_dev_err(hdev, "Failed to get fw flavor (%d)", err);
return err;
}
+ fw_flavor = (fw_flavor & 0x00000080) >> 7;
}
mediatek = hci_get_priv(hdev);
--
2.18.0
next reply other threads:[~2024-04-15 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 14:19 Peter Tsao [this message]
2024-04-15 14:56 ` Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921 bluez.test.bot
2024-04-16 15:10 ` [PATCH] " patchwork-bot+bluetooth
2024-05-08 8:33 ` Linux regression tracking (Thorsten Leemhuis)
2024-05-08 14:18 ` Luiz Augusto von Dentz
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=20240415141922.25055-1-peter.tsao@mediatek.com \
--to=peter.tsao@mediatek.com \
--cc=aaron.hou@mediatek.com \
--cc=chris.lu@mediatek.com \
--cc=deren.Wu@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=sean.wang@mediatek.com \
--cc=steve.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).