Lines Matching refs:pn
946 struct bt_rfcomm_pn *pn; in rfcomm_send_pn() local
950 buf = rfcomm_make_uih_msg(dlc->session, cr, BT_RFCOMM_PN, sizeof(*pn)); in rfcomm_send_pn()
954 pn = net_buf_add(buf, sizeof(*pn)); in rfcomm_send_pn()
955 pn->dlci = dlc->dlci; in rfcomm_send_pn()
956 pn->mtu = sys_cpu_to_le16(dlc->mtu); in rfcomm_send_pn()
960 pn->credits = dlc->rx_credit; in rfcomm_send_pn()
962 pn->flow_ctrl = BT_RFCOMM_PN_CFC_CMD; in rfcomm_send_pn()
964 pn->flow_ctrl = BT_RFCOMM_PN_CFC_RESP; in rfcomm_send_pn()
970 pn->credits = 0U; in rfcomm_send_pn()
971 pn->flow_ctrl = 0U; in rfcomm_send_pn()
973 pn->max_retrans = 0U; in rfcomm_send_pn()
974 pn->ack_timer = 0U; in rfcomm_send_pn()
975 pn->priority = 0U; in rfcomm_send_pn()
1210 struct bt_rfcomm_pn *pn = (void *)buf->data; in rfcomm_handle_pn() local
1213 dlc = rfcomm_dlcs_lookup_dlci(session->dlcs, pn->dlci); in rfcomm_handle_pn()
1220 if (!BT_RFCOMM_CHECK_MTU(pn->mtu)) { in rfcomm_handle_pn()
1221 LOG_ERR("Invalid mtu %d", pn->mtu); in rfcomm_handle_pn()
1222 rfcomm_send_dm(session, pn->dlci); in rfcomm_handle_pn()
1226 dlc = rfcomm_dlc_accept(session, pn->dlci); in rfcomm_handle_pn()
1228 rfcomm_send_dm(session, pn->dlci); in rfcomm_handle_pn()
1234 dlc->mtu = MIN(dlc->mtu, sys_le16_to_cpu(pn->mtu)); in rfcomm_handle_pn()
1236 if (pn->flow_ctrl == BT_RFCOMM_PN_CFC_CMD) { in rfcomm_handle_pn()
1241 rfcomm_dlc_tx_give_credits(dlc, pn->credits); in rfcomm_handle_pn()
1253 if (!BT_RFCOMM_CHECK_MTU(pn->mtu)) { in rfcomm_handle_pn()
1254 LOG_ERR("Invalid mtu %d", pn->mtu); in rfcomm_handle_pn()
1258 dlc->mtu = MIN(dlc->mtu, sys_le16_to_cpu(pn->mtu)); in rfcomm_handle_pn()
1265 dlc->mtu = MIN(dlc->mtu, sys_le16_to_cpu(pn->mtu)); in rfcomm_handle_pn()
1266 if (pn->flow_ctrl == BT_RFCOMM_PN_CFC_RESP) { in rfcomm_handle_pn()
1271 rfcomm_dlc_tx_give_credits(dlc, pn->credits); in rfcomm_handle_pn()