Lines Matching refs:p_cfg
1935 bool l2c_fcr_adj_our_req_options(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_adj_our_req_options() argument
1937 CHECK(p_cfg != NULL); in l2c_fcr_adj_our_req_options()
1939 tL2CAP_FCR_OPTS* p_fcr = &p_cfg->fcr; in l2c_fcr_adj_our_req_options()
1954 if (p_cfg->fcr_present && p_fcr->mode != L2CAP_FCR_BASIC_MODE) { in l2c_fcr_adj_our_req_options()
1968 if (p_cfg->fcr_present && !(p_ccb->config_done & RECONFIG_FLAG)) { in l2c_fcr_adj_our_req_options()
1980 p_cfg->fcr_present = false; in l2c_fcr_adj_our_req_options()
1981 p_cfg->fcs_present = false; /* Illegal to use FCS option in basic mode */ in l2c_fcr_adj_our_req_options()
1982 p_cfg->ext_flow_spec_present = in l2c_fcr_adj_our_req_options()
2010 if ((p_cfg->mtu_present) && (p_cfg->mtu > p_ccb->max_rx_mtu)) { in l2c_fcr_adj_our_req_options()
2012 p_cfg->mtu, p_ccb->max_rx_mtu); in l2c_fcr_adj_our_req_options()
2032 p_cfg->fcs_present = false; /* Illegal to use FCS option in basic mode */ in l2c_fcr_adj_our_req_options()
2033 p_cfg->ext_flow_spec_present = in l2c_fcr_adj_our_req_options()
2092 void l2c_fcr_adj_our_rsp_options(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_adj_our_rsp_options() argument
2094 CHECK(p_cfg != NULL); in l2c_fcr_adj_our_rsp_options()
2099 p_cfg->fcr_present = p_ccb->out_cfg_fcr_present; in l2c_fcr_adj_our_rsp_options()
2101 if (p_cfg->fcr_present) { in l2c_fcr_adj_our_rsp_options()
2113 p_cfg->fcr.mode = p_ccb->peer_cfg.fcr.mode; in l2c_fcr_adj_our_rsp_options()
2114 p_cfg->fcr.tx_win_sz = p_ccb->peer_cfg.fcr.tx_win_sz; in l2c_fcr_adj_our_rsp_options()
2115 p_cfg->fcr.max_transmit = p_ccb->peer_cfg.fcr.max_transmit; in l2c_fcr_adj_our_rsp_options()
2116 p_cfg->fcr.mps = p_ccb->peer_cfg.fcr.mps; in l2c_fcr_adj_our_rsp_options()
2117 p_cfg->fcr.rtrans_tout = p_ccb->our_cfg.fcr.rtrans_tout; in l2c_fcr_adj_our_rsp_options()
2118 p_cfg->fcr.mon_tout = p_ccb->our_cfg.fcr.mon_tout; in l2c_fcr_adj_our_rsp_options()
2134 bool l2c_fcr_renegotiate_chan(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_renegotiate_chan() argument
2136 CHECK(p_cfg != NULL); in l2c_fcr_renegotiate_chan()
2143 if (!p_cfg->fcr_present || (p_ccb->config_done & RECONFIG_FLAG)) in l2c_fcr_renegotiate_chan()
2147 if (p_cfg->result == L2CAP_CFG_UNACCEPTABLE_PARAMS) { in l2c_fcr_renegotiate_chan()
2148 peer_mode = (p_cfg->fcr_present) ? p_cfg->fcr.mode : L2CAP_FCR_BASIC_MODE; in l2c_fcr_renegotiate_chan()
2152 p_cfg->result = L2CAP_CFG_FAILED_NO_REASON; in l2c_fcr_renegotiate_chan()
2193 if ((p_cfg->mtu_present) && (p_cfg->mtu > L2CAP_MTU_SIZE)) { in l2c_fcr_renegotiate_chan()
2194 L2CAP_TRACE_WARNING("L2CAP - adjust MTU: %u too large", p_cfg->mtu); in l2c_fcr_renegotiate_chan()
2195 p_cfg->mtu = L2CAP_MTU_SIZE; in l2c_fcr_renegotiate_chan()
2229 uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_process_peer_cfg_req() argument
2231 CHECK(p_cfg != NULL); in l2c_fcr_process_peer_cfg_req()
2242 p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, in l2c_fcr_process_peer_cfg_req()
2246 if (p_cfg->fcr.mode == L2CAP_FCR_BASIC_MODE) { in l2c_fcr_process_peer_cfg_req()
2253 else if (p_cfg->fcr.mode != p_ccb->ertm_info.preferred_mode) { in l2c_fcr_process_peer_cfg_req()
2260 if ((((1 << p_cfg->fcr.mode) & L2CAP_FCR_CHAN_OPT_ALL_MASK) == 0) || in l2c_fcr_process_peer_cfg_req()
2262 p_cfg->fcr.mode = p_ccb->our_cfg.fcr.mode; in l2c_fcr_process_peer_cfg_req()
2263 p_cfg->fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz; in l2c_fcr_process_peer_cfg_req()
2264 p_cfg->fcr.max_transmit = p_ccb->our_cfg.fcr.max_transmit; in l2c_fcr_process_peer_cfg_req()
2270 p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE; in l2c_fcr_process_peer_cfg_req()
2271 p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0; in l2c_fcr_process_peer_cfg_req()
2272 p_cfg->fcr.rtrans_tout = p_cfg->fcr.mon_tout = p_cfg->fcr.mps = 0; in l2c_fcr_process_peer_cfg_req()
2282 else if ((p_cfg->fcr.mode != L2CAP_FCR_ERTM_MODE) || in l2c_fcr_process_peer_cfg_req()
2295 if (p_cfg->fcr_present && p_cfg->fcr.mode != L2CAP_FCR_BASIC_MODE) { in l2c_fcr_process_peer_cfg_req()
2297 if (p_cfg->fcs_present) { in l2c_fcr_process_peer_cfg_req()
2298 p_ccb->peer_cfg.fcs = p_cfg->fcs; in l2c_fcr_process_peer_cfg_req()
2300 if (p_cfg->fcs == L2CAP_CFG_FCS_BYPASS) in l2c_fcr_process_peer_cfg_req()
2309 if ((p_cfg->fcr.mps == 0) || (p_cfg->fcr.mps > p_ccb->peer_cfg.mtu)) { in l2c_fcr_process_peer_cfg_req()
2310 p_cfg->fcr.mps = p_ccb->peer_cfg.mtu; in l2c_fcr_process_peer_cfg_req()
2315 if (p_cfg->fcr.mps > max_retrans_size) { in l2c_fcr_process_peer_cfg_req()
2317 max_retrans_size, p_cfg->fcr.mps); in l2c_fcr_process_peer_cfg_req()
2319 p_cfg->fcr.mps = max_retrans_size; in l2c_fcr_process_peer_cfg_req()
2323 if (p_cfg->fcr.mode == L2CAP_FCR_ERTM_MODE || in l2c_fcr_process_peer_cfg_req()
2324 p_cfg->fcr.mode == L2CAP_FCR_STREAM_MODE) { in l2c_fcr_process_peer_cfg_req()
2331 p_ccb->peer_cfg.fcr = p_cfg->fcr; in l2c_fcr_process_peer_cfg_req()
2333 if (p_cfg->fcr_present) p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FCR; in l2c_fcr_process_peer_cfg_req()