mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
Bluetooth: btqca: Fix the NVM baudrate tag offcet for wcn3991
The baudrate set byte of wcn3991 in the NVM tag is byte 1, not byte 2. This patch will set correct byte for wcn3991. Signed-off-by: Rocky Liao <rjliao@codeaurora.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
4f9ed5bd63
commit
b63882549b
1 changed files with 7 additions and 3 deletions
|
@ -139,7 +139,7 @@ int qca_send_pre_shutdown_cmd(struct hci_dev *hdev)
|
||||||
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
|
EXPORT_SYMBOL_GPL(qca_send_pre_shutdown_cmd);
|
||||||
|
|
||||||
static void qca_tlv_check_data(struct qca_fw_config *config,
|
static void qca_tlv_check_data(struct qca_fw_config *config,
|
||||||
const struct firmware *fw)
|
const struct firmware *fw, enum qca_btsoc_type soc_type)
|
||||||
{
|
{
|
||||||
const u8 *data;
|
const u8 *data;
|
||||||
u32 type_len;
|
u32 type_len;
|
||||||
|
@ -148,6 +148,7 @@ static void qca_tlv_check_data(struct qca_fw_config *config,
|
||||||
struct tlv_type_hdr *tlv;
|
struct tlv_type_hdr *tlv;
|
||||||
struct tlv_type_patch *tlv_patch;
|
struct tlv_type_patch *tlv_patch;
|
||||||
struct tlv_type_nvm *tlv_nvm;
|
struct tlv_type_nvm *tlv_nvm;
|
||||||
|
uint8_t nvm_baud_rate = config->user_baud_rate;
|
||||||
|
|
||||||
tlv = (struct tlv_type_hdr *)fw->data;
|
tlv = (struct tlv_type_hdr *)fw->data;
|
||||||
|
|
||||||
|
@ -216,7 +217,10 @@ static void qca_tlv_check_data(struct qca_fw_config *config,
|
||||||
tlv_nvm->data[0] |= 0x80;
|
tlv_nvm->data[0] |= 0x80;
|
||||||
|
|
||||||
/* UART Baud Rate */
|
/* UART Baud Rate */
|
||||||
tlv_nvm->data[2] = config->user_baud_rate;
|
if (soc_type == QCA_WCN3991)
|
||||||
|
tlv_nvm->data[1] = nvm_baud_rate;
|
||||||
|
else
|
||||||
|
tlv_nvm->data[2] = nvm_baud_rate;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -354,7 +358,7 @@ static int qca_download_firmware(struct hci_dev *hdev,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
qca_tlv_check_data(config, fw);
|
qca_tlv_check_data(config, fw, soc_type);
|
||||||
|
|
||||||
segment = fw->data;
|
segment = fw->data;
|
||||||
remain = fw->size;
|
remain = fw->size;
|
||||||
|
|
Loading…
Reference in a new issue