• Home
  • Raw
  • Download

Lines Matching refs:p_cfg

537 void l2cu_send_peer_config_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {  in l2cu_send_peer_config_req()  argument
548 if (p_cfg->mtu_present) in l2cu_send_peer_config_req()
550 if (p_cfg->flush_to_present) in l2cu_send_peer_config_req()
552 if (p_cfg->qos_present) in l2cu_send_peer_config_req()
554 if (p_cfg->fcr_present) in l2cu_send_peer_config_req()
556 if (p_cfg->fcs_present) in l2cu_send_peer_config_req()
558 if (p_cfg->ext_flow_spec_present) in l2cu_send_peer_config_req()
573 UINT16_TO_STREAM(p, p_cfg->flags); /* Flags (continuation) */ in l2cu_send_peer_config_req()
576 if (p_cfg->mtu_present) { in l2cu_send_peer_config_req()
579 UINT16_TO_STREAM(p, p_cfg->mtu); in l2cu_send_peer_config_req()
581 if (p_cfg->flush_to_present) { in l2cu_send_peer_config_req()
584 UINT16_TO_STREAM(p, p_cfg->flush_to); in l2cu_send_peer_config_req()
586 if (p_cfg->qos_present) { in l2cu_send_peer_config_req()
589 UINT8_TO_STREAM(p, p_cfg->qos.qos_flags); in l2cu_send_peer_config_req()
590 UINT8_TO_STREAM(p, p_cfg->qos.service_type); in l2cu_send_peer_config_req()
591 UINT32_TO_STREAM(p, p_cfg->qos.token_rate); in l2cu_send_peer_config_req()
592 UINT32_TO_STREAM(p, p_cfg->qos.token_bucket_size); in l2cu_send_peer_config_req()
593 UINT32_TO_STREAM(p, p_cfg->qos.peak_bandwidth); in l2cu_send_peer_config_req()
594 UINT32_TO_STREAM(p, p_cfg->qos.latency); in l2cu_send_peer_config_req()
595 UINT32_TO_STREAM(p, p_cfg->qos.delay_variation); in l2cu_send_peer_config_req()
597 if (p_cfg->fcr_present) { in l2cu_send_peer_config_req()
600 UINT8_TO_STREAM(p, p_cfg->fcr.mode); in l2cu_send_peer_config_req()
601 UINT8_TO_STREAM(p, p_cfg->fcr.tx_win_sz); in l2cu_send_peer_config_req()
602 UINT8_TO_STREAM(p, p_cfg->fcr.max_transmit); in l2cu_send_peer_config_req()
603 UINT16_TO_STREAM(p, p_cfg->fcr.rtrans_tout); in l2cu_send_peer_config_req()
604 UINT16_TO_STREAM(p, p_cfg->fcr.mon_tout); in l2cu_send_peer_config_req()
605 UINT16_TO_STREAM(p, p_cfg->fcr.mps); in l2cu_send_peer_config_req()
608 if (p_cfg->fcs_present) { in l2cu_send_peer_config_req()
611 UINT8_TO_STREAM(p, p_cfg->fcs); in l2cu_send_peer_config_req()
614 if (p_cfg->ext_flow_spec_present) { in l2cu_send_peer_config_req()
617 UINT8_TO_STREAM(p, p_cfg->ext_flow_spec.id); in l2cu_send_peer_config_req()
618 UINT8_TO_STREAM(p, p_cfg->ext_flow_spec.stype); in l2cu_send_peer_config_req()
619 UINT16_TO_STREAM(p, p_cfg->ext_flow_spec.max_sdu_size); in l2cu_send_peer_config_req()
620 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.sdu_inter_time); in l2cu_send_peer_config_req()
621 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.access_latency); in l2cu_send_peer_config_req()
622 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.flush_timeout); in l2cu_send_peer_config_req()
638 void l2cu_send_peer_config_rsp(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2cu_send_peer_config_rsp() argument
644 if (p_cfg->mtu_present) in l2cu_send_peer_config_rsp()
646 if (p_cfg->flush_to_present) in l2cu_send_peer_config_rsp()
648 if (p_cfg->qos_present) in l2cu_send_peer_config_rsp()
650 if (p_cfg->fcr_present) in l2cu_send_peer_config_rsp()
652 if (p_cfg->ext_flow_spec_present) in l2cu_send_peer_config_rsp()
668 p_cfg->flags); /* Flags (continuation) Must match request */ in l2cu_send_peer_config_rsp()
669 UINT16_TO_STREAM(p, p_cfg->result); in l2cu_send_peer_config_rsp()
672 if (p_cfg->mtu_present) { in l2cu_send_peer_config_rsp()
675 UINT16_TO_STREAM(p, p_cfg->mtu); in l2cu_send_peer_config_rsp()
677 if (p_cfg->flush_to_present) { in l2cu_send_peer_config_rsp()
680 UINT16_TO_STREAM(p, p_cfg->flush_to); in l2cu_send_peer_config_rsp()
682 if (p_cfg->qos_present) { in l2cu_send_peer_config_rsp()
685 UINT8_TO_STREAM(p, p_cfg->qos.qos_flags); in l2cu_send_peer_config_rsp()
686 UINT8_TO_STREAM(p, p_cfg->qos.service_type); in l2cu_send_peer_config_rsp()
687 UINT32_TO_STREAM(p, p_cfg->qos.token_rate); in l2cu_send_peer_config_rsp()
688 UINT32_TO_STREAM(p, p_cfg->qos.token_bucket_size); in l2cu_send_peer_config_rsp()
689 UINT32_TO_STREAM(p, p_cfg->qos.peak_bandwidth); in l2cu_send_peer_config_rsp()
690 UINT32_TO_STREAM(p, p_cfg->qos.latency); in l2cu_send_peer_config_rsp()
691 UINT32_TO_STREAM(p, p_cfg->qos.delay_variation); in l2cu_send_peer_config_rsp()
693 if (p_cfg->fcr_present) { in l2cu_send_peer_config_rsp()
696 UINT8_TO_STREAM(p, p_cfg->fcr.mode); in l2cu_send_peer_config_rsp()
697 UINT8_TO_STREAM(p, p_cfg->fcr.tx_win_sz); in l2cu_send_peer_config_rsp()
698 UINT8_TO_STREAM(p, p_cfg->fcr.max_transmit); in l2cu_send_peer_config_rsp()
701 UINT16_TO_STREAM(p, p_cfg->fcr.mps); in l2cu_send_peer_config_rsp()
704 if (p_cfg->ext_flow_spec_present) { in l2cu_send_peer_config_rsp()
707 UINT8_TO_STREAM(p, p_cfg->ext_flow_spec.id); in l2cu_send_peer_config_rsp()
708 UINT8_TO_STREAM(p, p_cfg->ext_flow_spec.stype); in l2cu_send_peer_config_rsp()
709 UINT16_TO_STREAM(p, p_cfg->ext_flow_spec.max_sdu_size); in l2cu_send_peer_config_rsp()
710 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.sdu_inter_time); in l2cu_send_peer_config_rsp()
711 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.access_latency); in l2cu_send_peer_config_rsp()
712 UINT32_TO_STREAM(p, p_cfg->ext_flow_spec.flush_timeout); in l2cu_send_peer_config_rsp()
1848 uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2cu_process_peer_cfg_req() argument
1856 if (!p_cfg->fcr_present) p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE; in l2cu_process_peer_cfg_req()
1859 if (p_cfg->mtu_present) { in l2cu_process_peer_cfg_req()
1861 if (p_cfg->mtu >= L2CAP_MIN_MTU) { in l2cu_process_peer_cfg_req()
1863 if ((!p_cfg->fcr_present) && (p_cfg->mtu > L2CAP_MTU_SIZE)) in l2cu_process_peer_cfg_req()
1864 p_cfg->mtu = L2CAP_MTU_SIZE; in l2cu_process_peer_cfg_req()
1867 p_ccb->peer_cfg.mtu = p_cfg->mtu; in l2cu_process_peer_cfg_req()
1872 p_cfg->mtu = L2CAP_MIN_MTU; in l2cu_process_peer_cfg_req()
1878 p_cfg->mtu_present = true; in l2cu_process_peer_cfg_req()
1879 p_cfg->mtu = p_ccb->peer_cfg.mtu; in l2cu_process_peer_cfg_req()
1883 if (p_cfg->flush_to_present) { in l2cu_process_peer_cfg_req()
1884 if (!p_cfg->flush_to) { in l2cu_process_peer_cfg_req()
1885 p_cfg->flush_to = 0xFFFF; /* Infinite retransmissions (spec default) */ in l2cu_process_peer_cfg_req()
1890 p_ccb->peer_cfg.flush_to = p_cfg->flush_to; in l2cu_process_peer_cfg_req()
1896 p_cfg->flush_to_present = true; in l2cu_process_peer_cfg_req()
1897 p_cfg->flush_to = p_ccb->peer_cfg.flush_to; in l2cu_process_peer_cfg_req()
1901 if (p_cfg->qos_present) { in l2cu_process_peer_cfg_req()
1905 if (p_cfg->qos.service_type <= GUARANTEED) { in l2cu_process_peer_cfg_req()
1906 p_ccb->peer_cfg.qos = p_cfg->qos; in l2cu_process_peer_cfg_req()
1911 p_cfg->qos.service_type = BEST_EFFORT; in l2cu_process_peer_cfg_req()
1917 p_cfg->qos_present = true; in l2cu_process_peer_cfg_req()
1918 p_cfg->qos = p_ccb->peer_cfg.qos; in l2cu_process_peer_cfg_req()
1921 fcr_status = l2c_fcr_process_peer_cfg_req(p_ccb, p_cfg); in l2cu_process_peer_cfg_req()
1924 p_cfg->result = L2CAP_CFG_FAILED_NO_REASON; in l2cu_process_peer_cfg_req()
1925 p_cfg->mtu_present = p_cfg->qos_present = p_cfg->flush_to_present = 0; in l2cu_process_peer_cfg_req()
1937 p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS; in l2cu_process_peer_cfg_req()
1939 if (mtu_ok) p_cfg->mtu_present = false; in l2cu_process_peer_cfg_req()
1940 if (flush_to_ok) p_cfg->flush_to_present = false; in l2cu_process_peer_cfg_req()
1941 if (qos_type_ok) p_cfg->qos_present = false; in l2cu_process_peer_cfg_req()
1942 if (fcr_ok) p_cfg->fcr_present = false; in l2cu_process_peer_cfg_req()
1959 void l2cu_process_peer_cfg_rsp(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2cu_process_peer_cfg_rsp() argument
1962 if ((p_cfg->qos_present) && (p_ccb->our_cfg.qos_present)) in l2cu_process_peer_cfg_rsp()
1963 p_ccb->our_cfg.qos = p_cfg->qos; in l2cu_process_peer_cfg_rsp()
1965 if (p_cfg->fcr_present) { in l2cu_process_peer_cfg_rsp()
1967 if (p_cfg->fcr.mode == L2CAP_FCR_ERTM_MODE) { in l2cu_process_peer_cfg_rsp()
1968 p_ccb->peer_cfg.fcr.rtrans_tout = p_cfg->fcr.rtrans_tout; in l2cu_process_peer_cfg_rsp()
1969 p_ccb->peer_cfg.fcr.mon_tout = p_cfg->fcr.mon_tout; in l2cu_process_peer_cfg_rsp()
1974 if (p_cfg->fcr.tx_win_sz < p_ccb->our_cfg.fcr.tx_win_sz) in l2cu_process_peer_cfg_rsp()
1975 p_ccb->fcrb.max_held_acks = p_cfg->fcr.tx_win_sz / 3; in l2cu_process_peer_cfg_rsp()
1982 p_cfg->fcr.tx_win_sz, p_ccb->our_cfg.fcr.tx_win_sz, in l2cu_process_peer_cfg_rsp()
1998 void l2cu_process_our_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2cu_process_our_cfg_req() argument
2003 if (p_cfg->qos_present) { in l2cu_process_our_cfg_req()
2005 p_ccb->our_cfg.qos = p_cfg->qos; in l2cu_process_our_cfg_req()
2008 if (p_cfg->fcr_present) { in l2cu_process_our_cfg_req()
2010 if (p_cfg->fcr.mode == L2CAP_FCR_BASIC_MODE) in l2cu_process_our_cfg_req()
2011 memset(&p_cfg->fcr, 0, sizeof(tL2CAP_FCR_OPTS)); in l2cu_process_our_cfg_req()
2018 p_cfg->fcr.mon_tout = p_cfg->fcr.rtrans_tout = 0; in l2cu_process_our_cfg_req()
2020 if (p_cfg->fcr.mode == L2CAP_FCR_STREAM_MODE) in l2cu_process_our_cfg_req()
2021 p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0; in l2cu_process_our_cfg_req()
2025 p_ccb->fcrb.max_held_acks = p_cfg->fcr.tx_win_sz / 3; in l2cu_process_our_cfg_req()
2030 if (p_cfg->fcs_present && p_cfg->fcs == L2CAP_CFG_FCS_BYPASS) in l2cu_process_our_cfg_req()
2033 p_cfg->fcs_present = false; in l2cu_process_our_cfg_req()
2035 p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE; in l2cu_process_our_cfg_req()
2038 p_ccb->our_cfg.fcr.mode = p_cfg->fcr.mode; in l2cu_process_our_cfg_req()
2039 p_ccb->our_cfg.fcr_present = p_cfg->fcr_present; in l2cu_process_our_cfg_req()
2043 if (p_cfg->flush_to_present) { in l2cu_process_our_cfg_req()
2044 if ((p_cfg->flush_to == 0) || in l2cu_process_our_cfg_req()
2045 (p_cfg->flush_to == L2CAP_NO_AUTOMATIC_FLUSH)) { in l2cu_process_our_cfg_req()
2050 p_cfg->flush_to_present = false; in l2cu_process_our_cfg_req()
2052 p_ccb->our_cfg.flush_to = p_cfg->flush_to; in l2cu_process_our_cfg_req()
2055 if (p_cfg->flush_to < p_lcb->link_flush_tout) { in l2cu_process_our_cfg_req()
2056 p_lcb->link_flush_tout = p_cfg->flush_to; in l2cu_process_our_cfg_req()
2059 if (p_cfg->flush_to <= ((HCI_MAX_AUTOMATIC_FLUSH_TIMEOUT * 5) / 8)) { in l2cu_process_our_cfg_req()
2061 hci_flush_to = ((p_cfg->flush_to * 8) + 3) / 5; in l2cu_process_our_cfg_req()
2080 void l2cu_process_our_cfg_rsp(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2cu_process_our_cfg_rsp() argument
2083 if ((p_cfg->qos_present) && (p_ccb->peer_cfg.qos_present)) in l2cu_process_our_cfg_rsp()
2084 p_ccb->peer_cfg.qos = p_cfg->qos; in l2cu_process_our_cfg_rsp()
2086 p_cfg->qos_present = false; in l2cu_process_our_cfg_rsp()
2088 l2c_fcr_adj_our_rsp_options(p_ccb, p_cfg); in l2cu_process_our_cfg_rsp()