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()
127 int pos = 0; in ieee802154_hdr_get_addr() local
135 memcpy(&addr->pan_id, buf + pos, 2); in ieee802154_hdr_get_addr()
136 pos += 2; in ieee802154_hdr_get_addr()
140 memcpy(&addr->short_addr, buf + pos, 2); in ieee802154_hdr_get_addr()
141 return pos + 2; in ieee802154_hdr_get_addr()
143 memcpy(&addr->extended_addr, buf + pos, IEEE802154_ADDR_LEN); in ieee802154_hdr_get_addr()
144 return pos + IEEE802154_ADDR_LEN; in ieee802154_hdr_get_addr()
163 int pos = 5; in ieee802154_hdr_get_sechdr() local
170 return pos; in ieee802154_hdr_get_sechdr()
176 memcpy(&hdr->short_src, buf + pos, 4); in ieee802154_hdr_get_sechdr()
177 pos += 4; in ieee802154_hdr_get_sechdr()
181 memcpy(&hdr->extended_src, buf + pos, IEEE802154_ADDR_LEN); in ieee802154_hdr_get_sechdr()
182 pos += IEEE802154_ADDR_LEN; in ieee802154_hdr_get_sechdr()
186 hdr->key_id = buf[pos++]; in ieee802154_hdr_get_sechdr()
188 return pos; in ieee802154_hdr_get_sechdr()
220 int pos = 0; in ieee802154_hdr_get_addrs() local
222 pos += ieee802154_hdr_get_addr(buf + pos, hdr->fc.dest_addr_mode, in ieee802154_hdr_get_addrs()
224 pos += ieee802154_hdr_get_addr(buf + pos, hdr->fc.source_addr_mode, in ieee802154_hdr_get_addrs()
230 return pos; in ieee802154_hdr_get_addrs()
236 int pos = 3, rc; in ieee802154_hdr_pull() local
247 pos += ieee802154_hdr_get_addrs(skb->data + pos, hdr); in ieee802154_hdr_pull()
250 int want = pos + ieee802154_hdr_sechdr_len(skb->data[pos]); in ieee802154_hdr_pull()
255 pos += ieee802154_hdr_get_sechdr(skb->data + pos, &hdr->sec); in ieee802154_hdr_pull()
258 skb_pull(skb, pos); in ieee802154_hdr_pull()
259 return pos; in ieee802154_hdr_pull()
267 int pos = 3, rc; in ieee802154_hdr_peek_addrs() local
278 pos += ieee802154_hdr_get_addrs(buf + pos, hdr); in ieee802154_hdr_peek_addrs()
279 return pos; in ieee802154_hdr_peek_addrs()
287 int pos; in ieee802154_hdr_peek() local
289 pos = ieee802154_hdr_peek_addrs(skb, hdr); in ieee802154_hdr_peek()
290 if (pos < 0) in ieee802154_hdr_peek()
294 u8 key_id_mode = IEEE802154_SCF_KEY_ID_MODE(*(buf + pos)); in ieee802154_hdr_peek()
295 int want = pos + ieee802154_sechdr_lengths[key_id_mode]; in ieee802154_hdr_peek()
300 pos += ieee802154_hdr_get_sechdr(buf + pos, &hdr->sec); in ieee802154_hdr_peek()
303 return pos; in ieee802154_hdr_peek()