drivers/bluetooth/btmtk.c | 5 +++++ 1 file changed, 5 insertions(+)
From: Chris Lu <chris.lu@mediatek.com>
Add printing firmware information part when driver loading firmware that
user can get mediatek bluetooth information.
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Chris Lu <chris.lu@mediatek.com>
---
v3: resend again with the latest tree
---
drivers/bluetooth/btmtk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index 9482401d97fa..8490d59502a5 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
wmt_cmd_sync_func_t wmt_cmd_sync)
{
struct btmtk_hci_wmt_params wmt_params;
+ struct btmtk_patch_header *hdr;
struct btmtk_global_desc *globaldesc = NULL;
struct btmtk_section_map *sectionmap;
const struct firmware *fw;
@@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
fw_ptr = fw->data;
fw_bin_ptr = fw_ptr;
+ hdr = (struct btmtk_patch_header *)fw_ptr;
globaldesc = (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE);
section_num = le32_to_cpu(globaldesc->section_num);
+ bt_dev_info(hdev, "HW/SW Version: 0x%04x%04x, Build Time: %s",
+ le16_to_cpu(hdr->hwver), le16_to_cpu(hdr->swver), hdr->datetime);
+
for (i = 0; i < section_num; i++) {
first_block = 1;
fw_ptr = fw_bin_ptr;
--
2.25.1
Dear Sean, dear Chris,
Thank you for your patch.
Am 29.06.23 um 00:20 schrieb sean.wang@mediatek.com:
> From: Chris Lu <chris.lu@mediatek.com>
>
> Add printing firmware information part when driver loading firmware that
> user can get mediatek bluetooth information.
Maybe use the commit message summary/title below:
Bluetooth: btmtk: Log hw/sw version and fw build time
Maybe also paste one log message example to the commit message.
> Co-developed-by: Sean Wang <sean.wang@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Signed-off-by: Chris Lu <chris.lu@mediatek.com>
> ---
> v3: resend again with the latest tree
> ---
> drivers/bluetooth/btmtk.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
> index 9482401d97fa..8490d59502a5 100644
> --- a/drivers/bluetooth/btmtk.c
> +++ b/drivers/bluetooth/btmtk.c
> @@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
> wmt_cmd_sync_func_t wmt_cmd_sync)
> {
> struct btmtk_hci_wmt_params wmt_params;
> + struct btmtk_patch_header *hdr;
> struct btmtk_global_desc *globaldesc = NULL;
> struct btmtk_section_map *sectionmap;
> const struct firmware *fw;
> @@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
>
> fw_ptr = fw->data;
> fw_bin_ptr = fw_ptr;
> + hdr = (struct btmtk_patch_header *)fw_ptr;
> globaldesc = (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE);
> section_num = le32_to_cpu(globaldesc->section_num);
>
> + bt_dev_info(hdev, "HW/SW Version: 0x%04x%04x, Build Time: %s",
Why not print 0x%04x/0x%04x, that means with a slash?
> + le16_to_cpu(hdr->hwver), le16_to_cpu(hdr->swver), hdr->datetime);
> +
> for (i = 0; i < section_num; i++) {
> first_block = 1;
> fw_ptr = fw_bin_ptr;
Kind regards,
Paul
HI Paul,
Thanks! I will update the patch with your suggestions.
thanks!
Sean
On Wed, Jun 28, 2023 at 3:44 PM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Sean, dear Chris,
>
>
> Thank you for your patch.
>
> Am 29.06.23 um 00:20 schrieb sean.wang@mediatek.com:
> > From: Chris Lu <chris.lu@mediatek.com>
> >
> > Add printing firmware information part when driver loading firmware that
> > user can get mediatek bluetooth information.
>
> Maybe use the commit message summary/title below:
>
> Bluetooth: btmtk: Log hw/sw version and fw build time
>
> Maybe also paste one log message example to the commit message.
>
> > Co-developed-by: Sean Wang <sean.wang@mediatek.com>
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > Signed-off-by: Chris Lu <chris.lu@mediatek.com>
> > ---
> > v3: resend again with the latest tree
> > ---
> > drivers/bluetooth/btmtk.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
> > index 9482401d97fa..8490d59502a5 100644
> > --- a/drivers/bluetooth/btmtk.c
> > +++ b/drivers/bluetooth/btmtk.c
> > @@ -57,6 +57,7 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
> > wmt_cmd_sync_func_t wmt_cmd_sync)
> > {
> > struct btmtk_hci_wmt_params wmt_params;
> > + struct btmtk_patch_header *hdr;
> > struct btmtk_global_desc *globaldesc = NULL;
> > struct btmtk_section_map *sectionmap;
> > const struct firmware *fw;
> > @@ -75,9 +76,13 @@ int btmtk_setup_firmware_79xx(struct hci_dev *hdev, const char *fwname,
> >
> > fw_ptr = fw->data;
> > fw_bin_ptr = fw_ptr;
> > + hdr = (struct btmtk_patch_header *)fw_ptr;
> > globaldesc = (struct btmtk_global_desc *)(fw_ptr + MTK_FW_ROM_PATCH_HEADER_SIZE);
> > section_num = le32_to_cpu(globaldesc->section_num);
> >
> > + bt_dev_info(hdev, "HW/SW Version: 0x%04x%04x, Build Time: %s",
>
> Why not print 0x%04x/0x%04x, that means with a slash?
>
> > + le16_to_cpu(hdr->hwver), le16_to_cpu(hdr->swver), hdr->datetime);
> > +
> > for (i = 0; i < section_num; i++) {
> > first_block = 1;
> > fw_ptr = fw_bin_ptr;
>
>
> Kind regards,
>
> Paul
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Thu, 29 Jun 2023 06:20:03 +0800 you wrote:
> From: Chris Lu <chris.lu@mediatek.com>
>
> Add printing firmware information part when driver loading firmware that
> user can get mediatek bluetooth information.
>
> Co-developed-by: Sean Wang <sean.wang@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> Signed-off-by: Chris Lu <chris.lu@mediatek.com>
>
> [...]
Here is the summary with links:
- [v3] Bluetooth: btmtk: add printing firmware information
https://git.kernel.org/bluetooth/bluetooth-next/c/5ebfb27d09e1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
© 2016 - 2026 Red Hat, Inc.