History

Bluetooth: hci_sync: Rework hci_suspend_notifier

This makes hci_suspend_notifier use the hci_*_sync which can be executed synchronously which is allowed in the suspend_notifier and simplifies a lot of the handling since the status of each command can be checked inline so no other work need to be scheduled thus can be performed without using of a state machine.

Luiz Augusto von Dentz committed 5 years ago

Commit 182ee451 parent d0b137010 files · +650 −638Browse files

Showing the changes to include (2 of 10 files). Show all

Unified · Split

2 files
  1. include/net/bluetooth/hci_core.h +0 −4
  2. include/net/bluetooth/hci_sync.h +3 −0
include/net/bluetooth/hci_core.h+0−4
@@ -523,7 +523,6 @@ struct hci_dev { · 522 unmodified lines
523523 bool advertising_paused;
524524
525525 struct notifier_block suspend_notifier;
526− struct work_struct suspend_prepare;
527526 enum suspended_state suspend_state_next;
528527 enum suspended_state suspend_state;
529528 bool scanning_paused;
@@ -532,9 +531,6 @@ struct hci_dev { · 2 unmodified lines
532531 bdaddr_t wake_addr;
533532 u8 wake_addr_type;
534533
535− wait_queue_head_t suspend_wait_q;
536− DECLARE_BITMAP(suspend_tasks, __SUSPEND_NUM_TASKS);
537−
538534 struct hci_conn_hash conn_hash;
539535
540536 struct list_head mgmt_pending;
include/net/bluetooth/hci_sync.h+3−0
@@ -92,3 +92,6 @@ int hci_set_powered_sync(struct hci_dev *hdev, u8 val); · 91 unmodified lines
9292
9393 int hci_start_discovery_sync(struct hci_dev *hdev);
9494 int hci_stop_discovery_sync(struct hci_dev *hdev);
95+
96+int hci_suspend_sync(struct hci_dev *hdev);
97+int hci_resume_sync(struct hci_dev *hdev);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t