From 794bdbd6bad2765476d5d42aa7da4654917e9e40 Mon Sep 17 00:00:00 2001 From: Christian Marcheselli Date: Fri, 31 Mar 2023 15:21:25 -0700 Subject: Added in Quectel patches for bluetooth --- net/bluetooth/hci_core.c | 10 +++++----- net/bluetooth/mgmt.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'net') diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index d034bf2a999e..dbf36e343a9a 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -572,7 +572,7 @@ int hci_dev_close(__u16 dev) goto done; } - cancel_work_sync(&hdev->power_on); + cancel_delayed_work(&hdev->power_on); if (hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF)) cancel_delayed_work(&hdev->power_off); @@ -967,7 +967,7 @@ static const struct rfkill_ops hci_rfkill_ops = { static void hci_power_on(struct work_struct *work) { - struct hci_dev *hdev = container_of(work, struct hci_dev, power_on); + struct hci_dev *hdev = container_of(work, struct hci_dev, power_on.work); int err; BT_DBG("%s", hdev->name); @@ -2554,7 +2554,7 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv) INIT_WORK(&hdev->rx_work, hci_rx_work); INIT_WORK(&hdev->cmd_work, hci_cmd_work); INIT_WORK(&hdev->tx_work, hci_tx_work); - INIT_WORK(&hdev->power_on, hci_power_on); + INIT_DELAYED_WORK(&hdev->power_on, hci_power_on); INIT_WORK(&hdev->error_reset, hci_error_reset); hci_cmd_sync_init(hdev); @@ -2688,7 +2688,7 @@ int hci_register_dev(struct hci_dev *hdev) if (error) BT_WARN("register suspend notifier failed error:%d\n", error); - queue_work(hdev->req_workqueue, &hdev->power_on); + queue_delayed_work(hdev->req_workqueue, &hdev->power_on,HCI_AUTO_ON_TIMEOUT); idr_init(&hdev->adv_monitors_idr); msft_register(hdev); @@ -2719,7 +2719,7 @@ void hci_unregister_dev(struct hci_dev *hdev) list_del(&hdev->list); write_unlock(&hci_dev_list_lock); - cancel_work_sync(&hdev->power_on); + cancel_delayed_work(&hdev->power_on); hci_cmd_sync_clear(hdev); diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index d2e8565d0b33..8ffc53088f27 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7993,7 +7993,7 @@ static int set_external_config(struct sock *sk, struct hci_dev *hdev, hci_dev_set_flag(hdev, HCI_CONFIG); hci_dev_set_flag(hdev, HCI_AUTO_OFF); - queue_work(hdev->req_workqueue, &hdev->power_on); + queue_work(hdev->req_workqueue, &hdev->power_on.work); } else { set_bit(HCI_RAW, &hdev->flags); mgmt_index_added(hdev); @@ -8049,7 +8049,7 @@ static int set_public_address(struct sock *sk, struct hci_dev *hdev, hci_dev_set_flag(hdev, HCI_CONFIG); hci_dev_set_flag(hdev, HCI_AUTO_OFF); - queue_work(hdev->req_workqueue, &hdev->power_on); + queue_work(hdev->req_workqueue, &hdev->power_on.work); } unlock: -- cgit 1.4.1