+
+oal_status_t gattc_configure_mtu(int conn_id, int mtu)
+{
+ int ret;
+
+ API_TRACE("Configure MTU Size: [%d]", mtu);
+ CHECK_OAL_GATT_ENABLED();
+ CHECK_CLIENT_CONNECTION(conn_id);
+
+ /* To prevent crash in case other libraries not support this api */
+ if (gatt_api->client->configure_mtu == NULL) {
+ BT_WARN("configure_mtu is NULL");
+ return OAL_STATUS_NOT_SUPPORT;
+ }
+
+ ret = gatt_api->client->configure_mtu(conn_id, mtu);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("Gatt client configure_mtu error: %s", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+ return OAL_STATUS_SUCCESS;
+}
+
+oal_status_t gattc_add_connection_info(bt_address_t *device_address, int conn_id, int server_inst_id)
+{
+ int ret = OAL_STATUS_SUCCESS;
+ bdstr_t bdstr;
+
+ OAL_CHECK_PARAMETER(device_address, return);
+ API_TRACE("Add connection info: [%s]", bdt_bd2str(device_address, &bdstr));
+ CHECK_OAL_GATT_ENABLED();
+ CHECK_SERVER_INSTANCE(server_inst_id);
+ CHECK_SERVER_REGISTRATION(server_inst_id);
+
+ ret = gatt_api->client->add_connection_info((bt_bdaddr_t *)device_address, conn_id, server_inst_id);
+ if (ret != BT_STATUS_SUCCESS) {
+ BT_ERR("GATT connection info add failed: %s", status2string(ret));
+ return convert_to_oal_status(ret);
+ }
+ return OAL_STATUS_SUCCESS;
+}
+