Add API to config QoS
This commit is contained in:
committed by
Jiang Jiang Jian
parent
0b31f6a5fc
commit
64d30fa6c4
@@ -1866,7 +1866,7 @@ tBTM_STATUS BTM_SetQoS (BD_ADDR bd, FLOW_SPEC *p_flow, tBTM_CMPL_CB *p_cb)
|
||||
}
|
||||
|
||||
if ( (p = btm_bda_to_acl(bd, BT_TRANSPORT_BR_EDR)) != NULL) {
|
||||
btu_start_timer (&btm_cb.devcb.qossu_timer, BTU_TTYPE_BTM_ACL, BTM_DEV_REPLY_TIMEOUT);
|
||||
btu_start_timer (&btm_cb.devcb.qossu_timer, BTU_TTYPE_BTM_QOS, BTM_DEV_REPLY_TIMEOUT);
|
||||
btm_cb.devcb.p_qossu_cmpl_cb = p_cb;
|
||||
|
||||
if (!btsnd_hcic_qos_setup (p->hci_handle, p_flow->qos_flags, p_flow->service_type,
|
||||
@@ -1907,6 +1907,10 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
|
||||
memset(&qossu, 0, sizeof(tBTM_QOS_SETUP_CMPL));
|
||||
qossu.status = status;
|
||||
qossu.handle = handle;
|
||||
tACL_CONN *p = btm_handle_to_acl(handle);
|
||||
if (p != NULL) {
|
||||
memcpy (qossu.rem_bda, p->remote_addr, BD_ADDR_LEN);
|
||||
}
|
||||
if (p_flow != NULL) {
|
||||
qossu.flow.qos_flags = p_flow->qos_flags;
|
||||
qossu.flow.service_type = p_flow->service_type;
|
||||
@@ -1921,6 +1925,22 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btm_qos_setup_timeout
|
||||
**
|
||||
** Description This function processes a timeout.
|
||||
** Currently, we just report an error log
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void btm_qos_setup_timeout (void *p_tle)
|
||||
{
|
||||
BTM_TRACE_DEBUG ("%s\n", __func__);
|
||||
|
||||
btm_qos_setup_complete (HCI_ERR_HOST_TIMEOUT, 0, NULL);
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -1068,6 +1068,7 @@ void btm_sco_process_num_completed_pkts (UINT8 *p);
|
||||
#define btm_sco_chk_pend_unpark(hci_status, hci_handle)
|
||||
#endif /* BTM_SCO_INCLUDED */
|
||||
void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow);
|
||||
void btm_qos_setup_timeout (void *p_tle);
|
||||
|
||||
|
||||
/* Internal functions provided by btm_sco.c
|
||||
|
||||
Reference in New Issue
Block a user