Lines Matching refs:pkt

21 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt);
22 static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt);
72 struct cfpkt *pkt, int *err) in rfm_append() argument
78 if (cfpkt_extr_head(pkt, seghead, 6) < 0) in rfm_append()
85 tmppkt = cfpkt_append(rfml->incomplete_frm, pkt, in rfm_append()
97 static int cfrfml_receive(struct cflayer *layr, struct cfpkt *pkt) in cfrfml_receive() argument
112 if (cfpkt_extr_head(pkt, &tmp, 1) < 0) in cfrfml_receive()
119 if (cfpkt_peek_head(pkt, rfml->seghead, 6) < 0) in cfrfml_receive()
124 if (cfpkt_erroneous(pkt)) in cfrfml_receive()
126 rfml->incomplete_frm = pkt; in cfrfml_receive()
127 pkt = NULL; in cfrfml_receive()
130 tmppkt = rfm_append(rfml, seghead, pkt, &err); in cfrfml_receive()
150 tmppkt = rfm_append(rfml, seghead, pkt, &err); in cfrfml_receive()
158 pkt = tmppkt; in cfrfml_receive()
163 if (rfml->pdu_size != cfpkt_getlen(pkt) - RFM_HEAD_SIZE + 1) in cfrfml_receive()
167 err = rfml->serv.layer.up->receive(rfml->serv.layer.up, pkt); in cfrfml_receive()
174 if (pkt) in cfrfml_receive()
175 cfpkt_destroy(pkt); in cfrfml_receive()
196 static int cfrfml_transmit_segment(struct cfrfml *rfml, struct cfpkt *pkt) in cfrfml_transmit_segment() argument
198 caif_assert(cfpkt_getlen(pkt) < rfml->fragment_size + RFM_HEAD_SIZE); in cfrfml_transmit_segment()
201 cfpkt_info(pkt)->channel_id = rfml->serv.layer.id; in cfrfml_transmit_segment()
207 cfpkt_info(pkt)->hdr_len = RFM_HEAD_SIZE; in cfrfml_transmit_segment()
208 cfpkt_info(pkt)->dev_info = &rfml->serv.dev_info; in cfrfml_transmit_segment()
210 return rfml->serv.layer.dn->transmit(rfml->serv.layer.dn, pkt); in cfrfml_transmit_segment()
213 static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt) in cfrfml_transmit() argument
219 struct cfpkt *frontpkt = pkt; in cfrfml_transmit()
229 if (cfpkt_getlen(pkt) <= RFM_HEAD_SIZE-1) in cfrfml_transmit()
233 if (cfpkt_getlen(pkt) > rfml->fragment_size + RFM_HEAD_SIZE) in cfrfml_transmit()
234 err = cfpkt_peek_head(pkt, head, 6); in cfrfml_transmit()