Lines Matching +full:- +full:eproto
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) ST-Ericsson AB 2010
19 cfpkt_priv(pkt)->erronous = true; \
20 skb_reset_tail_pointer(&pkt->skb); \
47 return (struct cfpkt_priv_data *) pkt->skb.cb; in cfpkt_priv()
52 return cfpkt_priv(pkt)->erronous; in is_erronous()
57 return &pkt->skb; in pkt_to_skb()
68 cfpkt_priv(pkt)->erronous = false; in cfpkt_fromnative()
105 return skb->len > 0; in cfpkt_more()
112 memcpy(data, skb->data, len); in cfpkt_peek_head()
124 return -EPROTO; in cfpkt_extr_head()
126 if (unlikely(len > skb->len)) { in cfpkt_extr_head()
128 return -EPROTO; in cfpkt_extr_head()
134 return -EPROTO; in cfpkt_extr_head()
138 from -= len; in cfpkt_extr_head()
151 return -EPROTO; in cfpkt_extr_trail()
155 return -EPROTO; in cfpkt_extr_trail()
157 if (unlikely(skb->data + len > skb_tail_pointer(skb))) { in cfpkt_extr_trail()
159 return -EPROTO; in cfpkt_extr_trail()
161 from = skb_tail_pointer(skb) - len; in cfpkt_extr_trail()
162 skb_trim(skb, skb->len - len); in cfpkt_extr_trail()
181 return -EPROTO; in cfpkt_add_body()
199 return -EPROTO; in cfpkt_add_body()
223 return -EPROTO; in cfpkt_add_head()
226 return -EPROTO; in cfpkt_add_head()
250 return skb->len; in cfpkt_getlen()
259 * Checksum should not be used on high-speed interfaces anyway. in cfpkt_iterate()
262 return -EPROTO; in cfpkt_iterate()
263 if (unlikely(skb_linearize(&pkt->skb) != 0)) { in cfpkt_iterate()
265 return -EPROTO; in cfpkt_iterate()
267 return iter_func(data, pkt->skb.data, cfpkt_getlen(pkt)); in cfpkt_iterate()
276 return -EPROTO; in cfpkt_setlen()
278 if (likely(len <= skb->len)) { in cfpkt_setlen()
279 if (unlikely(skb->data_len)) in cfpkt_setlen()
288 if (unlikely(!cfpkt_pad_trail(pkt, len - skb->len))) in cfpkt_setlen()
313 if (dst->tail + neededtailspace > dst->end) { in cfpkt_append()
322 skb_put_data(tmp, dst->data, dstlen); in cfpkt_append()
326 skb_put_data(dst, add->data, skb_headlen(add)); in cfpkt_append()
336 u8 *split = skb->data + pos; in cfpkt_split()
337 u16 len2nd = skb_tail_pointer(skb) - split; in cfpkt_split()
342 if (skb->data + pos > skb_tail_pointer(skb)) { in cfpkt_split()
363 skb2->priority = skb->priority; in cfpkt_split()
369 return cfpkt_priv(pkt)->erronous; in cfpkt_erroneous()
374 return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb; in cfpkt_info()
380 pkt_to_skb(pkt)->priority = prio; in cfpkt_set_prio()