*
******************************************************************************/
void l2cu_process_our_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
- tL2C_LCB* p_lcb;
- uint16_t hci_flush_to;
-
/* Save the QOS settings we are using for transmit */
if (p_cfg->qos_present) {
p_ccb->our_cfg.qos_present = true;
p_ccb->our_cfg.fcr.mode = p_cfg->fcr.mode;
p_ccb->our_cfg.fcr_present = p_cfg->fcr_present;
-
- /* Check the flush timeout. If it is lower than the current one used */
- /* then we need to adjust the flush timeout sent to the controller */
- if (p_cfg->flush_to_present) {
- if ((p_cfg->flush_to == 0) ||
- (p_cfg->flush_to == L2CAP_NO_AUTOMATIC_FLUSH)) {
- /* don't send invalid flush timeout */
- /* SPEC: The sender of the Request shall specify its flush timeout value
- */
- /* if it differs from the default value of 0xFFFF */
- p_cfg->flush_to_present = false;
- } else {
- p_ccb->our_cfg.flush_to = p_cfg->flush_to;
- p_lcb = p_ccb->p_lcb;
-
- if (p_cfg->flush_to < p_lcb->LinkFlushTimeout()) {
- p_lcb->SetLinkFlushTimeout(p_cfg->flush_to);
-
- /* If the timeout is within range of HCI, set the flush timeout */
- if (p_cfg->flush_to <= ((HCI_MAX_AUTOMATIC_FLUSH_TIMEOUT * 5) / 8)) {
- /* Convert flush timeout to 0.625 ms units, with round */
- hci_flush_to = ((p_cfg->flush_to * 8) + 3) / 5;
- acl_write_automatic_flush_timeout(p_lcb->remote_bd_addr,
- hci_flush_to);
- }
- }
- }
- }
}
/*******************************************************************************