Lines Matching refs:p_cfg

1905 bool l2c_fcr_adj_our_req_options(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {  in l2c_fcr_adj_our_req_options()  argument
1907 CHECK(p_cfg != NULL); in l2c_fcr_adj_our_req_options()
1909 tL2CAP_FCR_OPTS* p_fcr = &p_cfg->fcr; in l2c_fcr_adj_our_req_options()
1924 if (p_cfg->fcr_present && p_fcr->mode != L2CAP_FCR_BASIC_MODE) { in l2c_fcr_adj_our_req_options()
1938 if (p_cfg->fcr_present && !(p_ccb->config_done & RECONFIG_FLAG)) { in l2c_fcr_adj_our_req_options()
1950 p_cfg->fcr_present = false; in l2c_fcr_adj_our_req_options()
1951 p_cfg->fcs_present = false; /* Illegal to use FCS option in basic mode */ in l2c_fcr_adj_our_req_options()
1952 p_cfg->ext_flow_spec_present = in l2c_fcr_adj_our_req_options()
1978 if ((p_cfg->mtu_present) && (p_cfg->mtu > p_ccb->max_rx_mtu)) { in l2c_fcr_adj_our_req_options()
1980 p_cfg->mtu, p_ccb->max_rx_mtu); in l2c_fcr_adj_our_req_options()
2000 p_cfg->fcs_present = false; /* Illegal to use FCS option in basic mode */ in l2c_fcr_adj_our_req_options()
2001 p_cfg->ext_flow_spec_present = in l2c_fcr_adj_our_req_options()
2060 void l2c_fcr_adj_our_rsp_options(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_adj_our_rsp_options() argument
2062 CHECK(p_cfg != NULL); in l2c_fcr_adj_our_rsp_options()
2067 p_cfg->fcr_present = p_ccb->out_cfg_fcr_present; in l2c_fcr_adj_our_rsp_options()
2069 if (p_cfg->fcr_present) { in l2c_fcr_adj_our_rsp_options()
2081 p_cfg->fcr.mode = p_ccb->peer_cfg.fcr.mode; in l2c_fcr_adj_our_rsp_options()
2082 p_cfg->fcr.tx_win_sz = p_ccb->peer_cfg.fcr.tx_win_sz; in l2c_fcr_adj_our_rsp_options()
2083 p_cfg->fcr.max_transmit = p_ccb->peer_cfg.fcr.max_transmit; in l2c_fcr_adj_our_rsp_options()
2084 p_cfg->fcr.mps = p_ccb->peer_cfg.fcr.mps; in l2c_fcr_adj_our_rsp_options()
2085 p_cfg->fcr.rtrans_tout = p_ccb->our_cfg.fcr.rtrans_tout; in l2c_fcr_adj_our_rsp_options()
2086 p_cfg->fcr.mon_tout = p_ccb->our_cfg.fcr.mon_tout; in l2c_fcr_adj_our_rsp_options()
2102 bool l2c_fcr_renegotiate_chan(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) { in l2c_fcr_renegotiate_chan() argument
2104 CHECK(p_cfg != NULL); in l2c_fcr_renegotiate_chan()
2111 if (!p_cfg->fcr_present || (p_ccb->config_done & RECONFIG_FLAG)) in l2c_fcr_renegotiate_chan()
2115 if (p_cfg->result == L2CAP_CFG_UNACCEPTABLE_PARAMS) { in l2c_fcr_renegotiate_chan()
2116 peer_mode = (p_cfg->fcr_present) ? p_cfg->fcr.mode : L2CAP_FCR_BASIC_MODE; in l2c_fcr_renegotiate_chan()
2120 p_cfg->result = L2CAP_CFG_FAILED_NO_REASON; in l2c_fcr_renegotiate_chan()
2167 if ((p_cfg->mtu_present) && (p_cfg->mtu > L2CAP_MTU_SIZE)) { in l2c_fcr_renegotiate_chan()
2168 L2CAP_TRACE_WARNING("L2CAP - adjust MTU: %u too large", p_cfg->mtu); in l2c_fcr_renegotiate_chan()
2169 p_cfg->mtu = L2CAP_MTU_SIZE; in l2c_fcr_renegotiate_chan()
2203 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
2205 CHECK(p_cfg != NULL); in l2c_fcr_process_peer_cfg_req()
2216 p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode, in l2c_fcr_process_peer_cfg_req()
2220 if (p_cfg->fcr.mode == L2CAP_FCR_BASIC_MODE) { in l2c_fcr_process_peer_cfg_req()
2227 else if (p_cfg->fcr.mode != p_ccb->ertm_info.preferred_mode) { in l2c_fcr_process_peer_cfg_req()
2234 if ((((1 << p_cfg->fcr.mode) & L2CAP_FCR_CHAN_OPT_ALL_MASK) == 0) || in l2c_fcr_process_peer_cfg_req()
2236 p_cfg->fcr.mode = p_ccb->our_cfg.fcr.mode; in l2c_fcr_process_peer_cfg_req()
2237 p_cfg->fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz; in l2c_fcr_process_peer_cfg_req()
2238 p_cfg->fcr.max_transmit = p_ccb->our_cfg.fcr.max_transmit; in l2c_fcr_process_peer_cfg_req()
2244 p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE; in l2c_fcr_process_peer_cfg_req()
2245 p_cfg->fcr.max_transmit = p_cfg->fcr.tx_win_sz = 0; in l2c_fcr_process_peer_cfg_req()
2246 p_cfg->fcr.rtrans_tout = p_cfg->fcr.mon_tout = p_cfg->fcr.mps = 0; in l2c_fcr_process_peer_cfg_req()
2256 else if ((p_cfg->fcr.mode != L2CAP_FCR_ERTM_MODE) || in l2c_fcr_process_peer_cfg_req()
2269 if (p_cfg->fcr_present && p_cfg->fcr.mode != L2CAP_FCR_BASIC_MODE) { in l2c_fcr_process_peer_cfg_req()
2271 if (p_cfg->fcs_present) { in l2c_fcr_process_peer_cfg_req()
2272 p_ccb->peer_cfg.fcs = p_cfg->fcs; in l2c_fcr_process_peer_cfg_req()
2274 if (p_cfg->fcs == L2CAP_CFG_FCS_BYPASS) in l2c_fcr_process_peer_cfg_req()
2283 if ((p_cfg->fcr.mps == 0) || (p_cfg->fcr.mps > p_ccb->peer_cfg.mtu)) { in l2c_fcr_process_peer_cfg_req()
2284 p_cfg->fcr.mps = p_ccb->peer_cfg.mtu; in l2c_fcr_process_peer_cfg_req()
2289 if (p_cfg->fcr.mps > max_retrans_size) { in l2c_fcr_process_peer_cfg_req()
2291 max_retrans_size, p_cfg->fcr.mps); in l2c_fcr_process_peer_cfg_req()
2293 p_cfg->fcr.mps = max_retrans_size; in l2c_fcr_process_peer_cfg_req()
2297 if (p_cfg->fcr.mode == L2CAP_FCR_ERTM_MODE || in l2c_fcr_process_peer_cfg_req()
2298 p_cfg->fcr.mode == L2CAP_FCR_STREAM_MODE) { in l2c_fcr_process_peer_cfg_req()
2305 p_ccb->peer_cfg.fcr = p_cfg->fcr; in l2c_fcr_process_peer_cfg_req()
2307 if (p_cfg->fcr_present) p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FCR; in l2c_fcr_process_peer_cfg_req()