Lines Matching defs:ae
213 static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
247 ncf->len = ae + FC_CONTENT_SZ;
250 ncf->data[ae] = N_PCI_FC | flowstatus;
251 ncf->data[ae + 1] = so->rxfc.bs;
252 ncf->data[ae + 2] = so->rxfc.stmin;
254 if (ae)
363 static int isotp_rcv_fc(struct isotp_sock *so, struct canfd_frame *cf, int ae)
373 if ((cf->len < ae + FC_CONTENT_SZ) ||
375 check_pad(so, cf, ae + FC_CONTENT_SZ, so->opt.rxpad_content))) {
389 so->txfc.bs = cf->data[ae + 1];
390 so->txfc.stmin = cf->data[ae + 2];
414 switch (cf->data[ae] & 0x0F) {
478 static int isotp_rcv_ff(struct sock *sk, struct canfd_frame *cf, int ae)
496 so->rx.len = (cf->data[ae] & 0x0F) << 8;
497 so->rx.len += cf->data[ae + 1];
504 so->rx.len = cf->data[ae + 2] << 24;
505 so->rx.len += cf->data[ae + 3] << 16;
506 so->rx.len += cf->data[ae + 4] << 8;
507 so->rx.len += cf->data[ae + 5];
514 if (so->rx.len + ae + off + ff_pci_sz < so->rx.ll_dl)
529 isotp_send_fc(sk, ae, ISOTP_FC_OVFLW);
535 for (i = ae + ff_pci_sz; i < so->rx.ll_dl; i++)
547 isotp_send_fc(sk, ae, ISOTP_FC_CTS);
551 static int isotp_rcv_cf(struct sock *sk, struct canfd_frame *cf, int ae,
579 if (so->rx.len - so->rx.idx > so->rx.ll_dl - ae - N_PCI_SZ)
583 if ((cf->data[ae] & 0x0F) != so->rx.sn) {
596 for (i = ae + N_PCI_SZ; i < cf->len; i++) {
641 isotp_send_fc(sk, ae, ISOTP_FC_CTS);
650 int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0;
662 if (ae && cf->data[0] != so->opt.rx_ext_address)
665 n_pci_type = cf->data[ae] & 0xF0;
683 isotp_rcv_fc(so, cf, ae);
695 sf_dl = cf->data[ae] & 0x0F;
698 isotp_rcv_sf(sk, cf, SF_PCI_SZ4 + ae, skb, sf_dl);
710 isotp_rcv_sf(sk, cf, SF_PCI_SZ8 + ae, skb,
711 cf->data[SF_PCI_SZ4 + ae]);
718 isotp_rcv_ff(sk, cf, ae);
723 isotp_rcv_cf(sk, cf, ae, skb);
732 int ae, int off)
734 int pcilen = N_PCI_SZ + ae + off;
758 if (ae)
769 int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0;
789 isotp_fill_dataframe(cf, so, ae, 0);
792 cf->data[ae] = N_PCI_CF | so->tx.sn++;
820 int ae)
827 if (ae)
833 cf->data[ae] = N_PCI_FF;
834 cf->data[ae + 1] = 0;
835 cf->data[ae + 2] = (u8)(so->tx.len >> 24) & 0xFFU;
836 cf->data[ae + 3] = (u8)(so->tx.len >> 16) & 0xFFU;
837 cf->data[ae + 4] = (u8)(so->tx.len >> 8) & 0xFFU;
838 cf->data[ae + 5] = (u8)so->tx.len & 0xFFU;
842 cf->data[ae] = (u8)(so->tx.len >> 8) | N_PCI_FF;
843 cf->data[ae + 1] = (u8)so->tx.len & 0xFFU;
847 /* add first data bytes depending on ae */
848 for (i = ae + ff_pci_sz; i < so->tx.ll_dl; i++)
945 int ae = (so->opt.flags & CAN_ISOTP_EXTEND_ADDR) ? 1 : 0;
988 (size > so->tx.ll_dl - SF_PCI_SZ4 - ae - off)) {
1025 if (size <= so->tx.ll_dl - SF_PCI_SZ4 - ae - off) {
1035 if (size <= CAN_MAX_DLEN - SF_PCI_SZ4 - ae)
1038 isotp_fill_dataframe(cf, so, ae, off);
1041 cf->data[ae] = N_PCI_SF;
1045 cf->data[SF_PCI_SZ4 + ae] = size;
1047 cf->data[ae] |= size;
1054 isotp_create_fframe(cf, so, ae);