Lines Matching refs:rfc
3184 struct l2cap_conf_rfc *rfc) in __l2cap_set_ertm_timeouts() argument
3186 rfc->retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO); in __l2cap_set_ertm_timeouts()
3187 rfc->monitor_timeout = cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO); in __l2cap_set_ertm_timeouts()
3251 struct l2cap_conf_rfc rfc = { .mode = chan->mode }; in l2cap_build_conf_req() local
3272 chan->mode = l2cap_select_mode(rfc.mode, chan->conn->feat_mask); in l2cap_build_conf_req()
3293 rfc.mode = L2CAP_MODE_BASIC; in l2cap_build_conf_req()
3294 rfc.txwin_size = 0; in l2cap_build_conf_req()
3295 rfc.max_transmit = 0; in l2cap_build_conf_req()
3296 rfc.retrans_timeout = 0; in l2cap_build_conf_req()
3297 rfc.monitor_timeout = 0; in l2cap_build_conf_req()
3298 rfc.max_pdu_size = 0; in l2cap_build_conf_req()
3300 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3301 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3305 rfc.mode = L2CAP_MODE_ERTM; in l2cap_build_conf_req()
3306 rfc.max_transmit = chan->max_tx; in l2cap_build_conf_req()
3308 __l2cap_set_ertm_timeouts(chan, &rfc); in l2cap_build_conf_req()
3313 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_build_conf_req()
3317 rfc.txwin_size = min_t(u16, chan->tx_win, in l2cap_build_conf_req()
3320 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3321 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3341 rfc.mode = L2CAP_MODE_STREAMING; in l2cap_build_conf_req()
3342 rfc.txwin_size = 0; in l2cap_build_conf_req()
3343 rfc.max_transmit = 0; in l2cap_build_conf_req()
3344 rfc.retrans_timeout = 0; in l2cap_build_conf_req()
3345 rfc.monitor_timeout = 0; in l2cap_build_conf_req()
3350 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_build_conf_req()
3352 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3353 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3383 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; in l2cap_parse_conf_req() local
3417 if (olen != sizeof(rfc)) in l2cap_parse_conf_req()
3419 memcpy(&rfc, (void *) val, olen); in l2cap_parse_conf_req()
3457 chan->mode = l2cap_select_mode(rfc.mode, in l2cap_parse_conf_req()
3469 if (chan->mode != rfc.mode) in l2cap_parse_conf_req()
3476 if (chan->mode != rfc.mode) { in l2cap_parse_conf_req()
3478 rfc.mode = chan->mode; in l2cap_parse_conf_req()
3483 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_req()
3484 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3519 switch (rfc.mode) { in l2cap_parse_conf_req()
3527 chan->remote_tx_win = rfc.txwin_size; in l2cap_parse_conf_req()
3529 rfc.txwin_size = L2CAP_DEFAULT_TX_WINDOW; in l2cap_parse_conf_req()
3531 chan->remote_max_tx = rfc.max_transmit; in l2cap_parse_conf_req()
3533 size = min_t(u16, le16_to_cpu(rfc.max_pdu_size), in l2cap_parse_conf_req()
3536 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_parse_conf_req()
3539 __l2cap_set_ertm_timeouts(chan, &rfc); in l2cap_parse_conf_req()
3544 sizeof(rfc), (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3564 size = min_t(u16, le16_to_cpu(rfc.max_pdu_size), in l2cap_parse_conf_req()
3567 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_parse_conf_req()
3572 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_req()
3573 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3580 memset(&rfc, 0, sizeof(rfc)); in l2cap_parse_conf_req()
3581 rfc.mode = chan->mode; in l2cap_parse_conf_req()
3602 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; in l2cap_parse_conf_rsp() local
3634 if (olen != sizeof(rfc)) in l2cap_parse_conf_rsp()
3636 memcpy(&rfc, (void *)val, olen); in l2cap_parse_conf_rsp()
3638 rfc.mode != chan->mode) in l2cap_parse_conf_rsp()
3641 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_rsp()
3642 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_rsp()
3676 if (chan->mode == L2CAP_MODE_BASIC && chan->mode != rfc.mode) in l2cap_parse_conf_rsp()
3679 chan->mode = rfc.mode; in l2cap_parse_conf_rsp()
3682 switch (rfc.mode) { in l2cap_parse_conf_rsp()
3684 chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); in l2cap_parse_conf_rsp()
3685 chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); in l2cap_parse_conf_rsp()
3686 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
3689 rfc.txwin_size); in l2cap_parse_conf_rsp()
3702 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
3859 struct l2cap_conf_rfc rfc = { in l2cap_conf_rfc_get() local
3879 if (olen != sizeof(rfc)) in l2cap_conf_rfc_get()
3881 memcpy(&rfc, (void *)val, olen); in l2cap_conf_rfc_get()
3891 switch (rfc.mode) { in l2cap_conf_rfc_get()
3893 chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); in l2cap_conf_rfc_get()
3894 chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); in l2cap_conf_rfc_get()
3895 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()
3900 rfc.txwin_size); in l2cap_conf_rfc_get()
3903 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()