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

Commit 4475a0a9 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth

parents 16a9d06c 687beaa0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ static struct usb_device_id ath3k_table[] = {
	/* Atheros AR3011 with sflash firmware*/
	{ USB_DEVICE(0x0CF3, 0x3002) },
	{ USB_DEVICE(0x13d3, 0x3304) },
	{ USB_DEVICE(0x0930, 0x0215) },

	/* Atheros AR9285 Malbec with sflash firmware */
	{ USB_DEVICE(0x03F0, 0x311D) },
+10 −3
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ static struct usb_device_id blacklist_table[] = {
	/* Atheros 3011 with sflash firmware */
	{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
	{ USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
	{ USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },

	/* Atheros AR9285 Malbec with sflash firmware */
	{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
@@ -256,7 +257,9 @@ static void btusb_intr_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
		/* -EPERM: urb is being killed;
		 * -ENODEV: device got disconnected */
		if (err != -EPERM && err != -ENODEV)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
@@ -341,7 +344,9 @@ static void btusb_bulk_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
		/* -EPERM: urb is being killed;
		 * -ENODEV: device got disconnected */
		if (err != -EPERM && err != -ENODEV)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
@@ -431,7 +436,9 @@ static void btusb_isoc_complete(struct urb *urb)

	err = usb_submit_urb(urb, GFP_ATOMIC);
	if (err < 0) {
		if (err != -EPERM)
		/* -EPERM: urb is being killed;
		 * -ENODEV: device got disconnected */
		if (err != -EPERM && err != -ENODEV)
			BT_ERR("%s urb %p failed to resubmit (%d)",
						hdev->name, urb, -err);
		usb_unanchor_urb(urb);
+3 −3
Original line number Diff line number Diff line
@@ -494,9 +494,8 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
	BT_DBG("sk %p", sk);

	add_wait_queue(sk_sleep(sk), &wait);
	while (sk->sk_state != state) {
	set_current_state(TASK_INTERRUPTIBLE);

	while (sk->sk_state != state) {
		if (!timeo) {
			err = -EINPROGRESS;
			break;
@@ -510,12 +509,13 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)
		release_sock(sk);
		timeo = schedule_timeout(timeo);
		lock_sock(sk);
		set_current_state(TASK_INTERRUPTIBLE);

		err = sock_error(sk);
		if (err)
			break;
	}
	set_current_state(TASK_RUNNING);
	__set_current_state(TASK_RUNNING);
	remove_wait_queue(sk_sleep(sk), &wait);
	return err;
}
+1 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ struct bnep_session {
	unsigned int  role;
	unsigned long state;
	unsigned long flags;
	atomic_t      terminate;
	struct task_struct *task;

	struct ethhdr eh;
+8 −5
Original line number Diff line number Diff line
@@ -484,9 +484,11 @@ static int bnep_session(void *arg)

	init_waitqueue_entry(&wait, current);
	add_wait_queue(sk_sleep(sk), &wait);
	while (!kthread_should_stop()) {
	while (1) {
		set_current_state(TASK_INTERRUPTIBLE);

		if (atomic_read(&s->terminate))
			break;
		/* RX */
		while ((skb = skb_dequeue(&sk->sk_receive_queue))) {
			skb_orphan(skb);
@@ -504,7 +506,7 @@ static int bnep_session(void *arg)

		schedule();
	}
	set_current_state(TASK_RUNNING);
	__set_current_state(TASK_RUNNING);
	remove_wait_queue(sk_sleep(sk), &wait);

	/* Cleanup session */
@@ -640,9 +642,10 @@ int bnep_del_connection(struct bnep_conndel_req *req)
	down_read(&bnep_session_sem);

	s = __bnep_get_session(req->dst);
	if (s)
		kthread_stop(s->task);
	else
	if (s) {
		atomic_inc(&s->terminate);
		wake_up_process(s->task);
	} else
		err = -ENOENT;

	up_read(&bnep_session_sem);
Loading