Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: qca: Support downloading board id specific NVM for WCN7850

Download board id specific NVM instead of default for WCN7850 if board id
is available.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Zijun Hu and committed by
Luiz Augusto von Dentz
e41137d8 b39910bb

+15 -3
+15 -3
drivers/bluetooth/btqca.c
··· 737 737 snprintf(fwname, max_size, "qca/hpnv%02x%s.%x", rom_ver, variant, bid); 738 738 } 739 739 740 + static inline void qca_get_nvm_name_generic(struct qca_fw_config *cfg, 741 + const char *stem, u8 rom_ver, u16 bid) 742 + { 743 + if (bid == 0x0) 744 + snprintf(cfg->fwname, sizeof(cfg->fwname), "qca/%snv%02x.bin", stem, rom_ver); 745 + else if (bid & 0xff00) 746 + snprintf(cfg->fwname, sizeof(cfg->fwname), 747 + "qca/%snv%02x.b%x", stem, rom_ver, bid); 748 + else 749 + snprintf(cfg->fwname, sizeof(cfg->fwname), 750 + "qca/%snv%02x.b%02x", stem, rom_ver, bid); 751 + } 752 + 740 753 int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, 741 754 enum qca_btsoc_type soc_type, struct qca_btsoc_version ver, 742 755 const char *firmware_name) ··· 830 817 /* Give the controller some time to get ready to receive the NVM */ 831 818 msleep(10); 832 819 833 - if (soc_type == QCA_QCA2066) 820 + if (soc_type == QCA_QCA2066 || soc_type == QCA_WCN7850) 834 821 qca_read_fw_board_id(hdev, &boardid); 835 822 836 823 /* Download NVM configuration */ ··· 872 859 "qca/hpnv%02x.bin", rom_ver); 873 860 break; 874 861 case QCA_WCN7850: 875 - snprintf(config.fwname, sizeof(config.fwname), 876 - "qca/hmtnv%02x.bin", rom_ver); 862 + qca_get_nvm_name_generic(&config, "hmt", rom_ver, boardid); 877 863 break; 878 864 879 865 default: