Commit 6a87691c authored by David S. Miller's avatar David S. Miller

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

Johan Hedberg says:

====================
pull request: bluetooth 2019-09-05

Here are a few more Bluetooth fixes for 5.3. I hope they can still make
it. There's one USB ID addition for btusb, two reverts due to discovered
regressions, and two other important fixes.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents d55a2e37 68d19d7d
...@@ -337,7 +337,7 @@ static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb) ...@@ -337,7 +337,7 @@ static int bpa10x_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
usb_free_urb(urb); usb_free_urb(urb);
return 0; return err;
} }
static int bpa10x_set_diag(struct hci_dev *hdev, bool enable) static int bpa10x_set_diag(struct hci_dev *hdev, bool enable)
......
...@@ -384,6 +384,9 @@ static const struct usb_device_id blacklist_table[] = { ...@@ -384,6 +384,9 @@ static const struct usb_device_id blacklist_table[] = {
{ USB_DEVICE(0x13d3, 0x3526), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x13d3, 0x3526), .driver_info = BTUSB_REALTEK },
{ USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK },
/* Additional Realtek 8822CE Bluetooth devices */
{ USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK },
/* Silicon Wave based devices */ /* Silicon Wave based devices */
{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE }, { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
...@@ -1170,10 +1173,6 @@ static int btusb_open(struct hci_dev *hdev) ...@@ -1170,10 +1173,6 @@ static int btusb_open(struct hci_dev *hdev)
} }
data->intf->needs_remote_wakeup = 1; data->intf->needs_remote_wakeup = 1;
/* device specific wakeup source enabled and required for USB
* remote wakeup while host is suspended
*/
device_wakeup_enable(&data->udev->dev);
if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags)) if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
goto done; goto done;
...@@ -1238,7 +1237,6 @@ static int btusb_close(struct hci_dev *hdev) ...@@ -1238,7 +1237,6 @@ static int btusb_close(struct hci_dev *hdev)
goto failed; goto failed;
data->intf->needs_remote_wakeup = 0; data->intf->needs_remote_wakeup = 0;
device_wakeup_disable(&data->udev->dev);
usb_autopm_put_interface(data->intf); usb_autopm_put_interface(data->intf);
failed: failed:
......
...@@ -309,13 +309,14 @@ static void qca_wq_awake_device(struct work_struct *work) ...@@ -309,13 +309,14 @@ static void qca_wq_awake_device(struct work_struct *work)
ws_awake_device); ws_awake_device);
struct hci_uart *hu = qca->hu; struct hci_uart *hu = qca->hu;
unsigned long retrans_delay; unsigned long retrans_delay;
unsigned long flags;
BT_DBG("hu %p wq awake device", hu); BT_DBG("hu %p wq awake device", hu);
/* Vote for serial clock */ /* Vote for serial clock */
serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu); serial_clock_vote(HCI_IBS_TX_VOTE_CLOCK_ON, hu);
spin_lock(&qca->hci_ibs_lock); spin_lock_irqsave(&qca->hci_ibs_lock, flags);
/* Send wake indication to device */ /* Send wake indication to device */
if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0) if (send_hci_ibs_cmd(HCI_IBS_WAKE_IND, hu) < 0)
...@@ -327,7 +328,7 @@ static void qca_wq_awake_device(struct work_struct *work) ...@@ -327,7 +328,7 @@ static void qca_wq_awake_device(struct work_struct *work)
retrans_delay = msecs_to_jiffies(qca->wake_retrans); retrans_delay = msecs_to_jiffies(qca->wake_retrans);
mod_timer(&qca->wake_retrans_timer, jiffies + retrans_delay); mod_timer(&qca->wake_retrans_timer, jiffies + retrans_delay);
spin_unlock(&qca->hci_ibs_lock); spin_unlock_irqrestore(&qca->hci_ibs_lock, flags);
/* Actually send the packets */ /* Actually send the packets */
hci_uart_tx_wakeup(hu); hci_uart_tx_wakeup(hu);
...@@ -338,12 +339,13 @@ static void qca_wq_awake_rx(struct work_struct *work) ...@@ -338,12 +339,13 @@ static void qca_wq_awake_rx(struct work_struct *work)
struct qca_data *qca = container_of(work, struct qca_data, struct qca_data *qca = container_of(work, struct qca_data,
ws_awake_rx); ws_awake_rx);
struct hci_uart *hu = qca->hu; struct hci_uart *hu = qca->hu;
unsigned long flags;
BT_DBG("hu %p wq awake rx", hu); BT_DBG("hu %p wq awake rx", hu);
serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu); serial_clock_vote(HCI_IBS_RX_VOTE_CLOCK_ON, hu);
spin_lock(&qca->hci_ibs_lock); spin_lock_irqsave(&qca->hci_ibs_lock, flags);
qca->rx_ibs_state = HCI_IBS_RX_AWAKE; qca->rx_ibs_state = HCI_IBS_RX_AWAKE;
/* Always acknowledge device wake up, /* Always acknowledge device wake up,
...@@ -354,7 +356,7 @@ static void qca_wq_awake_rx(struct work_struct *work) ...@@ -354,7 +356,7 @@ static void qca_wq_awake_rx(struct work_struct *work)
qca->ibs_sent_wacks++; qca->ibs_sent_wacks++;
spin_unlock(&qca->hci_ibs_lock); spin_unlock_irqrestore(&qca->hci_ibs_lock, flags);
/* Actually send the packets */ /* Actually send the packets */
hci_uart_tx_wakeup(hu); hci_uart_tx_wakeup(hu);
......
...@@ -5660,11 +5660,6 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev, ...@@ -5660,11 +5660,6 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev,
return send_conn_param_neg_reply(hdev, handle, return send_conn_param_neg_reply(hdev, handle,
HCI_ERROR_UNKNOWN_CONN_ID); HCI_ERROR_UNKNOWN_CONN_ID);
if (min < hcon->le_conn_min_interval ||
max > hcon->le_conn_max_interval)
return send_conn_param_neg_reply(hdev, handle,
HCI_ERROR_INVALID_LL_PARAMS);
if (hci_check_conn_params(min, max, latency, timeout)) if (hci_check_conn_params(min, max, latency, timeout))
return send_conn_param_neg_reply(hdev, handle, return send_conn_param_neg_reply(hdev, handle,
HCI_ERROR_INVALID_LL_PARAMS); HCI_ERROR_INVALID_LL_PARAMS);
......
...@@ -5305,14 +5305,7 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn, ...@@ -5305,14 +5305,7 @@ static inline int l2cap_conn_param_update_req(struct l2cap_conn *conn,
memset(&rsp, 0, sizeof(rsp)); memset(&rsp, 0, sizeof(rsp));
if (min < hcon->le_conn_min_interval || err = hci_check_conn_params(min, max, latency, to_multiplier);
max > hcon->le_conn_max_interval) {
BT_DBG("requested connection interval exceeds current bounds.");
err = -EINVAL;
} else {
err = hci_check_conn_params(min, max, latency, to_multiplier);
}
if (err) if (err)
rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED); rsp.result = cpu_to_le16(L2CAP_CONN_PARAM_REJECTED);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment