Lines Matching refs:pos
306 const u8 *pos = data;
330 dialog_token = *pos++;
336 if (*pos != WLAN_EID_ADV_PROTO) {
338 "P2P: Unexpected IE in GAS Initial Request: %u", *pos);
341 pos++;
343 slen = *pos++;
344 next = pos + slen;
350 pos++; /* skip QueryRespLenLimit and PAME-BI */
352 if (*pos != NATIVE_QUERY_PROTOCOL) {
355 *pos);
359 pos = next;
361 if (pos + 2 > end)
363 slen = WPA_GET_LE16(pos);
364 pos += 2;
365 if (pos + slen > end)
367 end = pos + slen;
370 if (pos + 4 > end)
372 if (WPA_GET_LE16(pos) != NQP_VENDOR_SPECIFIC) {
374 "P2P: Unsupported NQP Info ID %u", WPA_GET_LE16(pos));
377 pos += 2;
379 slen = WPA_GET_LE16(pos);
380 pos += 2;
381 if (pos + slen > end || slen < 3 + 1) {
387 if (WPA_GET_BE24(pos) != OUI_WFA) {
389 "P2P: Unsupported NQP OUI %06x", WPA_GET_BE24(pos));
392 pos += 3;
394 if (*pos != P2P_OUI_TYPE) {
396 "P2P: Unsupported NQP vendor type %u", *pos);
399 pos++;
401 if (pos + 2 > end)
403 update_indic = WPA_GET_LE16(pos);
406 pos += 2;
409 update_indic, pos, end - pos);
470 const u8 *pos = data;
499 dialog_token = *pos++;
501 status_code = WPA_GET_LE16(pos);
502 pos += 2;
503 comeback_delay = WPA_GET_LE16(pos);
504 pos += 2;
515 if (*pos != WLAN_EID_ADV_PROTO) {
518 *pos);
521 pos++;
523 slen = *pos++;
524 next = pos + slen;
530 pos++; /* skip QueryRespLenLimit and PAME-BI */
532 if (*pos != NATIVE_QUERY_PROTOCOL) {
535 *pos);
539 pos = next;
541 if (pos + 2 > end) {
546 slen = WPA_GET_LE16(pos);
547 pos += 2;
550 if (pos + slen > end) {
555 end = pos + slen;
571 if (pos + 4 > end)
573 if (WPA_GET_LE16(pos) != NQP_VENDOR_SPECIFIC) {
575 "P2P: Unsupported NQP Info ID %u", WPA_GET_LE16(pos));
578 pos += 2;
580 slen = WPA_GET_LE16(pos);
581 pos += 2;
582 if (pos + slen > end || slen < 3 + 1) {
588 if (WPA_GET_BE24(pos) != OUI_WFA) {
590 "P2P: Unsupported NQP OUI %06x", WPA_GET_BE24(pos));
593 pos += 3;
595 if (*pos != P2P_OUI_TYPE) {
597 "P2P: Unsupported NQP vendor type %u", *pos);
600 pos++;
602 if (pos + 2 > end)
604 update_indic = WPA_GET_LE16(pos);
607 pos += 2;
628 pos, end - pos);
708 const u8 *pos = data;
740 dialog_token = *pos++;
742 status_code = WPA_GET_LE16(pos);
743 pos += 2;
744 frag_id = *pos & 0x7f;
745 more_frags = (*pos & 0x80) >> 7;
746 pos++;
747 comeback_delay = WPA_GET_LE16(pos);
748 pos += 2;
762 if (*pos != WLAN_EID_ADV_PROTO) {
765 *pos);
768 pos++;
770 slen = *pos++;
771 next = pos + slen;
777 pos++; /* skip QueryRespLenLimit and PAME-BI */
779 if (*pos != NATIVE_QUERY_PROTOCOL) {
782 *pos);
786 pos = next;
788 if (pos + 2 > end) {
793 slen = WPA_GET_LE16(pos);
794 pos += 2;
797 if (pos + slen > end) {
807 end = pos + slen;
818 if (pos + 4 > end)
820 if (WPA_GET_LE16(pos) != NQP_VENDOR_SPECIFIC) {
822 "P2P: Unsupported NQP Info ID %u", WPA_GET_LE16(pos));
825 pos += 2;
827 slen = WPA_GET_LE16(pos);
828 pos += 2;
836 if (pos + 4 > end)
839 if (WPA_GET_BE24(pos) != OUI_WFA) {
841 "P2P: Unsupported NQP OUI %06x", WPA_GET_BE24(pos));
844 pos += 3;
846 if (*pos != P2P_OUI_TYPE) {
848 "P2P: Unsupported NQP vendor type %u", *pos);
851 pos++;
853 if (pos + 2 > end)
855 p2p->sd_rx_update_indic = WPA_GET_LE16(pos);
858 pos += 2;
861 if (wpabuf_resize(&p2p->sd_rx_resp, end - pos) < 0)
863 wpabuf_put_data(p2p->sd_rx_resp, pos, end - pos);