Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 342149c5 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 2018-10-20

Here's one more bluetooth-next pull request for the 4.20 kernel.

 - Added new USB ID for QCA_ROME controller
 - Added debug trace support from QCA wcn3990 controllers
 - Updated L2CAP to conform to latest Errata Service Release
 - Fix binding to non-removable BCM43430 devices

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a4efbaf6 c614ca3f
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -293,13 +293,17 @@ static int btsdio_probe(struct sdio_func *func,
		tuple = tuple->next;
	}

	/* BCM43341 devices soldered onto the PCB (non-removable) use an
	 * uart connection for bluetooth, ignore the BT SDIO interface.
	/* Broadcom devices soldered onto the PCB (non-removable) use an
	 * UART connection for Bluetooth, ignore the BT SDIO interface.
	 */
	if (func->vendor == SDIO_VENDOR_ID_BROADCOM &&
	    func->device == SDIO_DEVICE_ID_BROADCOM_43341 &&
	    !mmc_card_is_removable(func->card->host))
	    !mmc_card_is_removable(func->card->host)) {
		switch (func->device) {
		case SDIO_DEVICE_ID_BROADCOM_43341:
		case SDIO_DEVICE_ID_BROADCOM_43430:
			return -ENODEV;
		}
	}

	data = devm_kzalloc(&func->dev, sizeof(*data), GFP_KERNEL);
	if (!data)
+1 −0
Original line number Diff line number Diff line
@@ -264,6 +264,7 @@ static const struct usb_device_id blacklist_table[] = {
	{ USB_DEVICE(0x0489, 0xe03c), .driver_info = BTUSB_ATH3012 },

	/* QCA ROME chipset */
	{ USB_DEVICE(0x0cf3, 0x535b), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe007), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe009), .driver_info = BTUSB_QCA_ROME },
	{ USB_DEVICE(0x0cf3, 0xe010), .driver_info = BTUSB_QCA_ROME },
+18 −1
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/serdev.h>
#include <asm/unaligned.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -63,6 +64,9 @@
/* susclk rate */
#define SUSCLK_RATE_32KHZ	32768

/* Controller debug log header */
#define QCA_DEBUG_HANDLE	0x2EDC

/* HCI_IBS transmit side sleep protocol states */
enum tx_ibs_states {
	HCI_IBS_TX_ASLEEP,
@@ -849,6 +853,19 @@ static int qca_ibs_wake_ack(struct hci_dev *hdev, struct sk_buff *skb)
	return 0;
}

static int qca_recv_acl_data(struct hci_dev *hdev, struct sk_buff *skb)
{
	/* We receive debug logs from chip as an ACL packets.
	 * Instead of sending the data to ACL to decode the
	 * received data, we are pushing them to the above layers
	 * as a diagnostic packet.
	 */
	if (get_unaligned_le16(skb->data) == QCA_DEBUG_HANDLE)
		return hci_recv_diag(hdev, skb);

	return hci_recv_frame(hdev, skb);
}

#define QCA_IBS_SLEEP_IND_EVENT \
	.type = HCI_IBS_SLEEP_IND, \
	.hlen = 0, \
@@ -871,7 +888,7 @@ static int qca_ibs_wake_ack(struct hci_dev *hdev, struct sk_buff *skb)
	.maxlen = HCI_MAX_IBS_SIZE

static const struct h4_recv_pkt qca_recv_pkts[] = {
	{ H4_RECV_ACL,             .recv = hci_recv_frame    },
	{ H4_RECV_ACL,             .recv = qca_recv_acl_data },
	{ H4_RECV_SCO,             .recv = hci_recv_frame    },
	{ H4_RECV_EVENT,           .recv = hci_recv_frame    },
	{ QCA_IBS_WAKE_IND_EVENT,  .recv = qca_ibs_wake_ind  },
+13 −6
Original line number Diff line number Diff line
@@ -277,12 +277,19 @@ struct l2cap_conn_rsp {
#define L2CAP_CR_SEC_BLOCK	0x0003
#define L2CAP_CR_NO_MEM		0x0004
#define L2CAP_CR_BAD_AMP	0x0005
#define L2CAP_CR_AUTHENTICATION	0x0005
#define L2CAP_CR_AUTHORIZATION	0x0006
#define L2CAP_CR_BAD_KEY_SIZE	0x0007
#define L2CAP_CR_ENCRYPTION	0x0008
#define L2CAP_CR_INVALID_SCID	0x0009
#define L2CAP_CR_SCID_IN_USE	0x000A
#define L2CAP_CR_INVALID_SCID	0x0006
#define L2CAP_CR_SCID_IN_USE	0x0007

/* credit based connect results */
#define L2CAP_CR_LE_SUCCESS		0x0000
#define L2CAP_CR_LE_BAD_PSM		0x0002
#define L2CAP_CR_LE_NO_MEM		0x0004
#define L2CAP_CR_LE_AUTHENTICATION	0x0005
#define L2CAP_CR_LE_AUTHORIZATION	0x0006
#define L2CAP_CR_LE_BAD_KEY_SIZE	0x0007
#define L2CAP_CR_LE_ENCRYPTION		0x0008
#define L2CAP_CR_LE_INVALID_SCID	0x0009
#define L2CAP_CR_LE_SCID_IN_USE		0X000A

/* connect/create channel status */
#define L2CAP_CS_NO_INFO	0x0000
+17 −21
Original line number Diff line number Diff line
@@ -4937,7 +4937,6 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,
	hci_debugfs_create_conn(conn);
	hci_conn_add_sysfs(conn);

	if (!status) {
	/* The remote features procedure is defined for master
	 * role only. So only in case of an initiated connection
	 * request the remote features.
@@ -4961,9 +4960,6 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,
		conn->state = BT_CONNECTED;
		hci_connect_cfm(conn, status);
	}
	} else {
		hci_connect_cfm(conn, status);
	}

	params = hci_pend_le_action_lookup(&hdev->pend_le_conns, &conn->dst,
					   conn->dst_type);
Loading