Lines Matching refs:rfc
3340 struct l2cap_conf_rfc *rfc) in __l2cap_set_ertm_timeouts() argument
3369 rfc->retrans_timeout = cpu_to_le16((u16) ertm_to); in __l2cap_set_ertm_timeouts()
3370 rfc->monitor_timeout = rfc->retrans_timeout; in __l2cap_set_ertm_timeouts()
3372 rfc->retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO); in __l2cap_set_ertm_timeouts()
3373 rfc->monitor_timeout = cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO); in __l2cap_set_ertm_timeouts()
3438 struct l2cap_conf_rfc rfc = { .mode = chan->mode }; in l2cap_build_conf_req() local
3459 chan->mode = l2cap_select_mode(rfc.mode, chan->conn->feat_mask); in l2cap_build_conf_req()
3480 rfc.mode = L2CAP_MODE_BASIC; in l2cap_build_conf_req()
3481 rfc.txwin_size = 0; in l2cap_build_conf_req()
3482 rfc.max_transmit = 0; in l2cap_build_conf_req()
3483 rfc.retrans_timeout = 0; in l2cap_build_conf_req()
3484 rfc.monitor_timeout = 0; in l2cap_build_conf_req()
3485 rfc.max_pdu_size = 0; in l2cap_build_conf_req()
3487 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3488 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3492 rfc.mode = L2CAP_MODE_ERTM; in l2cap_build_conf_req()
3493 rfc.max_transmit = chan->max_tx; in l2cap_build_conf_req()
3495 __l2cap_set_ertm_timeouts(chan, &rfc); in l2cap_build_conf_req()
3500 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_build_conf_req()
3504 rfc.txwin_size = min_t(u16, chan->tx_win, in l2cap_build_conf_req()
3507 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3508 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3528 rfc.mode = L2CAP_MODE_STREAMING; in l2cap_build_conf_req()
3529 rfc.txwin_size = 0; in l2cap_build_conf_req()
3530 rfc.max_transmit = 0; in l2cap_build_conf_req()
3531 rfc.retrans_timeout = 0; in l2cap_build_conf_req()
3532 rfc.monitor_timeout = 0; in l2cap_build_conf_req()
3537 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_build_conf_req()
3539 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_build_conf_req()
3540 (unsigned long) &rfc, endptr - ptr); in l2cap_build_conf_req()
3570 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; in l2cap_parse_conf_req() local
3604 if (olen != sizeof(rfc)) in l2cap_parse_conf_req()
3606 memcpy(&rfc, (void *) val, olen); in l2cap_parse_conf_req()
3650 chan->mode = l2cap_select_mode(rfc.mode, in l2cap_parse_conf_req()
3662 if (chan->mode != rfc.mode) in l2cap_parse_conf_req()
3669 if (chan->mode != rfc.mode) { in l2cap_parse_conf_req()
3671 rfc.mode = chan->mode; in l2cap_parse_conf_req()
3676 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_req()
3677 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3712 switch (rfc.mode) { in l2cap_parse_conf_req()
3720 chan->remote_tx_win = rfc.txwin_size; in l2cap_parse_conf_req()
3722 rfc.txwin_size = L2CAP_DEFAULT_TX_WINDOW; in l2cap_parse_conf_req()
3724 chan->remote_max_tx = rfc.max_transmit; in l2cap_parse_conf_req()
3726 size = min_t(u16, le16_to_cpu(rfc.max_pdu_size), in l2cap_parse_conf_req()
3729 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_parse_conf_req()
3732 __l2cap_set_ertm_timeouts(chan, &rfc); in l2cap_parse_conf_req()
3737 sizeof(rfc), (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3756 size = min_t(u16, le16_to_cpu(rfc.max_pdu_size), in l2cap_parse_conf_req()
3759 rfc.max_pdu_size = cpu_to_le16(size); in l2cap_parse_conf_req()
3764 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_req()
3765 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_req()
3772 memset(&rfc, 0, sizeof(rfc)); in l2cap_parse_conf_req()
3773 rfc.mode = chan->mode; in l2cap_parse_conf_req()
3794 struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; in l2cap_parse_conf_rsp() local
3826 if (olen != sizeof(rfc)) in l2cap_parse_conf_rsp()
3828 memcpy(&rfc, (void *)val, olen); in l2cap_parse_conf_rsp()
3830 rfc.mode != chan->mode) in l2cap_parse_conf_rsp()
3833 l2cap_add_conf_opt(&ptr, L2CAP_CONF_RFC, sizeof(rfc), in l2cap_parse_conf_rsp()
3834 (unsigned long) &rfc, endptr - ptr); in l2cap_parse_conf_rsp()
3868 if (chan->mode == L2CAP_MODE_BASIC && chan->mode != rfc.mode) in l2cap_parse_conf_rsp()
3871 chan->mode = rfc.mode; in l2cap_parse_conf_rsp()
3874 switch (rfc.mode) { in l2cap_parse_conf_rsp()
3876 chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); in l2cap_parse_conf_rsp()
3877 chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); in l2cap_parse_conf_rsp()
3878 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
3881 rfc.txwin_size); in l2cap_parse_conf_rsp()
3894 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_parse_conf_rsp()
4012 struct l2cap_conf_rfc rfc = { in l2cap_conf_rfc_get() local
4032 if (olen != sizeof(rfc)) in l2cap_conf_rfc_get()
4034 memcpy(&rfc, (void *)val, olen); in l2cap_conf_rfc_get()
4044 switch (rfc.mode) { in l2cap_conf_rfc_get()
4046 chan->retrans_timeout = le16_to_cpu(rfc.retrans_timeout); in l2cap_conf_rfc_get()
4047 chan->monitor_timeout = le16_to_cpu(rfc.monitor_timeout); in l2cap_conf_rfc_get()
4048 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()
4053 rfc.txwin_size); in l2cap_conf_rfc_get()
4056 chan->mps = le16_to_cpu(rfc.max_pdu_size); in l2cap_conf_rfc_get()