forked from PeterGSI/patches
32 lines
1.7 KiB
Diff
32 lines
1.7 KiB
Diff
From 3aa174edd50a176986ab15f91bcb87b7cec160fa Mon Sep 17 00:00:00 2001
|
|
From: DerTeufel <dominik-kassel@gmx.de>
|
|
Date: Wed, 4 Jan 2023 21:39:37 +0100
|
|
Subject: [PATCH 1/2] Don't crash on status:UNSUPPORTED_REMOTE_OR_LMP_FEATURE
|
|
|
|
especially 'opcode:0x811 (SNIFF_SUBRATING)' which is the only one I had observed
|
|
|
|
Change-Id: Ic57d6631185370cbfdeafdac00801c6ca27fb755
|
|
---
|
|
system/gd/hci/hci_layer.cc | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/system/gd/hci/hci_layer.cc b/system/gd/hci/hci_layer.cc
|
|
index 70a5f43b56..07d5d25a5c 100644
|
|
--- a/system/gd/hci/hci_layer.cc
|
|
+++ b/system/gd/hci/hci_layer.cc
|
|
@@ -216,8 +216,10 @@ struct HciLayer::impl {
|
|
|
|
bool is_vendor_specific = static_cast<int>(op_code) & (0x3f << 10);
|
|
CommandStatusView status_view = CommandStatusView::Create(event);
|
|
- if (is_vendor_specific && (is_status && !command_queue_.front().waiting_for_status_) &&
|
|
- (status_view.IsValid() && status_view.GetStatus() == ErrorCode::UNKNOWN_HCI_COMMAND)) {
|
|
+ if ((is_vendor_specific && (is_status && !command_queue_.front().waiting_for_status_) &&
|
|
+ (status_view.IsValid() && status_view.GetStatus() == ErrorCode::UNKNOWN_HCI_COMMAND)) ||
|
|
+ ((is_status && !command_queue_.front().waiting_for_status_) &&
|
|
+ (status_view.IsValid() && status_view.GetStatus() == ErrorCode::UNSUPPORTED_REMOTE_OR_LMP_FEATURE))) {
|
|
// If this is a command status of a vendor specific command, and command complete is expected,
|
|
// we can't treat this as hard failure since we have no way of probing this lack of support at
|
|
// earlier time. Instead we let the command complete handler handle a empty Command Complete
|
|
--
|
|
2.44.0
|
|
|