if included service, flag primary,
if descriptor, not used */
tBTA_GATTC_ATTR_TYPE attr_type;
-// btla-specific ++
} __attribute__((packed)) tBTA_GATTC_CACHE_ATTR;
-// btla-specific --
typedef struct
{
UINT16 s_handle;
UINT16 e_handle;
list_node_t *p_cur_char; /* node pointing to p_attr */
-// btla-specific ++
} __attribute__((packed)) tBTA_GATTC_CACHE;
-// btla-specific --
typedef struct
{
}
cb_data.reg_oper.server_if = BTA_GATTS_INVALID_IF;
-// btla-specific ++
memcpy(&cb_data.reg_oper.uuid, &p_msg->api_reg.app_uuid, sizeof(tBT_UUID));
-// btla-specific --
if (first_unuse != 0xff)
{
APPL_TRACE_ERROR("register application first_unuse rcb_idx = %d", first_unuse);
cb_data.create.status = BTA_GATT_OK;
cb_data.create.service_id = service_id;
-// btla-specific ++
cb_data.create.is_primary = p_msg->api_create_svc.is_pri;
-// btla-specific --
cb_data.create.server_if = p_cb->rcb[rcb_idx].gatt_if;
}
else
memset(&p_cb->srvc_cb[srvc_idx], 0, sizeof(tBTA_GATTS_SRVC_CB));
APPL_TRACE_ERROR("service creation failed.");
}
-// btla-specific ++
memcpy(&cb_data.create.uuid, &p_msg->api_create_svc.service_uuid, sizeof(tBT_UUID));
cb_data.create.svc_instance= p_msg->api_create_svc.inst;
-// btla-specific --
}
if (p_cb->rcb[rcb_idx].p_cback)
(* p_cb->rcb[rcb_idx].p_cback)(BTA_GATTS_CREATE_EVT, &cb_data);
cb_data.add_result.server_if = p_rcb->gatt_if;
cb_data.add_result.service_id = p_msg->api_add_incl_srvc.hdr.layer_specific;
cb_data.add_result.attr_id = attr_id;
-// btla-specific ++
memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char.char_uuid, sizeof(tBT_UUID));
-// btla-specific --
if (attr_id)
{
cb_data.add_result.server_if = p_rcb->gatt_if;
cb_data.add_result.service_id = p_msg->api_add_incl_srvc.hdr.layer_specific;
cb_data.add_result.attr_id = attr_id;
-// btla-specific ++
memcpy(&cb_data.add_result.char_uuid, &p_msg->api_add_char_descr.descr_uuid, sizeof(tBT_UUID));
-// btla-specific --
if (attr_id)
{
else /* else remove device by handle */
{
index = bta_hh_dev_handle_to_cb_idx((UINT8)p_msg->layer_specific);
-// btla-specific ++
/* If BT disable is done while the HID device is connected and Link_Key uses unauthenticated combination
* then we can get into a situation where remove_bonding is called with the index set to 0 (without getting
* cleaned up). Only when VIRTUAL_UNPLUG is called do we cleanup the index and make it MAX_KNOWN.
(bta_hh_cb.kdev[index].in_use == FALSE)) {
index = BTA_HH_IDX_INVALID;
}
-// btla-specific --
}
}
else if (p_msg->event == BTA_HH_INT_OPEN_EVT)
******************************************************************************/
extern void bta_ag_ci_slc_ready(UINT16 handle);
-// btla-specific ++
/******************************************************************************
**
** Function bta_ag_ci_wbs_command
**
******************************************************************************/
extern void bta_ag_ci_wbs_command (UINT16 handle, char *p_data, UINT16 len);
-// btla-specific --
#ifdef __cplusplus
}
/* BLE profile service ID */
#define BTA_BLE_SERVICE_ID 30 /* GATT profile */
-// btla-specific ++
#define BTA_USER_SERVICE_ID 31 /* User requested UUID */
#define BTA_MAX_SERVICE_ID 32
-// btla-specific --
#else
#define BTA_USER_SERVICE_ID 30 /* User requested UUID */
#define BTA_MAX_SERVICE_ID 31
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
#define BTA_BLE_SERVICE_MASK 0x20000000 /* GATT based service */
-// btla-specific ++
#define BTA_USER_SERVICE_MASK 0x40000000 /* Message Notification Profile */
-// btla-specific --
#else
-// btla-specific ++
#define BTA_USER_SERVICE_MASK 0x20000000 /* Message Notification Profile */
-// btla-specific --
#endif
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
#define BTA_DM_BLE_CONNECTABLE BTM_BLE_CONNECTABLE /* Device is LE connectable. */
#endif
-// btla-specific ++
typedef UINT16 tBTA_DM_CONN;
#define BTA_TRANSPORT_UNKNOWN 0
#define BTA_DM_BLE_LOCAL_IR_EVT 20 /* BLE local IR event */
#define BTA_DM_BLE_LOCAL_ER_EVT 21 /* BLE local ER event */
#define BTA_DM_BLE_NC_REQ_EVT 22 /* SMP Numeric Comparison request event */
-// btla-specific ++
#define BTA_DM_SP_RMT_OOB_EXT_EVT 23 /* Simple Pairing Remote OOB Extended Data request. */
#define BTA_DM_BLE_AUTH_CMPL_EVT 24 /* BLE Auth complete */
-// btla-specific --
#define BTA_DM_DEV_UNPAIRED_EVT 25
#define BTA_DM_HW_ERROR_EVT 26 /* BT Chip H/W error */
#define BTA_DM_LE_FEATURES_READ 27 /* Cotroller specific LE features are read */
BD_ADDR bd_addr; /* BD address peer device. */
BD_NAME bd_name; /* Name of peer device. */
tBTA_SERVICE_ID service; /* Service ID to authorize. */
-// btla-specific ++
DEV_CLASS dev_class;
-// btla-specific --
} tBTA_DM_AUTHORIZE;
/* Structure associated with BTA_DM_LINK_UP_EVT */
BD_ADDR bd_addr; /* BD address peer device. */
BD_NAME bd_name; /* Name of peer device. */
tBTA_SERVICE_MASK services; /* Services found on peer device. */
-// btla-specific ++
UINT8 * p_raw_data; /* Raw data for discovery DB */
UINT32 raw_data_size; /* size of raw data */
tBT_DEVICE_TYPE device_type; /* device type in case it is BLE device */
UINT32 num_uuids;
UINT8 *p_uuid_list;
-// btla-specific --
tBTA_STATUS result;
} tBTA_DM_DISC_RES;
extern void BTA_DmDiscover(BD_ADDR bd_addr, tBTA_SERVICE_MASK services,
tBTA_DM_SEARCH_CBACK *p_cback, BOOLEAN sdp_search);
-// btla-specific ++
/*******************************************************************************
**
** Function BTA_DmDiscoverUUID
**
*******************************************************************************/
tBTA_STATUS BTA_DmGetCachedRemoteName(BD_ADDR remote_device, UINT8 **pp_cached_name);
-// btla-specific --
/*******************************************************************************
**
#endif
#if BLE_INCLUDED == TRUE
-// btla-specific --
/*******************************************************************************
**
** Function BTA_DmBleConfigLocalPrivacy
extern void bta_dm_co_ble_load_local_keys (tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys);
-// btla-specific ++
/*******************************************************************************
**
** Function bta_dm_co_ble_io_req
UINT8 *p_max_key_size,
tBTA_LE_KEY_TYPE *p_init_key,
tBTA_LE_KEY_TYPE *p_resp_key );
-// btla-specific --
#endif
{
tBTA_GATT_STATUS status;
tBTA_GATTC_IF client_if;
-// btla-specific ++
tBT_UUID app_uuid;
-// btla-specific --
}tBTA_GATTC_REG;
typedef struct
BOOLEAN congested; /* congestion indicator */
}tBTA_GATTC_CONGEST;
-// btla-specific ++
typedef struct
{
tBTA_GATT_STATUS status;
UINT16 conn_id;
BD_ADDR remote_bda;
}tBTA_GATTC_OPEN_CLOSE;
-// btla-specific --
typedef struct
{
{
tBTA_GATTS_IF server_if;
tBTA_GATT_STATUS status;
-// btla-specific ++
tBT_UUID uuid;
-// btla-specific --
}tBTA_GATTS_REG_OPER;
{
tBTA_GATTS_IF server_if;
UINT16 service_id;
-// btla-specific ++
UINT16 svc_instance;
BOOLEAN is_primary;
tBTA_GATT_STATUS status;
tBT_UUID uuid;
-// btla-specific --
}tBTA_GATTS_CREATE;
typedef struct
UINT16 service_id;
UINT16 attr_id;
tBTA_GATT_STATUS status;
-// btla-specific ++
tBT_UUID char_uuid;
-// btla-specific --
}tBTA_GATTS_ADD_RESULT;
typedef struct
#define BTTRC_ID_AVDT_SCB 80 /* avdt scb */
#define BTTRC_ID_AVDT_CCB 81 /* avdt ccb */
-// btla-specific ++
/* LayerIDs added for BTL-A. Probably should modify bte_logmsg.c in future. */
#define BTTRC_ID_STK_RFCOMM 82
#define BTTRC_ID_STK_RFCOMM_DATA 83
#define BTTRC_ID_BT_PROTOCOL 88 /* this is a temporary solution to allow dynamic
enable/disable of BT_PROTOCOL_TRACE */
#define BTTRC_ID_MAX_ID BTTRC_ID_BT_PROTOCOL
-// btla-specific --
#define BTTRC_ID_ALL_LAYERS 0xFF /* all trace layers */
/* Parameter datatypes used in Trace APIs */
#define BTTRC_PARAM_UINT8 1
** BT_TRACE_LEVEL_DEBUG 5 * Debug messages (general)
******************************************************************************/
-// btla-specific ++
/* Core Stack default trace levels */
#ifndef HCI_INITIAL_TRACE_LEVEL
#define HCI_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
#ifndef SMP_INITIAL_TRACE_LEVEL
#define SMP_INITIAL_TRACE_LEVEL BT_TRACE_LEVEL_WARNING
#endif
-// btla-specific --
#define BT_TRACE(l,t,...) LogMsg((TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | (t)), ##__VA_ARGS__)
#define BT_ERROR_TRACE(l,...) LogMsg(TRACE_CTRL_GENERAL | (l) | TRACE_ORG_STACK | TRACE_TYPE_ERROR, ##__VA_ARGS__)
tBTM_LE_CONN_PRAMS conn_params;
#endif
-// btla-specific ++
#if BTM_DISC_DURING_RS == TRUE
#define BTM_SEC_RS_NOT_PENDING 0 /* Role Switch not in progress */
#define BTM_SEC_RS_PENDING 1 /* Role Switch in progress */
#define BTM_SEC_DISC_PENDING 2 /* Disconnect is pending */
UINT8 rs_disc_pending;
#endif
-// btla-specific --
#define BTM_SEC_NO_LAST_SERVICE_ID 0
UINT8 last_author_service_id; /* ID of last serviced authorized: Reset after each l2cap connection */
extern void btm_read_remote_version_complete (UINT8 *p);
extern void btm_establish_continue (tACL_CONN *p_acl_cb);
-// btla-specific ++
extern void btm_acl_chk_peer_pkt_type_support (tACL_CONN *p, UINT16 *p_pkt_type);
-// btla-specific --
/* Read maximum data packet that can be sent over current connection */
extern UINT16 btm_get_max_packet_size (BD_ADDR addr);
extern tACL_CONN *btm_bda_to_acl (BD_ADDR bda, tBT_TRANSPORT transport);
status = GATT_INVALID_PDU;
}
/* these attribute does not allow write blob */
-// btla-specific ++
else if ( (p_attr->uuid_type == GATT_ATTR_UUID_TYPE_16) &&
(p_attr->uuid == GATT_UUID_CHAR_CLIENT_CONFIG ||
p_attr->uuid == GATT_UUID_CHAR_SRVR_CONFIG) )
-// btla-specific --
{
if (op_code == GATT_REQ_PREPARE_WRITE && offset != 0) /* does not allow write blob */
{
#define BT_EVT_HCISU 0x5000
-// btla-specific ++
#define BT_EVT_TO_HCISU_RECONFIG_EVT (0x0001 | BT_EVT_HCISU)
#define BT_EVT_TO_HCISU_UPDATE_BAUDRATE_EVT (0x0002 | BT_EVT_HCISU)
#define BT_EVT_TO_HCISU_LP_ENABLE_EVT (0x0003 | BT_EVT_HCISU)
#define BT_EVT_TO_HCISU_LP_DISABLE_EVT (0x0004 | BT_EVT_HCISU)
-// btla-specific --
#define BT_EVT_TO_HCISU_LP_APP_SLEEPING_EVT (0x0005 | BT_EVT_HCISU)
#define BT_EVT_TO_HCISU_LP_ALLOW_BT_SLEEP_EVT (0x0006 | BT_EVT_HCISU)
#define BT_EVT_TO_HCISU_LP_WAKEUP_HOST_EVT (0x0007 | BT_EVT_HCISU)
*******************************************************************************/
extern UINT8 BTM_AllocateSCN(void);
-// btla-specific ++
/*******************************************************************************
**
** Function BTM_TryAllocateSCN
**
*******************************************************************************/
extern BOOLEAN BTM_TryAllocateSCN(UINT8 scn);
-// btla-specific --
/*******************************************************************************
/* Cancel sniff mode if needed */
{
tBTM_PM_PWR_MD settings;
-// btla-specific ++
memset((void*)&settings, 0, sizeof(settings));
-// btla-specific --
settings.mode = BTM_PM_MD_ACTIVE;
/* COVERITY
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
/* Cancel sniff mode if needed */
{
tBTM_PM_PWR_MD settings;
-// btla-specific ++
memset((void*)&settings, 0, sizeof(settings));
-// btla-specific --
settings.mode = BTM_PM_MD_ACTIVE;
/* COVERITY
Event uninit_use_in_call: Using uninitialized value "settings" (field "settings".timeout uninitialized) in call to function "BTM_SetPowerMode" [details]
break;
case L2CEVT_L2CAP_DISCONNECT_REQ: /* Peer disconnected request */
-// btla-specific ++
/* Make sure we are not in sniff mode */
{
tBTM_PM_PWR_MD settings;
settings.mode = BTM_PM_MD_ACTIVE;
BTM_SetPowerMode (BTM_PM_SET_ONLY_ID, p_ccb->p_lcb->remote_bd_addr, &settings);
}
-// btla-specific --
p_ccb->chnl_state = CST_W4_L2CA_DISCONNECT_RSP;
alarm_set_on_queue(p_ccb->l2c_ccb_timer,
if (p_cfg->fcr_present)
{
-// btla-specific ++
/* Temporary - until a better algorithm is implemented */
/* If peer's tx_wnd_sz requires too many buffers for us to support, then adjust it. For now, respond with our own tx_wnd_sz. */
/* Note: peer is not guaranteed to obey our adjustment */
L2CAP_TRACE_DEBUG ("%s: adjusting requested tx_win_sz from %i to %i", __FUNCTION__, p_ccb->peer_cfg.fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz);
p_ccb->peer_cfg.fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz;
}
-// btla-specific --
p_cfg->fcr.mode = p_ccb->peer_cfg.fcr.mode;
p_cfg->fcr.tx_win_sz = p_ccb->peer_cfg.fcr.tx_win_sz;
alarm_free(p_ccb->fcrb.ack_timer);
p_ccb->fcrb.ack_timer = alarm_new("l2c_fcrb.ack_timer");
-// btla-specific ++
/* CSP408639 Fix: When L2CAP send amp move channel request or receive
* L2CEVT_AMP_MOVE_REQ do following sequence. Send channel move
* request -> Stop retrans/monitor timer -> Change channel state to CST_AMP_MOVING. */
alarm_free(p_ccb->fcrb.mon_retrans_timer);
p_ccb->fcrb.mon_retrans_timer = alarm_new("l2c_fcrb.mon_retrans_timer");
-// btla-specific --
p_ccb->ertm_info.preferred_mode = L2CAP_FCR_BASIC_MODE; /* Default mode for channel is basic mode */
p_ccb->ertm_info.allowed_modes = L2CAP_FCR_CHAN_OPT_BASIC; /* Default mode for channel is basic mode */
SDP_DeleteRecord (pan_cb.pan_nap_sdp_handle);
pan_cb.pan_nap_sdp_handle = pan_register_with_sdp (UUID_SERVCLASS_NAP, p_sec[2], p_nap_name, p_desc);
-// btla-specific ++
bta_sys_add_uuid(UUID_SERVCLASS_NAP);
-// btla-specific --
}
/* If the NAP role is already active and now being cleared delete the record */
else if (pan_cb.role & PAN_ROLE_NAP_SERVER)
{
SDP_DeleteRecord (pan_cb.pan_nap_sdp_handle);
pan_cb.pan_nap_sdp_handle = 0;
-// btla-specific ++
bta_sys_remove_uuid(UUID_SERVCLASS_NAP);
-// btla-specific --
}
}
#endif
SDP_DeleteRecord (pan_cb.pan_gn_sdp_handle);
pan_cb.pan_gn_sdp_handle = pan_register_with_sdp (UUID_SERVCLASS_GN, p_sec[1], p_gn_name, p_desc);
-// btla-specific ++
bta_sys_add_uuid(UUID_SERVCLASS_GN);
-// btla-specific --
}
/* If the GN role is already active and now being cleared delete the record */
else if (pan_cb.role & PAN_ROLE_GN_SERVER)
{
SDP_DeleteRecord (pan_cb.pan_gn_sdp_handle);
pan_cb.pan_gn_sdp_handle = 0;
-// btla-specific ++
bta_sys_remove_uuid(UUID_SERVCLASS_GN);
-// btla-specific --
}
}
#endif
SDP_DeleteRecord (pan_cb.pan_user_sdp_handle);
pan_cb.pan_user_sdp_handle = pan_register_with_sdp (UUID_SERVCLASS_PANU, p_sec[0], p_user_name, p_desc);
-// btla-specific ++
bta_sys_add_uuid(UUID_SERVCLASS_PANU);
-// btla-specific --
}
/* If the PANU role is already active and now being cleared delete the record */
else if (pan_cb.role & PAN_ROLE_CLIENT)
{
SDP_DeleteRecord (pan_cb.pan_user_sdp_handle);
pan_cb.pan_user_sdp_handle = 0;
-// btla-specific ++
bta_sys_remove_uuid(UUID_SERVCLASS_PANU);
-// btla-specific --
}
}
#endif
SDP_AddAttribute (sdp_handle, ATTR_ID_PROTOCOL_DESC_LIST, DATA_ELE_SEQ_DESC_TYPE,
proto_len, (UINT8 *)(pan_proto_elem_data+2));
-// btla-specific ++
#if 0
availability = 0xFF;
SDP_AddAttribute (sdp_handle, ATTR_ID_SERVICE_AVAILABILITY, UINT_DESC_TYPE, 1, &availability);
#endif
-// btla-specific --
/* Language base */
SDP_AddLanguageBaseAttrIDList (sdp_handle, LANG_ID_CODE_ENGLISH, LANG_ID_CHAR_ENCODE_UTF8, LANGUAGE_BASE_ID);
#define RFC_EVENT_DATA 14
#define RFC_EVENT_SEC_COMPLETE 15
-// btla-specific ++
#define RFC_T1_TIMEOUT 20 /* seconds to wait for reply with Poll bit */
#define RFC_PORT_T1_TIMEOUT 60 /* seconds to wait for reply with Poll bit other than MX */
#define RFC_T2_TIMEOUT 20 /* timeout to wait for Mx UIH */
-// btla-specific --
#define RFC_DISC_TIMEOUT 3 /* If something goes wrong and we send DISC we should not wait for min */
#define RFC_CLOSE_TIMEOUT 10
#define RFCOMM_CONN_TIMEOUT 120 /* first connection to be established on Mx */
#define MAX_ATTR_PER_SEQ 16
/* Max length we support for any attribute */
-// btla-specific ++
#ifdef SDP_MAX_ATTR_LEN
#define MAX_ATTR_LEN SDP_MAX_ATTR_LEN
#else
#define MAX_ATTR_LEN 256
#endif
-// btla-specific --
/* Internal UUID sequence representation */
typedef struct