mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Allow non-zero HCI interface numbers" into main am: 13c04c29cc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2858605 Change-Id: I82faa19507ff1b284fa92df68d16e2ae3fe2cc52 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -162,9 +162,9 @@ int NetBluetoothMgmt::waitHciDev(int hci_interface) {
|
|||||||
(struct mgmt_ev_read_index_list*)ev.data;
|
(struct mgmt_ev_read_index_list*)ev.data;
|
||||||
|
|
||||||
for (int i = 0; i < data->num_controllers; i++) {
|
for (int i = 0; i < data->num_controllers; i++) {
|
||||||
if (data->index[i] == hci_interface) {
|
if (data->index[i] >= hci_interface) {
|
||||||
ALOGI("hci interface %d found", hci_interface);
|
ALOGI("hci interface %d found", data->index[i]);
|
||||||
ret = 0;
|
ret = data->index[i];
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -253,8 +253,9 @@ int NetBluetoothMgmt::openHci(int hci_interface) {
|
|||||||
rfkill(1);
|
rfkill(1);
|
||||||
|
|
||||||
// Wait for the HCI interface to complete initialization or to come online.
|
// Wait for the HCI interface to complete initialization or to come online.
|
||||||
if (waitHciDev(hci_interface)) {
|
hci_interface = waitHciDev(hci_interface);
|
||||||
ALOGE("hci interface %d not found", hci_interface);
|
if (hci_interface < 0) {
|
||||||
|
ALOGE("hci interface not found");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user