Bluetooth: Rename BT_SUSPEND_COMPLETE
authorAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
Wed, 13 May 2020 02:19:25 +0000 (19:19 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 13 May 2020 07:12:04 +0000 (09:12 +0200)
Renamed BT_SUSPEND_COMPLETE to BT_SUSPEND_CONFIGURE_WAKE since it sets
up the event filter and whitelist for wake-up.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_request.c

index 0c7f3ad7666522ff7b9e9f8b871245f29f14e1ea..869ee2b30a4c184025a47c50f4afe7873db2ba9a 100644 (file)
@@ -110,7 +110,7 @@ enum suspend_tasks {
 enum suspended_state {
        BT_RUNNING = 0,
        BT_SUSPEND_DISCONNECT,
-       BT_SUSPEND_COMPLETE,
+       BT_SUSPEND_CONFIGURE_WAKE,
 };
 
 struct hci_conn_hash {
index 51d39927327623d626a093c689d3bc01f35cc159..de1f4e72ec065dc2350c1b7dfc478fe3694bba59 100644 (file)
@@ -3353,7 +3353,7 @@ static int hci_suspend_notifier(struct notifier_block *nb, unsigned long action,
                /* Only configure whitelist if disconnect succeeded */
                if (!ret)
                        ret = hci_change_suspend_state(hdev,
-                                                      BT_SUSPEND_COMPLETE);
+                                               BT_SUSPEND_CONFIGURE_WAKE);
        } else if (action == PM_POST_SUSPEND) {
                ret = hci_change_suspend_state(hdev, BT_RUNNING);
        }
index 6b45e31432a7722026658e9d1680ee890d1540d7..1fc55685da62d9f616e8efdb5d5290c25f9999b7 100644 (file)
@@ -1090,7 +1090,7 @@ void hci_req_prepare_suspend(struct hci_dev *hdev, enum suspended_state next)
                                   disconnect_counter);
                        set_bit(SUSPEND_DISCONNECTING, hdev->suspend_tasks);
                }
-       } else if (next == BT_SUSPEND_COMPLETE) {
+       } else if (next == BT_SUSPEND_CONFIGURE_WAKE) {
                /* Unpause to take care of updating scanning params */
                hdev->scanning_paused = false;
                /* Enable event filter for paired devices */