hci_sync.c (47db6b42991e6d5645d0938e43085aaf88cdfba4) | hci_sync.c (2f2eb0c9de2eb69969aaf04feffb69310d3804b2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * BlueZ - Bluetooth protocol stack for Linux 4 * 5 * Copyright (C) 2021 Intel Corporation 6 */ 7 8#include <net/bluetooth/bluetooth.h> --- 2090 unchanged lines hidden (view full) --- 2099 hci_dev_test_flag(hdev, HCI_CONFIG) || 2100 hci_dev_test_flag(hdev, HCI_AUTO_OFF) || 2101 hci_dev_test_flag(hdev, HCI_UNREGISTER)) 2102 return 0; 2103 2104 return hci_cmd_sync_queue(hdev, update_passive_scan_sync, NULL, NULL); 2105} 2106 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * BlueZ - Bluetooth protocol stack for Linux 4 * 5 * Copyright (C) 2021 Intel Corporation 6 */ 7 8#include <net/bluetooth/bluetooth.h> --- 2090 unchanged lines hidden (view full) --- 2099 hci_dev_test_flag(hdev, HCI_CONFIG) || 2100 hci_dev_test_flag(hdev, HCI_AUTO_OFF) || 2101 hci_dev_test_flag(hdev, HCI_UNREGISTER)) 2102 return 0; 2103 2104 return hci_cmd_sync_queue(hdev, update_passive_scan_sync, NULL, NULL); 2105} 2106 |
2107static int hci_write_sc_support_sync(struct hci_dev *hdev, u8 val) | 2107int hci_write_sc_support_sync(struct hci_dev *hdev, u8 val) |
2108{ | 2108{ |
2109 int err; 2110 |
|
2109 if (!bredr_sc_enabled(hdev) || lmp_host_sc_capable(hdev)) 2110 return 0; 2111 | 2111 if (!bredr_sc_enabled(hdev) || lmp_host_sc_capable(hdev)) 2112 return 0; 2113 |
2112 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_SC_SUPPORT, | 2114 err = __hci_cmd_sync_status(hdev, HCI_OP_WRITE_SC_SUPPORT, |
2113 sizeof(val), &val, HCI_CMD_TIMEOUT); | 2115 sizeof(val), &val, HCI_CMD_TIMEOUT); |
2116 2117 if (!err) { 2118 if (val) { 2119 hdev->features[1][0] |= LMP_HOST_SC; 2120 hci_dev_set_flag(hdev, HCI_SC_ENABLED); 2121 } else { 2122 hdev->features[1][0] &= ~LMP_HOST_SC; 2123 hci_dev_clear_flag(hdev, HCI_SC_ENABLED); 2124 } 2125 } 2126 2127 return err; |
|
2114} 2115 2116static int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode) 2117{ 2118 int err; 2119 2120 if (!hci_dev_test_flag(hdev, HCI_SSP_ENABLED) || 2121 lmp_host_ssp_capable(hdev)) --- 732 unchanged lines hidden --- | 2128} 2129 2130static int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode) 2131{ 2132 int err; 2133 2134 if (!hci_dev_test_flag(hdev, HCI_SSP_ENABLED) || 2135 lmp_host_ssp_capable(hdev)) --- 732 unchanged lines hidden --- |