Commit e1be4b59 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next



Johan Hedberg says:

====================
pull request: bluetooth-next 2020-12-07

Here's the main bluetooth-next pull request for the 5.11 kernel.

 - Updated Bluetooth entries in MAINTAINERS to include Luiz von Dentz
 - Added support for Realtek 8822CE and 8852A devices
 - Added support for MediaTek MT7615E device
 - Improved workarounds for fake CSR devices
 - Fix Bluetooth qualification test case L2CAP/COS/CFD/BV-14-C
 - Fixes for LL Privacy support
 - Enforce 16 byte encryption key size for FIPS security level
 - Added new mgmt commands for extended advertising support
 - Multiple other smaller fixes & improvements

Please let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 97f8841e 02be5f13
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3194,8 +3194,9 @@ F: drivers/mtd/devices/block2mtd.c
BLUETOOTH DRIVERS
M:	Marcel Holtmann <marcel@holtmann.org>
M:	Johan Hedberg <johan.hedberg@gmail.com>
M:	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
L:	linux-bluetooth@vger.kernel.org
S:	Maintained
S:	Supported
W:	http://www.bluez.org/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
@@ -3204,8 +3205,9 @@ F: drivers/bluetooth/
BLUETOOTH SUBSYSTEM
M:	Marcel Holtmann <marcel@holtmann.org>
M:	Johan Hedberg <johan.hedberg@gmail.com>
M:	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
L:	linux-bluetooth@vger.kernel.org
S:	Maintained
S:	Supported
W:	http://www.bluez.org/
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
+14 −7
Original line number Diff line number Diff line
@@ -437,31 +437,38 @@ int btintel_read_version_tlv(struct hci_dev *hdev, struct intel_version_tlv *ver
		tlv = (struct intel_tlv *)skb->data;
		switch (tlv->type) {
		case INTEL_TLV_CNVI_TOP:
			version->cnvi_top = get_unaligned_le32(tlv->val);
			version->cnvi_top =
				__le32_to_cpu(get_unaligned_le32(tlv->val));
			break;
		case INTEL_TLV_CNVR_TOP:
			version->cnvr_top = get_unaligned_le32(tlv->val);
			version->cnvr_top =
				__le32_to_cpu(get_unaligned_le32(tlv->val));
			break;
		case INTEL_TLV_CNVI_BT:
			version->cnvi_bt = get_unaligned_le32(tlv->val);
			version->cnvi_bt =
				__le32_to_cpu(get_unaligned_le32(tlv->val));
			break;
		case INTEL_TLV_CNVR_BT:
			version->cnvr_bt = get_unaligned_le32(tlv->val);
			version->cnvr_bt =
				__le32_to_cpu(get_unaligned_le32(tlv->val));
			break;
		case INTEL_TLV_DEV_REV_ID:
			version->dev_rev_id = get_unaligned_le16(tlv->val);
			version->dev_rev_id =
				__le16_to_cpu(get_unaligned_le16(tlv->val));
			break;
		case INTEL_TLV_IMAGE_TYPE:
			version->img_type = tlv->val[0];
			break;
		case INTEL_TLV_TIME_STAMP:
			version->timestamp = get_unaligned_le16(tlv->val);
			version->timestamp =
				__le16_to_cpu(get_unaligned_le16(tlv->val));
			break;
		case INTEL_TLV_BUILD_TYPE:
			version->build_type = tlv->val[0];
			break;
		case INTEL_TLV_BUILD_NUM:
			version->build_num = get_unaligned_le32(tlv->val);
			version->build_num =
				__le32_to_cpu(get_unaligned_le32(tlv->val));
			break;
		case INTEL_TLV_SECURE_BOOT:
			version->secure_boot = tlv->val[0];
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ struct intel_debug_features {
	__u8    page1[16];
} __packed;

#define INTEL_HW_PLATFORM(cnvx_bt)	((u8)(((cnvx_bt) & 0x0000ff00) >> 8))
#define INTEL_HW_VARIANT(cnvx_bt)	((u8)(((cnvx_bt) & 0x003f0000) >> 16))
#define INTEL_CNVX_TOP_TYPE(cnvx_top)	((cnvx_top) & 0x00000fff)
#define INTEL_CNVX_TOP_STEP(cnvx_top)	(((cnvx_top) & 0x0f000000) >> 24)
#define INTEL_CNVX_TOP_PACK_SWAB(t, s)	__swab16(((__u16)(((t) << 4) | (s))))

#if IS_ENABLED(CONFIG_BT_INTEL)

int btintel_check_bdaddr(struct hci_dev *hdev);
+1 −1
Original line number Diff line number Diff line
@@ -704,7 +704,7 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname)
	err = mtk_hci_wmt_sync(hdev, &wmt_params);
	if (err < 0) {
		bt_dev_err(hdev, "Failed to power on data RAM (%d)", err);
		return err;
		goto free_fw;
	}

	fw_ptr = fw->data;
+20 −16
Original line number Diff line number Diff line
@@ -14,12 +14,11 @@

#define VERSION "0.1"

int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
int qca_read_soc_version(struct hci_dev *hdev, struct qca_btsoc_version *ver,
			 enum qca_btsoc_type soc_type)
{
	struct sk_buff *skb;
	struct edl_event_hdr *edl;
	struct qca_btsoc_version *ver;
	char cmd;
	int err = 0;
	u8 event_type = HCI_EV_VENDOR;
@@ -70,9 +69,9 @@ int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
	}

	if (soc_type >= QCA_WCN3991)
		memmove(&edl->data, &edl->data[1], sizeof(*ver));

	ver = (struct qca_btsoc_version *)(edl->data);
		memcpy(ver, edl->data + 1, sizeof(*ver));
	else
		memcpy(ver, &edl->data, sizeof(*ver));

	bt_dev_info(hdev, "QCA Product ID   :0x%08x",
		    le32_to_cpu(ver->product_id));
@@ -83,13 +82,7 @@ int qca_read_soc_version(struct hci_dev *hdev, u32 *soc_version,
	bt_dev_info(hdev, "QCA Patch Version:0x%08x",
		    le16_to_cpu(ver->patch_ver));

	/* QCA chipset version can be decided by patch and SoC
	 * version, combination with upper 2 bytes from SoC
	 * and lower 2 bytes from patch will be used.
	 */
	*soc_version = (le32_to_cpu(ver->soc_id) << 16) |
		       (le16_to_cpu(ver->rom_ver) & 0x0000ffff);
	if (*soc_version == 0)
	if (ver->soc_id == 0 || ver->rom_ver == 0)
		err = -EILSEQ;

out:
@@ -446,15 +439,20 @@ int qca_set_bdaddr_rome(struct hci_dev *hdev, const bdaddr_t *bdaddr)
EXPORT_SYMBOL_GPL(qca_set_bdaddr_rome);

int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
		   enum qca_btsoc_type soc_type, u32 soc_ver,
		   enum qca_btsoc_type soc_type, struct qca_btsoc_version ver,
		   const char *firmware_name)
{
	struct qca_fw_config config;
	int err;
	u8 rom_ver = 0;
	u32 soc_ver;

	bt_dev_dbg(hdev, "QCA setup on UART");

	soc_ver = get_soc_ver(ver.soc_id, ver.rom_ver);

	bt_dev_info(hdev, "QCA controller version 0x%08x", soc_ver);

	config.user_baud_rate = baudrate;

	/* Download rampatch file */
@@ -491,9 +489,15 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
	if (firmware_name)
		snprintf(config.fwname, sizeof(config.fwname),
			 "qca/%s", firmware_name);
	else if (qca_is_wcn399x(soc_type))
	else if (qca_is_wcn399x(soc_type)) {
		if (ver.soc_id == QCA_WCN3991_SOC_ID) {
			snprintf(config.fwname, sizeof(config.fwname),
				 "qca/crnv%02xu.bin", rom_ver);
		} else {
			snprintf(config.fwname, sizeof(config.fwname),
				 "qca/crnv%02x.bin", rom_ver);
		}
	}
	else if (soc_type == QCA_QCA6390)
		snprintf(config.fwname, sizeof(config.fwname),
			 "qca/htnv%02x.bin", rom_ver);
Loading