break;
        }
 
-       hci_update_background_scan(hdev);
+       hci_update_passive_scan(hdev);
 }
 
 static void hci_conn_cleanup(struct hci_conn *conn)
        /* Since we may have temporarily stopped the background scanning in
         * favor of connection establishment, we should restart it.
         */
-       hci_update_background_scan(hdev);
+       hci_update_passive_scan(hdev);
 
        /* Re-enable advertising in case this was a failed connection
         * attempt as a peripheral.
        conn->conn_timeout = conn_timeout;
        conn->conn_reason = conn_reason;
 
-       hci_update_background_scan(hdev);
+       hci_update_passive_scan(hdev);
 
 done:
        hci_conn_hold(conn);
 
 
        switch (state) {
        case DISCOVERY_STOPPED:
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
 
                if (old_state != DISCOVERY_STARTING)
                        mgmt_discovering(hdev, 0);
        return ret;
 }
 
-static void hci_update_scan_state(struct hci_dev *hdev, u8 scan)
+static void hci_update_passive_scan_state(struct hci_dev *hdev, u8 scan)
 {
        bool conn_changed, discov_changed;
 
                 * get correctly modified as this was a non-mgmt change.
                 */
                if (!err)
-                       hci_update_scan_state(hdev, dr.dev_opt);
+                       hci_update_passive_scan_state(hdev, dr.dev_opt);
                break;
 
        case HCISETLINKPOL:
 
        switch (hci_get_adv_monitor_offload_ext(hdev)) {
        case HCI_ADV_MONITOR_EXT_NONE:
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
                bt_dev_dbg(hdev, "%s add monitor status %d", hdev->name, *err);
                /* Message was not forwarded to controller - not an error */
                return false;
 
        pending = hci_remove_adv_monitor(hdev, monitor, handle, err);
        if (!*err && !pending)
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
 
        bt_dev_dbg(hdev, "%s remove monitor handle %d, status %d, %spending",
                   hdev->name, handle, *err, pending ? "" : "not ");
        }
 
        if (update)
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
 
        bt_dev_dbg(hdev, "%s remove all monitors status %d, %spending",
                   hdev->name, *err, pending ? "" : "not ");
 
        hci_conn_params_free(params);
 
-       hci_update_background_scan(hdev);
+       hci_update_passive_scan(hdev);
 
        BT_DBG("addr %pMR (type %u)", addr, addr_type);
 }
 
                case HCI_AUTO_CONN_ALWAYS:
                        list_del_init(¶ms->action);
                        list_add(¶ms->action, &hdev->pend_le_conns);
-                       hci_update_background_scan(hdev);
+                       hci_update_passive_scan(hdev);
                        break;
 
                default:
        }
 
 unlock:
-       hci_update_background_scan(hdev);
+       hci_update_passive_scan(hdev);
        hci_dev_unlock(hdev);
 }
 
 
 
 int hci_update_passive_scan(struct hci_dev *hdev)
 {
+       /* Only queue if it would have any effect */
+       if (!test_bit(HCI_UP, &hdev->flags) ||
+           test_bit(HCI_INIT, &hdev->flags) ||
+           hci_dev_test_flag(hdev, HCI_SETUP) ||
+           hci_dev_test_flag(hdev, HCI_CONFIG) ||
+           hci_dev_test_flag(hdev, HCI_AUTO_OFF) ||
+           hci_dev_test_flag(hdev, HCI_UNREGISTER))
+               return 0;
+
        return hci_cmd_sync_queue(hdev, update_passive_scan_sync, NULL, NULL);
 }
 
 
        if (changed) {
                hci_req_update_scan(hdev);
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
                return new_settings(hdev, sk);
        }
 
                        __hci_req_update_scan_rsp_data(&req, 0x00);
                }
                hci_req_run(&req, NULL);
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
        }
 
 unlock:
                hdev->adv_monitors_cnt++;
                if (monitor->state == ADV_MONITOR_STATE_NOT_REGISTERED)
                        monitor->state = ADV_MONITOR_STATE_REGISTERED;
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
        }
 
        err = mgmt_cmd_complete(cmd->sk, cmd->index, cmd->opcode,
        rp.monitor_handle = cp->monitor_handle;
 
        if (!status)
-               hci_update_background_scan(hdev);
+               hci_update_passive_scan(hdev);
 
        err = mgmt_cmd_complete(cmd->sk, cmd->index, cmd->opcode,
                                mgmt_status(status), &rp, sizeof(rp));
 
                if (!monitor) {
                        /* All monitors have been reregistered */
                        msft->reregistering = false;
-                       hci_update_background_scan(hdev);
+                       hci_update_passive_scan(hdev);
                        return;
                }