Lines Matching refs:pos

18 	int pos = 0;  in ieee802154_hdr_push_addr()  local
24 memcpy(buf + pos, &addr->pan_id, 2); in ieee802154_hdr_push_addr()
25 pos += 2; in ieee802154_hdr_push_addr()
30 memcpy(buf + pos, &addr->short_addr, 2); in ieee802154_hdr_push_addr()
31 pos += 2; in ieee802154_hdr_push_addr()
35 memcpy(buf + pos, &addr->extended_addr, IEEE802154_ADDR_LEN); in ieee802154_hdr_push_addr()
36 pos += IEEE802154_ADDR_LEN; in ieee802154_hdr_push_addr()
43 return pos; in ieee802154_hdr_push_addr()
49 int pos = 5; in ieee802154_hdr_push_sechdr() local
56 return pos; in ieee802154_hdr_push_sechdr()
62 memcpy(buf + pos, &hdr->short_src, 4); in ieee802154_hdr_push_sechdr()
63 pos += 4; in ieee802154_hdr_push_sechdr()
67 memcpy(buf + pos, &hdr->extended_src, IEEE802154_ADDR_LEN); in ieee802154_hdr_push_sechdr()
68 pos += IEEE802154_ADDR_LEN; in ieee802154_hdr_push_sechdr()
72 buf[pos++] = hdr->key_id; in ieee802154_hdr_push_sechdr()
74 return pos; in ieee802154_hdr_push_sechdr()
81 int pos = 2; in ieee802154_hdr_push() local
85 buf[pos++] = hdr->seq; in ieee802154_hdr_push()
89 rc = ieee802154_hdr_push_addr(buf + pos, &hdr->dest, false); in ieee802154_hdr_push()
92 pos += rc; in ieee802154_hdr_push()
100 rc = ieee802154_hdr_push_addr(buf + pos, &hdr->source, fc->intra_pan); in ieee802154_hdr_push()
103 pos += rc; in ieee802154_hdr_push()
108 rc = ieee802154_hdr_push_sechdr(buf + pos, &hdr->sec); in ieee802154_hdr_push()
112 pos += rc; in ieee802154_hdr_push()
117 memcpy(skb_push(skb, pos), buf, pos); in ieee802154_hdr_push()
119 return pos; in ieee802154_hdr_push()
174 int pos = 0; in ieee802154_hdr_get_addr() local
182 memcpy(&addr->pan_id, buf + pos, 2); in ieee802154_hdr_get_addr()
183 pos += 2; in ieee802154_hdr_get_addr()
187 memcpy(&addr->short_addr, buf + pos, 2); in ieee802154_hdr_get_addr()
188 return pos + 2; in ieee802154_hdr_get_addr()
190 memcpy(&addr->extended_addr, buf + pos, IEEE802154_ADDR_LEN); in ieee802154_hdr_get_addr()
191 return pos + IEEE802154_ADDR_LEN; in ieee802154_hdr_get_addr()
210 int pos = 5; in ieee802154_hdr_get_sechdr() local
217 return pos; in ieee802154_hdr_get_sechdr()
223 memcpy(&hdr->short_src, buf + pos, 4); in ieee802154_hdr_get_sechdr()
224 pos += 4; in ieee802154_hdr_get_sechdr()
228 memcpy(&hdr->extended_src, buf + pos, IEEE802154_ADDR_LEN); in ieee802154_hdr_get_sechdr()
229 pos += IEEE802154_ADDR_LEN; in ieee802154_hdr_get_sechdr()
233 hdr->key_id = buf[pos++]; in ieee802154_hdr_get_sechdr()
235 return pos; in ieee802154_hdr_get_sechdr()
267 int pos = 0; in ieee802154_hdr_get_addrs() local
269 pos += ieee802154_hdr_get_addr(buf + pos, hdr->fc.dest_addr_mode, in ieee802154_hdr_get_addrs()
271 pos += ieee802154_hdr_get_addr(buf + pos, hdr->fc.source_addr_mode, in ieee802154_hdr_get_addrs()
277 return pos; in ieee802154_hdr_get_addrs()
283 int pos = 3, rc; in ieee802154_hdr_pull() local
294 pos += ieee802154_hdr_get_addrs(skb->data + pos, hdr); in ieee802154_hdr_pull()
297 int want = pos + ieee802154_hdr_sechdr_len(skb->data[pos]); in ieee802154_hdr_pull()
302 pos += ieee802154_hdr_get_sechdr(skb->data + pos, &hdr->sec); in ieee802154_hdr_pull()
305 skb_pull(skb, pos); in ieee802154_hdr_pull()
306 return pos; in ieee802154_hdr_pull()
327 int pos = 3, rc; in ieee802154_hdr_peek_addrs() local
338 pos += ieee802154_hdr_get_addrs(buf + pos, hdr); in ieee802154_hdr_peek_addrs()
339 return pos; in ieee802154_hdr_peek_addrs()
347 int pos; in ieee802154_hdr_peek() local
349 pos = ieee802154_hdr_peek_addrs(skb, hdr); in ieee802154_hdr_peek()
350 if (pos < 0) in ieee802154_hdr_peek()
354 u8 key_id_mode = IEEE802154_SCF_KEY_ID_MODE(*(buf + pos)); in ieee802154_hdr_peek()
355 int want = pos + ieee802154_sechdr_lengths[key_id_mode]; in ieee802154_hdr_peek()
360 pos += ieee802154_hdr_get_sechdr(buf + pos, &hdr->sec); in ieee802154_hdr_peek()
363 return pos; in ieee802154_hdr_peek()