summaryrefslogtreecommitdiff
path: root/profiles/health
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-06-08 09:25:28 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-06-08 09:27:16 -0700
commitb55b94c647a474a47ad15f468e749ea95f0e8b19 (patch)
treef55e24d8aa278cdf82ff8a39df90b34ae89f1859 /profiles/health
parent7e7f3e4286fdec002d8046316e924bb7b9eed4b0 (diff)
downloadbluez-b55b94c647a474a47ad15f468e749ea95f0e8b19.tar.gz
health: Fix use of L2CAP modes with bt_io
bt_io modes are no longer compatible with L2CAP modes so the later shall not used with bt_io APIs.
Diffstat (limited to 'profiles/health')
-rw-r--r--profiles/health/hdp.c14
-rw-r--r--profiles/health/mcap.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/profiles/health/hdp.c b/profiles/health/hdp.c
index 541738357..a8354936b 100644
--- a/profiles/health/hdp.c
+++ b/profiles/health/hdp.c
@@ -543,9 +543,9 @@ static void hdp_get_dcpsm_cb(uint16_t dcpsm, gpointer user_data, GError *err)
}
if (hdp_chann->config == HDP_RELIABLE_DC)
- mode = L2CAP_MODE_ERTM;
+ mode = BT_IO_MODE_ERTM;
else
- mode = L2CAP_MODE_STREAMING;
+ mode = BT_IO_MODE_STREAMING;
if (mcap_connect_mdl(hdp_chann->mdl, mode, dcpsm, hdp_conn->cb,
hdp_tmp_dc_data_ref(hdp_conn),
@@ -914,11 +914,11 @@ static gboolean check_channel_conf(struct hdp_channel *chan)
switch (chan->config) {
case HDP_RELIABLE_DC:
- if (mode != L2CAP_MODE_ERTM)
+ if (mode != BT_IO_MODE_ERTM)
return FALSE;
break;
case HDP_STREAMING_DC:
- if (mode != L2CAP_MODE_STREAMING)
+ if (mode != BT_IO_MODE_STREAMING)
return FALSE;
break;
default:
@@ -1057,8 +1057,8 @@ static void hdp_mcap_mdl_aborted_cb(struct mcap_mdl *mdl, void *data)
static uint8_t hdp2l2cap_mode(uint8_t hdp_mode)
{
- return hdp_mode == HDP_STREAMING_DC ? L2CAP_MODE_STREAMING :
- L2CAP_MODE_ERTM;
+ return hdp_mode == HDP_STREAMING_DC ? BT_IO_MODE_STREAMING :
+ BT_IO_MODE_ERTM;
}
static uint8_t hdp_mcap_mdl_conn_req_cb(struct mcap_mcl *mcl, uint8_t mdepid,
@@ -1089,7 +1089,7 @@ static uint8_t hdp_mcap_mdl_conn_req_cb(struct mcap_mcl *mcl, uint8_t mdepid,
}
if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi,
- L2CAP_MODE_ERTM, &err)) {
+ BT_IO_MODE_ERTM, &err)) {
error("Error: %s", err->message);
g_error_free(err);
return MCAP_MDL_BUSY;
diff --git a/profiles/health/mcap.c b/profiles/health/mcap.c
index 249a75326..ba43e6e96 100644
--- a/profiles/health/mcap.c
+++ b/profiles/health/mcap.c
@@ -1741,7 +1741,7 @@ gboolean mcap_connect_mdl(struct mcap_mdl *mdl, uint8_t mode,
return FALSE;
}
- if ((mode != L2CAP_MODE_ERTM) && (mode != L2CAP_MODE_STREAMING)) {
+ if ((mode != BT_IO_MODE_ERTM) && (mode != BT_IO_MODE_STREAMING)) {
g_set_error(err, MCAP_ERROR, MCAP_ERROR_INVALID_ARGS,
"Invalid MDL configuration");
return FALSE;
@@ -1933,7 +1933,7 @@ gboolean mcap_create_mcl(struct mcap_instance *mi,
BT_IO_OPT_PSM, ccpsm,
BT_IO_OPT_MTU, MCAP_CC_MTU,
BT_IO_OPT_SEC_LEVEL, mi->sec,
- BT_IO_OPT_MODE, L2CAP_MODE_ERTM,
+ BT_IO_OPT_MODE, BT_IO_MODE_ERTM,
BT_IO_OPT_INVALID);
if (!mcl->cc) {
mcl->ctrl &= ~MCAP_CTRL_CONN;
@@ -2111,7 +2111,7 @@ struct mcap_instance *mcap_create_instance(const bdaddr_t *src,
BT_IO_OPT_PSM, ccpsm,
BT_IO_OPT_MTU, MCAP_CC_MTU,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_MODE, L2CAP_MODE_ERTM,
+ BT_IO_OPT_MODE, BT_IO_MODE_ERTM,
BT_IO_OPT_INVALID);
if (!mi->ccio) {
error("%s", (*gerr)->message);