Lines Matching +full:fixed +full:- +full:length

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020 Marc Kleine-Budde <[email protected]>
19 * ---------------------------------------------------------
27 * Data Length Code (DLC) 4
37 * ---------------------------------------------------------
48 * Data length code (DLC) 4
55 * Size of a CAN-FD Standard Frame in bits
58 * ---------------------------------------------------------
69 * Data length code (DLC) 4
76 * Size of a CAN-FD Extended Frame in bits
79 * ---------------------------------------------------------
92 * Data length code (DLC) 4
102 * ---------------------------------------------------------
111 * Size of a CAN-FD CRC17 Field in bits (length: 0..16)
114 * ---------------------------------------------------------
118 * Fixed stuff bits 6
123 * Size of a CAN-FD CRC21 Field in bits (length: 20..64)
126 * ---------------------------------------------------------
130 * Fixed stuff bits 7
135 * Size of a CAN(-FD) Frame footer in bits
138 * ---------------------------------------------------------
149 * (a.k.a. IMF - intermission field)
154 * can_bitstuffing_len() - Calculate the maximum length with bitstuffing
155 * @destuffed_len: length of a destuffed bit stream
165 * - "0": dominant bit
166 * - "o": dominant stuff bit
167 * - "1": recessive bit
168 * - "i": recessive stuff bit
172 * Return: length of the stuffed bit stream in the worst case scenario.
175 (destuffed_len + (destuffed_len - 1) / 4)
208 * can_frame_bits() - Calculate the number of bits on the wire in a
210 * @is_fd: true: CAN-FD frame; false: Classical CAN frame.
214 * bitstuffing). CAN-FD's fixed stuff bits are always included.
220 * @data_len: length of the data field in bytes. Correspond to
221 * can(fd)_frame->len. Should be zero for remote frames. No
252 * Maximum size of a CAN-FD frame
258 * can_cc_dlc2len(value) - convert a given data length code (dlc) of a
259 * Classical CAN frame into a valid data length of max. 8 bytes.
262 * ISO 11898-1 Chapter 8.4.2.3 (DLC field)
266 /* helper to get the data length code (DLC) for Classical CAN raw DLC access */
271 (cf->len == CAN_MAX_DLEN) && in can_get_cc_dlc()
272 (cf->len8_dlc > CAN_MAX_DLEN && cf->len8_dlc <= CAN_MAX_RAW_DLC)) in can_get_cc_dlc()
273 return cf->len8_dlc; in can_get_cc_dlc()
275 /* return the payload length as dlc value */ in can_get_cc_dlc()
276 return cf->len; in can_get_cc_dlc()
285 cf->len8_dlc = dlc; in can_frame_set_cc_len()
287 /* limit the payload length 'len' to CAN_MAX_DLEN */ in can_frame_set_cc_len()
288 cf->len = can_cc_dlc2len(dlc); in can_frame_set_cc_len()
291 /* get data length from raw data length code (DLC) */
294 /* map the sanitized data length to an appropriate data length code */
297 /* calculate the CAN Frame length in bytes of a given skb */
300 /* map the data length to an appropriate data link layer length */