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

Commit 8fd2b084 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9564855 from 3d8e9c82 to udc-release

Change-Id: I6f0de08820200a552f944bfaa9d2c303549eedd1
parents bb6b59a9 3d8e9c82
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -153,7 +153,8 @@ struct eatt_impl {
    tL2CAP_LE_CFG_INFO local_coc_cfg = {
        .mtu = eatt_dev->rx_mtu_,
        .mps = eatt_dev->rx_mps_ < max_mps ? eatt_dev->rx_mps_ : max_mps,
        .credits = L2CAP_LE_CREDIT_DEFAULT};
        .credits = L2CA_LeCreditDefault(),
    };

    if (!L2CA_ConnectCreditBasedRsp(bda, identifier, lcids, L2CAP_CONN_OK,
                                    &local_coc_cfg))
@@ -586,7 +587,7 @@ struct eatt_impl {
    tL2CAP_LE_CFG_INFO local_coc_cfg = {
        .mtu = eatt_dev->rx_mtu_,
        .mps = eatt_dev->rx_mps_,
        .credits = L2CAP_LE_CREDIT_DEFAULT,
        .credits = L2CA_LeCreditDefault(),
        .number_of_channels = num_of_channels,
    };

+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,

  /* Configure L2CAP COC, if transport is LE */
  if (transport == BT_TRANSPORT_LE) {
    p_ccb->local_coc_cfg.credits = L2CAP_LE_CREDIT_DEFAULT;
    p_ccb->local_coc_cfg.credits = L2CA_LeCreditDefault();
    p_ccb->local_coc_cfg.mtu = p_cfg->mtu;

    uint16_t max_mps = controller_get_interface()->get_acl_data_size_ble();
+2 −2
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ void gatt_verify_signature(tGATT_TCB& tcb, uint16_t cid, BT_HDR* p_buf) {
 * Returns          void.
 *
 ******************************************************************************/
void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb,
static void gatt_sec_check_complete(bool sec_check_ok, tGATT_CLCB* p_clcb,
                                    uint8_t sec_act) {
  if (p_clcb && p_clcb->p_tcb && p_clcb->p_tcb->pending_enc_clcb.empty()) {
    gatt_set_sec_act(p_clcb->p_tcb, GATT_SEC_NONE);
+2 −8
Original line number Diff line number Diff line
@@ -263,6 +263,8 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) {
}
#undef CASE_RETURN_TEXT

// If you change these values make sure to look at b/262219144 before.
// Some platform rely on this to never changes
#define GATT_GATT_START_HANDLE 1
#define GATT_GAP_START_HANDLE 20
#define GATT_GMCS_START_HANDLE 40
@@ -270,14 +272,6 @@ inline std::string gatt_channel_state_text(const tGATT_CH_STATE& state) {
#define GATT_TMAS_START_HANDLE 130
#define GATT_APP_START_HANDLE 134

#ifndef GATT_DEFAULT_START_HANDLE
#define GATT_DEFAULT_START_HANDLE GATT_GATT_START_HANDLE
#endif

#ifndef GATT_LAST_HANDLE
#define GATT_LAST_HANDLE 0xFFFF
#endif

typedef struct hdl_cfg {
  uint16_t gatt_start_hdl;
  uint16_t gap_start_hdl;
+9 −2
Original line number Diff line number Diff line
@@ -934,6 +934,13 @@ void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda) {
/** This function is called to send a service chnaged indication to the
 * specified bd address */
void gatt_send_srv_chg_ind(const RawAddress& peer_bda) {
  static const uint16_t sGATT_DEFAULT_START_HANDLE =
      (uint16_t)osi_property_get_int32(
          "bluetooth.gatt.default_start_handle_for_srvc_change.value",
          GATT_GATT_START_HANDLE);
  static const uint16_t sGATT_LAST_HANDLE = (uint16_t)osi_property_get_int32(
      "bluetooth.gatt.last_handle_for_srvc_change.value", 0xFFFF);

  VLOG(1) << __func__;

  if (!gatt_cb.handle_of_h_r) return;
@@ -947,8 +954,8 @@ void gatt_send_srv_chg_ind(const RawAddress& peer_bda) {

  uint8_t handle_range[GATT_SIZE_OF_SRV_CHG_HNDL_RANGE];
  uint8_t* p = handle_range;
  UINT16_TO_STREAM(p, GATT_DEFAULT_START_HANDLE);
  UINT16_TO_STREAM(p, GATT_LAST_HANDLE);
  UINT16_TO_STREAM(p, sGATT_DEFAULT_START_HANDLE);
  UINT16_TO_STREAM(p, sGATT_LAST_HANDLE);
  GATTS_HandleValueIndication(conn_id, gatt_cb.handle_of_h_r,
                              GATT_SIZE_OF_SRV_CHG_HNDL_RANGE, handle_range);
}
Loading