From 21227dfc6ec1b4ab8ff58cc30ad840b301027d52 Mon Sep 17 00:00:00 2001 From: Avish Shah Date: Wed, 17 May 2017 17:24:16 +0530 Subject: [PATCH] Bluetooth 5: Update LE2M implementation through DM (2/3) This patch moves LE2M implementation to the DM instead of tied to GATT. Below are the reasons to make this change: 1) Per link setting usually be done under DM, such as link policy etc. 2) In the future, if LECOC is coming to use in more profile/apps, we can not rely on GATT API for these. Separate API should be required. 3) we could have multiple logical GATT user on top of the same link. 4) Also this will avoid duplicating all the APIs on GATTC and GATTS. Bug: 37586939 Test: manual Change-Id: I71579d6160fb16fb891e75cca64fe3cf9745116a --- include/hardware/bt_gatt_client.h | 4 ++-- include/hardware/bt_gatt_server.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h index 154cb09e..98d50d56 100644 --- a/include/hardware/bt_gatt_client.h +++ b/include/hardware/bt_gatt_client.h @@ -276,11 +276,11 @@ typedef struct { bt_status_t (*conn_parameter_update)(const bt_bdaddr_t *bd_addr, int min_interval, int max_interval, int latency, int timeout); - bt_status_t (*set_preferred_phy)(int conn_id, uint8_t tx_phy, + bt_status_t (*set_preferred_phy)(const bt_bdaddr_t& bd_addr, uint8_t tx_phy, uint8_t rx_phy, uint16_t phy_options); bt_status_t (*read_phy)( - int conn_id, + const bt_bdaddr_t& bd_addr, base::Callback cb); diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h index 36259a18..fcc0f306 100644 --- a/include/hardware/bt_gatt_server.h +++ b/include/hardware/bt_gatt_server.h @@ -166,11 +166,11 @@ typedef struct { bt_status_t (*send_response)(int conn_id, int trans_id, int status, btgatt_response_t *response); - bt_status_t (*set_preferred_phy)(int conn_id, uint8_t tx_phy, + bt_status_t (*set_preferred_phy)(const bt_bdaddr_t& bd_addr, uint8_t tx_phy, uint8_t rx_phy, uint16_t phy_options); bt_status_t (*read_phy)( - int conn_id, + const bt_bdaddr_t& bd_addr, base::Callback cb);