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

Unverified Commit 2cf767c9 authored by derfelot's avatar derfelot
Browse files

Merge Linux 4.4.299 kernel

Changes in 4.4.299: (15 commits)
        bpf, test: fix ld_abs + vlan push/pop stress test
        Bluetooth: btusb: Apply QCA Rome patches for some ATH3012 models
        ieee802154: atusb: fix uninit value in atusb_set_extended_addr
        mac80211: initialize variable have_higher_than_11mbit
        i40e: Fix incorrect netdev's real number of RX/TX queues
        sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc
        xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate
        rndis_host: support Hytera digital radios
        phonet: refcount leak in pep_sock_accep
        scsi: libiscsi: Fix UAF in iscsi_conn_get_param()/iscsi_conn_teardown()
        ip6_vti: initialize __ip6_tnl_parm struct in vti6_siocdevprivate
        net: udp: fix alignment problem in udp4_seq_show()
        mISDN: change function names to avoid conflicts
        power: reset: ltc2952: Fix use of floating point literals
        Linux 4.4.299
parents dd205ee3 b0ee5231
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 298
SUBLEVEL = 299
EXTRAVERSION =
NAME = Blurry Fish Butt

+25 −7
Original line number Diff line number Diff line
@@ -2489,11 +2489,9 @@ static const struct qca_device_info qca_devices_table[] = {
	{ 0x00000302, 28, 4, 18 }, /* Rome 3.2 */
};

static int btusb_qca_send_vendor_req(struct hci_dev *hdev, u8 request,
static int btusb_qca_send_vendor_req(struct usb_device *udev, u8 request,
				     void *data, u16 size)
{
	struct btusb_data *btdata = hci_get_drvdata(hdev);
	struct usb_device *udev = btdata->udev;
	int pipe, err;
	u8 *buf;

@@ -2508,7 +2506,7 @@ static int btusb_qca_send_vendor_req(struct hci_dev *hdev, u8 request,
	err = usb_control_msg(udev, pipe, request, USB_TYPE_VENDOR | USB_DIR_IN,
			      0, 0, buf, size, USB_CTRL_SET_TIMEOUT);
	if (err < 0) {
		BT_ERR("%s: Failed to access otp area (%d)", hdev->name, err);
		dev_err(&udev->dev, "Failed to access otp area (%d)", err);
		goto done;
	}

@@ -2664,20 +2662,38 @@ static int btusb_setup_qca_load_nvm(struct hci_dev *hdev,
	return err;
}

/* identify the ROM version and check whether patches are needed */
static bool btusb_qca_need_patch(struct usb_device *udev)
{
	struct qca_version ver;

	if (btusb_qca_send_vendor_req(udev, QCA_GET_TARGET_VERSION, &ver,
				      sizeof(ver)) < 0)
		return false;
	/* only low ROM versions need patches */
	return !(le32_to_cpu(ver.rom_version) & ~0xffffU);
}

static int btusb_setup_qca(struct hci_dev *hdev)
{
	struct btusb_data *btdata = hci_get_drvdata(hdev);
	struct usb_device *udev = btdata->udev;
	const struct qca_device_info *info = NULL;
	struct qca_version ver;
	u32 ver_rom;
	u8 status;
	int i, err;

	err = btusb_qca_send_vendor_req(hdev, QCA_GET_TARGET_VERSION, &ver,
	err = btusb_qca_send_vendor_req(udev, QCA_GET_TARGET_VERSION, &ver,
					sizeof(ver));
	if (err < 0)
		return err;

	ver_rom = le32_to_cpu(ver.rom_version);
	/* Don't care about high ROM versions */
	if (ver_rom & ~0xffffU)
		return 0;

	for (i = 0; i < ARRAY_SIZE(qca_devices_table); i++) {
		if (ver_rom == qca_devices_table[i].rom_version)
			info = &qca_devices_table[i];
@@ -2688,7 +2704,7 @@ static int btusb_setup_qca(struct hci_dev *hdev)
		return -ENODEV;
	}

	err = btusb_qca_send_vendor_req(hdev, QCA_CHECK_STATUS, &status,
	err = btusb_qca_send_vendor_req(udev, QCA_CHECK_STATUS, &status,
					sizeof(status));
	if (err < 0)
		return err;
@@ -2834,7 +2850,8 @@ static int btusb_probe(struct usb_interface *intf,

		/* Old firmware would otherwise let ath3k driver load
		 * patch and sysconfig files */
		if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001)
		if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001 &&
		    !btusb_qca_need_patch(udev))
			return -ENODEV;
	}

@@ -2981,6 +2998,7 @@ static int btusb_probe(struct usb_interface *intf,
	}

	if (id->driver_info & BTUSB_ATH3012) {
		data->setup_on_usb = btusb_setup_qca;
		hdev->set_bdaddr = btusb_set_bdaddr_ath3012;
		set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
		set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks);
+3 −3
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ mISDNInit(void)
	err = mISDN_inittimer(&debug);
	if (err)
		goto error2;
	err = l1_init(&debug);
	err = Isdnl1_Init(&debug);
	if (err)
		goto error3;
	err = Isdnl2_Init(&debug);
@@ -404,7 +404,7 @@ mISDNInit(void)
error5:
	Isdnl2_cleanup();
error4:
	l1_cleanup();
	Isdnl1_cleanup();
error3:
	mISDN_timer_cleanup();
error2:
@@ -417,7 +417,7 @@ static void mISDN_cleanup(void)
{
	misdn_sock_cleanup();
	Isdnl2_cleanup();
	l1_cleanup();
	Isdnl1_cleanup();
	mISDN_timer_cleanup();
	class_unregister(&mISDN_class);

+2 −2
Original line number Diff line number Diff line
@@ -69,8 +69,8 @@ struct Bprotocol *get_Bprotocol4id(u_int);
extern int	mISDN_inittimer(u_int *);
extern void	mISDN_timer_cleanup(void);

extern int	l1_init(u_int *);
extern void	l1_cleanup(void);
extern int	Isdnl1_Init(u_int *);
extern void	Isdnl1_cleanup(void);
extern int	Isdnl2_Init(u_int *);
extern void	Isdnl2_cleanup(void);

+2 −2
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ create_l1(struct dchannel *dch, dchannel_l1callback *dcb) {
EXPORT_SYMBOL(create_l1);

int
l1_init(u_int *deb)
Isdnl1_Init(u_int *deb)
{
	debug = deb;
	l1fsm_s.state_count = L1S_STATE_COUNT;
@@ -419,7 +419,7 @@ l1_init(u_int *deb)
}

void
l1_cleanup(void)
Isdnl1_cleanup(void)
{
	mISDN_FsmFree(&l1fsm_s);
}
Loading