Lines Matching refs:hdp_adapter
60 static gboolean update_adapter(struct hdp_adapter *adapter);
200 const struct hdp_adapter *hdp_adapter = a; in cmp_adapter() local
203 if (hdp_adapter->btd_adapter == adapter) in cmp_adapter()
1090 if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi, in hdp_mcap_mdl_conn_req_cb()
1146 if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi, in hdp_mcap_mdl_conn_req_cb()
1177 if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi, in hdp_mcap_mdl_reconn_req_cb()
1223 struct hdp_adapter *hdp_adapter = data; in mcl_connected() local
1229 hdp_adapter->btd_adapter, str); in mcl_connected()
1329 static void release_adapter_instance(struct hdp_adapter *hdp_adapter) in release_adapter_instance() argument
1331 if (!hdp_adapter->mi) in release_adapter_instance()
1335 mcap_release_instance(hdp_adapter->mi); in release_adapter_instance()
1336 mcap_instance_unref(hdp_adapter->mi); in release_adapter_instance()
1337 hdp_adapter->mi = NULL; in release_adapter_instance()
1340 static gboolean update_adapter(struct hdp_adapter *hdp_adapter) in update_adapter() argument
1346 release_adapter_instance(hdp_adapter); in update_adapter()
1350 if (hdp_adapter->mi) in update_adapter()
1353 adapter_get_address(hdp_adapter->btd_adapter, &addr); in update_adapter()
1354 hdp_adapter->mi = mcap_create_instance(&addr, BT_IO_SEC_MEDIUM, 0, 0, in update_adapter()
1358 hdp_adapter, &err); in update_adapter()
1360 if (!hdp_adapter->mi) { in update_adapter()
1366 hdp_adapter->ccpsm = mcap_get_ctrl_psm(hdp_adapter->mi, &err); in update_adapter()
1372 hdp_adapter->dcpsm = mcap_get_data_psm(hdp_adapter->mi, &err); in update_adapter()
1379 if (hdp_update_sdp_record(hdp_adapter, applications)) in update_adapter()
1384 release_adapter_instance(hdp_adapter); in update_adapter()
1392 struct hdp_adapter *hdp_adapter; in hdp_adapter_register() local
1394 hdp_adapter = g_new0(struct hdp_adapter, 1); in hdp_adapter_register()
1395 hdp_adapter->btd_adapter = btd_adapter_ref(adapter); in hdp_adapter_register()
1397 if(!update_adapter(hdp_adapter)) in hdp_adapter_register()
1400 adapters = g_slist_append(adapters, hdp_adapter); in hdp_adapter_register()
1405 btd_adapter_unref(hdp_adapter->btd_adapter); in hdp_adapter_register()
1406 g_free(hdp_adapter); in hdp_adapter_register()
1412 struct hdp_adapter *hdp_adapter; in hdp_adapter_unregister() local
1420 hdp_adapter = l->data; in hdp_adapter_unregister()
1421 adapters = g_slist_remove(adapters, hdp_adapter); in hdp_adapter_unregister()
1422 if (hdp_adapter->sdp_handler) in hdp_adapter_unregister()
1423 remove_record_from_server(hdp_adapter->sdp_handler); in hdp_adapter_unregister()
1424 release_adapter_instance(hdp_adapter); in hdp_adapter_unregister()
1425 btd_adapter_unref(hdp_adapter->btd_adapter); in hdp_adapter_unregister()
1426 g_free(hdp_adapter); in hdp_adapter_unregister()
2135 dev->hdp_adapter = l->data; in create_health_device()