Commit c4c57b97 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-01-26

Here's (probably) the last bluetooth-next pull request for the 5.6 kernel.

 - Initial pieces of Bluetooth 5.2 Isochronous Channels support
 - mgmt: Various cleanups and a new Set Blocked Keys command
 - btusb: Added support for 04ca:3021 QCA_ROME device
 - hci_qca: Multiple fixes & cleanups
 - hci_bcm: Fixes & improved device tree support
 - Fixed attempts to create duplicate debugfs entries

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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5a44c71c 11eb85ec
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Required properties:

 - compatible: should contain one of the following:
   * "brcm,bcm20702a1"
   * "brcm,bcm4329-bt"
   * "brcm,bcm4330-bt"
   * "brcm,bcm43438-bt"
   * "brcm,bcm4345c5"
@@ -22,7 +23,9 @@ Optional properties:
 - max-speed: see Documentation/devicetree/bindings/serial/slave-device.txt
 - shutdown-gpios: GPIO specifier, used to enable the BT module
 - device-wakeup-gpios: GPIO specifier, used to wakeup the controller
 - host-wakeup-gpios: GPIO specifier, used to wakeup the host processor
 - host-wakeup-gpios: GPIO specifier, used to wakeup the host processor.
                      deprecated, replaced by interrupts and
                      "host-wakeup" interrupt-names
 - clocks: 1 or 2 clocks as defined in clock-names below, in that order
 - clock-names: names for clock inputs, matching the clocks given
   - "extclk": deprecated, replaced by "txco"
@@ -36,7 +39,8 @@ Optional properties:
    - pcm-frame-type: short, long
    - pcm-sync-mode: slave, master
    - pcm-clock-mode: slave, master

 - interrupts: must be one, used to wakeup the host processor
 - interrupt-names: must be "host-wakeup"

Example:

+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ int btbcm_check_bdaddr(struct hci_dev *hdev)
			     HCI_INIT_TIMEOUT);
	if (IS_ERR(skb)) {
		int err = PTR_ERR(skb);

		bt_dev_err(hdev, "BCM: Reading device address failed (%d)", err);
		return err;
	}
@@ -223,6 +224,7 @@ static int btbcm_reset(struct hci_dev *hdev)
	skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
	if (IS_ERR(skb)) {
		int err = PTR_ERR(skb);

		bt_dev_err(hdev, "BCM: Reset failed (%d)", err);
		return err;
	}
+2 −2
Original line number Diff line number Diff line
@@ -78,13 +78,13 @@ static inline int btbcm_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr)
	return -EOPNOTSUPP;
}

int btbcm_read_pcm_int_params(struct hci_dev *hdev,
static inline int btbcm_read_pcm_int_params(struct hci_dev *hdev,
			      struct bcm_set_pcm_int_params *params)
{
	return -EOPNOTSUPP;
}

int btbcm_write_pcm_int_params(struct hci_dev *hdev,
static inline int btbcm_write_pcm_int_params(struct hci_dev *hdev,
			       const struct bcm_set_pcm_int_params *params)
{
	return -EOPNOTSUPP;
+11 −9
Original line number Diff line number Diff line
@@ -370,11 +370,11 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev,
	 * the end.
	 */
	len = patch_length;
	buf = kmemdup(btrtl_dev->fw_data + patch_offset, patch_length,
		      GFP_KERNEL);
	buf = kvmalloc(patch_length, GFP_KERNEL);
	if (!buf)
		return -ENOMEM;

	memcpy(buf, btrtl_dev->fw_data + patch_offset, patch_length - 4);
	memcpy(buf + patch_length - 4, &epatch_info->fw_version, 4);

	*_buf = buf;
@@ -460,8 +460,10 @@ static int rtl_load_file(struct hci_dev *hdev, const char *name, u8 **buff)
	if (ret < 0)
		return ret;
	ret = fw->size;
	*buff = kmemdup(fw->data, ret, GFP_KERNEL);
	if (!*buff)
	*buff = kvmalloc(fw->size, GFP_KERNEL);
	if (*buff)
		memcpy(*buff, fw->data, ret);
	else
		ret = -ENOMEM;

	release_firmware(fw);
@@ -499,14 +501,14 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev,
		goto out;

	if (btrtl_dev->cfg_len > 0) {
		tbuff = kzalloc(ret + btrtl_dev->cfg_len, GFP_KERNEL);
		tbuff = kvzalloc(ret + btrtl_dev->cfg_len, GFP_KERNEL);
		if (!tbuff) {
			ret = -ENOMEM;
			goto out;
		}

		memcpy(tbuff, fw_data, ret);
		kfree(fw_data);
		kvfree(fw_data);

		memcpy(tbuff + ret, btrtl_dev->cfg_data, btrtl_dev->cfg_len);
		ret += btrtl_dev->cfg_len;
@@ -519,14 +521,14 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev,
	ret = rtl_download_firmware(hdev, fw_data, ret);

out:
	kfree(fw_data);
	kvfree(fw_data);
	return ret;
}

void btrtl_free(struct btrtl_device_info *btrtl_dev)
{
	kfree(btrtl_dev->fw_data);
	kfree(btrtl_dev->cfg_data);
	kvfree(btrtl_dev->fw_data);
	kvfree(btrtl_dev->cfg_data);
	kfree(btrtl_dev);
}
EXPORT_SYMBOL_GPL(btrtl_free);
+14 −5
Original line number Diff line number Diff line
@@ -145,11 +145,20 @@ static int btsdio_rx_packet(struct btsdio_data *data)

	data->hdev->stat.byte_rx += len;

	switch (hdr[3]) {
	case HCI_EVENT_PKT:
	case HCI_ACLDATA_PKT:
	case HCI_SCODATA_PKT:
	case HCI_ISODATA_PKT:
		hci_skb_pkt_type(skb) = hdr[3];

		err = hci_recv_frame(data->hdev, skb);
		if (err < 0)
			return err;
		break;
	default:
		kfree_skb(skb);
		return -EINVAL;
	}

	sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);

Loading