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

Commit bb2af9b3 authored by William Escande's avatar William Escande
Browse files

BT5.3 Subrating -- Gd cleanup

Bug: 248126637
Test: build
Change-Id: I05f80175d046c0f61766bec305e15eaae52500e4
parent db426500
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ pub mod ffi {
        fn controller_supports_enhanced_accept_synchronous_connection(c: &Controller) -> bool;
        fn controller_supports_ble_set_privacy_mode(c: &Controller) -> bool;

        fn controller_supports_ble_connection_subrating(c: &Controller) -> bool;
        fn controller_supports_ble_connection_subrating_host(c: &Controller) -> bool;

        fn controller_get_acl_buffer_length(c: &Controller) -> u16;
        fn controller_get_le_buffer_length(c: &Controller) -> u16;
        fn controller_get_iso_buffer_length(c: &Controller) -> u16;
+2 −0
Original line number Diff line number Diff line
@@ -88,6 +88,8 @@ le_feature_getters! {
    iso_broadcaster,
    synchronized_receiver,
    ble_periodic_advertising_adi,
    ble_connection_subrating,
    ble_connection_subrating_host,
}

macro_rules! opcode_getters {
+2 −0
Original line number Diff line number Diff line
@@ -329,6 +329,8 @@ supported_le_features! {
    iso_broadcaster => 30,
    synchronized_receiver => 31,
    ble_periodic_advertising_adi => 36,
    ble_connection_subrating => 37,
    ble_connection_subrating_host => 38,
}

/// Convert a null terminated C string into a Rust String
+3 −8
Original line number Diff line number Diff line
@@ -195,14 +195,9 @@ MAP_TO_GD(supports_connected_iso_stream_peripheral,
          SupportsBleConnectedIsochronousStreamPeripheral)
MAP_TO_GD(supports_iso_broadcaster, SupportsBleIsochronousBroadcaster)
MAP_TO_GD(supports_synchronized_receiver, SupportsBleSynchronizedReceiver)

static bool supports_ble_connection_subrating(void) {
  return GetController()->SupportsBleConnectionSubrating();
}

static bool supports_ble_connection_subrating_host(void) {
  return GetController()->SupportsBleConnectionSubratingHost();
}
MAP_TO_GD(supports_ble_connection_subrating, SupportsBleConnectionSubrating)
MAP_TO_GD(supports_ble_connection_subrating_host,
          SupportsBleConnectionSubratingHost)

#define FORWARD_IF_RUST(legacy, gd)                                      \
  static bool legacy(void) {                                             \