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

Commit 7bf07d77 authored by Jack He's avatar Jack He
Browse files

[GD Controller] Return version info to legacy stack

* Copy and return version info to legacy stack
* Support parsing BT 5.2 version info

Tag: #gd-refactor
Bug: 183349385
Test: make, A2DP streaming
Change-Id: Ic8921570000599175b9b219052f95f6c7b4035a8
parent 56afa027
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2494,6 +2494,7 @@ enum HciVersion : 8 {
  V_4_2 = 0x08,
  V_5_0 = 0x09,
  V_5_1 = 0x0a,
  V_5_2 = 0x0b,
}

enum LmpVersion : 8 {
@@ -2508,6 +2509,7 @@ enum LmpVersion : 8 {
  V_4_2 = 0x08,
  V_5_0 = 0x09,
  V_5_1 = 0x0a,
  V_5_2 = 0x0b,
}

struct LocalVersionInformation {
+10 −0
Original line number Diff line number Diff line
@@ -91,6 +91,16 @@ static future_t* start_up(void) {
    data_.le_supported_states =
        bluetooth::shim::GetController()->GetLeSupportedStates();

    auto local_version_info =
        bluetooth::shim::GetController()->GetLocalVersionInformation();
    data_.bt_version.hci_version =
        static_cast<uint8_t>(local_version_info.hci_version_);
    data_.bt_version.hci_revision = local_version_info.hci_revision_;
    data_.bt_version.lmp_version =
        static_cast<uint8_t>(local_version_info.lmp_version_);
    data_.bt_version.lmp_subversion = local_version_info.lmp_subversion_;
    data_.bt_version.manufacturer = local_version_info.manufacturer_name_;

    LOG_INFO("Mac address:%s", string_address.c_str());
  }