diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c index 34c7e3560597..06a1fe8d48a6 100644 --- a/drivers/bluetooth/btqca.c +++ b/drivers/bluetooth/btqca.c @@ -222,49 +222,6 @@ static int qca_send_reset(struct hci_dev *hdev) return 0; } -static int qca_read_fw_board_id(struct hci_dev *hdev, u16 *bid) -{ - u8 cmd; - struct sk_buff *skb; - struct edl_event_hdr *edl; - int err = 0; - - cmd = EDL_GET_BID_REQ_CMD; - skb = __hci_cmd_sync_ev(hdev, EDL_PATCH_CMD_OPCODE, EDL_PATCH_CMD_LEN, - &cmd, 0, HCI_INIT_TIMEOUT); - if (IS_ERR(skb)) { - err = PTR_ERR(skb); - bt_dev_err(hdev, "Reading QCA board ID failed (%d)", err); - return err; - } - - edl = skb_pull_data(skb, sizeof(*edl)); - if (!edl) { - bt_dev_err(hdev, "QCA read board ID with no header"); - err = -EILSEQ; - goto out; - } - - if (edl->cresp != EDL_CMD_REQ_RES_EVT || - edl->rtype != EDL_GET_BID_REQ_CMD) { - bt_dev_err(hdev, "QCA Wrong packet: %d %d", edl->cresp, edl->rtype); - err = -EIO; - goto out; - } - - if (skb->len < 3) { - err = -EILSEQ; - goto out; - } - - *bid = (edl->data[1] << 8) + edl->data[2]; - bt_dev_dbg(hdev, "%s: bid = %x", __func__, *bid); - -out: - kfree_skb(skb); - return err; -} - int qca_send_pre_shutdown_cmd(struct hci_dev *hdev) { struct sk_buff *skb; @@ -688,7 +645,6 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, int err; u8 rom_ver = 0; u32 soc_ver; - u16 boardid = 0; bt_dev_dbg(hdev, "QCA setup on UART"); @@ -735,9 +691,6 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, /* Give the controller some time to get ready to receive the NVM */ msleep(10); - if (soc_type == QCA_QCA2066) - qca_read_fw_board_id(hdev, &boardid); - /* Download NVM configuration */ config.type = TLV_TYPE_NVM; if (firmware_name) diff --git a/drivers/bluetooth/btqca.h b/drivers/bluetooth/btqca.h index 1aaea1c76b8a..0920c2aa676e 100644 --- a/drivers/bluetooth/btqca.h +++ b/drivers/bluetooth/btqca.h @@ -12,7 +12,6 @@ #define EDL_PATCH_VER_REQ_CMD (0x19) #define EDL_PATCH_TLV_REQ_CMD (0x1E) #define EDL_GET_BUILD_INFO_CMD (0x20) -#define EDL_GET_BID_REQ_CMD (0x23) #define EDL_NVM_ACCESS_SET_REQ_CMD (0x01) #define EDL_PATCH_CONFIG_CMD (0x28) #define MAX_SIZE_PER_TLV_SEGMENT (243) @@ -47,9 +46,6 @@ #define get_soc_ver(soc_id, rom_ver) \ ((le32_to_cpu(soc_id) << 16) | (le16_to_cpu(rom_ver))) -#define QCA_HSP_GF_SOC_ID 0x1200 -#define QCA_HSP_GF_SOC_MASK 0x0000ff00 - enum qca_baudrate { QCA_BAUDRATE_115200 = 0, QCA_BAUDRATE_57600, @@ -146,7 +142,6 @@ enum qca_btsoc_type { QCA_WCN3990, QCA_WCN3998, QCA_WCN3991, - QCA_QCA2066, QCA_QCA6390, QCA_WCN6750, }; diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 1d2c7577891f..37f7b1e3ba63 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1868,7 +1868,7 @@ static const struct qca_device_data qca_soc_data_wcn3998 = { .num_vregs = 4, }; -static const struct qca_device_data qca_soc_data_qca6390 = { +static const struct qca_device_data qca_soc_data_qca6390 __maybe_unused = { .soc_type = QCA_QCA6390, .num_vregs = 0, .capabilities = QCA_CAP_WIDEBAND_SPEECH | QCA_CAP_VALID_LE_STATES,