diff --git a/system/gd/hci/hci_packets.pdl b/system/gd/hci/hci_packets.pdl index caae4744652b096da9919f41239735f367b3e370..fa7373a3353719a9d8dc70beb6821a3a8fcfbe65 100644 --- a/system/gd/hci/hci_packets.pdl +++ b/system/gd/hci/hci_packets.pdl @@ -803,7 +803,7 @@ enum ErrorCode: 8 { CONNECTION_REJECTED_SECURITY_REASONS = 0x0E, CONNECTION_REJECTED_UNACCEPTABLE_BD_ADDR = 0x0F, CONNECTION_ACCEPT_TIMEOUT = 0x10, - UNSUPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11, + UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE = 0x11, INVALID_HCI_COMMAND_PARAMETERS = 0x12, REMOTE_USER_TERMINATED_CONNECTION = 0x13, REMOTE_DEVICE_TERMINATED_CONNECTION_LOW_RESOURCES = 0x14, diff --git a/system/gd/hci/le_scanning_manager.cc b/system/gd/hci/le_scanning_manager.cc index 6ba1c4286203f018f695fdbff3a7c1e41482eaf8..1ee248fd43329b5400eb5c1ffefd7eab433813ef 100644 --- a/system/gd/hci/le_scanning_manager.cc +++ b/system/gd/hci/le_scanning_manager.cc @@ -1017,7 +1017,7 @@ struct LeScanningManager::impl : public bluetooth::hci::LeAddressManagerCallback void batch_scan_read_results(ScannerId scanner_id, uint16_t total_num_of_records, BatchScanMode scan_mode) { if (!is_batch_scan_support_) { LOG_WARN("Batch scan is not supported"); - int status = static_cast<int>(ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE); + int status = static_cast<int>(ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE); scanning_callbacks_->OnBatchScanReports(scanner_id, status, 0, 0, {}); return; } diff --git a/system/main/shim/helpers.h b/system/main/shim/helpers.h index b7e4bc73f1ec911b364df44e560ed3d07af43cd0..7d023291eb7873220aef1fcd17898b9a2f152e85 100644 --- a/system/main/shim/helpers.h +++ b/system/main/shim/helpers.h @@ -180,9 +180,9 @@ inline tHCI_STATUS ToLegacyHciErrorCode(const hci::ErrorCode& reason) { return HCI_ERR_HOST_REJECT_DEVICE; case hci::ErrorCode::CONNECTION_ACCEPT_TIMEOUT: return HCI_ERR_HOST_TIMEOUT; - case hci::ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE: + case hci::ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE: return static_cast<tHCI_STATUS>( - hci::ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE); + hci::ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE); case hci::ErrorCode::INVALID_HCI_COMMAND_PARAMETERS: return HCI_ERR_ILLEGAL_PARAMETER_FMT; case hci::ErrorCode::REMOTE_USER_TERMINATED_CONNECTION: diff --git a/tools/rootcanal/model/controller/dual_mode_controller.cc b/tools/rootcanal/model/controller/dual_mode_controller.cc index b9ada7bbdfa79c9dd30276de6f42645bbdd0ef4c..af0c86c14856169e707f0aff4ebdce569d80c236 100644 --- a/tools/rootcanal/model/controller/dual_mode_controller.cc +++ b/tools/rootcanal/model/controller/dual_mode_controller.cc @@ -1603,11 +1603,12 @@ void DualModeController::LeSetHostFeature(CommandView command) { auto command_view = gd_hci::LeSetHostFeatureView::Create(command); ASSERT(command_view.IsValid()); // TODO: if the controller has active connections, return COMMAND_DISALLOED - ErrorCode error_code = properties_.SetLeHostFeature( - static_cast<uint8_t>(command_view.GetBitNumber()), - static_cast<uint8_t>(command_view.GetBitValue())) - ? ErrorCode::SUCCESS - : ErrorCode::UNSUPORTED_FEATURE_OR_PARAMETER_VALUE; + ErrorCode error_code = + properties_.SetLeHostFeature( + static_cast<uint8_t>(command_view.GetBitNumber()), + static_cast<uint8_t>(command_view.GetBitValue())) + ? ErrorCode::SUCCESS + : ErrorCode::UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE; send_event_(bluetooth::hci::LeSetHostFeatureCompleteBuilder::Create( kNumCommandPackets, error_code)); }