Lines Matching full:pos

24 static u8 * hostapd_eid_timeout_interval(u8 *pos, u8 type, u32 value)  in hostapd_eid_timeout_interval()  argument
26 *pos++ = WLAN_EID_TIMEOUT_INTERVAL; in hostapd_eid_timeout_interval()
27 *pos++ = 5; in hostapd_eid_timeout_interval()
28 *pos++ = type; in hostapd_eid_timeout_interval()
29 WPA_PUT_LE32(pos, value); in hostapd_eid_timeout_interval()
30 pos += 4; in hostapd_eid_timeout_interval()
32 return pos; in hostapd_eid_timeout_interval()
365 static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx, in hostapd_ext_capab_byte() argument
368 *pos = 0x00; in hostapd_ext_capab_byte()
373 *pos |= 0x01; /* Bit 0 - Coexistence management */ in hostapd_ext_capab_byte()
375 *pos |= 0x04; /* Bit 2 - Extended Channel Switching */ in hostapd_ext_capab_byte()
379 *pos |= 0x10; /* Bit 12 - Proxy ARP */ in hostapd_ext_capab_byte()
382 *pos |= 0x20; in hostapd_ext_capab_byte()
387 *pos |= 0x02; /* Bit 17 - WNM-Sleep Mode */ in hostapd_ext_capab_byte()
389 *pos |= 0x08; /* Bit 19 - BSS Transition */ in hostapd_ext_capab_byte()
391 *pos |= 0x40; /* Bit 22 - Multiple BSSID */ in hostapd_ext_capab_byte()
395 *pos |= 0x02; /* Bit 25 - SSID List */ in hostapd_ext_capab_byte()
398 *pos |= 0x08; /* Bit 27 - UTC TSF Offset */ in hostapd_ext_capab_byte()
400 *pos |= 0x80; /* Bit 31 - Interworking */ in hostapd_ext_capab_byte()
404 *pos |= 0x01; /* Bit 32 - QoS Map */ in hostapd_ext_capab_byte()
406 *pos |= 0x40; /* Bit 38 - TDLS Prohibited */ in hostapd_ext_capab_byte()
409 *pos |= 0x80; in hostapd_ext_capab_byte()
415 *pos |= 0x40; /* Bit 46 - WNM-Notification */ in hostapd_ext_capab_byte()
419 *pos |= 0x40; /* Bit 46 - WNM-Notification */ in hostapd_ext_capab_byte()
424 *pos |= 0x01; /* Bit 48 - UTF-8 SSID */ in hostapd_ext_capab_byte()
430 *pos |= 0x40; /* Bit 70 - FTM responder */ in hostapd_ext_capab_byte()
432 *pos |= 0x80; /* Bit 71 - FTM initiator */ in hostapd_ext_capab_byte()
438 *pos |= 0x01; in hostapd_ext_capab_byte()
442 *pos |= 0x40; /* Bit 78 - TWT responder */ in hostapd_ext_capab_byte()
445 *pos |= 0x40; /* Bit 78 - TWT responder */ in hostapd_ext_capab_byte()
454 *pos |= 0x02; /* Bit 81 - SAE Password in hostapd_ext_capab_byte()
457 *pos |= 0x04; /* Bit 82 - SAE Password in hostapd_ext_capab_byte()
464 *pos |= 0x10; /* Bit 84 - Beacon Protection Enabled */ in hostapd_ext_capab_byte()
466 *pos |= 0x08; /* Bit 83 - Enhanced multiple BSSID */ in hostapd_ext_capab_byte()
468 *pos |= 0x01; /* Bit 80 - Complete List of NonTxBSSID in hostapd_ext_capab_byte()
476 *pos |= 0x01; /* Bit 88 - SAE PK Exclusively */ in hostapd_ext_capab_byte()
486 u8 *pos = eid; in hostapd_eid_ext_capab() local
492 *pos++ = WLAN_EID_EXT_CAPAB; in hostapd_eid_ext_capab()
493 *pos++ = len; in hostapd_eid_ext_capab()
494 for (i = 0; i < len; i++, pos++) { in hostapd_eid_ext_capab()
495 hostapd_ext_capab_byte(hapd, pos, i, mbssid_complete); in hostapd_eid_ext_capab()
498 *pos &= ~hapd->iface->extended_capa_mask[i]; in hostapd_eid_ext_capab()
499 *pos |= hapd->iface->extended_capa[i]; in hostapd_eid_ext_capab()
503 *pos &= ~hapd->conf->ext_capa_mask[i]; in hostapd_eid_ext_capab()
504 *pos |= hapd->conf->ext_capa[i]; in hostapd_eid_ext_capab()
510 *pos &= ~0x08; in hostapd_eid_ext_capab()
512 *pos &= ~0x40; in hostapd_eid_ext_capab()
528 u8 *pos = eid; in hostapd_eid_qos_map_set() local
534 *pos++ = WLAN_EID_QOS_MAP_SET; in hostapd_eid_qos_map_set()
535 *pos++ = len; in hostapd_eid_qos_map_set()
536 os_memcpy(pos, hapd->conf->qos_map_set, len); in hostapd_eid_qos_map_set()
537 pos += len; in hostapd_eid_qos_map_set()
539 return pos; in hostapd_eid_qos_map_set()
545 u8 *pos = eid; in hostapd_eid_interworking() local
552 *pos++ = WLAN_EID_INTERWORKING; in hostapd_eid_interworking()
553 len = pos++; in hostapd_eid_interworking()
555 *pos = hapd->conf->access_network_type; in hostapd_eid_interworking()
557 *pos |= INTERWORKING_ANO_INTERNET; in hostapd_eid_interworking()
559 *pos |= INTERWORKING_ANO_ASRA; in hostapd_eid_interworking()
561 *pos |= INTERWORKING_ANO_ESR; in hostapd_eid_interworking()
563 *pos |= INTERWORKING_ANO_UESA; in hostapd_eid_interworking()
564 pos++; in hostapd_eid_interworking()
567 *pos++ = hapd->conf->venue_group; in hostapd_eid_interworking()
568 *pos++ = hapd->conf->venue_type; in hostapd_eid_interworking()
572 os_memcpy(pos, hapd->conf->hessid, ETH_ALEN); in hostapd_eid_interworking()
573 pos += ETH_ALEN; in hostapd_eid_interworking()
576 *len = pos - len - 1; in hostapd_eid_interworking()
579 return pos; in hostapd_eid_interworking()
585 u8 *pos = eid; in hostapd_eid_adv_proto() local
592 *pos++ = WLAN_EID_ADV_PROTO; in hostapd_eid_adv_proto()
593 *pos++ = 2; in hostapd_eid_adv_proto()
594 *pos++ = 0x7F; /* Query Response Length Limit | PAME-BI */ in hostapd_eid_adv_proto()
595 *pos++ = ACCESS_NETWORK_QUERY_PROTOCOL; in hostapd_eid_adv_proto()
598 return pos; in hostapd_eid_adv_proto()
604 u8 *pos = eid; in hostapd_eid_roaming_consortium() local
614 *pos++ = WLAN_EID_ROAMING_CONSORTIUM; in hostapd_eid_roaming_consortium()
615 len = pos++; in hostapd_eid_roaming_consortium()
619 *pos++ = 255; in hostapd_eid_roaming_consortium()
621 *pos++ = hapd->conf->roaming_consortium_count - 3; in hostapd_eid_roaming_consortium()
623 *pos++ = 0; in hostapd_eid_roaming_consortium()
626 *pos = hapd->conf->roaming_consortium[0].len; in hostapd_eid_roaming_consortium()
628 *pos |= hapd->conf->roaming_consortium[1].len << 4; in hostapd_eid_roaming_consortium()
629 pos++; in hostapd_eid_roaming_consortium()
637 os_memcpy(pos, hapd->conf->roaming_consortium[i].oi, in hostapd_eid_roaming_consortium()
639 pos += hapd->conf->roaming_consortium[i].len; in hostapd_eid_roaming_consortium()
642 *len = pos - len - 1; in hostapd_eid_roaming_consortium()
645 return pos; in hostapd_eid_roaming_consortium()
692 u8 *pos; in hostapd_update_time_adv() local
704 pos = wpabuf_put(hapd->time_adv, elen); in hostapd_update_time_adv()
706 pos = wpabuf_mhead_u8(hapd->time_adv); in hostapd_update_time_adv()
708 *pos++ = WLAN_EID_TIME_ADVERTISEMENT; in hostapd_update_time_adv()
709 *pos++ = 1 + 10 + 5 + 1; in hostapd_update_time_adv()
711 *pos++ = 2; /* UTC time at which the TSF timer is 0 */ in hostapd_update_time_adv()
715 WPA_PUT_LE16(pos, tm.year); /* Year */ in hostapd_update_time_adv()
716 pos += 2; in hostapd_update_time_adv()
717 *pos++ = tm.month; /* Month */ in hostapd_update_time_adv()
718 *pos++ = tm.day; /* Day of month */ in hostapd_update_time_adv()
719 *pos++ = tm.hour; /* Hours */ in hostapd_update_time_adv()
720 *pos++ = tm.min; /* Minutes */ in hostapd_update_time_adv()
721 *pos++ = tm.sec; /* Seconds */ in hostapd_update_time_adv()
722 WPA_PUT_LE16(pos, 0); /* Milliseconds (not used) */ in hostapd_update_time_adv()
723 pos += 2; in hostapd_update_time_adv()
724 *pos++ = 0; /* Reserved */ in hostapd_update_time_adv()
728 *pos++ = 0; in hostapd_update_time_adv()
729 *pos++ = 0; in hostapd_update_time_adv()
730 *pos++ = 0; in hostapd_update_time_adv()
731 *pos++ = 0; in hostapd_update_time_adv()
732 *pos++ = 0; in hostapd_update_time_adv()
734 *pos++ = hapd->time_update_counter++; in hostapd_update_time_adv()
743 u8 *pos = eid; in hostapd_eid_bss_max_idle_period() local
749 *pos++ = WLAN_EID_BSS_MAX_IDLE_PERIOD; in hostapd_eid_bss_max_idle_period()
750 *pos++ = 3; in hostapd_eid_bss_max_idle_period()
762 WPA_PUT_LE16(pos, val); in hostapd_eid_bss_max_idle_period()
763 pos += 2; in hostapd_eid_bss_max_idle_period()
766 *pos++ = hapd->conf->bss_max_idle == 2 ? BIT(0) : 0x00; in hostapd_eid_bss_max_idle_period()
770 return pos; in hostapd_eid_bss_max_idle_period()
795 u8 *pos = eid; in hostapd_eid_mbo() local
826 pos += mbo_add_ie(pos, len, mbo, mbo_pos - mbo); in hostapd_eid_mbo()
828 return pos; in hostapd_eid_mbo()
883 u8 *pos = eid; in hostapd_eid_owe_trans() local
891 return pos; in hostapd_eid_owe_trans()
897 return pos; in hostapd_eid_owe_trans()
900 *pos++ = WLAN_EID_VENDOR_SPECIFIC; in hostapd_eid_owe_trans()
901 *pos++ = elen - 2; in hostapd_eid_owe_trans()
902 WPA_PUT_BE24(pos, OUI_WFA); in hostapd_eid_owe_trans()
903 pos += 3; in hostapd_eid_owe_trans()
904 *pos++ = OWE_OUI_TYPE; in hostapd_eid_owe_trans()
905 os_memcpy(pos, hapd->conf->owe_transition_bssid, ETH_ALEN); in hostapd_eid_owe_trans()
906 pos += ETH_ALEN; in hostapd_eid_owe_trans()
907 *pos++ = hapd->conf->owe_transition_ssid_len; in hostapd_eid_owe_trans()
908 os_memcpy(pos, hapd->conf->owe_transition_ssid, in hostapd_eid_owe_trans()
910 pos += hapd->conf->owe_transition_ssid_len; in hostapd_eid_owe_trans()
912 return pos; in hostapd_eid_owe_trans()
931 u8 *pos = eid; in hostapd_eid_dpp_cc() local
935 return pos; in hostapd_eid_dpp_cc()
937 *pos++ = WLAN_EID_VENDOR_SPECIFIC; in hostapd_eid_dpp_cc()
938 *pos++ = 4; in hostapd_eid_dpp_cc()
939 WPA_PUT_BE24(pos, OUI_WFA); in hostapd_eid_dpp_cc()
940 pos += 3; in hostapd_eid_dpp_cc()
941 *pos++ = DPP_CC_OUI_TYPE; in hostapd_eid_dpp_cc()
944 return pos; in hostapd_eid_dpp_cc()
967 u8 *pos = eid; in hostapd_eid_fils_indic() local
976 return pos; in hostapd_eid_fils_indic()
982 *pos++ = WLAN_EID_FILS_INDICATION; in hostapd_eid_fils_indic()
983 len = pos++; in hostapd_eid_fils_indic()
1002 WPA_PUT_LE16(pos, fils_info); in hostapd_eid_fils_indic()
1003 pos += 2; in hostapd_eid_fils_indic()
1005 os_memcpy(pos, hapd->conf->fils_cache_id, FILS_CACHE_ID_LEN); in hostapd_eid_fils_indic()
1006 pos += FILS_CACHE_ID_LEN; in hostapd_eid_fils_indic()
1009 os_memcpy(pos, hapd->conf->hessid, ETH_ALEN); in hostapd_eid_fils_indic()
1010 pos += ETH_ALEN; in hostapd_eid_fils_indic()
1018 os_memcpy(pos, realm->hash, 2); in hostapd_eid_fils_indic()
1019 pos += 2; in hostapd_eid_fils_indic()
1021 *len = pos - len - 1; in hostapd_eid_fils_indic()
1024 return pos; in hostapd_eid_fils_indic()
1098 u8 *pos = eid; in hostapd_eid_rsnxe() local
1145 *pos++ = WLAN_EID_RSNX; in hostapd_eid_rsnxe()
1146 *pos++ = flen; in hostapd_eid_rsnxe()
1148 *pos++ = capab & 0xff; in hostapd_eid_rsnxe()
1152 return pos; in hostapd_eid_rsnxe()