Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e891ac08 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Add host support for stack/

Test: compile
Change-Id: Ie3c4f7c7625a50863200930c71f2e66a1cb77a9b
parent 69afb119
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ static_assert(LOG_TAG != nullptr, "LOG_TAG is null after header inclusion");
    abort();                  \
  } while (false)
#define android_errorWriteLog(tag, subTag) LOG_ERROR("ERROR tag: 0x%x, sub_tag: %s", tag, subTag)
#define android_errorWriteWithInfoLog(tag, subTag, uid, data, dataLen) \
  LOG_ERROR("ERROR tag: 0x%x, sub_tag: %s", tag, subTag)
#define LOG_EVENT_INT(...)

#endif /* defined(OS_ANDROID) */
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ cc_library_static {
            ],
        },
    },
    host_supported: true,
}

// HCI unit tests for target
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ static void open_next_snoop_file() {
    return;
  }

  write(logfile_fd, "btsnoop\0\0\0\0\1\0\0\x3\xea", 16);
  (void)write(logfile_fd, "btsnoop\0\0\0\0\1\0\0\x3\xea", 16);
}

typedef struct {
+2 −2
Original line number Diff line number Diff line
@@ -89,8 +89,8 @@ static const uint32_t COMMAND_PENDING_TIMEOUT_MS = 2000;
static const uint32_t COMMAND_PENDING_MUTEX_ACQUIRE_TIMEOUT_MS = 500;
static const uint32_t COMMAND_TIMEOUT_RESTART_MS = 5000;
static const uint32_t ROOT_INFLAMMED_RESTART_MS = 5000;
static const int HCI_UNKNOWN_COMMAND_TIMED_OUT = 0x00ffffff;
static const int HCI_STARTUP_TIMED_OUT = 0x00eeeeee;
[[maybe_unused]] constexpr int HCI_UNKNOWN_COMMAND_TIMED_OUT = 0x00ffffff;
[[maybe_unused]] constexpr int HCI_STARTUP_TIMED_OUT = 0x00eeeeee;

// Our interface
static bool interface_created;
+0 −2
Original line number Diff line number Diff line
@@ -34,14 +34,12 @@
#include <android/hardware/bluetooth/1.0/types.h>
#include <android/hardware/bluetooth/1.1/IBluetoothHci.h>
#include <android/hardware/bluetooth/1.1/IBluetoothHciCallbacks.h>
#include <hwbinder/ProcessState.h>

#define LOG_PATH "/data/misc/bluetooth/logs/firmware_events.log"
#define LAST_LOG_PATH "/data/misc/bluetooth/logs/firmware_events.log.last"

using ::android::hardware::hidl_death_recipient;
using ::android::hardware::hidl_vec;
using ::android::hardware::ProcessState;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::bluetooth::V1_0::HciPacket;
Loading