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

Commit 82c93ab1 authored by William Escande's avatar William Escande
Browse files

BT5.3: Set min encryption key size -- post cleanup

Follow-up cl to add gd rust layer

Bug: 248126637
Tag: #feature
Test: Manual end-to-end testing (need 5.3 support in controller)
Change-Id: I22c25161b9afaf1e7e4cda1ad00135aa0a20a601
parent 45374a40
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ pub mod ffi {
        fn controller_supports_synchronized_receiver(c: &Controller) -> bool;
        fn controller_supports_ble_periodic_advertising_adi(c: &Controller) -> bool;
        fn controller_supports_configure_data_path(c: &Controller) -> bool;
        fn controller_supports_set_min_encryption_key_size(c: &Controller) -> bool;

        fn controller_supports_reading_remote_extended_features(c: &Controller) -> bool;
        fn controller_supports_enhanced_setup_synchronous_connection(c: &Controller) -> bool;
+3 −2
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ le_feature_getters! {
}

macro_rules! opcode_getters {
    ($($id:ident => $opcode:path),*) => {
    ($($id:ident => $opcode:path,)*) => {
        paste! {
            $(
                pub fn [<controller_supports_ $id>](c: &Controller) -> bool {
@@ -107,7 +107,8 @@ opcode_getters! {
    enhanced_setup_synchronous_connection => OpCode::EnhancedSetupSynchronousConnection,
    enhanced_accept_synchronous_connection => OpCode::EnhancedAcceptSynchronousConnection,
    ble_set_privacy_mode => OpCode::LeSetPrivacyMode,
    configure_data_path => OpCode::ConfigureDataPath
    configure_data_path => OpCode::ConfigureDataPath,
    set_min_encryption_key_size => OpCode::SetMinEncryptionKeySize,
}

macro_rules! field_getters {
+3 −4
Original line number Diff line number Diff line
@@ -210,10 +210,9 @@ FORWARD_IF_RUST(
    supports_configure_data_path,
    GetController()->IsSupported(bluetooth::hci::OpCode::CONFIGURE_DATA_PATH))

static bool supports_set_min_encryption_key_size(void) {
  return GetController()->IsSupported(
      bluetooth::hci::OpCode::SET_MIN_ENCRYPTION_KEY_SIZE);
}
FORWARD_IF_RUST(supports_set_min_encryption_key_size,
                GetController()->IsSupported(
                    bluetooth::hci::OpCode::SET_MIN_ENCRYPTION_KEY_SIZE))

FORWARD_IF_RUST(supports_reading_remote_extended_features,
                GetController()->IsSupported(