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

Commit 14442992 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "gatt: Add upper tester for Multiple Variable Len notification" into tm-d1-dev

parents 757f0a53 b61f768d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@ TRC_HID_DEV=2
# Disable LE Connection updates
#PTS_DisableConnUpdates=true

# Use EATT for the notifications
#PTS_ForceEattForNotifications=true

# Disable BR/EDR discovery after LE pairing to avoid cross key derivation errors
#PTS_DisableSDPOnLEPair=true

+4 −0
Original line number Diff line number Diff line
@@ -551,6 +551,10 @@
#define GATT_CONFORMANCE_TESTING FALSE
#endif

/* Used only for GATT Multiple Variable Length Notifications PTS tests */
#ifndef GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_NOTIF
#define GATT_UPPER_TESTER_MULT_VARIABLE_LENGTH_NOTIF FALSE
#endif
/******************************************************************************
 *
 * SMP
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ typedef struct {
  bool (*get_pts_crosskey_sdp_disable)(void);
  const std::string* (*get_pts_smp_options)(void);
  int (*get_pts_smp_failure_case)(void);
  bool (*get_pts_force_eatt_for_notifications)(void);
  config_t* (*get_all)(void);
} stack_config_t;

+15 −5
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ const char* PTS_LE_CONN_UPDATED_DISABLED = "PTS_DisableConnUpdates";
const char* PTS_DISABLE_SDP_LE_PAIR = "PTS_DisableSDPOnLEPair";
const char* PTS_SMP_PAIRING_OPTIONS_KEY = "PTS_SmpOptions";
const char* PTS_SMP_FAILURE_CASE_KEY = "PTS_SmpFailureCase";
const char* PTS_FORCE_EATT_FOR_NOTIFICATIONS = "PTS_ForceEattForNotifications";

static std::unique_ptr<config_t> config;
}  // namespace
@@ -110,12 +111,21 @@ static int get_pts_smp_failure_case(void) {
                        PTS_SMP_FAILURE_CASE_KEY, 0);
}

static bool get_pts_force_eatt_for_notifications(void) {
  return config_get_bool(*config, CONFIG_DEFAULT_SECTION,
                         PTS_FORCE_EATT_FOR_NOTIFICATIONS, false);
}

static config_t* get_all(void) { return config.get(); }

const stack_config_t interface = {
    get_trace_config_enabled,     get_pts_avrcp_test,
    get_pts_secure_only_mode,     get_pts_conn_updates_disabled,
    get_pts_crosskey_sdp_disable, get_pts_smp_options,
    get_pts_smp_failure_case,     get_all};
const stack_config_t interface = {get_trace_config_enabled,
                                  get_pts_avrcp_test,
                                  get_pts_secure_only_mode,
                                  get_pts_conn_updates_disabled,
                                  get_pts_crosskey_sdp_disable,
                                  get_pts_smp_options,
                                  get_pts_smp_failure_case,
                                  get_pts_force_eatt_for_notifications,
                                  get_all};

const stack_config_t* stack_config_get_interface(void) { return &interface; }
+5 −3
Original line number Diff line number Diff line
@@ -54,8 +54,10 @@ class FakeA2dpInterface : public A2dpInterface {

bool get_pts_avrcp_test(void) { return false; }

const stack_config_t interface = {
    nullptr, get_pts_avrcp_test, nullptr, nullptr, nullptr, nullptr, nullptr,
const stack_config_t interface = {nullptr, get_pts_avrcp_test,
                                  nullptr, nullptr,
                                  nullptr, nullptr,
                                  nullptr, nullptr,
                                  nullptr};

void Callback(uint8_t, bool, std::unique_ptr<::bluetooth::PacketBuilder>) {}
Loading