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

Commit 4db1c0af authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Remove unused GATT_Listen

Bug: 30622771
Test: still builds
Change-Id: I4003a1241e611c9c1f2a21090ea3ba7530b0643a
parent 3ac60b24
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -1169,8 +1169,6 @@ void GATT_Deregister (tGATT_IF gatt_if)
    }

    gatt_deregister_bgdev_list(gatt_if);
    /* update the listen mode */
    GATT_Listen(false);

    memset (p_reg, 0, sizeof(tGATT_REG));
}
@@ -1442,22 +1440,5 @@ bool GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr, uint16_t *p
    return status;
}


/*******************************************************************************
**
** Function         GATT_Listen
**
** Description      This function start or stop LE advertisement and listen for
**                  connection.
**
** Parameters       start: start or stop listening.
**
*******************************************************************************/
void GATT_Listen(bool start)
{
    GATT_TRACE_API("GATT_Listen start=%d", start);
    gatt_update_listen_mode(start ? GATT_LISTEN_TO_ALL : GATT_LISTEN_TO_NONE);
}

#endif
+0 −4
Original line number Diff line number Diff line
@@ -215,9 +215,6 @@ typedef struct
    bool            in_use;
} tGATT_SR_REG;

#define GATT_LISTEN_TO_ALL  0xff
#define GATT_LISTEN_TO_NONE 0

/* Data Structure used for GATT server */
/* An GATT registration record consists of a handle, and 1 or more attributes */
/* A service registration information record consists of beginning and ending */
@@ -542,7 +539,6 @@ extern void gatt_set_srv_chg(void);
extern void gatt_delete_dev_from_srv_chg_clt_list(BD_ADDR bd_addr);
extern tGATT_VALUE *gatt_add_pending_ind(tGATT_TCB  *p_tcb, tGATT_VALUE *p_ind);
extern void gatt_free_srvc_db_buffer_app_id(tBT_UUID *p_app_id);
extern void gatt_update_listen_mode(int listening);
extern bool    gatt_cl_send_next_cmd_inq(tGATT_TCB *p_tcb);

/* reserved handle list */
+0 −26
Original line number Diff line number Diff line
@@ -2686,33 +2686,7 @@ tGATT_PENDING_ENC_CLCB* gatt_add_pending_enc_channel_clcb(tGATT_TCB *p_tcb, tGAT

    return p_buf;
}
/*******************************************************************************
**
** Function     gatt_update_listen_mode
**
** Description  update peripheral role listening mode
**
** Returns    Pointer to the new service start buffer, NULL no buffer available
**
*******************************************************************************/
void gatt_update_listen_mode(int listening)
{
    uint16_t        connectability, window, interval;

    connectability = BTM_ReadConnectability(&window, &interval);

    if (listening != GATT_LISTEN_TO_NONE)
    {
        connectability |= BTM_BLE_CONNECTABLE;
    }
    else
    {
        if ((connectability & BTM_BLE_CONNECTABLE) == 0)
        connectability &= ~BTM_BLE_CONNECTABLE;
    }
    /* turning on the adv now */
    btm_ble_set_connectability(connectability);
}
#endif

+0 −1
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ void btm_ble_update_dmt_flag_bits(uint8_t *flag_value,
                                  const uint16_t disc_mode);
void btm_gen_resolvable_private_addr(void *p_cmd_cplt_cback);
void btm_acl_update_conn_addr(uint8_t conn_handle, BD_ADDR address);
void GATT_Listen(bool start);

// methods we expose to c code:
void btm_ble_multi_adv_cleanup(void);
+0 −14
Original line number Diff line number Diff line
@@ -1075,20 +1075,6 @@ extern bool GATT_GetConnectionInfor(uint16_t conn_id, tGATT_IF *p_gatt_if,
extern bool    GATT_GetConnIdIfConnected(tGATT_IF gatt_if, BD_ADDR bd_addr,
                                         uint16_t *p_conn_id, tBT_TRANSPORT transport);


/*******************************************************************************
**
** Function         GATT_Listen
**
** Description      This function start or stop LE advertisement and listen for
**                  connection.
**
** Parameters       start: is a direct conenection or a background auto connection
**
**
*******************************************************************************/
extern void GATT_Listen(bool start);

/*******************************************************************************
**
** Function         GATT_ConfigServiceChangeCCC