• Home
  • Raw
  • Download

Lines Matching refs:cf

923 	struct can_frame *cf;  in kvaser_usb_hydra_update_state()  local
942 skb = alloc_can_err_skb(netdev, &cf); in kvaser_usb_hydra_update_state()
950 can_change_state(netdev, cf, tx_state, rx_state); in kvaser_usb_hydra_update_state()
972 cf->can_id |= CAN_ERR_CNT; in kvaser_usb_hydra_update_state()
973 cf->data[6] = bec->txerr; in kvaser_usb_hydra_update_state()
974 cf->data[7] = bec->rxerr; in kvaser_usb_hydra_update_state()
1070 struct can_frame *cf; in kvaser_usb_hydra_error_frame() local
1088 skb = alloc_can_err_skb(netdev, &cf); in kvaser_usb_hydra_error_frame()
1099 can_change_state(netdev, cf, tx_state, rx_state); in kvaser_usb_hydra_error_frame()
1104 cf->can_id |= CAN_ERR_RESTARTED; in kvaser_usb_hydra_error_frame()
1125 cf->can_id |= CAN_ERR_BUSERROR; in kvaser_usb_hydra_error_frame()
1127 cf->can_id |= CAN_ERR_CNT; in kvaser_usb_hydra_error_frame()
1128 cf->data[6] = bec.txerr; in kvaser_usb_hydra_error_frame()
1129 cf->data[7] = bec.rxerr; in kvaser_usb_hydra_error_frame()
1143 struct can_frame *cf; in kvaser_usb_hydra_one_shot_fail() local
1147 skb = alloc_can_err_skb(netdev, &cf); in kvaser_usb_hydra_one_shot_fail()
1154 cf->can_id |= CAN_ERR_BUSERROR; in kvaser_usb_hydra_one_shot_fail()
1158 cf->can_id |= CAN_ERR_ACK; in kvaser_usb_hydra_one_shot_fail()
1160 cf->can_id |= CAN_ERR_LOSTARB; in kvaser_usb_hydra_one_shot_fail()
1223 struct can_frame *cf; in kvaser_usb_hydra_rx_msg_std() local
1245 skb = alloc_can_skb(priv->netdev, &cf); in kvaser_usb_hydra_rx_msg_std()
1254 cf->can_id = le32_to_cpu(cmd->rx_can.id); in kvaser_usb_hydra_rx_msg_std()
1256 if (cf->can_id & KVASER_USB_HYDRA_EXTENDED_FRAME_ID) { in kvaser_usb_hydra_rx_msg_std()
1257 cf->can_id &= CAN_EFF_MASK; in kvaser_usb_hydra_rx_msg_std()
1258 cf->can_id |= CAN_EFF_FLAG; in kvaser_usb_hydra_rx_msg_std()
1260 cf->can_id &= CAN_SFF_MASK; in kvaser_usb_hydra_rx_msg_std()
1266 cf->len = can_cc_dlc2len(cmd->rx_can.dlc); in kvaser_usb_hydra_rx_msg_std()
1269 cf->can_id |= CAN_RTR_FLAG; in kvaser_usb_hydra_rx_msg_std()
1271 memcpy(cf->data, cmd->rx_can.data, cf->len); in kvaser_usb_hydra_rx_msg_std()
1273 stats->rx_bytes += cf->len; in kvaser_usb_hydra_rx_msg_std()
1285 struct canfd_frame *cf; in kvaser_usb_hydra_rx_msg_ext() local
1314 skb = alloc_canfd_skb(priv->netdev, &cf); in kvaser_usb_hydra_rx_msg_ext()
1316 skb = alloc_can_skb(priv->netdev, (struct can_frame **)&cf); in kvaser_usb_hydra_rx_msg_ext()
1326 cf->can_id = le32_to_cpu(cmd->rx_can.id); in kvaser_usb_hydra_rx_msg_ext()
1329 cf->can_id &= CAN_EFF_MASK; in kvaser_usb_hydra_rx_msg_ext()
1330 cf->can_id |= CAN_EFF_FLAG; in kvaser_usb_hydra_rx_msg_ext()
1332 cf->can_id &= CAN_SFF_MASK; in kvaser_usb_hydra_rx_msg_ext()
1339 cf->len = can_fd_dlc2len(dlc); in kvaser_usb_hydra_rx_msg_ext()
1341 cf->flags |= CANFD_BRS; in kvaser_usb_hydra_rx_msg_ext()
1343 cf->flags |= CANFD_ESI; in kvaser_usb_hydra_rx_msg_ext()
1345 cf->len = can_cc_dlc2len(dlc); in kvaser_usb_hydra_rx_msg_ext()
1349 cf->can_id |= CAN_RTR_FLAG; in kvaser_usb_hydra_rx_msg_ext()
1351 memcpy(cf->data, cmd->rx_can.kcan_payload, cf->len); in kvaser_usb_hydra_rx_msg_ext()
1353 stats->rx_bytes += cf->len; in kvaser_usb_hydra_rx_msg_ext()
1444 struct canfd_frame *cf = (struct canfd_frame *)skb->data; in kvaser_usb_hydra_frame_to_cmd_ext() local
1445 u8 dlc = can_fd_len2dlc(cf->len); in kvaser_usb_hydra_frame_to_cmd_ext()
1446 u8 nbr_of_bytes = cf->len; in kvaser_usb_hydra_frame_to_cmd_ext()
1473 if (cf->can_id & CAN_EFF_FLAG) { in kvaser_usb_hydra_frame_to_cmd_ext()
1474 id = cf->can_id & CAN_EFF_MASK; in kvaser_usb_hydra_frame_to_cmd_ext()
1476 kcan_id = (cf->can_id & CAN_EFF_MASK) | in kvaser_usb_hydra_frame_to_cmd_ext()
1479 id = cf->can_id & CAN_SFF_MASK; in kvaser_usb_hydra_frame_to_cmd_ext()
1481 kcan_id = cf->can_id & CAN_SFF_MASK; in kvaser_usb_hydra_frame_to_cmd_ext()
1484 if (cf->can_id & CAN_ERR_FLAG) in kvaser_usb_hydra_frame_to_cmd_ext()
1495 (cf->flags & CANFD_BRS ? in kvaser_usb_hydra_frame_to_cmd_ext()
1498 if (cf->can_id & CAN_RTR_FLAG) { in kvaser_usb_hydra_frame_to_cmd_ext()
1510 memcpy(cmd->tx_can.kcan_payload, cf->data, nbr_of_bytes); in kvaser_usb_hydra_frame_to_cmd_ext()
1522 struct can_frame *cf = (struct can_frame *)skb->data; in kvaser_usb_hydra_frame_to_cmd_std() local
1538 if (cf->can_id & CAN_EFF_FLAG) { in kvaser_usb_hydra_frame_to_cmd_std()
1539 id = (cf->can_id & CAN_EFF_MASK); in kvaser_usb_hydra_frame_to_cmd_std()
1542 id = cf->can_id & CAN_SFF_MASK; in kvaser_usb_hydra_frame_to_cmd_std()
1545 cmd->tx_can.dlc = cf->len; in kvaser_usb_hydra_frame_to_cmd_std()
1547 flags = (cf->can_id & CAN_EFF_FLAG ? in kvaser_usb_hydra_frame_to_cmd_std()
1550 if (cf->can_id & CAN_RTR_FLAG) in kvaser_usb_hydra_frame_to_cmd_std()
1553 flags |= (cf->can_id & CAN_ERR_FLAG ? in kvaser_usb_hydra_frame_to_cmd_std()
1559 memcpy(cmd->tx_can.data, cf->data, cf->len); in kvaser_usb_hydra_frame_to_cmd_std()