Lines Matching refs:fcs

107 	uint8_t fcs = 0xff;  in rfcomm_calc_fcs()  local
110 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_calc_fcs()
114 return (0xff - fcs); in rfcomm_calc_fcs()
120 uint8_t fcs = 0xff; in rfcomm_check_fcs() local
123 fcs = rfcomm_crc_table[fcs ^ *data++]; in rfcomm_check_fcs()
127 fcs = rfcomm_crc_table[fcs ^ recvd_fcs]; in rfcomm_check_fcs()
130 return (fcs == 0xcf); in rfcomm_check_fcs()
335 uint8_t cr, fcs; in rfcomm_send_sabm() local
345 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_sabm()
346 net_buf_add_u8(buf, fcs); in rfcomm_send_sabm()
355 uint8_t fcs, cr; in rfcomm_send_disc() local
366 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_disc()
367 net_buf_add_u8(buf, fcs); in rfcomm_send_disc()
501 uint8_t fcs, cr; in rfcomm_send_dm() local
513 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_dm()
514 net_buf_add_u8(buf, fcs); in rfcomm_send_dm()
642 uint8_t cr, fcs; in rfcomm_send_ua() local
652 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_NON_UIH, buf->data); in rfcomm_send_ua()
653 net_buf_add_u8(buf, fcs); in rfcomm_send_ua()
663 uint8_t fcs; in rfcomm_send_msc() local
673 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_msc()
674 net_buf_add_u8(buf, fcs); in rfcomm_send_msc()
684 uint8_t fcs; in rfcomm_send_rls() local
694 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_rls()
695 net_buf_add_u8(buf, fcs); in rfcomm_send_rls()
704 uint8_t fcs; in rfcomm_send_rpn() local
710 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_rpn()
711 net_buf_add_u8(buf, fcs); in rfcomm_send_rpn()
720 uint8_t fcs; in rfcomm_send_test() local
726 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_test()
727 net_buf_add_u8(buf, fcs); in rfcomm_send_test()
735 uint8_t fcs; in rfcomm_send_nsc() local
742 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_nsc()
743 net_buf_add_u8(buf, fcs); in rfcomm_send_nsc()
751 uint8_t fcs; in rfcomm_send_fcon() local
755 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_fcon()
756 net_buf_add_u8(buf, fcs); in rfcomm_send_fcon()
764 uint8_t fcs; in rfcomm_send_fcoff() local
768 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_fcoff()
769 net_buf_add_u8(buf, fcs); in rfcomm_send_fcoff()
948 uint8_t fcs; in rfcomm_send_pn() local
977 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_pn()
978 net_buf_add_u8(buf, fcs); in rfcomm_send_pn()
987 uint8_t fcs, cr; in rfcomm_send_credit() local
1000 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in rfcomm_send_credit()
1001 net_buf_add_u8(buf, fcs); in rfcomm_send_credit()
1463 uint8_t fcs, cr; in bt_rfcomm_dlc_send() local
1494 fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data); in bt_rfcomm_dlc_send()
1495 net_buf_add_u8(buf, fcs); in bt_rfcomm_dlc_send()
1507 uint8_t dlci, frame_type, fcs, fcs_len; in rfcomm_recv() local
1512 if (buf->len < (sizeof(*hdr) + sizeof(fcs))) { in rfcomm_recv()
1530 if (buf->len < (hdr_len + msg_len + sizeof(fcs))) { in rfcomm_recv()
1532 hdr_len + msg_len + sizeof(fcs)); in rfcomm_recv()
1537 fcs = *(net_buf_tail(buf) - sizeof(fcs)); in rfcomm_recv()
1538 if (!rfcomm_check_fcs(fcs_len, buf->data, fcs)) { in rfcomm_recv()