mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup()
mt79xx_setup() passes a hardcoded 0 to btmtk_setup_firmware_79xx(), discarding the device id that btmtksdio_setup() has just read from register 0x70010200. That argument only gates the section filtering for MT6639, which has no SDIO interface, so this is a no-op on supported hardware and carries no Fixes: tag. Pass the value that has already been read, matching the USB path. Declare dev_id as u32 while at it, since that is what btmtksdio_mtk_reg_read() writes through the pointer. Signed-off-by: Chris Lu <chris.lu@mediatek.com> Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
8c947cd1c2
commit
a2bb734c36
|
|
@ -917,14 +917,14 @@ static int mt76xx_setup(struct hci_dev *hdev, const char *fwname)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mt79xx_setup(struct hci_dev *hdev, const char *fwname)
|
||||
static int mt79xx_setup(struct hci_dev *hdev, const char *fwname, u32 dev_id)
|
||||
{
|
||||
struct btmtksdio_dev *bdev = hci_get_drvdata(hdev);
|
||||
struct btmtk_hci_wmt_params wmt_params;
|
||||
u8 param = 0x1;
|
||||
int err;
|
||||
|
||||
err = btmtk_setup_firmware_79xx(hdev, fwname, mtk_hci_wmt_sync, 0);
|
||||
err = btmtk_setup_firmware_79xx(hdev, fwname, mtk_hci_wmt_sync, dev_id);
|
||||
if (err < 0) {
|
||||
bt_dev_err(hdev, "Failed to setup 79xx firmware (%d)", err);
|
||||
return err;
|
||||
|
|
@ -1137,8 +1137,8 @@ static int btmtksdio_setup(struct hci_dev *hdev)
|
|||
ktime_t calltime, delta, rettime;
|
||||
unsigned long long duration;
|
||||
char fwname[64];
|
||||
int err, dev_id;
|
||||
u32 fw_version = 0, val;
|
||||
int err;
|
||||
u32 dev_id, fw_version = 0, val;
|
||||
|
||||
calltime = ktime_get();
|
||||
set_bit(BTMTKSDIO_HW_TX_READY, &bdev->tx_state);
|
||||
|
|
@ -1180,7 +1180,7 @@ static int btmtksdio_setup(struct hci_dev *hdev)
|
|||
btmtk_fw_get_filename(fwname, sizeof(fwname), dev_id,
|
||||
fw_version, 0);
|
||||
|
||||
err = mt79xx_setup(hdev, fwname);
|
||||
err = mt79xx_setup(hdev, fwname, dev_id);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user