ieee802_11_parse_elems:
  819|  3.25k|{
  820|  3.25k|	os_memset(elems, 0, sizeof(*elems));
  ------------------
  |  |  529|  3.25k|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
  821|       |
  822|  3.25k|	return __ieee802_11_parse_elems(start, len, elems, show_errors);
  823|  3.25k|}
ieee802_11_elems_clear_ids:
  840|  1.02k|{
  841|  1.02k|	size_t i;
  842|       |
  843|  16.8k|	for (i = 0; i < num; i++) {
  ------------------
  |  Branch (843:14): [True: 15.7k, False: 1.02k]
  ------------------
  844|  15.7k|		switch (ids[i]) {
  ------------------
  |  Branch (844:11): [True: 12.6k, False: 3.18k]
  ------------------
  845|  1.68k|		case WLAN_EID_SSID:
  ------------------
  |  |  323|  1.68k|#define WLAN_EID_SSID 0
  ------------------
  |  Branch (845:3): [True: 1.68k, False: 14.0k]
  ------------------
  846|  1.68k|			elems->ssid = NULL;
  847|  1.68k|			elems->ssid_len = 0;
  848|  1.68k|			break;
  849|    494|		case WLAN_EID_SUPP_RATES:
  ------------------
  |  |  324|    494|#define WLAN_EID_SUPP_RATES 1
  ------------------
  |  Branch (849:3): [True: 494, False: 15.2k]
  ------------------
  850|    494|			elems->supp_rates = NULL;
  851|    494|			elems->supp_rates_len = 0;
  852|    494|			break;
  853|    394|		case WLAN_EID_DS_PARAMS:
  ------------------
  |  |  325|    394|#define WLAN_EID_DS_PARAMS 3
  ------------------
  |  Branch (853:3): [True: 394, False: 15.3k]
  ------------------
  854|    394|			elems->ds_params = NULL;
  855|    394|			break;
  856|    254|		case WLAN_EID_CHALLENGE:
  ------------------
  |  |  336|    254|#define WLAN_EID_CHALLENGE 16
  ------------------
  |  Branch (856:3): [True: 254, False: 15.5k]
  ------------------
  857|    254|			elems->challenge = NULL;
  858|    254|			elems->challenge_len = 0;
  859|    254|			break;
  860|    285|		case WLAN_EID_ERP_INFO:
  ------------------
  |  |  347|    285|#define WLAN_EID_ERP_INFO 42
  ------------------
  |  Branch (860:3): [True: 285, False: 15.5k]
  ------------------
  861|    285|			elems->erp_info = NULL;
  862|    285|			break;
  863|    413|		case WLAN_EID_EXT_SUPP_RATES:
  ------------------
  |  |  353|    413|#define WLAN_EID_EXT_SUPP_RATES 50
  ------------------
  |  Branch (863:3): [True: 413, False: 15.3k]
  ------------------
  864|    413|			elems->ext_supp_rates = NULL;
  865|    413|			elems->ext_supp_rates_len = 0;
  866|    413|			break;
  867|    319|		case WLAN_EID_RSN:
  ------------------
  |  |  352|    319|#define WLAN_EID_RSN 48
  ------------------
  |  Branch (867:3): [True: 319, False: 15.4k]
  ------------------
  868|    319|			elems->rsn_ie = NULL;
  869|    319|			elems->rsn_ie_len = 0;
  870|    319|			break;
  871|    354|		case WLAN_EID_RSNX:
  ------------------
  |  |  504|    354|#define WLAN_EID_RSNX 244
  ------------------
  |  Branch (871:3): [True: 354, False: 15.4k]
  ------------------
  872|    354|			elems->rsnxe = NULL;
  873|    354|			elems->rsnxe_len = 0;
  874|    354|			break;
  875|    285|		case WLAN_EID_PWR_CAPABILITY:
  ------------------
  |  |  338|    285|#define WLAN_EID_PWR_CAPABILITY 33
  ------------------
  |  Branch (875:3): [True: 285, False: 15.5k]
  ------------------
  876|    285|			elems->power_capab = NULL;
  877|    285|			elems->power_capab_len = 0;
  878|    285|			break;
  879|    236|		case WLAN_EID_SUPPORTED_CHANNELS:
  ------------------
  |  |  341|    236|#define WLAN_EID_SUPPORTED_CHANNELS 36
  ------------------
  |  Branch (879:3): [True: 236, False: 15.5k]
  ------------------
  880|    236|			elems->supp_channels = NULL;
  881|    236|			elems->supp_channels_len = 0;
  882|    236|			break;
  883|    255|		case WLAN_EID_MOBILITY_DOMAIN:
  ------------------
  |  |  357|    255|#define WLAN_EID_MOBILITY_DOMAIN 54
  ------------------
  |  Branch (883:3): [True: 255, False: 15.5k]
  ------------------
  884|    255|			elems->mdie = NULL;
  885|    255|			elems->mdie_len = 0;
  886|    255|			break;
  887|    341|		case WLAN_EID_FAST_BSS_TRANSITION:
  ------------------
  |  |  358|    341|#define WLAN_EID_FAST_BSS_TRANSITION 55
  ------------------
  |  Branch (887:3): [True: 341, False: 15.4k]
  ------------------
  888|    341|			elems->ftie = NULL;
  889|    341|			elems->ftie_len = 0;
  890|    341|			break;
  891|    328|		case WLAN_EID_TIMEOUT_INTERVAL:
  ------------------
  |  |  359|    328|#define WLAN_EID_TIMEOUT_INTERVAL 56
  ------------------
  |  Branch (891:3): [True: 328, False: 15.4k]
  ------------------
  892|    328|			elems->timeout_int = NULL;
  893|    328|			break;
  894|    326|		case WLAN_EID_HT_CAP:
  ------------------
  |  |  350|    326|#define WLAN_EID_HT_CAP 45
  ------------------
  |  Branch (894:3): [True: 326, False: 15.4k]
  ------------------
  895|    326|			elems->ht_capabilities = NULL;
  896|    326|			break;
  897|    261|		case WLAN_EID_HT_OPERATION:
  ------------------
  |  |  364|    261|#define WLAN_EID_HT_OPERATION 61
  ------------------
  |  Branch (897:3): [True: 261, False: 15.5k]
  ------------------
  898|    261|			elems->ht_operation = NULL;
  899|    261|			break;
  900|    255|		case WLAN_EID_MESH_CONFIG:
  ------------------
  |  |  414|    255|#define WLAN_EID_MESH_CONFIG 113
  ------------------
  |  Branch (900:3): [True: 255, False: 15.5k]
  ------------------
  901|    255|			elems->mesh_config = NULL;
  902|    255|			elems->mesh_config_len = 0;
  903|    255|			break;
  904|    212|		case WLAN_EID_MESH_ID:
  ------------------
  |  |  415|    212|#define WLAN_EID_MESH_ID 114
  ------------------
  |  Branch (904:3): [True: 212, False: 15.5k]
  ------------------
  905|    212|			elems->mesh_id = NULL;
  906|    212|			elems->mesh_id_len = 0;
  907|    212|			break;
  908|    238|		case WLAN_EID_PEER_MGMT:
  ------------------
  |  |  418|    238|#define WLAN_EID_PEER_MGMT 117
  ------------------
  |  Branch (908:3): [True: 238, False: 15.5k]
  ------------------
  909|    238|			elems->peer_mgmt = NULL;
  910|    238|			elems->peer_mgmt_len = 0;
  911|    238|			break;
  912|    287|		case WLAN_EID_VHT_CAP:
  ------------------
  |  |  478|    287|#define WLAN_EID_VHT_CAP 191
  ------------------
  |  Branch (912:3): [True: 287, False: 15.4k]
  ------------------
  913|    287|			elems->vht_capabilities = NULL;
  914|    287|			break;
  915|    248|		case WLAN_EID_VHT_OPERATION:
  ------------------
  |  |  479|    248|#define WLAN_EID_VHT_OPERATION 192
  ------------------
  |  Branch (915:3): [True: 248, False: 15.5k]
  ------------------
  916|    248|			elems->vht_operation = NULL;
  917|    248|			break;
  918|    334|		case WLAN_EID_OPERATING_MODE_NOTIFICATION:
  ------------------
  |  |  486|    334|#define WLAN_EID_OPERATING_MODE_NOTIFICATION 199
  ------------------
  |  Branch (918:3): [True: 334, False: 15.4k]
  ------------------
  919|    334|			elems->opmode_notif = NULL;
  920|    334|			break;
  921|    391|		case WLAN_EID_LINK_ID:
  ------------------
  |  |  403|    391|#define WLAN_EID_LINK_ID 101
  ------------------
  |  Branch (921:3): [True: 391, False: 15.3k]
  ------------------
  922|    391|			elems->link_id = NULL;
  923|    391|			break;
  924|    264|		case WLAN_EID_INTERWORKING:
  ------------------
  |  |  408|    264|#define WLAN_EID_INTERWORKING 107
  ------------------
  |  Branch (924:3): [True: 264, False: 15.5k]
  ------------------
  925|    264|			elems->interworking = NULL;
  926|    264|			elems->interworking_len = 0;
  927|    264|			break;
  928|    223|		case WLAN_EID_QOS_MAP_SET:
  ------------------
  |  |  411|    223|#define WLAN_EID_QOS_MAP_SET 110
  ------------------
  |  Branch (928:3): [True: 223, False: 15.5k]
  ------------------
  929|    223|			elems->qos_map_set = NULL;
  930|    223|			elems->qos_map_set_len = 0;
  931|    223|			break;
  932|    225|		case WLAN_EID_EXT_CAPAB:
  ------------------
  |  |  428|    225|#define WLAN_EID_EXT_CAPAB 127
  ------------------
  |  Branch (932:3): [True: 225, False: 15.5k]
  ------------------
  933|    225|			elems->ext_capab = NULL;
  934|    225|			elems->ext_capab_len = 0;
  935|    225|			break;
  936|    439|		case WLAN_EID_BSS_MAX_IDLE_PERIOD:
  ------------------
  |  |  392|    439|#define WLAN_EID_BSS_MAX_IDLE_PERIOD 90
  ------------------
  |  Branch (936:3): [True: 439, False: 15.3k]
  ------------------
  937|    439|			elems->bss_max_idle_period = NULL;
  938|    439|			break;
  939|    335|		case WLAN_EID_SSID_LIST:
  ------------------
  |  |  386|    335|#define WLAN_EID_SSID_LIST 84
  ------------------
  |  Branch (939:3): [True: 335, False: 15.4k]
  ------------------
  940|    335|			elems->ssid_list = NULL;
  941|    335|			elems->ssid_list_len = 0;
  942|    335|			break;
  943|    262|		case WLAN_EID_AMPE:
  ------------------
  |  |  434|    262|#define WLAN_EID_AMPE 139
  ------------------
  |  Branch (943:3): [True: 262, False: 15.5k]
  ------------------
  944|    262|			elems->ampe = NULL;
  945|    262|			elems->ampe_len = 0;
  946|    262|			break;
  947|    224|		case WLAN_EID_MIC:
  ------------------
  |  |  435|    224|#define WLAN_EID_MIC 140
  ------------------
  |  Branch (947:3): [True: 224, False: 15.5k]
  ------------------
  948|    224|			elems->mic = NULL;
  949|    224|			elems->mic_len = 0;
  950|    224|			break;
  951|    239|		case WLAN_EID_MULTI_BAND:
  ------------------
  |  |  450|    239|#define WLAN_EID_MULTI_BAND 158
  ------------------
  |  Branch (951:3): [True: 239, False: 15.5k]
  ------------------
  952|    239|			os_memset(&elems->mb_ies, 0, sizeof(elems->mb_ies));
  ------------------
  |  |  529|    239|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
  953|    239|			elems->mb_ies.nof_ies = 0;
  954|    239|			break;
  955|    401|		case WLAN_EID_SUPPORTED_OPERATING_CLASSES:
  ------------------
  |  |  362|    401|#define WLAN_EID_SUPPORTED_OPERATING_CLASSES 59
  ------------------
  |  Branch (955:3): [True: 401, False: 15.3k]
  ------------------
  956|    401|			elems->supp_op_classes = NULL;
  957|    401|			elems->supp_op_classes_len = 0;
  958|    401|			break;
  959|    308|		case WLAN_EID_RRM_ENABLED_CAPABILITIES:
  ------------------
  |  |  373|    308|#define WLAN_EID_RRM_ENABLED_CAPABILITIES 70
  ------------------
  |  Branch (959:3): [True: 308, False: 15.4k]
  ------------------
  960|    308|			elems->rrm_enabled = NULL;
  961|    308|			elems->rrm_enabled_len = 0;
  962|    308|			break;
  963|    321|		case WLAN_EID_CAG_NUMBER:
  ------------------
  |  |  499|    321|#define WLAN_EID_CAG_NUMBER 237
  ------------------
  |  Branch (963:3): [True: 321, False: 15.4k]
  ------------------
  964|    321|			elems->cag_number = NULL;
  965|    321|			elems->cag_number_len = 0;
  966|    321|			break;
  967|    208|		case WLAN_EID_AP_CSN:
  ------------------
  |  |  500|    208|#define WLAN_EID_AP_CSN 239
  ------------------
  |  Branch (967:3): [True: 208, False: 15.5k]
  ------------------
  968|    208|			elems->ap_csn = NULL;
  969|    208|			break;
  970|    353|		case WLAN_EID_FILS_INDICATION:
  ------------------
  |  |  501|    353|#define WLAN_EID_FILS_INDICATION 240
  ------------------
  |  Branch (970:3): [True: 353, False: 15.4k]
  ------------------
  971|    353|			elems->fils_indic = NULL;
  972|    353|			elems->fils_indic_len = 0;
  973|    353|			break;
  974|    360|		case WLAN_EID_DILS:
  ------------------
  |  |  502|    360|#define WLAN_EID_DILS 241
  ------------------
  |  Branch (974:3): [True: 360, False: 15.4k]
  ------------------
  975|    360|			elems->dils = NULL;
  976|    360|			elems->dils_len = 0;
  977|    360|			break;
  978|    245|		case WLAN_EID_S1G_CAPABILITIES:
  ------------------
  |  |  495|    245|#define WLAN_EID_S1G_CAPABILITIES 217
  ------------------
  |  Branch (978:3): [True: 245, False: 15.5k]
  ------------------
  979|       |			elems->s1g_capab = NULL;
  980|    245|			break;
  981|  15.7k|		}
  982|  15.7k|	}
  983|  1.02k|}
ieee802_11_elems_clear_ext_ids:
  994|    434|{
  995|    434|	size_t i;
  996|       |
  997|  10.5k|	for (i = 0; i < num; i++) {
  ------------------
  |  Branch (997:14): [True: 10.1k, False: 434]
  ------------------
  998|  10.1k|		switch (ids[i]) {
  ------------------
  |  Branch (998:11): [True: 7.20k, False: 2.90k]
  ------------------
  999|    395|		case WLAN_EID_EXT_ASSOC_DELAY_INFO:
  ------------------
  |  |  508|    395|#define WLAN_EID_EXT_ASSOC_DELAY_INFO 1
  ------------------
  |  Branch (999:3): [True: 395, False: 9.71k]
  ------------------
 1000|    395|			elems->assoc_delay_info = NULL;
 1001|    395|			break;
 1002|    225|		case WLAN_EID_EXT_FILS_REQ_PARAMS:
  ------------------
  |  |  509|    225|#define WLAN_EID_EXT_FILS_REQ_PARAMS 2
  ------------------
  |  Branch (1002:3): [True: 225, False: 9.88k]
  ------------------
 1003|    225|			elems->fils_req_params = NULL;
 1004|    225|			elems->fils_req_params_len = 0;
 1005|    225|			break;
 1006|    298|		case WLAN_EID_EXT_FILS_KEY_CONFIRM:
  ------------------
  |  |  510|    298|#define WLAN_EID_EXT_FILS_KEY_CONFIRM 3
  ------------------
  |  Branch (1006:3): [True: 298, False: 9.81k]
  ------------------
 1007|    298|			elems->fils_key_confirm = NULL;
 1008|    298|			elems->fils_key_confirm_len = 0;
 1009|    298|			break;
 1010|    269|		case WLAN_EID_EXT_FILS_SESSION:
  ------------------
  |  |  511|    269|#define WLAN_EID_EXT_FILS_SESSION 4
  ------------------
  |  Branch (1010:3): [True: 269, False: 9.84k]
  ------------------
 1011|    269|			elems->fils_session = NULL;
 1012|    269|			break;
 1013|    383|		case WLAN_EID_EXT_FILS_HLP_CONTAINER:
  ------------------
  |  |  512|    383|#define WLAN_EID_EXT_FILS_HLP_CONTAINER 5
  ------------------
  |  Branch (1013:3): [True: 383, False: 9.72k]
  ------------------
 1014|    383|			elems->fils_hlp = NULL;
 1015|    383|			elems->fils_hlp_len = 0;
 1016|    383|			break;
 1017|    236|		case WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN:
  ------------------
  |  |  513|    236|#define WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN 6
  ------------------
  |  Branch (1017:3): [True: 236, False: 9.87k]
  ------------------
 1018|    236|			elems->fils_ip_addr_assign = NULL;
 1019|    236|			elems->fils_ip_addr_assign_len = 0;
 1020|    236|			break;
 1021|    402|		case WLAN_EID_EXT_KEY_DELIVERY:
  ------------------
  |  |  514|    402|#define WLAN_EID_EXT_KEY_DELIVERY 7
  ------------------
  |  Branch (1021:3): [True: 402, False: 9.70k]
  ------------------
 1022|    402|			elems->key_delivery = NULL;
 1023|    402|			elems->key_delivery_len = 0;
 1024|    402|			break;
 1025|    214|		case WLAN_EID_EXT_WRAPPED_DATA:
  ------------------
  |  |  515|    214|#define WLAN_EID_EXT_WRAPPED_DATA 8
  ------------------
  |  Branch (1025:3): [True: 214, False: 9.89k]
  ------------------
 1026|    214|			elems->wrapped_data = NULL;
 1027|    214|			elems->wrapped_data_len = 0;
 1028|    214|			break;
 1029|    257|		case WLAN_EID_EXT_FILS_PUBLIC_KEY:
  ------------------
  |  |  519|    257|#define WLAN_EID_EXT_FILS_PUBLIC_KEY 12
  ------------------
  |  Branch (1029:3): [True: 257, False: 9.85k]
  ------------------
 1030|    257|			elems->fils_pk = NULL;
 1031|    257|			elems->fils_pk_len = 0;
 1032|    257|			break;
 1033|    202|		case WLAN_EID_EXT_NONCE:
  ------------------
  |  |  520|    202|#define WLAN_EID_EXT_NONCE 13
  ------------------
  |  Branch (1033:3): [True: 202, False: 9.90k]
  ------------------
 1034|    202|			elems->nonce = NULL;
 1035|    202|			break;
 1036|    337|		case WLAN_EID_EXT_OWE_DH_PARAM:
  ------------------
  |  |  522|    337|#define WLAN_EID_EXT_OWE_DH_PARAM 32
  ------------------
  |  Branch (1036:3): [True: 337, False: 9.77k]
  ------------------
 1037|    337|			elems->owe_dh = NULL;
 1038|    337|			elems->owe_dh_len = 0;
 1039|    337|			break;
 1040|    254|		case WLAN_EID_EXT_PASSWORD_IDENTIFIER:
  ------------------
  |  |  523|    254|#define WLAN_EID_EXT_PASSWORD_IDENTIFIER 33
  ------------------
  |  Branch (1040:3): [True: 254, False: 9.85k]
  ------------------
 1041|    254|			elems->password_id = NULL;
 1042|    254|			elems->password_id_len = 0;
 1043|    254|			break;
 1044|    376|		case WLAN_EID_EXT_HE_CAPABILITIES:
  ------------------
  |  |  524|    376|#define WLAN_EID_EXT_HE_CAPABILITIES 35
  ------------------
  |  Branch (1044:3): [True: 376, False: 9.73k]
  ------------------
 1045|    376|			elems->he_capabilities = NULL;
 1046|    376|			elems->he_capabilities_len = 0;
 1047|    376|			break;
 1048|    461|		case WLAN_EID_EXT_HE_OPERATION:
  ------------------
  |  |  525|    461|#define WLAN_EID_EXT_HE_OPERATION 36
  ------------------
  |  Branch (1048:3): [True: 461, False: 9.64k]
  ------------------
 1049|    461|			elems->he_operation = NULL;
 1050|    461|			elems->he_operation_len = 0;
 1051|    461|			break;
 1052|    384|		case WLAN_EID_EXT_OCV_OCI:
  ------------------
  |  |  530|    384|#define WLAN_EID_EXT_OCV_OCI 54
  ------------------
  |  Branch (1052:3): [True: 384, False: 9.72k]
  ------------------
 1053|    384|			elems->oci = NULL;
 1054|    384|			elems->oci_len = 0;
 1055|    384|			break;
 1056|    222|		case WLAN_EID_EXT_SHORT_SSID_LIST:
  ------------------
  |  |  534|    222|#define WLAN_EID_EXT_SHORT_SSID_LIST 58
  ------------------
  |  Branch (1056:3): [True: 222, False: 9.88k]
  ------------------
 1057|    222|			elems->short_ssid_list = NULL;
 1058|    222|			elems->short_ssid_list_len = 0;
 1059|    222|			break;
 1060|    233|		case WLAN_EID_EXT_HE_6GHZ_BAND_CAP:
  ------------------
  |  |  535|    233|#define WLAN_EID_EXT_HE_6GHZ_BAND_CAP 59
  ------------------
  |  Branch (1060:3): [True: 233, False: 9.87k]
  ------------------
 1061|    233|			elems->he_6ghz_band_cap = NULL;
 1062|    233|			break;
 1063|    366|		case WLAN_EID_EXT_PASN_PARAMS:
  ------------------
  |  |  542|    366|#define WLAN_EID_EXT_PASN_PARAMS 100
  ------------------
  |  Branch (1063:3): [True: 366, False: 9.74k]
  ------------------
 1064|    366|			elems->pasn_params = NULL;
 1065|    366|			elems->pasn_params_len = 0;
 1066|    366|			break;
 1067|    402|		case WLAN_EID_EXT_MULTI_LINK:
  ------------------
  |  |  544|    402|#define WLAN_EID_EXT_MULTI_LINK 107
  ------------------
  |  Branch (1067:3): [True: 402, False: 9.70k]
  ------------------
 1068|    402|			elems->basic_mle = NULL;
 1069|    402|			elems->probe_req_mle = NULL;
 1070|    402|			elems->reconf_mle = NULL;
 1071|    402|			elems->tdls_mle = NULL;
 1072|    402|			elems->prior_access_mle = NULL;
 1073|       |
 1074|    402|			elems->basic_mle_len = 0;
 1075|    402|			elems->probe_req_mle_len = 0;
 1076|    402|			elems->reconf_mle_len = 0;
 1077|    402|			elems->tdls_mle_len = 0;
 1078|    402|			elems->prior_access_mle_len = 0;
 1079|    402|			break;
 1080|    273|		case WLAN_EID_EXT_EHT_CAPABILITIES:
  ------------------
  |  |  545|    273|#define WLAN_EID_EXT_EHT_CAPABILITIES 108
  ------------------
  |  Branch (1080:3): [True: 273, False: 9.83k]
  ------------------
 1081|    273|			elems->eht_capabilities = NULL;
 1082|    273|			elems->eht_capabilities_len = 0;
 1083|    273|			break;
 1084|    322|		case WLAN_EID_EXT_EHT_OPERATION:
  ------------------
  |  |  543|    322|#define WLAN_EID_EXT_EHT_OPERATION 106
  ------------------
  |  Branch (1084:3): [True: 322, False: 9.78k]
  ------------------
 1085|    322|			elems->eht_operation = NULL;
 1086|    322|			elems->eht_operation_len = 0;
 1087|    322|			break;
 1088|    210|		case WLAN_EID_EXT_UHR_CAPABILITIES:
  ------------------
  |  |  554|    210|#define WLAN_EID_EXT_UHR_CAPABILITIES 152
  ------------------
  |  Branch (1088:3): [True: 210, False: 9.89k]
  ------------------
 1089|    210|			elems->uhr_capabilities = NULL;
 1090|    210|			elems->uhr_capabilities_len = 0;
 1091|    210|			break;
 1092|    237|		case WLAN_EID_EXT_UHR_OPERATION:
  ------------------
  |  |  553|    237|#define WLAN_EID_EXT_UHR_OPERATION 151
  ------------------
  |  Branch (1092:3): [True: 237, False: 9.87k]
  ------------------
 1093|    237|			elems->uhr_operation = NULL;
 1094|    237|			elems->uhr_operation_len = 0;
 1095|    237|			break;
 1096|    242|		case WLAN_EID_EXT_SECURITY_PROFILE:
  ------------------
  |  |  563|    242|#define WLAN_EID_EXT_SECURITY_PROFILE 162
  ------------------
  |  Branch (1096:3): [True: 242, False: 9.86k]
  ------------------
 1097|       |			elems->security_profile = NULL;
 1098|    242|			elems->security_profile_len = 0;
 1099|    242|			break;
 1100|  10.1k|		}
 1101|  10.1k|	}
 1102|    434|}
ieee802_11_parse_link_assoc_req:
 1291|  23.5k|{
 1292|  23.5k|	return ieee802_11_parse_link_profile(elems, mlbuf, link_id,
 1293|       |					     show_errors, false);
 1294|  23.5k|}
ieee802_11_parse_link_assoc_resp:
 1300|  23.5k|{
 1301|       |	/* ieee802_11_defrag_mle_subelem() handles subelement defragmentation
 1302|       |	 * in-place within mlbuf */
 1303|  23.5k|	return ieee802_11_parse_link_profile(elems, mlbuf, link_id,
 1304|       |					     show_errors, true);
 1305|  23.5k|}
get_ie_ext:
 2731|  2.50k|{
 2732|  2.50k|	const struct element *elem;
 2733|       |
 2734|  2.50k|	if (!ies)
  ------------------
  |  Branch (2734:6): [True: 0, False: 2.50k]
  ------------------
 2735|      0|		return NULL;
 2736|       |
 2737|  22.5k|	for_each_element_extid(elem, ext, ies, len)
  ------------------
  |  |  410|  2.50k|	for_each_element(element, _data, _datalen)			\
  |  |  ------------------
  |  |  |  |  395|  2.50k|	for (_elem = (const struct element *) (_data);			\
  |  |  |  |  396|  24.0k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (396:7): [True: 23.2k, False: 823]
  |  |  |  |  ------------------
  |  |  |  |  397|  24.0k|		(int) sizeof(*_elem) &&					\
  |  |  |  |  398|  24.0k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (398:7): [True: 23.1k, False: 28]
  |  |  |  |  ------------------
  |  |  |  |  399|  23.2k|		(int) element_hdr_size(_elem) &&			\
  |  |  |  |  400|  24.0k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (400:7): [True: 22.5k, False: 580]
  |  |  |  |  ------------------
  |  |  |  |  401|  23.1k|		(int) (element_hdr_size(_elem) +			\
  |  |  |  |  402|  23.1k|		       element_datalen(_elem));				\
  |  |  |  |  403|  21.5k|	     _elem = element_next(_elem))
  |  |  ------------------
  |  |  411|  22.5k|		if (element->id == WLAN_EID_EXTENSION &&		\
  |  |  ------------------
  |  |  |  |  505|  45.1k|#define WLAN_EID_EXTENSION 255
  |  |  ------------------
  |  |  |  Branch (411:7): [True: 7.91k, False: 14.6k]
  |  |  ------------------
  |  |  412|  22.5k|		    element->datalen > 0 &&				\
  |  |  ------------------
  |  |  |  Branch (412:7): [True: 7.43k, False: 481]
  |  |  ------------------
  |  |  413|  22.5k|		    element->data[0] == (extid))
  |  |  ------------------
  |  |  |  Branch (413:7): [True: 1.07k, False: 6.36k]
  |  |  ------------------
  ------------------
 2738|  1.07k|		return &elem->id;
 2739|       |
 2740|  1.43k|	return NULL;
 2741|  2.50k|}
ieee802_11_defrag:
 3614|  55.2k|{
 3615|  55.2k|	struct wpabuf *buf;
 3616|  55.2k|	const u8 *pos, *end;
 3617|  55.2k|	size_t min_defrag_len = ext_elem ? 255 : 256;
  ------------------
  |  Branch (3617:26): [True: 51.9k, False: 3.25k]
  ------------------
 3618|       |
 3619|  55.2k|	if (!data || !len)
  ------------------
  |  Branch (3619:6): [True: 0, False: 55.2k]
  |  Branch (3619:15): [True: 0, False: 55.2k]
  ------------------
 3620|      0|		return NULL;
 3621|       |
 3622|  55.2k|	if (len < min_defrag_len)
  ------------------
  |  Branch (3622:6): [True: 46.6k, False: 8.52k]
  ------------------
 3623|  46.6k|		return wpabuf_alloc_copy(data, len);
 3624|       |
 3625|  8.52k|	buf = wpabuf_alloc_copy(data, min_defrag_len - 1);
 3626|  8.52k|	if (!buf)
  ------------------
  |  Branch (3626:6): [True: 0, False: 8.52k]
  ------------------
 3627|      0|		return NULL;
 3628|       |
 3629|  8.52k|	pos = &data[min_defrag_len - 1];
 3630|  8.52k|	end = data + len;
 3631|  8.52k|	len -= min_defrag_len - 1;
 3632|  43.3k|	while (len > 2 && pos[0] == WLAN_EID_FRAGMENT && pos[1]) {
  ------------------
  |  |  503|  79.6k|#define WLAN_EID_FRAGMENT 242
  ------------------
  |  Branch (3632:9): [True: 36.2k, False: 7.18k]
  |  Branch (3632:20): [True: 35.2k, False: 1.00k]
  |  Branch (3632:51): [True: 34.9k, False: 215]
  ------------------
 3633|  34.9k|		int ret;
 3634|  34.9k|		size_t elen = 2 + pos[1];
 3635|       |
 3636|  34.9k|		if (elen > (size_t) (end - pos) || elen > len)
  ------------------
  |  Branch (3636:7): [True: 116, False: 34.8k]
  |  Branch (3636:38): [True: 0, False: 34.8k]
  ------------------
 3637|    116|			break;
 3638|  34.8k|		ret = wpabuf_resize(&buf, pos[1]);
 3639|  34.8k|		if (ret < 0) {
  ------------------
  |  Branch (3639:7): [True: 0, False: 34.8k]
  ------------------
 3640|      0|			wpabuf_free(buf);
 3641|      0|			return NULL;
 3642|      0|		}
 3643|       |
 3644|       |		/* Copy only the fragment data (without the EID and length) */
 3645|  34.8k|		wpabuf_put_data(buf, &pos[2], pos[1]);
 3646|  34.8k|		pos += elen;
 3647|  34.8k|		len -= elen;
 3648|  34.8k|	}
 3649|       |
 3650|  8.52k|	return buf;
 3651|  8.52k|}
ieee802_11_defrag_mle_subelem:
 3671|  93.8k|{
 3672|  93.8k|	u8 *buf, *pos, *end;
 3673|  93.8k|	size_t len, subelem_len;
 3674|  93.8k|	const size_t min_defrag_len = 255;
 3675|  93.8k|	int num_frag_subelems = 0;
 3676|       |
 3677|  93.8k|	if (!mlbuf || !parent_subelem)
  ------------------
  |  Branch (3677:6): [True: 0, False: 93.8k]
  |  Branch (3677:16): [True: 0, False: 93.8k]
  ------------------
 3678|      0|		return -1;
 3679|       |
 3680|  93.8k|	buf = wpabuf_mhead_u8(mlbuf);
 3681|  93.8k|	len = wpabuf_len(mlbuf);
 3682|  93.8k|	end = buf + len;
 3683|       |
 3684|  93.8k|	*defrag_len = parent_subelem[1];
 3685|  93.8k|	if (parent_subelem[1] < min_defrag_len)
  ------------------
  |  Branch (3685:6): [True: 85.2k, False: 8.61k]
  ------------------
 3686|  85.2k|		return 0;
 3687|       |
 3688|  8.61k|	pos = (u8 *) parent_subelem;
 3689|  8.61k|	if (2 + parent_subelem[1] > end - pos)
  ------------------
  |  Branch (3689:6): [True: 2.86k, False: 5.75k]
  ------------------
 3690|  2.86k|		return -1;
 3691|  5.75k|	pos += 2 + parent_subelem[1];
 3692|  5.75k|	subelem_len = parent_subelem[1];
 3693|       |
 3694|  14.9k|	while (end - pos > 2 &&
  ------------------
  |  Branch (3694:9): [True: 14.0k, False: 832]
  ------------------
 3695|  14.0k|	       pos[0] == MULTI_LINK_SUB_ELEM_ID_FRAGMENT && pos[1]) {
  ------------------
  |  | 2939|  29.0k|#define MULTI_LINK_SUB_ELEM_ID_FRAGMENT			254
  ------------------
  |  Branch (3695:9): [True: 9.88k, False: 4.20k]
  |  Branch (3695:54): [True: 9.79k, False: 93]
  ------------------
 3696|  9.79k|		size_t elen = 2 + pos[1];
 3697|       |
 3698|       |		/* This Multi-Link parent subelement has more data and is
 3699|       |		 * fragmented. */
 3700|  9.79k|		num_frag_subelems++;
 3701|       |
 3702|  9.79k|		if (elen > (size_t) (end - pos))
  ------------------
  |  Branch (3702:7): [True: 625, False: 9.17k]
  ------------------
 3703|    625|			return -1;
 3704|       |
 3705|  9.17k|		os_memmove(pos, pos + 2, end - (pos + 2));
  ------------------
  |  |  526|  9.17k|#define os_memmove(d, s, n) memmove((d), (s), (n))
  ------------------
 3706|  9.17k|		end -= 2;
 3707|  9.17k|		mlbuf->used -= 2;
 3708|  9.17k|		pos += elen - 2;
 3709|  9.17k|		subelem_len += elen - 2;
 3710|       |
 3711|       |		/* Deduct Fragment subelement header */
 3712|  9.17k|		len -= 2;
 3713|  9.17k|	}
 3714|       |
 3715|  5.12k|	*defrag_len = subelem_len;
 3716|  5.12k|	return num_frag_subelems;
 3717|  5.75k|}
get_ml_ie:
 3721|  26.0k|{
 3722|  26.0k|	const struct element *elem;
 3723|       |
 3724|  26.0k|	if (!ies)
  ------------------
  |  Branch (3724:6): [True: 0, False: 26.0k]
  ------------------
 3725|      0|		return NULL;
 3726|       |
 3727|   425k|	for_each_element_extid(elem, WLAN_EID_EXT_MULTI_LINK, ies, len) {
  ------------------
  |  |  410|  26.0k|	for_each_element(element, _data, _datalen)			\
  |  |  ------------------
  |  |  |  |  395|  26.0k|	for (_elem = (const struct element *) (_data);			\
  |  |  |  |  396|   449k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (396:7): [True: 427k, False: 21.8k]
  |  |  |  |  ------------------
  |  |  |  |  397|   449k|		(int) sizeof(*_elem) &&					\
  |  |  |  |  398|   449k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (398:7): [True: 427k, False: 126]
  |  |  |  |  ------------------
  |  |  |  |  399|   427k|		(int) element_hdr_size(_elem) &&			\
  |  |  |  |  400|   449k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (400:7): [True: 425k, False: 2.26k]
  |  |  |  |  ------------------
  |  |  |  |  401|   427k|		(int) (element_hdr_size(_elem) +			\
  |  |  |  |  402|   427k|		       element_datalen(_elem));				\
  |  |  |  |  403|   423k|	     _elem = element_next(_elem))
  |  |  ------------------
  |  |  411|   425k|		if (element->id == WLAN_EID_EXTENSION &&		\
  |  |  ------------------
  |  |  |  |  505|   850k|#define WLAN_EID_EXTENSION 255
  |  |  ------------------
  |  |  |  Branch (411:7): [True: 65.6k, False: 359k]
  |  |  ------------------
  |  |  412|   425k|		    element->datalen > 0 &&				\
  |  |  ------------------
  |  |  |  Branch (412:7): [True: 62.6k, False: 2.92k]
  |  |  ------------------
  |  |  413|   425k|		    element->data[0] == (extid))
  |  |  ------------------
  |  |  |  Branch (413:7): [True: 19.9k, False: 42.7k]
  |  |  ------------------
  ------------------
 3728|  19.9k|		if (elem->datalen >= 2 &&
  ------------------
  |  Branch (3728:7): [True: 19.6k, False: 302]
  ------------------
 3729|  19.6k|		    (elem->data[1] & MULTI_LINK_CONTROL_TYPE_MASK) == type)
  ------------------
  |  | 2923|  19.6k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  |  Branch (3729:7): [True: 1.76k, False: 17.8k]
  ------------------
 3730|  1.76k|			return &elem->id;
 3731|  19.9k|	}
 3732|       |
 3733|  24.2k|	return NULL;
 3734|  26.0k|}
get_basic_mle_mld_addr:
 3738|  4.70k|{
 3739|  4.70k|	const size_t mld_addr_pos =
 3740|  4.70k|		2 /* Control field */ +
 3741|  4.70k|		1 /* Common Info Length field */;
 3742|  4.70k|	const size_t fixed_len = mld_addr_pos +
 3743|  4.70k|		ETH_ALEN /* MLD MAC Address field */;
  ------------------
  |  |  344|  4.70k|#define ETH_ALEN 6
  ------------------
 3744|       |
 3745|  4.70k|	if (len < fixed_len)
  ------------------
  |  Branch (3745:6): [True: 731, False: 3.97k]
  ------------------
 3746|    731|		return NULL;
 3747|       |
 3748|  3.97k|	if ((buf[0] & MULTI_LINK_CONTROL_TYPE_MASK) !=
  ------------------
  |  | 2923|  3.97k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  |  Branch (3748:6): [True: 2.43k, False: 1.54k]
  ------------------
 3749|  3.97k|	    MULTI_LINK_CONTROL_TYPE_BASIC)
  ------------------
  |  | 2927|  3.97k|#define MULTI_LINK_CONTROL_TYPE_BASIC			0
  ------------------
 3750|  2.43k|		return NULL;
 3751|       |
 3752|  1.54k|	return &buf[mld_addr_pos];
 3753|  3.97k|}
get_basic_mle_eml_capa:
 3757|  4.70k|{
 3758|  4.70k|	const struct ieee80211_eht_ml *ml =
 3759|  4.70k|		(const struct ieee80211_eht_ml *) buf;
 3760|  4.70k|	u16 ctrl;
 3761|  4.70k|	size_t eml_capa_pos =
 3762|  4.70k|		MULTI_LINK_CONTROL_LEN + /* Multi-Link Control field */
  ------------------
  |  | 2924|  4.70k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3763|  4.70k|		1 + /* Common Info Length field (Basic) */
 3764|  4.70k|		ETH_ALEN; /* MLD MAC Address field (Basic) */
  ------------------
  |  |  344|  4.70k|#define ETH_ALEN 6
  ------------------
 3765|  4.70k|	size_t common_info_limit;
 3766|  4.70k|	u8 common_info_len;
 3767|       |
 3768|       |	/* The Common Info Length field follows the Multi-Link Control field */
 3769|  4.70k|	if (len < MULTI_LINK_CONTROL_LEN + 1)
  ------------------
  |  | 2924|  4.70k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
  |  Branch (3769:6): [True: 79, False: 4.63k]
  ------------------
 3770|     79|		return NULL;
 3771|       |
 3772|  4.63k|	ctrl = le_to_host16(ml->ml_control);
  ------------------
  |  |  175|  4.63k|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
 3773|  4.63k|	if ((ctrl & MULTI_LINK_CONTROL_TYPE_MASK) !=
  ------------------
  |  | 2923|  4.63k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  |  Branch (3773:6): [True: 2.98k, False: 1.64k]
  ------------------
 3774|  4.63k|	    MULTI_LINK_CONTROL_TYPE_BASIC)
  ------------------
  |  | 2927|  4.63k|#define MULTI_LINK_CONTROL_TYPE_BASIC			0
  ------------------
 3775|  2.98k|		return NULL;
 3776|  1.64k|	if (!(ctrl & BASIC_MULTI_LINK_CTRL_PRES_EML_CAPA))
  ------------------
  |  | 2947|  1.64k|#define BASIC_MULTI_LINK_CTRL_PRES_EML_CAPA		0x0080
  ------------------
  |  Branch (3776:6): [True: 1.11k, False: 531]
  ------------------
 3777|  1.11k|		return NULL;
 3778|       |
 3779|       |	/* Validate Common Info Length against available data */
 3780|    531|	common_info_len = buf[MULTI_LINK_CONTROL_LEN];
  ------------------
  |  | 2924|    531|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3781|    531|	if (len < (size_t) MULTI_LINK_CONTROL_LEN + common_info_len)
  ------------------
  |  | 2924|    531|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
  |  Branch (3781:6): [True: 49, False: 482]
  ------------------
 3782|     49|		return NULL;
 3783|    482|	common_info_limit = MULTI_LINK_CONTROL_LEN + common_info_len;
  ------------------
  |  | 2924|    482|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3784|       |
 3785|    482|	if (ctrl & BASIC_MULTI_LINK_CTRL_PRES_LINK_ID)
  ------------------
  |  | 2944|    482|#define BASIC_MULTI_LINK_CTRL_PRES_LINK_ID		0x0010
  ------------------
  |  Branch (3785:6): [True: 444, False: 38]
  ------------------
 3786|    444|		eml_capa_pos += EHT_ML_LINK_ID_LEN;
  ------------------
  |  | 2997|    444|#define EHT_ML_LINK_ID_LEN  1
  ------------------
 3787|       |
 3788|    482|	if (ctrl & BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT)
  ------------------
  |  | 2945|    482|#define BASIC_MULTI_LINK_CTRL_PRES_BSS_PARAM_CH_COUNT	0x0020
  ------------------
  |  Branch (3788:6): [True: 425, False: 57]
  ------------------
 3789|    425|		eml_capa_pos++;
 3790|       |
 3791|    482|	if (ctrl & BASIC_MULTI_LINK_CTRL_PRES_MSD_INFO)
  ------------------
  |  | 2946|    482|#define BASIC_MULTI_LINK_CTRL_PRES_MSD_INFO		0x0040
  ------------------
  |  Branch (3791:6): [True: 57, False: 425]
  ------------------
 3792|     57|		eml_capa_pos += 2;
 3793|       |
 3794|       |	/* Ensure EML Capabilities field fits within the declared Common Info */
 3795|    482|	if (eml_capa_pos + EHT_ML_EML_CAPA_LEN > common_info_limit)
  ------------------
  |  | 2994|    482|#define EHT_ML_EML_CAPA_LEN  2
  ------------------
  |  Branch (3795:6): [True: 451, False: 31]
  ------------------
 3796|    451|		return NULL;
 3797|       |
 3798|     31|	return &buf[eml_capa_pos];
 3799|    482|}
get_basic_mle_link_id:
 3803|  4.70k|{
 3804|  4.70k|	struct ieee80211_eht_ml *ml = (struct ieee80211_eht_ml *) buf;
 3805|  4.70k|	u16 ctrl;
 3806|  4.70k|	size_t link_id_pos =
 3807|  4.70k|		MULTI_LINK_CONTROL_LEN + /* Multi-Link Control field */
  ------------------
  |  | 2924|  4.70k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3808|  4.70k|		1 + /* Common Info Length field (Basic) */
 3809|  4.70k|		ETH_ALEN; /* MLD MAC Address field (Basic) */
  ------------------
  |  |  344|  4.70k|#define ETH_ALEN 6
  ------------------
 3810|  4.70k|	size_t common_info_limit;
 3811|  4.70k|	u8 common_info_len;
 3812|  4.70k|	u8 link_id;
 3813|       |
 3814|       |	/* The Common Info Length field follows the Multi-Link Control field */
 3815|  4.70k|	if (len < MULTI_LINK_CONTROL_LEN + 1)
  ------------------
  |  | 2924|  4.70k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
  |  Branch (3815:6): [True: 79, False: 4.63k]
  ------------------
 3816|     79|		return -1;
 3817|       |
 3818|  4.63k|	ctrl = le_to_host16(ml->ml_control);
  ------------------
  |  |  175|  4.63k|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
 3819|  4.63k|	if ((ctrl & MULTI_LINK_CONTROL_TYPE_MASK) !=
  ------------------
  |  | 2923|  4.63k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  |  Branch (3819:6): [True: 2.98k, False: 1.64k]
  ------------------
 3820|  4.63k|	    MULTI_LINK_CONTROL_TYPE_BASIC)
  ------------------
  |  | 2927|  4.63k|#define MULTI_LINK_CONTROL_TYPE_BASIC			0
  ------------------
 3821|  2.98k|		return -1;
 3822|       |
 3823|       |	/* Validate Common Info Length against available data */
 3824|  1.64k|	common_info_len = buf[MULTI_LINK_CONTROL_LEN];
  ------------------
  |  | 2924|  1.64k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3825|  1.64k|	if (len < (size_t) MULTI_LINK_CONTROL_LEN + common_info_len)
  ------------------
  |  | 2924|  1.64k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
  |  Branch (3825:6): [True: 84, False: 1.55k]
  ------------------
 3826|     84|		return -1;
 3827|  1.55k|	common_info_limit = MULTI_LINK_CONTROL_LEN + common_info_len;
  ------------------
  |  | 2924|  1.55k|#define MULTI_LINK_CONTROL_LEN				2
  ------------------
 3828|       |
 3829|  1.55k|	if (!(ctrl & BASIC_MULTI_LINK_CTRL_PRES_LINK_ID))
  ------------------
  |  | 2944|  1.55k|#define BASIC_MULTI_LINK_CTRL_PRES_LINK_ID		0x0010
  ------------------
  |  Branch (3829:6): [True: 1.01k, False: 544]
  ------------------
 3830|  1.01k|		return -1;
 3831|       |
 3832|    544|	if (link_id_pos + EHT_ML_LINK_ID_LEN > common_info_limit)
  ------------------
  |  | 2997|    544|#define EHT_ML_LINK_ID_LEN  1
  ------------------
  |  Branch (3832:6): [True: 498, False: 46]
  ------------------
 3833|    498|		return -1;
 3834|       |
 3835|     46|	link_id = buf[link_id_pos] & BASIC_MLE_STA_CTRL_LINK_ID_MASK;
  ------------------
  |  | 2959|     46|#define BASIC_MLE_STA_CTRL_LINK_ID_MASK			0x000F
  ------------------
 3836|     46|	if (link_id >= MAX_NUM_MLD_LINKS)
  ------------------
  |  |  581|     46|#define MAX_NUM_MLD_LINKS 15
  ------------------
  |  Branch (3836:6): [True: 10, False: 36]
  ------------------
 3837|     10|		return -1;
 3838|       |
 3839|     36|	return link_id;
 3840|     46|}
ieee802_11_common.c:__ieee802_11_parse_elems:
  523|  4.92k|{
  524|  4.92k|	const struct element *elem;
  525|  4.92k|	int unknown = 0;
  526|       |
  527|  4.92k|	if (!start)
  ------------------
  |  Branch (527:6): [True: 0, False: 4.92k]
  ------------------
  528|      0|		return ParseOK;
  529|       |
  530|  76.3k|	for_each_element(elem, start, len) {
  ------------------
  |  |  395|  4.92k|	for (_elem = (const struct element *) (_data);			\
  |  |  396|  81.2k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (396:7): [True: 77.4k, False: 3.85k]
  |  |  ------------------
  |  |  397|  81.2k|		(int) sizeof(*_elem) &&					\
  |  |  398|  81.2k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (398:7): [True: 77.3k, False: 47]
  |  |  ------------------
  |  |  399|  77.4k|		(int) element_hdr_size(_elem) &&			\
  |  |  400|  81.2k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (400:7): [True: 76.3k, False: 1.02k]
  |  |  ------------------
  |  |  401|  77.3k|		(int) (element_hdr_size(_elem) +			\
  |  |  402|  77.3k|		       element_datalen(_elem));				\
  |  |  403|  76.3k|	     _elem = element_next(_elem))
  ------------------
  531|  76.3k|		u8 id = elem->id, elen;
  532|  76.3k|		const u8 *pos;
  533|  76.3k|		size_t *total_len = NULL;
  534|       |
  535|  76.3k|		if (id == WLAN_EID_FRAGMENT && elems->num_frag_elems > 0) {
  ------------------
  |  |  503|   152k|#define WLAN_EID_FRAGMENT 242
  ------------------
  |  Branch (535:7): [True: 10.1k, False: 66.1k]
  |  Branch (535:34): [True: 9.60k, False: 578]
  ------------------
  536|  9.60k|			elems->num_frag_elems--;
  537|  9.60k|			continue;
  538|  9.60k|		}
  539|       |
  540|  66.7k|		elems->num_frag_elems = 0;
  541|  66.7k|		if (id == WLAN_EID_EXT_LENGTH) {
  ------------------
  |  |  498|  66.7k|#define WLAN_EID_EXT_LENGTH 227
  ------------------
  |  Branch (541:7): [True: 985, False: 65.7k]
  ------------------
  542|    985|			if (ieee802_11_parse_ext_len_elem(
  ------------------
  |  Branch (542:8): [True: 372, False: 613]
  ------------------
  543|    985|				    (const struct ext_len_element *) elem,
  544|    985|				    elems, show_errors))
  545|    372|				unknown++;
  546|    985|			continue;
  547|    985|		}
  548|       |
  549|  65.7k|		elen = elem->datalen;
  550|  65.7k|		pos = elem->data;
  551|       |
  552|  65.7k|		switch (id) {
  553|  10.6k|		case WLAN_EID_SSID:
  ------------------
  |  |  323|  10.6k|#define WLAN_EID_SSID 0
  ------------------
  |  Branch (553:3): [True: 10.6k, False: 55.0k]
  ------------------
  554|  10.6k|			if (elen > SSID_MAX_LEN) {
  ------------------
  |  |  511|  10.6k|#define SSID_MAX_LEN 32
  ------------------
  |  Branch (554:8): [True: 660, False: 9.99k]
  ------------------
  555|    660|				wpa_printf(MSG_DEBUG,
  556|    660|					   "Ignored too long SSID element (elen=%u)",
  557|    660|					   elen);
  558|    660|				break;
  559|    660|			}
  560|  9.99k|			if (elems->ssid) {
  ------------------
  |  Branch (560:8): [True: 8.75k, False: 1.23k]
  ------------------
  561|  8.75k|				wpa_printf(MSG_MSGDUMP,
  562|  8.75k|					   "Ignored duplicated SSID element");
  563|  8.75k|				break;
  564|  8.75k|			}
  565|  1.23k|			elems->ssid = pos;
  566|  1.23k|			elems->ssid_len = elen;
  567|  1.23k|			break;
  568|  1.20k|		case WLAN_EID_SUPP_RATES:
  ------------------
  |  |  324|  1.20k|#define WLAN_EID_SUPP_RATES 1
  ------------------
  |  Branch (568:3): [True: 1.20k, False: 64.5k]
  ------------------
  569|  1.20k|			elems->supp_rates = pos;
  570|  1.20k|			elems->supp_rates_len = elen;
  571|  1.20k|			break;
  572|    686|		case WLAN_EID_DS_PARAMS:
  ------------------
  |  |  325|    686|#define WLAN_EID_DS_PARAMS 3
  ------------------
  |  Branch (572:3): [True: 686, False: 65.0k]
  ------------------
  573|    686|			if (elen < 1)
  ------------------
  |  Branch (573:8): [True: 271, False: 415]
  ------------------
  574|    271|				break;
  575|    415|			elems->ds_params = pos;
  576|    415|			break;
  577|    530|		case WLAN_EID_CF_PARAMS:
  ------------------
  |  |  326|    530|#define WLAN_EID_CF_PARAMS 4
  ------------------
  |  Branch (577:3): [True: 530, False: 65.2k]
  ------------------
  578|    994|		case WLAN_EID_TIM:
  ------------------
  |  |  327|    994|#define WLAN_EID_TIM 5
  ------------------
  |  Branch (578:3): [True: 464, False: 65.2k]
  ------------------
  579|    994|			break;
  580|    265|		case WLAN_EID_CHALLENGE:
  ------------------
  |  |  336|    265|#define WLAN_EID_CHALLENGE 16
  ------------------
  |  Branch (580:3): [True: 265, False: 65.4k]
  ------------------
  581|    265|			elems->challenge = pos;
  582|    265|			elems->challenge_len = elen;
  583|    265|			break;
  584|    433|		case WLAN_EID_ERP_INFO:
  ------------------
  |  |  347|    433|#define WLAN_EID_ERP_INFO 42
  ------------------
  |  Branch (584:3): [True: 433, False: 65.3k]
  ------------------
  585|    433|			if (elen < 1)
  ------------------
  |  Branch (585:8): [True: 226, False: 207]
  ------------------
  586|    226|				break;
  587|    207|			elems->erp_info = pos;
  588|    207|			break;
  589|    225|		case WLAN_EID_EXT_SUPP_RATES:
  ------------------
  |  |  353|    225|#define WLAN_EID_EXT_SUPP_RATES 50
  ------------------
  |  Branch (589:3): [True: 225, False: 65.5k]
  ------------------
  590|    225|			elems->ext_supp_rates = pos;
  591|    225|			elems->ext_supp_rates_len = elen;
  592|    225|			break;
  593|  13.0k|		case WLAN_EID_VENDOR_SPECIFIC:
  ------------------
  |  |  496|  13.0k|#define WLAN_EID_VENDOR_SPECIFIC 221
  ------------------
  |  Branch (593:3): [True: 13.0k, False: 52.7k]
  ------------------
  594|  13.0k|			if (ieee802_11_parse_vendor_specific(pos, elen,
  ------------------
  |  Branch (594:8): [True: 7.43k, False: 5.56k]
  ------------------
  595|  13.0k|							     elems,
  596|  13.0k|							     show_errors))
  597|  7.43k|				unknown++;
  598|  13.0k|			break;
  599|    219|		case WLAN_EID_RSN:
  ------------------
  |  |  352|    219|#define WLAN_EID_RSN 48
  ------------------
  |  Branch (599:3): [True: 219, False: 65.5k]
  ------------------
  600|    219|			elems->rsn_ie = pos;
  601|    219|			elems->rsn_ie_len = elen;
  602|    219|			break;
  603|    294|		case WLAN_EID_RSNX:
  ------------------
  |  |  504|    294|#define WLAN_EID_RSNX 244
  ------------------
  |  Branch (603:3): [True: 294, False: 65.4k]
  ------------------
  604|    294|			elems->rsnxe = pos;
  605|    294|			elems->rsnxe_len = elen;
  606|    294|			break;
  607|    563|		case WLAN_EID_PWR_CAPABILITY:
  ------------------
  |  |  338|    563|#define WLAN_EID_PWR_CAPABILITY 33
  ------------------
  |  Branch (607:3): [True: 563, False: 65.1k]
  ------------------
  608|    563|			if (elen < 2)
  ------------------
  |  Branch (608:8): [True: 298, False: 265]
  ------------------
  609|    298|				break;
  610|    265|			elems->power_capab = pos;
  611|    265|			elems->power_capab_len = elen;
  612|    265|			break;
  613|    216|		case WLAN_EID_SUPPORTED_CHANNELS:
  ------------------
  |  |  341|    216|#define WLAN_EID_SUPPORTED_CHANNELS 36
  ------------------
  |  Branch (613:3): [True: 216, False: 65.5k]
  ------------------
  614|    216|			elems->supp_channels = pos;
  615|    216|			elems->supp_channels_len = elen;
  616|    216|			break;
  617|    459|		case WLAN_EID_MOBILITY_DOMAIN:
  ------------------
  |  |  357|    459|#define WLAN_EID_MOBILITY_DOMAIN 54
  ------------------
  |  Branch (617:3): [True: 459, False: 65.2k]
  ------------------
  618|    459|			if (elen < sizeof(struct rsn_mdie))
  ------------------
  |  Branch (618:8): [True: 244, False: 215]
  ------------------
  619|    244|				break;
  620|    215|			elems->mdie = pos;
  621|    215|			elems->mdie_len = elen;
  622|    215|			break;
  623|    582|		case WLAN_EID_FAST_BSS_TRANSITION:
  ------------------
  |  |  358|    582|#define WLAN_EID_FAST_BSS_TRANSITION 55
  ------------------
  |  Branch (623:3): [True: 582, False: 65.1k]
  ------------------
  624|    582|			if (elen < sizeof(struct rsn_ftie))
  ------------------
  |  Branch (624:8): [True: 227, False: 355]
  ------------------
  625|    227|				break;
  626|    355|			elems->ftie = pos;
  627|    355|			elems->ftie_len = elen;
  628|    355|			elems->fte_defrag_len = elen;
  629|    355|			total_len = &elems->fte_defrag_len;
  630|    355|			break;
  631|    427|		case WLAN_EID_TIMEOUT_INTERVAL:
  ------------------
  |  |  359|    427|#define WLAN_EID_TIMEOUT_INTERVAL 56
  ------------------
  |  Branch (631:3): [True: 427, False: 65.3k]
  ------------------
  632|    427|			if (elen != 5)
  ------------------
  |  Branch (632:8): [True: 232, False: 195]
  ------------------
  633|    232|				break;
  634|    195|			elems->timeout_int = pos;
  635|    195|			break;
  636|    441|		case WLAN_EID_HT_CAP:
  ------------------
  |  |  350|    441|#define WLAN_EID_HT_CAP 45
  ------------------
  |  Branch (636:3): [True: 441, False: 65.3k]
  ------------------
  637|    441|			if (elen < sizeof(struct ieee80211_ht_capabilities))
  ------------------
  |  Branch (637:8): [True: 233, False: 208]
  ------------------
  638|    233|				break;
  639|    208|			elems->ht_capabilities = pos;
  640|    208|			break;
  641|    477|		case WLAN_EID_HT_OPERATION:
  ------------------
  |  |  364|    477|#define WLAN_EID_HT_OPERATION 61
  ------------------
  |  Branch (641:3): [True: 477, False: 65.2k]
  ------------------
  642|    477|			if (elen < sizeof(struct ieee80211_ht_operation))
  ------------------
  |  Branch (642:8): [True: 274, False: 203]
  ------------------
  643|    274|				break;
  644|    203|			elems->ht_operation = pos;
  645|    203|			break;
  646|    221|		case WLAN_EID_MESH_CONFIG:
  ------------------
  |  |  414|    221|#define WLAN_EID_MESH_CONFIG 113
  ------------------
  |  Branch (646:3): [True: 221, False: 65.5k]
  ------------------
  647|    221|			elems->mesh_config = pos;
  648|    221|			elems->mesh_config_len = elen;
  649|    221|			break;
  650|    245|		case WLAN_EID_MESH_ID:
  ------------------
  |  |  415|    245|#define WLAN_EID_MESH_ID 114
  ------------------
  |  Branch (650:3): [True: 245, False: 65.4k]
  ------------------
  651|    245|			elems->mesh_id = pos;
  652|    245|			elems->mesh_id_len = elen;
  653|    245|			break;
  654|    220|		case WLAN_EID_PEER_MGMT:
  ------------------
  |  |  418|    220|#define WLAN_EID_PEER_MGMT 117
  ------------------
  |  Branch (654:3): [True: 220, False: 65.5k]
  ------------------
  655|    220|			elems->peer_mgmt = pos;
  656|    220|			elems->peer_mgmt_len = elen;
  657|    220|			break;
  658|    460|		case WLAN_EID_VHT_CAP:
  ------------------
  |  |  478|    460|#define WLAN_EID_VHT_CAP 191
  ------------------
  |  Branch (658:3): [True: 460, False: 65.2k]
  ------------------
  659|    460|			if (elen < sizeof(struct ieee80211_vht_capabilities))
  ------------------
  |  Branch (659:8): [True: 237, False: 223]
  ------------------
  660|    237|				break;
  661|    223|			elems->vht_capabilities = pos;
  662|    223|			break;
  663|    422|		case WLAN_EID_VHT_OPERATION:
  ------------------
  |  |  479|    422|#define WLAN_EID_VHT_OPERATION 192
  ------------------
  |  Branch (663:3): [True: 422, False: 65.3k]
  ------------------
  664|    422|			if (elen < sizeof(struct ieee80211_vht_operation))
  ------------------
  |  Branch (664:8): [True: 209, False: 213]
  ------------------
  665|    209|				break;
  666|    213|			elems->vht_operation = pos;
  667|    213|			break;
  668|    423|		case WLAN_EID_OPERATING_MODE_NOTIFICATION:
  ------------------
  |  |  486|    423|#define WLAN_EID_OPERATING_MODE_NOTIFICATION 199
  ------------------
  |  Branch (668:3): [True: 423, False: 65.3k]
  ------------------
  669|    423|			if (elen != 1)
  ------------------
  |  Branch (669:8): [True: 218, False: 205]
  ------------------
  670|    218|				break;
  671|    205|			elems->opmode_notif = pos;
  672|    205|			break;
  673|    438|		case WLAN_EID_LINK_ID:
  ------------------
  |  |  403|    438|#define WLAN_EID_LINK_ID 101
  ------------------
  |  Branch (673:3): [True: 438, False: 65.3k]
  ------------------
  674|    438|			if (elen < 18)
  ------------------
  |  Branch (674:8): [True: 217, False: 221]
  ------------------
  675|    217|				break;
  676|    221|			elems->link_id = pos;
  677|    221|			break;
  678|    271|		case WLAN_EID_INTERWORKING:
  ------------------
  |  |  408|    271|#define WLAN_EID_INTERWORKING 107
  ------------------
  |  Branch (678:3): [True: 271, False: 65.4k]
  ------------------
  679|    271|			elems->interworking = pos;
  680|    271|			elems->interworking_len = elen;
  681|    271|			break;
  682|    404|		case WLAN_EID_QOS_MAP_SET:
  ------------------
  |  |  411|    404|#define WLAN_EID_QOS_MAP_SET 110
  ------------------
  |  Branch (682:3): [True: 404, False: 65.3k]
  ------------------
  683|    404|			if (elen < 16)
  ------------------
  |  Branch (683:8): [True: 202, False: 202]
  ------------------
  684|    202|				break;
  685|    202|			elems->qos_map_set = pos;
  686|    202|			elems->qos_map_set_len = elen;
  687|    202|			break;
  688|    244|		case WLAN_EID_EXT_CAPAB:
  ------------------
  |  |  428|    244|#define WLAN_EID_EXT_CAPAB 127
  ------------------
  |  Branch (688:3): [True: 244, False: 65.4k]
  ------------------
  689|    244|			elems->ext_capab = pos;
  690|    244|			elems->ext_capab_len = elen;
  691|    244|			break;
  692|    520|		case WLAN_EID_BSS_MAX_IDLE_PERIOD:
  ------------------
  |  |  392|    520|#define WLAN_EID_BSS_MAX_IDLE_PERIOD 90
  ------------------
  |  Branch (692:3): [True: 520, False: 65.2k]
  ------------------
  693|    520|			if (elen < 3)
  ------------------
  |  Branch (693:8): [True: 213, False: 307]
  ------------------
  694|    213|				break;
  695|    307|			elems->bss_max_idle_period = pos;
  696|    307|			break;
  697|    228|		case WLAN_EID_SSID_LIST:
  ------------------
  |  |  386|    228|#define WLAN_EID_SSID_LIST 84
  ------------------
  |  Branch (697:3): [True: 228, False: 65.5k]
  ------------------
  698|    228|			elems->ssid_list = pos;
  699|    228|			elems->ssid_list_len = elen;
  700|    228|			break;
  701|    212|		case WLAN_EID_AMPE:
  ------------------
  |  |  434|    212|#define WLAN_EID_AMPE 139
  ------------------
  |  Branch (701:3): [True: 212, False: 65.5k]
  ------------------
  702|    212|			elems->ampe = pos;
  703|    212|			elems->ampe_len = elen;
  704|    212|			break;
  705|    210|		case WLAN_EID_MIC:
  ------------------
  |  |  435|    210|#define WLAN_EID_MIC 140
  ------------------
  |  Branch (705:3): [True: 210, False: 65.5k]
  ------------------
  706|    210|			elems->mic = pos;
  707|    210|			elems->mic_len = elen;
  708|    210|			if (elems->stop_at_mic) {
  ------------------
  |  Branch (708:8): [True: 0, False: 210]
  ------------------
  709|       |				/* After MIC everything is encrypted, so stop.
  710|       |				 */
  711|      0|				goto done;
  712|      0|			}
  713|    210|			break;
  714|    314|		case WLAN_EID_MULTI_BAND:
  ------------------
  |  |  450|    314|#define WLAN_EID_MULTI_BAND 158
  ------------------
  |  Branch (714:3): [True: 314, False: 65.4k]
  ------------------
  715|    314|			if (elems->mb_ies.nof_ies >= MAX_NOF_MB_IES_SUPPORTED) {
  ------------------
  |  |   58|    314|#define MAX_NOF_MB_IES_SUPPORTED 5
  ------------------
  |  Branch (715:8): [True: 208, False: 106]
  ------------------
  716|    208|				wpa_printf(MSG_MSGDUMP,
  717|    208|					   "IEEE 802.11 element parse ignored MB IE (id=%d elen=%d)",
  718|    208|					   id, elen);
  719|    208|				break;
  720|    208|			}
  721|       |
  722|    106|			elems->mb_ies.ies[elems->mb_ies.nof_ies].ie = pos;
  723|    106|			elems->mb_ies.ies[elems->mb_ies.nof_ies].ie_len = elen;
  724|    106|			elems->mb_ies.nof_ies++;
  725|    106|			break;
  726|    235|		case WLAN_EID_SUPPORTED_OPERATING_CLASSES:
  ------------------
  |  |  362|    235|#define WLAN_EID_SUPPORTED_OPERATING_CLASSES 59
  ------------------
  |  Branch (726:3): [True: 235, False: 65.5k]
  ------------------
  727|    235|			elems->supp_op_classes = pos;
  728|    235|			elems->supp_op_classes_len = elen;
  729|    235|			break;
  730|    518|		case WLAN_EID_RRM_ENABLED_CAPABILITIES:
  ------------------
  |  |  373|    518|#define WLAN_EID_RRM_ENABLED_CAPABILITIES 70
  ------------------
  |  Branch (730:3): [True: 518, False: 65.2k]
  ------------------
  731|    518|			elems->rrm_enabled = pos;
  732|    518|			elems->rrm_enabled_len = elen;
  733|    518|			break;
  734|    857|		case WLAN_EID_MULTIPLE_BSSID:
  ------------------
  |  |  374|    857|#define WLAN_EID_MULTIPLE_BSSID 71
  ------------------
  |  Branch (734:3): [True: 857, False: 64.8k]
  ------------------
  735|    857|			if (elen < 1)
  ------------------
  |  Branch (735:8): [True: 585, False: 272]
  ------------------
  736|    585|				break;
  737|    272|			elems->mbssid = pos;
  738|    272|			elems->mbssid_len = elen;
  739|    272|			break;
  740|    203|		case WLAN_EID_CAG_NUMBER:
  ------------------
  |  |  499|    203|#define WLAN_EID_CAG_NUMBER 237
  ------------------
  |  Branch (740:3): [True: 203, False: 65.5k]
  ------------------
  741|    203|			elems->cag_number = pos;
  742|    203|			elems->cag_number_len = elen;
  743|    203|			break;
  744|    461|		case WLAN_EID_AP_CSN:
  ------------------
  |  |  500|    461|#define WLAN_EID_AP_CSN 239
  ------------------
  |  Branch (744:3): [True: 461, False: 65.2k]
  ------------------
  745|    461|			if (elen < 1)
  ------------------
  |  Branch (745:8): [True: 251, False: 210]
  ------------------
  746|    251|				break;
  747|    210|			elems->ap_csn = pos;
  748|    210|			break;
  749|    429|		case WLAN_EID_FILS_INDICATION:
  ------------------
  |  |  501|    429|#define WLAN_EID_FILS_INDICATION 240
  ------------------
  |  Branch (749:3): [True: 429, False: 65.3k]
  ------------------
  750|    429|			if (elen < 2)
  ------------------
  |  Branch (750:8): [True: 211, False: 218]
  ------------------
  751|    211|				break;
  752|    218|			elems->fils_indic = pos;
  753|    218|			elems->fils_indic_len = elen;
  754|    218|			break;
  755|    524|		case WLAN_EID_DILS:
  ------------------
  |  |  502|    524|#define WLAN_EID_DILS 241
  ------------------
  |  Branch (755:3): [True: 524, False: 65.2k]
  ------------------
  756|    524|			if (elen < 2)
  ------------------
  |  Branch (756:8): [True: 312, False: 212]
  ------------------
  757|    312|				break;
  758|    212|			elems->dils = pos;
  759|    212|			elems->dils_len = elen;
  760|    212|			break;
  761|    588|		case WLAN_EID_S1G_CAPABILITIES:
  ------------------
  |  |  495|    588|#define WLAN_EID_S1G_CAPABILITIES 217
  ------------------
  |  Branch (761:3): [True: 588, False: 65.1k]
  ------------------
  762|    588|			if (elen < 15)
  ------------------
  |  Branch (762:8): [True: 265, False: 323]
  ------------------
  763|    265|				break;
  764|    323|			elems->s1g_capab = pos;
  765|    323|			break;
  766|    578|		case WLAN_EID_FRAGMENT:
  ------------------
  |  |  503|    578|#define WLAN_EID_FRAGMENT 242
  ------------------
  |  Branch (766:3): [True: 578, False: 65.1k]
  ------------------
  767|    578|			wpa_printf(MSG_MSGDUMP,
  768|    578|				   "Fragment without a valid last element - skip");
  769|       |
  770|    578|			break;
  771|  15.5k|		case WLAN_EID_EXTENSION:
  ------------------
  |  |  505|  15.5k|#define WLAN_EID_EXTENSION 255
  ------------------
  |  Branch (771:3): [True: 15.5k, False: 50.2k]
  ------------------
  772|  15.5k|			if (ieee802_11_parse_extension(pos, elen, elems, start,
  ------------------
  |  Branch (772:8): [True: 1.79k, False: 13.7k]
  ------------------
  773|  15.5k|						       len, show_errors))
  774|  1.79k|				unknown++;
  775|  15.5k|			break;
  776|  9.87k|		default:
  ------------------
  |  Branch (776:3): [True: 9.87k, False: 55.8k]
  ------------------
  777|  9.87k|			unknown++;
  778|  9.87k|			if (!show_errors)
  ------------------
  |  Branch (778:8): [True: 0, False: 9.87k]
  ------------------
  779|      0|				break;
  780|  9.87k|			wpa_printf(MSG_MSGDUMP, "IEEE 802.11 element parse "
  781|  9.87k|				   "ignored unknown element (id=%d elen=%d)",
  782|  9.87k|				   id, elen);
  783|  9.87k|			break;
  784|  65.7k|		}
  785|       |
  786|  65.7k|		if (elen == 255 && total_len)
  ------------------
  |  Branch (786:7): [True: 1.21k, False: 64.5k]
  |  Branch (786:22): [True: 234, False: 976]
  ------------------
  787|    234|			*total_len += ieee802_11_fragments_length(
  788|    234|				elems, pos + elen,
  789|    234|				(start + len) - (pos + elen));
  790|       |
  791|  65.7k|	}
  792|       |
  793|  4.92k|	if (!for_each_element_completed(elem, start, len)) {
  ------------------
  |  Branch (793:6): [True: 1.59k, False: 3.33k]
  ------------------
  794|  1.59k|		if (show_errors) {
  ------------------
  |  Branch (794:7): [True: 1.59k, False: 0]
  ------------------
  795|  1.59k|			wpa_printf(MSG_DEBUG,
  796|  1.59k|				   "IEEE 802.11 element parse failed @%d",
  797|  1.59k|				   (int) (start + len - (const u8 *) elem));
  798|  1.59k|			wpa_hexdump(MSG_MSGDUMP, "IEs", start, len);
  799|  1.59k|		}
  800|  1.59k|		return ParseFailed;
  801|  1.59k|	}
  802|       |
  803|  3.33k|done:
  804|  3.33k|	return unknown ? ParseUnknown : ParseOK;
  ------------------
  |  Branch (804:9): [True: 597, False: 2.73k]
  ------------------
  805|  4.92k|}
ieee802_11_common.c:ieee802_11_parse_ext_len_elem:
  489|    985|{
  490|    985|	u16 id, info_len;
  491|    985|	const u8 *pos;
  492|       |
  493|    985|	id = le_to_host16(elem->ext_id);
  ------------------
  |  |  175|    985|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
  494|    985|	info_len = le_to_host16(elem->datalen);
  ------------------
  |  |  175|    985|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
  495|    985|	pos = elem->data;
  496|       |
  497|    985|	switch (id) {
  498|    613|	case WLAN_EID_EXT_LEN_PQC_PARAMETER:
  ------------------
  |  |  567|    613|#define WLAN_EID_EXT_LEN_PQC_PARAMETER 0
  ------------------
  |  Branch (498:2): [True: 613, False: 372]
  ------------------
  499|       |		/* The elements contains at least the Security Profile Number
  500|       |		 * and Content Presence fields. */
  501|    613|		if (info_len < 2)
  ------------------
  |  Branch (501:7): [True: 326, False: 287]
  ------------------
  502|    326|			break;
  503|       |
  504|    287|		elems->pqc_parameter = pos;
  505|    287|		elems->pqc_parameter_len = info_len;
  506|    287|		break;
  507|    372|	default:
  ------------------
  |  Branch (507:2): [True: 372, False: 613]
  ------------------
  508|    372|		if (show_errors) {
  ------------------
  |  Branch (508:7): [True: 372, False: 0]
  ------------------
  509|    372|			wpa_printf(MSG_MSGDUMP,
  510|    372|				   "IEEE 802.11 element parsing ignored unknown extended length element (id=%u elen=%u)",
  511|    372|				   id, info_len);
  512|    372|		}
  513|    372|		return -1;
  514|    985|	}
  515|       |
  516|    613|	return 0;
  517|    985|}
ieee802_11_common.c:ieee802_11_parse_vendor_specific:
   23|  13.0k|{
   24|  13.0k|	unsigned int oui;
   25|       |
   26|       |	/* first 3 bytes in vendor specific information element are the IEEE
   27|       |	 * OUI of the vendor. The following byte is used a vendor specific
   28|       |	 * sub-type. */
   29|  13.0k|	if (elen < 4) {
  ------------------
  |  Branch (29:6): [True: 4.75k, False: 8.24k]
  ------------------
   30|  4.75k|		if (show_errors) {
  ------------------
  |  Branch (30:7): [True: 4.75k, False: 0]
  ------------------
   31|  4.75k|			wpa_printf(MSG_MSGDUMP, "short vendor specific "
   32|  4.75k|				   "information element ignored (len=%lu)",
   33|  4.75k|				   (unsigned long) elen);
   34|  4.75k|		}
   35|  4.75k|		return -1;
   36|  4.75k|	}
   37|       |
   38|  8.24k|	oui = WPA_GET_BE24(pos);
   39|  8.24k|	switch (oui) {
   40|  1.89k|	case OUI_MICROSOFT:
  ------------------
  |  | 1569|  1.89k|#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
  ------------------
  |  Branch (40:2): [True: 1.89k, False: 6.35k]
  ------------------
   41|       |		/* Microsoft/Wi-Fi information elements are further typed and
   42|       |		 * subtyped */
   43|  1.89k|		switch (pos[3]) {
   44|    237|		case 1:
  ------------------
  |  Branch (44:3): [True: 237, False: 1.65k]
  ------------------
   45|       |			/* Microsoft OUI (00:50:F2) with OUI Type 1:
   46|       |			 * real WPA information element */
   47|    237|			elems->wpa_ie = pos;
   48|    237|			elems->wpa_ie_len = elen;
   49|    237|			break;
   50|  1.11k|		case WMM_OUI_TYPE:
  ------------------
  |  | 1625|  1.11k|#define WMM_OUI_TYPE 2
  ------------------
  |  Branch (50:3): [True: 1.11k, False: 778]
  ------------------
   51|       |			/* WMM information element */
   52|  1.11k|			if (elen < 5) {
  ------------------
  |  Branch (52:8): [True: 194, False: 919]
  ------------------
   53|    194|				wpa_printf(MSG_MSGDUMP, "short WMM "
   54|    194|					   "information element ignored "
   55|    194|					   "(len=%lu)",
   56|    194|					   (unsigned long) elen);
   57|    194|				return -1;
   58|    194|			}
   59|    919|			switch (pos[4]) {
   60|    196|			case WMM_OUI_SUBTYPE_INFORMATION_ELEMENT:
  ------------------
  |  | 1626|    196|#define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0
  ------------------
  |  Branch (60:4): [True: 196, False: 723]
  ------------------
   61|    417|			case WMM_OUI_SUBTYPE_PARAMETER_ELEMENT:
  ------------------
  |  | 1627|    417|#define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1
  ------------------
  |  Branch (61:4): [True: 221, False: 698]
  ------------------
   62|       |				/*
   63|       |				 * Share same pointer since only one of these
   64|       |				 * is used and they start with same data.
   65|       |				 * Length field can be used to distinguish the
   66|       |				 * IEs.
   67|       |				 */
   68|    417|				elems->wmm = pos;
   69|    417|				elems->wmm_len = elen;
   70|    417|				break;
   71|    305|			case WMM_OUI_SUBTYPE_TSPEC_ELEMENT:
  ------------------
  |  | 1628|    305|#define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2
  ------------------
  |  Branch (71:4): [True: 305, False: 614]
  ------------------
   72|    305|				elems->wmm_tspec = pos;
   73|    305|				elems->wmm_tspec_len = elen;
   74|    305|				break;
   75|    197|			default:
  ------------------
  |  Branch (75:4): [True: 197, False: 722]
  ------------------
   76|    197|				wpa_printf(MSG_EXCESSIVE, "unknown WMM "
   77|    197|					   "information element ignored "
   78|    197|					   "(subtype=%d len=%lu)",
   79|    197|					   pos[4], (unsigned long) elen);
   80|    197|				return -1;
   81|    919|			}
   82|    722|			break;
   83|    722|		case 4:
  ------------------
  |  Branch (83:3): [True: 195, False: 1.69k]
  ------------------
   84|       |			/* Wi-Fi Protected Setup (WPS) IE */
   85|    195|			elems->wps_ie = pos;
   86|    195|			elems->wps_ie_len = elen;
   87|    195|			break;
   88|    346|		default:
  ------------------
  |  Branch (88:3): [True: 346, False: 1.54k]
  ------------------
   89|    346|			wpa_printf(MSG_EXCESSIVE, "Unknown Microsoft "
   90|    346|				   "information element ignored "
   91|    346|				   "(type=%d len=%lu)",
   92|    346|				   pos[3], (unsigned long) elen);
   93|    346|			return -1;
   94|  1.89k|		}
   95|  1.15k|		break;
   96|       |
   97|  3.96k|	case OUI_WFA:
  ------------------
  |  | 1574|  3.96k|#define OUI_WFA 0x506f9a
  ------------------
  |  Branch (97:2): [True: 3.96k, False: 4.28k]
  ------------------
   98|  3.96k|		switch (pos[3]) {
   99|    217|		case P2P_OUI_TYPE:
  ------------------
  |  | 1865|    217|#define P2P_OUI_TYPE 9
  ------------------
  |  Branch (99:3): [True: 217, False: 3.75k]
  ------------------
  100|       |			/* Wi-Fi Alliance - P2P IE */
  101|    217|			elems->p2p = pos;
  102|    217|			elems->p2p_len = elen;
  103|    217|			break;
  104|    198|		case WFD_OUI_TYPE:
  ------------------
  |  | 1578|    198|#define WFD_OUI_TYPE 10
  ------------------
  |  Branch (104:3): [True: 198, False: 3.76k]
  ------------------
  105|       |			/* Wi-Fi Alliance - WFD IE */
  106|    198|			elems->wfd = pos;
  107|    198|			elems->wfd_len = elen;
  108|    198|			break;
  109|    219|		case HS20_INDICATION_OUI_TYPE:
  ------------------
  |  | 1740|    219|#define HS20_INDICATION_OUI_TYPE 16
  ------------------
  |  Branch (109:3): [True: 219, False: 3.74k]
  ------------------
  110|       |			/* Hotspot 2.0 */
  111|    219|			elems->hs20 = pos;
  112|    219|			elems->hs20_len = elen;
  113|    219|			break;
  114|    203|		case MBO_OUI_TYPE:
  ------------------
  |  | 1586|    203|#define MBO_OUI_TYPE 22
  ------------------
  |  Branch (114:3): [True: 203, False: 3.76k]
  ------------------
  115|       |			/* MBO-OCE */
  116|    203|			elems->mbo = pos;
  117|    203|			elems->mbo_len = elen;
  118|    203|			break;
  119|    194|		case HS20_ROAMING_CONS_SEL_OUI_TYPE:
  ------------------
  |  | 1742|    194|#define HS20_ROAMING_CONS_SEL_OUI_TYPE 29
  ------------------
  |  Branch (119:3): [True: 194, False: 3.77k]
  ------------------
  120|       |			/* Hotspot 2.0 Roaming Consortium Selection */
  121|    194|			elems->roaming_cons_sel = pos;
  122|    194|			elems->roaming_cons_sel_len = elen;
  123|    194|			break;
  124|    194|		case MULTI_AP_OUI_TYPE:
  ------------------
  |  | 1589|    194|#define MULTI_AP_OUI_TYPE 0x1B
  ------------------
  |  Branch (124:3): [True: 194, False: 3.77k]
  ------------------
  125|    194|			elems->multi_ap = pos;
  126|    194|			elems->multi_ap_len = elen;
  127|    194|			break;
  128|    202|		case OWE_OUI_TYPE:
  ------------------
  |  | 1588|    202|#define OWE_OUI_TYPE 28
  ------------------
  |  Branch (128:3): [True: 202, False: 3.76k]
  ------------------
  129|       |			/* OWE Transition Mode element */
  130|    202|			break;
  131|    196|		case DPP_CC_OUI_TYPE:
  ------------------
  |  | 1591|    196|#define DPP_CC_OUI_TYPE 0x1e
  ------------------
  |  Branch (131:3): [True: 196, False: 3.77k]
  ------------------
  132|       |			/* DPP Configurator Connectivity element */
  133|    196|			break;
  134|    250|		case SAE_PK_OUI_TYPE:
  ------------------
  |  | 1593|    250|#define SAE_PK_OUI_TYPE 0x1f
  ------------------
  |  Branch (134:3): [True: 250, False: 3.71k]
  ------------------
  135|    250|			elems->sae_pk = pos + 4;
  136|    250|			elems->sae_pk_len = elen - 4;
  137|    250|			break;
  138|    196|		case WFA_CAPA_OUI_TYPE:
  ------------------
  |  | 1597|    196|#define WFA_CAPA_OUI_TYPE 0x23
  ------------------
  |  Branch (138:3): [True: 196, False: 3.77k]
  ------------------
  139|    196|			elems->wfa_capab = pos + 4;
  140|    196|			elems->wfa_capab_len = elen - 4;
  141|    196|			break;
  142|    194|		case WFA_RSNE_OVERRIDE_OUI_TYPE:
  ------------------
  |  | 1598|    194|#define WFA_RSNE_OVERRIDE_OUI_TYPE 0x29
  ------------------
  |  Branch (142:3): [True: 194, False: 3.77k]
  ------------------
  143|    194|			elems->rsne_override = pos;
  144|    194|			elems->rsne_override_len = elen;
  145|    194|			break;
  146|    194|		case WFA_RSNE_OVERRIDE_2_OUI_TYPE:
  ------------------
  |  | 1599|    194|#define WFA_RSNE_OVERRIDE_2_OUI_TYPE 0x2a
  ------------------
  |  Branch (146:3): [True: 194, False: 3.77k]
  ------------------
  147|    194|			elems->rsne_override_2 = pos;
  148|    194|			elems->rsne_override_2_len = elen;
  149|    194|			break;
  150|    195|		case WFA_RSNXE_OVERRIDE_OUI_TYPE:
  ------------------
  |  | 1600|    195|#define WFA_RSNXE_OVERRIDE_OUI_TYPE 0x2b
  ------------------
  |  Branch (150:3): [True: 195, False: 3.77k]
  ------------------
  151|    195|			elems->rsnxe_override = pos;
  152|    195|			elems->rsnxe_override_len = elen;
  153|    195|			break;
  154|    397|		case WFA_RSN_SELECTION_OUI_TYPE:
  ------------------
  |  | 1601|    397|#define WFA_RSN_SELECTION_OUI_TYPE 0x2c
  ------------------
  |  Branch (154:3): [True: 397, False: 3.57k]
  ------------------
  155|    397|			if (elen < 4 + 1) {
  ------------------
  |  Branch (155:8): [True: 194, False: 203]
  ------------------
  156|    194|				wpa_printf(MSG_DEBUG,
  157|    194|					   "Too short RSN Selection element ignored");
  158|    194|				return -1;
  159|    194|			}
  160|    203|			elems->rsn_selection = pos + 4;
  161|    203|			elems->rsn_selection_len = elen - 4;
  162|    203|			break;
  163|    310|		case P2P2_OUI_TYPE:
  ------------------
  |  | 1866|    310|#define P2P2_OUI_TYPE 0x28
  ------------------
  |  Branch (163:3): [True: 310, False: 3.65k]
  ------------------
  164|       |			/* Wi-Fi Alliance - P2P2 IE */
  165|    310|			elems->p2p2_ie = pos;
  166|    310|			elems->p2p2_ie_len = elen;
  167|    310|			break;
  168|    196|		case PR_OUI_TYPE:
  ------------------
  |  | 1608|    196|#define PR_OUI_TYPE 0x2e
  ------------------
  |  Branch (168:3): [True: 196, False: 3.77k]
  ------------------
  169|       |			/* Wi-Fi Alliance - Proximity Ranging element */
  170|    196|			elems->proximity_ranging = pos;
  171|    196|			elems->proximity_ranging_len = elen;
  172|    196|			break;
  173|    208|		case NAN_SDF_OUI_TYPE:
  ------------------
  |  | 1582|    208|#define NAN_SDF_OUI_TYPE 0x13
  ------------------
  |  Branch (173:3): [True: 208, False: 3.75k]
  ------------------
  174|       |			/* Wi-Fi Alliance - NAN IE */
  175|    208|			elems->nan_ie = pos;
  176|    208|			elems->nan_len = elen;
  177|    208|			break;
  178|    204|		default:
  ------------------
  |  Branch (178:3): [True: 204, False: 3.76k]
  ------------------
  179|    204|			wpa_printf(MSG_MSGDUMP, "Unknown WFA "
  180|    204|				   "information element ignored "
  181|    204|				   "(type=%d len=%lu)",
  182|    204|				   pos[3], (unsigned long) elen);
  183|    204|			return -1;
  184|  3.96k|		}
  185|  3.56k|		break;
  186|       |
  187|  3.56k|	case OUI_BROADCOM:
  ------------------
  |  | 2072|  1.38k|#define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */
  ------------------
  |  Branch (187:2): [True: 1.38k, False: 6.86k]
  ------------------
  188|  1.38k|		switch (pos[3]) {
  189|    246|		case VENDOR_HT_CAPAB_OUI_TYPE:
  ------------------
  |  | 2077|    246|#define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
  ------------------
  |  Branch (189:3): [True: 246, False: 1.13k]
  ------------------
  190|    246|			elems->vendor_ht_cap = pos;
  191|    246|			elems->vendor_ht_cap_len = elen;
  192|    246|			break;
  193|    841|		case VENDOR_VHT_TYPE:
  ------------------
  |  | 2073|    841|#define VENDOR_VHT_TYPE		0x04
  ------------------
  |  Branch (193:3): [True: 841, False: 543]
  ------------------
  194|    841|			if (elen > 4 &&
  ------------------
  |  Branch (194:8): [True: 610, False: 231]
  ------------------
  195|    610|			    (pos[4] == VENDOR_VHT_SUBTYPE ||
  ------------------
  |  | 2074|  1.22k|#define VENDOR_VHT_SUBTYPE	0x08
  ------------------
  |  Branch (195:9): [True: 200, False: 410]
  ------------------
  196|    410|			     pos[4] == VENDOR_VHT_SUBTYPE2)) {
  ------------------
  |  | 2075|    410|#define VENDOR_VHT_SUBTYPE2	0x00
  ------------------
  |  Branch (196:9): [True: 194, False: 216]
  ------------------
  197|    394|				elems->vendor_vht = pos;
  198|    394|				elems->vendor_vht_len = elen;
  199|    394|			} else
  200|    447|				return -1;
  201|    394|			break;
  202|    394|		default:
  ------------------
  |  Branch (202:3): [True: 297, False: 1.08k]
  ------------------
  203|    297|			wpa_printf(MSG_EXCESSIVE, "Unknown Broadcom "
  204|    297|				   "information element ignored "
  205|    297|				   "(type=%d len=%lu)",
  206|    297|				   pos[3], (unsigned long) elen);
  207|    297|			return -1;
  208|  1.38k|		}
  209|    640|		break;
  210|       |
  211|    640|	case OUI_QCA:
  ------------------
  |  |   21|    498|#define OUI_QCA 0x001374
  ------------------
  |  Branch (211:2): [True: 498, False: 7.75k]
  ------------------
  212|    498|		switch (pos[3]) {
  213|    205|		case QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST:
  ------------------
  |  Branch (213:3): [True: 205, False: 293]
  ------------------
  214|    205|			elems->pref_freq_list = pos;
  215|    205|			elems->pref_freq_list_len = elen;
  216|    205|			break;
  217|    293|		default:
  ------------------
  |  Branch (217:3): [True: 293, False: 205]
  ------------------
  218|    293|			wpa_printf(MSG_EXCESSIVE,
  219|    293|				   "Unknown QCA information element ignored (type=%d len=%lu)",
  220|    293|				   pos[3], (unsigned long) elen);
  221|    293|			return -1;
  222|    498|		}
  223|    205|		break;
  224|       |
  225|    508|	default:
  ------------------
  |  Branch (225:2): [True: 508, False: 7.74k]
  ------------------
  226|    508|		wpa_printf(MSG_EXCESSIVE, "unknown vendor specific "
  227|    508|			   "information element ignored (vendor OUI "
  228|    508|			   "%02x:%02x:%02x len=%lu)",
  229|    508|			   pos[0], pos[1], pos[2], (unsigned long) elen);
  230|    508|		return -1;
  231|  8.24k|	}
  232|       |
  233|  5.56k|	return 0;
  234|  8.24k|}
ieee802_11_common.c:ieee802_11_parse_extension:
  304|  15.5k|{
  305|  15.5k|	u8 ext_id;
  306|  15.5k|	size_t *total_len = NULL;
  307|       |
  308|  15.5k|	if (elen < 1) {
  ------------------
  |  Branch (308:6): [True: 874, False: 14.6k]
  ------------------
  309|    874|		if (show_errors) {
  ------------------
  |  Branch (309:7): [True: 874, False: 0]
  ------------------
  310|    874|			wpa_printf(MSG_MSGDUMP,
  311|    874|				   "short information element (Ext)");
  312|    874|		}
  313|    874|		return -1;
  314|    874|	}
  315|       |
  316|  14.6k|	ext_id = *pos++;
  317|  14.6k|	elen--;
  318|       |
  319|  14.6k|	switch (ext_id) {
  320|    537|	case WLAN_EID_EXT_ASSOC_DELAY_INFO:
  ------------------
  |  |  508|    537|#define WLAN_EID_EXT_ASSOC_DELAY_INFO 1
  ------------------
  |  Branch (320:2): [True: 537, False: 14.0k]
  ------------------
  321|    537|		if (elen != 1)
  ------------------
  |  Branch (321:7): [True: 332, False: 205]
  ------------------
  322|    332|			break;
  323|    205|		elems->assoc_delay_info = pos;
  324|    205|		break;
  325|    510|	case WLAN_EID_EXT_FILS_REQ_PARAMS:
  ------------------
  |  |  509|    510|#define WLAN_EID_EXT_FILS_REQ_PARAMS 2
  ------------------
  |  Branch (325:2): [True: 510, False: 14.1k]
  ------------------
  326|    510|		if (elen < 3)
  ------------------
  |  Branch (326:7): [True: 220, False: 290]
  ------------------
  327|    220|			break;
  328|    290|		elems->fils_req_params = pos;
  329|    290|		elems->fils_req_params_len = elen;
  330|    290|		break;
  331|    209|	case WLAN_EID_EXT_FILS_KEY_CONFIRM:
  ------------------
  |  |  510|    209|#define WLAN_EID_EXT_FILS_KEY_CONFIRM 3
  ------------------
  |  Branch (331:2): [True: 209, False: 14.4k]
  ------------------
  332|    209|		elems->fils_key_confirm = pos;
  333|    209|		elems->fils_key_confirm_len = elen;
  334|    209|		break;
  335|    433|	case WLAN_EID_EXT_FILS_SESSION:
  ------------------
  |  |  511|    433|#define WLAN_EID_EXT_FILS_SESSION 4
  ------------------
  |  Branch (335:2): [True: 433, False: 14.1k]
  ------------------
  336|    433|		if (elen != FILS_SESSION_LEN)
  ------------------
  |  | 1063|    433|#define FILS_SESSION_LEN 8
  ------------------
  |  Branch (336:7): [True: 221, False: 212]
  ------------------
  337|    221|			break;
  338|    212|		elems->fils_session = pos;
  339|    212|		break;
  340|    484|	case WLAN_EID_EXT_FILS_HLP_CONTAINER:
  ------------------
  |  |  512|    484|#define WLAN_EID_EXT_FILS_HLP_CONTAINER 5
  ------------------
  |  Branch (340:2): [True: 484, False: 14.1k]
  ------------------
  341|    484|		if (elen < 2 * ETH_ALEN)
  ------------------
  |  |  344|    484|#define ETH_ALEN 6
  ------------------
  |  Branch (341:7): [True: 249, False: 235]
  ------------------
  342|    249|			break;
  343|    235|		elems->fils_hlp = pos;
  344|    235|		elems->fils_hlp_len = elen;
  345|    235|		total_len = &elems->fils_hlp_len;
  346|    235|		break;
  347|    456|	case WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN:
  ------------------
  |  |  513|    456|#define WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN 6
  ------------------
  |  Branch (347:2): [True: 456, False: 14.1k]
  ------------------
  348|    456|		if (elen < 1)
  ------------------
  |  Branch (348:7): [True: 240, False: 216]
  ------------------
  349|    240|			break;
  350|    216|		elems->fils_ip_addr_assign = pos;
  351|    216|		elems->fils_ip_addr_assign_len = elen;
  352|    216|		break;
  353|    510|	case WLAN_EID_EXT_KEY_DELIVERY:
  ------------------
  |  |  514|    510|#define WLAN_EID_EXT_KEY_DELIVERY 7
  ------------------
  |  Branch (353:2): [True: 510, False: 14.1k]
  ------------------
  354|    510|		if (elen < WPA_KEY_RSC_LEN)
  ------------------
  |  |   24|    510|#define WPA_KEY_RSC_LEN 8
  ------------------
  |  Branch (354:7): [True: 211, False: 299]
  ------------------
  355|    211|			break;
  356|    299|		elems->key_delivery = pos;
  357|    299|		elems->key_delivery_len = elen;
  358|    299|		total_len = &elems->key_delivery_len;
  359|    299|		break;
  360|    261|	case WLAN_EID_EXT_WRAPPED_DATA:
  ------------------
  |  |  515|    261|#define WLAN_EID_EXT_WRAPPED_DATA 8
  ------------------
  |  Branch (360:2): [True: 261, False: 14.3k]
  ------------------
  361|    261|		elems->wrapped_data = pos;
  362|    261|		elems->wrapped_data_len = elen;
  363|    261|		total_len = &elems->wrapped_data_len;
  364|    261|		break;
  365|    453|	case WLAN_EID_EXT_FILS_PUBLIC_KEY:
  ------------------
  |  |  519|    453|#define WLAN_EID_EXT_FILS_PUBLIC_KEY 12
  ------------------
  |  Branch (365:2): [True: 453, False: 14.1k]
  ------------------
  366|    453|		if (elen < 1)
  ------------------
  |  Branch (366:7): [True: 218, False: 235]
  ------------------
  367|    218|			break;
  368|    235|		elems->fils_pk = pos;
  369|    235|		elems->fils_pk_len = elen;
  370|    235|		break;
  371|    525|	case WLAN_EID_EXT_NONCE:
  ------------------
  |  |  520|    525|#define WLAN_EID_EXT_NONCE 13
  ------------------
  |  Branch (371:2): [True: 525, False: 14.1k]
  ------------------
  372|    525|		if (elen < NONCE_LEN)
  ------------------
  |  | 1062|    525|#define NONCE_LEN 16
  ------------------
  |  Branch (372:7): [True: 237, False: 288]
  ------------------
  373|    237|			break;
  374|    288|		elems->nonce = pos;
  375|    288|		elems->nonce_len = elen;
  376|    288|		break;
  377|    424|	case WLAN_EID_EXT_OWE_DH_PARAM:
  ------------------
  |  |  522|    424|#define WLAN_EID_EXT_OWE_DH_PARAM 32
  ------------------
  |  Branch (377:2): [True: 424, False: 14.2k]
  ------------------
  378|    424|		if (elen < 2)
  ------------------
  |  Branch (378:7): [True: 204, False: 220]
  ------------------
  379|    204|			break;
  380|    220|		elems->owe_dh = pos;
  381|    220|		elems->owe_dh_len = elen;
  382|    220|		break;
  383|    218|	case WLAN_EID_EXT_PASSWORD_IDENTIFIER:
  ------------------
  |  |  523|    218|#define WLAN_EID_EXT_PASSWORD_IDENTIFIER 33
  ------------------
  |  Branch (383:2): [True: 218, False: 14.4k]
  ------------------
  384|    218|		elems->password_id = pos;
  385|    218|		elems->password_id_len = elen;
  386|    218|		break;
  387|    545|	case WLAN_EID_EXT_HE_CAPABILITIES:
  ------------------
  |  |  524|    545|#define WLAN_EID_EXT_HE_CAPABILITIES 35
  ------------------
  |  Branch (387:2): [True: 545, False: 14.0k]
  ------------------
  388|    545|		if (elen < HE_CAPABILITIES_ELEM_MIN_LEN)
  ------------------
  |  | 2645|    545|#define HE_CAPABILITIES_ELEM_MIN_LEN		21
  ------------------
  |  Branch (388:7): [True: 215, False: 330]
  ------------------
  389|    215|			break;
  390|    330|		elems->he_capabilities = pos;
  391|    330|		elems->he_capabilities_len = elen;
  392|    330|		break;
  393|    450|	case WLAN_EID_EXT_HE_OPERATION:
  ------------------
  |  |  525|    450|#define WLAN_EID_EXT_HE_OPERATION 36
  ------------------
  |  Branch (393:2): [True: 450, False: 14.1k]
  ------------------
  394|    450|		if (elen < HE_OPERATION_ELEM_MIN_LEN)
  ------------------
  |  | 2699|    450|#define HE_OPERATION_ELEM_MIN_LEN				6
  ------------------
  |  Branch (394:7): [True: 235, False: 215]
  ------------------
  395|    235|			break;
  396|    215|		elems->he_operation = pos;
  397|    215|		elems->he_operation_len = elen;
  398|    215|		break;
  399|    197|	case WLAN_EID_EXT_OCV_OCI:
  ------------------
  |  |  530|    197|#define WLAN_EID_EXT_OCV_OCI 54
  ------------------
  |  Branch (399:2): [True: 197, False: 14.4k]
  ------------------
  400|    197|		elems->oci = pos;
  401|    197|		elems->oci_len = elen;
  402|    197|		break;
  403|    229|	case WLAN_EID_EXT_SHORT_SSID_LIST:
  ------------------
  |  |  534|    229|#define WLAN_EID_EXT_SHORT_SSID_LIST 58
  ------------------
  |  Branch (403:2): [True: 229, False: 14.4k]
  ------------------
  404|    229|		elems->short_ssid_list = pos;
  405|    229|		elems->short_ssid_list_len = elen;
  406|    229|		break;
  407|    435|	case WLAN_EID_EXT_HE_6GHZ_BAND_CAP:
  ------------------
  |  |  535|    435|#define WLAN_EID_EXT_HE_6GHZ_BAND_CAP 59
  ------------------
  |  Branch (407:2): [True: 435, False: 14.1k]
  ------------------
  408|    435|		if (elen < sizeof(struct ieee80211_he_6ghz_band_cap))
  ------------------
  |  Branch (408:7): [True: 227, False: 208]
  ------------------
  409|    227|			break;
  410|    208|		elems->he_6ghz_band_cap = pos;
  411|    208|		break;
  412|    200|	case WLAN_EID_EXT_PASN_PARAMS:
  ------------------
  |  |  542|    200|#define WLAN_EID_EXT_PASN_PARAMS 100
  ------------------
  |  Branch (412:2): [True: 200, False: 14.4k]
  ------------------
  413|    200|		elems->pasn_params = pos;
  414|    200|		elems->pasn_params_len = elen;
  415|    200|		break;
  416|    416|	case WLAN_EID_EXT_EHT_CAPABILITIES:
  ------------------
  |  |  545|    416|#define WLAN_EID_EXT_EHT_CAPABILITIES 108
  ------------------
  |  Branch (416:2): [True: 416, False: 14.2k]
  ------------------
  417|    416|		if (elen < EHT_CAPABILITIES_ELEM_MIN_LEN)
  ------------------
  |  | 2846|    416|#define EHT_CAPABILITIES_ELEM_MIN_LEN             11
  ------------------
  |  Branch (417:7): [True: 213, False: 203]
  ------------------
  418|    213|			break;
  419|    203|		elems->eht_capabilities = pos;
  420|    203|		elems->eht_capabilities_len = elen;
  421|    203|		break;
  422|    550|	case WLAN_EID_EXT_EHT_OPERATION:
  ------------------
  |  |  543|    550|#define WLAN_EID_EXT_EHT_OPERATION 106
  ------------------
  |  Branch (422:2): [True: 550, False: 14.0k]
  ------------------
  423|    550|		if (elen < EHT_OPERATION_ELEM_MIN_LEN)
  ------------------
  |  | 2808|    550|#define EHT_OPERATION_ELEM_MIN_LEN                       5
  ------------------
  |  Branch (423:7): [True: 347, False: 203]
  ------------------
  424|    347|			break;
  425|    203|		elems->eht_operation = pos;
  426|    203|		elems->eht_operation_len = elen;
  427|    203|		break;
  428|  3.48k|	case WLAN_EID_EXT_MULTI_LINK:
  ------------------
  |  |  544|  3.48k|#define WLAN_EID_EXT_MULTI_LINK 107
  ------------------
  |  Branch (428:2): [True: 3.48k, False: 11.1k]
  ------------------
  429|  3.48k|		if (elen < 2)
  ------------------
  |  Branch (429:7): [True: 546, False: 2.94k]
  ------------------
  430|    546|			break;
  431|  2.94k|		if (ieee802_11_parse_mle(pos, elen, &total_len, elems,
  ------------------
  |  Branch (431:7): [True: 242, False: 2.70k]
  ------------------
  432|  2.94k|					 show_errors))
  433|    242|			return -1;
  434|  2.70k|		break;
  435|  2.70k|	case WLAN_EID_EXT_KNOWN_BSSID:
  ------------------
  |  |  533|    204|#define WLAN_EID_EXT_KNOWN_BSSID 57
  ------------------
  |  Branch (435:2): [True: 204, False: 14.4k]
  ------------------
  436|    204|		elems->mbssid_known_bss = pos;
  437|    204|		elems->mbssid_known_bss_len = elen;
  438|    204|		break;
  439|    230|	case WLAN_EID_EXT_PASN_ENCRYPTED_DATA:
  ------------------
  |  |  552|    230|#define WLAN_EID_EXT_PASN_ENCRYPTED_DATA 140
  ------------------
  |  Branch (439:2): [True: 230, False: 14.3k]
  ------------------
  440|    230|		elems->pasn_encrypted_data = pos;
  441|    230|		elems->pasn_encrypted_data_len = elen;
  442|    230|		break;
  443|    459|	case WLAN_EID_EXT_AKM_SUITE_SELECTOR:
  ------------------
  |  |  549|    459|#define WLAN_EID_EXT_AKM_SUITE_SELECTOR 114
  ------------------
  |  Branch (443:2): [True: 459, False: 14.1k]
  ------------------
  444|    459|		if (elen < RSN_SELECTOR_LEN)
  ------------------
  |  |   67|    459|#define RSN_SELECTOR_LEN 4
  ------------------
  |  Branch (444:7): [True: 258, False: 201]
  ------------------
  445|    258|			break;
  446|    201|		elems->akm_suite_selector = pos;
  447|    201|		elems->akm_suite_selector_len = elen;
  448|    201|		break;
  449|    691|	case WLAN_EID_EXT_SUPPORTED_GROUPS:
  ------------------
  |  |  562|    691|#define WLAN_EID_EXT_SUPPORTED_GROUPS 161
  ------------------
  |  Branch (449:2): [True: 691, False: 13.9k]
  ------------------
  450|    691|		if (elen < 2 || elen % 2 != 0)
  ------------------
  |  Branch (450:7): [True: 197, False: 494]
  |  Branch (450:19): [True: 295, False: 199]
  ------------------
  451|    492|			break;
  452|    199|		elems->supported_groups = pos;
  453|    199|		elems->supported_groups_len = elen;
  454|    199|		break;
  455|    195|	case WLAN_EID_EXT_UHR_CAPABILITIES:
  ------------------
  |  |  554|    195|#define WLAN_EID_EXT_UHR_CAPABILITIES 152
  ------------------
  |  Branch (455:2): [True: 195, False: 14.4k]
  ------------------
  456|    195|		elems->uhr_capabilities = pos;
  457|    195|		elems->uhr_capabilities_len = elen;
  458|    195|		break;
  459|    209|	case WLAN_EID_EXT_UHR_OPERATION:
  ------------------
  |  |  553|    209|#define WLAN_EID_EXT_UHR_OPERATION 151
  ------------------
  |  Branch (459:2): [True: 209, False: 14.4k]
  ------------------
  460|    209|		elems->uhr_operation = pos;
  461|    209|		elems->uhr_operation_len = elen;
  462|    209|		break;
  463|    431|	case WLAN_EID_EXT_SECURITY_PROFILE:
  ------------------
  |  |  563|    431|#define WLAN_EID_EXT_SECURITY_PROFILE 162
  ------------------
  |  Branch (463:2): [True: 431, False: 14.1k]
  ------------------
  464|    431|		if (elen < 2)
  ------------------
  |  Branch (464:7): [True: 205, False: 226]
  ------------------
  465|    205|			break;
  466|    226|		elems->security_profile = pos;
  467|    226|		elems->security_profile_len = elen;
  468|    226|		break;
  469|    680|	default:
  ------------------
  |  Branch (469:2): [True: 680, False: 13.9k]
  ------------------
  470|    680|		if (show_errors) {
  ------------------
  |  Branch (470:7): [True: 680, False: 0]
  ------------------
  471|    680|			wpa_printf(MSG_MSGDUMP,
  472|    680|				   "IEEE 802.11 element parsing ignored unknown element extension (ext_id=%u elen=%u)",
  473|    680|				   ext_id, (unsigned int) elen);
  474|    680|		}
  475|    680|		return -1;
  476|  14.6k|	}
  477|       |
  478|  13.7k|	if (elen == 254 && total_len)
  ------------------
  |  Branch (478:6): [True: 640, False: 13.0k]
  |  Branch (478:21): [True: 540, False: 100]
  ------------------
  479|    540|		*total_len += ieee802_11_fragments_length(
  480|    540|			elems, pos + elen, (start + len) - (pos + elen));
  481|       |
  482|  13.7k|	return 0;
  483|  14.6k|}
ieee802_11_common.c:ieee802_11_parse_mle:
  240|  2.94k|{
  241|  2.94k|	u8 mle_type = pos[0] & MULTI_LINK_CONTROL_TYPE_MASK;
  ------------------
  |  | 2923|  2.94k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  242|       |
  243|  2.94k|	switch (mle_type) {
  244|  1.71k|	case MULTI_LINK_CONTROL_TYPE_BASIC:
  ------------------
  |  | 2927|  1.71k|#define MULTI_LINK_CONTROL_TYPE_BASIC			0
  ------------------
  |  Branch (244:2): [True: 1.71k, False: 1.23k]
  ------------------
  245|  1.71k|		elems->basic_mle = pos;
  246|  1.71k|		elems->basic_mle_len = elen;
  247|  1.71k|		*total_len = &elems->basic_mle_len;
  248|  1.71k|		break;
  249|    210|	case MULTI_LINK_CONTROL_TYPE_PROBE_REQ:
  ------------------
  |  | 2928|    210|#define MULTI_LINK_CONTROL_TYPE_PROBE_REQ		1
  ------------------
  |  Branch (249:2): [True: 210, False: 2.73k]
  ------------------
  250|    210|		elems->probe_req_mle = pos;
  251|    210|		elems->probe_req_mle_len = elen;
  252|    210|		*total_len = &elems->probe_req_mle_len;
  253|    210|		break;
  254|    331|	case MULTI_LINK_CONTROL_TYPE_RECONF:
  ------------------
  |  | 2929|    331|#define MULTI_LINK_CONTROL_TYPE_RECONF			2
  ------------------
  |  Branch (254:2): [True: 331, False: 2.61k]
  ------------------
  255|    331|		elems->reconf_mle = pos;
  256|    331|		elems->reconf_mle_len = elen;
  257|    331|		*total_len = &elems->reconf_mle_len;
  258|    331|		break;
  259|    228|	case MULTI_LINK_CONTROL_TYPE_TDLS:
  ------------------
  |  | 2930|    228|#define MULTI_LINK_CONTROL_TYPE_TDLS			3
  ------------------
  |  Branch (259:2): [True: 228, False: 2.71k]
  ------------------
  260|    228|		elems->tdls_mle = pos;
  261|    228|		elems->tdls_mle_len = elen;
  262|    228|		*total_len = &elems->tdls_mle_len;
  263|    228|		break;
  264|    221|	case MULTI_LINK_CONTROL_TYPE_PRIOR_ACCESS:
  ------------------
  |  | 2931|    221|#define MULTI_LINK_CONTROL_TYPE_PRIOR_ACCESS		4
  ------------------
  |  Branch (264:2): [True: 221, False: 2.72k]
  ------------------
  265|    221|		elems->prior_access_mle = pos;
  266|    221|		elems->prior_access_mle_len = elen;
  267|    221|		*total_len = &elems->prior_access_mle_len;
  268|    221|		break;
  269|    242|	default:
  ------------------
  |  Branch (269:2): [True: 242, False: 2.70k]
  ------------------
  270|    242|		if (show_errors) {
  ------------------
  |  Branch (270:7): [True: 242, False: 0]
  ------------------
  271|    242|			wpa_printf(MSG_MSGDUMP,
  272|    242|				   "Unknown Multi-Link element type %u",
  273|    242|				   mle_type);
  274|    242|		}
  275|    242|		return -1;
  276|  2.94k|	}
  277|       |
  278|  2.70k|	return 0;
  279|  2.94k|}
ieee802_11_common.c:ieee802_11_fragments_length:
  284|    774|{
  285|    774|	const struct element *elem;
  286|    774|	size_t frags_len = 0;
  287|       |
  288|  10.0k|	for_each_element(elem, start, len) {
  ------------------
  |  |  395|    774|	for (_elem = (const struct element *) (_data);			\
  |  |  396|  10.3k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (396:7): [True: 10.1k, False: 232]
  |  |  ------------------
  |  |  397|  10.3k|		(int) sizeof(*_elem) &&					\
  |  |  398|  10.3k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (398:7): [True: 10.1k, False: 15]
  |  |  ------------------
  |  |  399|  10.1k|		(int) element_hdr_size(_elem) &&			\
  |  |  400|  10.3k|	     (const u8 *) (_data) + (_datalen) - (const u8 *) _elem >=	\
  |  |  ------------------
  |  |  |  Branch (400:7): [True: 10.0k, False: 107]
  |  |  ------------------
  |  |  401|  10.1k|		(int) (element_hdr_size(_elem) +			\
  |  |  402|  10.1k|		       element_datalen(_elem));				\
  |  |  403|  9.60k|	     _elem = element_next(_elem))
  ------------------
  289|  10.0k|		if (elem->id != WLAN_EID_FRAGMENT)
  ------------------
  |  |  503|  10.0k|#define WLAN_EID_FRAGMENT 242
  ------------------
  |  Branch (289:7): [True: 420, False: 9.60k]
  ------------------
  290|    420|			break;
  291|       |
  292|  9.60k|		frags_len += elem->datalen + 2;
  293|  9.60k|		elems->num_frag_elems++;
  294|  9.60k|	}
  295|       |
  296|    774|	return frags_len;
  297|    774|}
ieee802_11_common.c:ieee802_11_parse_link_profile:
 1109|  47.1k|{
 1110|  47.1k|	const struct ieee80211_eht_ml *ml;
 1111|  47.1k|	const u8 *pos;
 1112|  47.1k|	ParseRes res = ParseFailed;
 1113|  47.1k|	size_t len;
 1114|       |
 1115|  47.1k|	pos = wpabuf_head(mlbuf);
 1116|  47.1k|	len = wpabuf_len(mlbuf);
 1117|       |
 1118|       |	/* Must have control and common info length */
 1119|  47.1k|	if (len < sizeof(*ml) + 1 || len < sizeof(*ml) + pos[sizeof(*ml)])
  ------------------
  |  Branch (1119:6): [True: 1.65k, False: 45.4k]
  |  Branch (1119:31): [True: 960, False: 44.5k]
  ------------------
 1120|  2.61k|		goto out;
 1121|       |
 1122|  44.5k|	ml = (const struct ieee80211_eht_ml *) pos;
 1123|       |
 1124|       |	/* As we are interested with the Per-STA profile, ignore other types */
 1125|  44.5k|	if ((le_to_host16(ml->ml_control) & MULTI_LINK_CONTROL_TYPE_MASK) !=
  ------------------
  |  |  175|  44.5k|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
              	if ((le_to_host16(ml->ml_control) & MULTI_LINK_CONTROL_TYPE_MASK) !=
  ------------------
  |  | 2923|  44.5k|#define MULTI_LINK_CONTROL_TYPE_MASK			0x07
  ------------------
  |  Branch (1125:6): [True: 1.56k, False: 42.9k]
  ------------------
 1126|  44.5k|	     MULTI_LINK_CONTROL_TYPE_BASIC)
  ------------------
  |  | 2927|  44.5k|#define MULTI_LINK_CONTROL_TYPE_BASIC			0
  ------------------
 1127|  1.56k|		goto out;
 1128|       |
 1129|       |	/* Skip the common info */
 1130|  42.9k|	len -= sizeof(*ml) + pos[sizeof(*ml)];
 1131|  42.9k|	pos += sizeof(*ml) + pos[sizeof(*ml)];
 1132|       |
 1133|   117k|	while (len > 2) {
  ------------------
  |  Branch (1133:9): [True: 89.0k, False: 28.7k]
  ------------------
 1134|  89.0k|		size_t sub_elem_len, sta_info_len;
 1135|  89.0k|		u16 link_info_control;
 1136|  89.0k|		const u8 *non_inherit;
 1137|  89.0k|		int num_frag_subelems;
 1138|       |
 1139|  89.0k|		num_frag_subelems =
 1140|  89.0k|			ieee802_11_defrag_mle_subelem(mlbuf, pos,
 1141|  89.0k|						      &sub_elem_len);
 1142|  89.0k|		if (num_frag_subelems < 0) {
  ------------------
  |  Branch (1142:7): [True: 3.09k, False: 85.9k]
  ------------------
 1143|  3.09k|			wpa_printf(MSG_DEBUG,
 1144|  3.09k|				   "MLD: Failed to parse MLE subelem");
 1145|  3.09k|			goto out;
 1146|  3.09k|		}
 1147|  85.9k|		if ((size_t) num_frag_subelems * 2 > len)
  ------------------
  |  Branch (1147:7): [True: 0, False: 85.9k]
  ------------------
 1148|      0|			goto out;
 1149|  85.9k|		len -= num_frag_subelems * 2;
 1150|       |
 1151|  85.9k|		wpa_printf(MSG_DEBUG,
 1152|  85.9k|			   "MLD: sub element: len=%zu, sub_elem_len=%zu, Fragment subelems=%u",
 1153|  85.9k|			   len, sub_elem_len, num_frag_subelems);
 1154|       |
 1155|  85.9k|		if (2 + sub_elem_len > len) {
  ------------------
  |  Branch (1155:7): [True: 5.46k, False: 80.4k]
  ------------------
 1156|  5.46k|			if (show_errors)
  ------------------
  |  Branch (1156:8): [True: 5.46k, False: 0]
  ------------------
 1157|  5.46k|				wpa_printf(MSG_DEBUG,
 1158|  5.46k|					   "MLD: error: len=%zu, sub_elem_len=%zu",
 1159|  5.46k|					   len, sub_elem_len);
 1160|  5.46k|			goto out;
 1161|  5.46k|		}
 1162|       |
 1163|  80.4k|		if (*pos != 0) {
  ------------------
  |  Branch (1163:7): [True: 30.4k, False: 50.0k]
  ------------------
 1164|  30.4k|			pos += 2 + sub_elem_len;
 1165|  30.4k|			len -= 2 + sub_elem_len;
 1166|  30.4k|			continue;
 1167|  30.4k|		}
 1168|       |
 1169|  50.0k|		if (sub_elem_len < 5) {
  ------------------
  |  Branch (1169:7): [True: 2.21k, False: 47.8k]
  ------------------
 1170|  2.21k|			if (show_errors)
  ------------------
  |  Branch (1170:8): [True: 2.21k, False: 0]
  ------------------
 1171|  2.21k|				wpa_printf(MSG_DEBUG,
 1172|  2.21k|					   "MLD: error: sub_elem_len=%zu < 5",
 1173|  2.21k|					   sub_elem_len);
 1174|  2.21k|			goto out;
 1175|  2.21k|		}
 1176|       |
 1177|  47.8k|		link_info_control = WPA_GET_LE16(pos + 2);
 1178|  47.8k|		if ((link_info_control & BASIC_MLE_STA_CTRL_LINK_ID_MASK) !=
  ------------------
  |  | 2959|  47.8k|#define BASIC_MLE_STA_CTRL_LINK_ID_MASK			0x000F
  ------------------
  |  Branch (1178:7): [True: 44.3k, False: 3.41k]
  ------------------
 1179|  47.8k|		    link_id) {
 1180|  44.3k|			pos += 2 + sub_elem_len;
 1181|  44.3k|			len -= 2 + sub_elem_len;
 1182|  44.3k|			continue;
 1183|  44.3k|		}
 1184|       |
 1185|  3.41k|		sta_info_len = *(pos + 4);
 1186|  3.41k|		if (sub_elem_len < sta_info_len + 3 || sta_info_len < 1) {
  ------------------
  |  Branch (1186:7): [True: 172, False: 3.24k]
  |  Branch (1186:42): [True: 170, False: 3.07k]
  ------------------
 1187|    342|			if (show_errors)
  ------------------
  |  Branch (1187:8): [True: 342, False: 0]
  ------------------
 1188|    342|				wpa_printf(MSG_DEBUG,
 1189|    342|					   "MLD: error: sub_elem_len=%zu, sta_info_len=%zu",
 1190|    342|					   sub_elem_len, sta_info_len);
 1191|    342|			goto out;
 1192|    342|		}
 1193|       |
 1194|  3.07k|		pos += sta_info_len + 4;
 1195|  3.07k|		sub_elem_len -= sta_info_len + 2;
 1196|       |
 1197|  3.07k|		if (sub_elem_len < 2) {
  ------------------
  |  Branch (1197:7): [True: 18, False: 3.05k]
  ------------------
 1198|     18|			if (show_errors)
  ------------------
  |  Branch (1198:8): [True: 18, False: 0]
  ------------------
 1199|     18|				wpa_printf(MSG_DEBUG,
 1200|     18|					   "MLD: missing capability info");
 1201|     18|			goto out;
 1202|     18|		}
 1203|       |
 1204|  3.05k|		pos += 2;
 1205|  3.05k|		sub_elem_len -= 2;
 1206|       |
 1207|       |		/* For association response, check status code */
 1208|  3.05k|		if (is_assoc_resp) {
  ------------------
  |  Branch (1208:7): [True: 1.52k, False: 1.52k]
  ------------------
 1209|  1.52k|			u16 status_code;
 1210|       |
 1211|  1.52k|			if (sub_elem_len < 2) {
  ------------------
  |  Branch (1211:8): [True: 122, False: 1.40k]
  ------------------
 1212|    122|				if (show_errors)
  ------------------
  |  Branch (1212:9): [True: 122, False: 0]
  ------------------
 1213|    122|					wpa_printf(MSG_DEBUG,
 1214|    122|						   "MLD: missing status code");
 1215|    122|				goto out;
 1216|    122|			}
 1217|       |
 1218|  1.40k|			status_code = WPA_GET_LE16(pos);
 1219|  1.40k|			if (status_code != WLAN_STATUS_SUCCESS) {
  ------------------
  |  |  134|  1.40k|#define WLAN_STATUS_SUCCESS 0
  ------------------
  |  Branch (1219:8): [True: 432, False: 974]
  ------------------
 1220|    432|				wpa_printf(MSG_DEBUG,
 1221|    432|					   "MLD: status code %u", status_code);
 1222|    432|				goto out;
 1223|    432|			}
 1224|       |
 1225|    974|			pos += 2;
 1226|    974|			sub_elem_len -= 2;
 1227|    974|		}
 1228|       |
 1229|       |		/* Handle non-inheritance */
 1230|  2.50k|		non_inherit = get_ie_ext(pos, sub_elem_len,
 1231|  2.50k|					 WLAN_EID_EXT_NON_INHERITANCE);
  ------------------
  |  |  532|  2.50k|#define WLAN_EID_EXT_NON_INHERITANCE 56
  ------------------
 1232|  2.50k|		if (non_inherit && non_inherit[1] > 1) {
  ------------------
  |  Branch (1232:7): [True: 1.07k, False: 1.43k]
  |  Branch (1232:22): [True: 1.05k, False: 12]
  ------------------
 1233|  1.05k|			u8 non_inherit_len = non_inherit[1] - 1;
 1234|       |
 1235|       |			/*
 1236|       |			 * Do not include the Non-Inheritance element when
 1237|       |			 * parsing below. It should be the last element in the
 1238|       |			 * subelement.
 1239|       |			 */
 1240|  1.05k|			if (3U + non_inherit_len > sub_elem_len)
  ------------------
  |  Branch (1240:8): [True: 0, False: 1.05k]
  ------------------
 1241|      0|				goto out;
 1242|  1.05k|			sub_elem_len -= 3 + non_inherit_len;
 1243|       |
 1244|       |			/* Skip the ID, length and extension ID */
 1245|  1.05k|			non_inherit += 3;
 1246|       |
 1247|  1.05k|			if (non_inherit_len < 1UL + non_inherit[0]) {
  ------------------
  |  Branch (1247:8): [True: 33, False: 1.02k]
  ------------------
 1248|     33|				if (show_errors)
  ------------------
  |  Branch (1248:9): [True: 33, False: 0]
  ------------------
 1249|     33|					wpa_printf(MSG_DEBUG,
 1250|     33|						   "MLD: Invalid inheritance");
 1251|     33|				goto out;
 1252|     33|			}
 1253|       |
 1254|  1.02k|			ieee802_11_elems_clear_ids(elems, &non_inherit[1],
 1255|  1.02k|						   non_inherit[0]);
 1256|       |
 1257|  1.02k|			non_inherit_len -= 1 + non_inherit[0];
 1258|  1.02k|			non_inherit += 1 + non_inherit[0];
 1259|       |
 1260|  1.02k|			if (non_inherit_len < 1UL ||
  ------------------
  |  Branch (1260:8): [True: 344, False: 682]
  ------------------
 1261|    682|			    non_inherit_len < 1UL + non_inherit[0]) {
  ------------------
  |  Branch (1261:8): [True: 248, False: 434]
  ------------------
 1262|    592|				if (show_errors)
  ------------------
  |  Branch (1262:9): [True: 592, False: 0]
  ------------------
 1263|    592|					wpa_printf(MSG_DEBUG,
 1264|    592|						   "MLD: Invalid inheritance");
 1265|    592|				goto out;
 1266|    592|			}
 1267|       |
 1268|    434|			ieee802_11_elems_clear_ext_ids(elems, &non_inherit[1],
 1269|    434|						       non_inherit[0]);
 1270|    434|		}
 1271|       |
 1272|  1.87k|		wpa_printf(MSG_DEBUG, "MLD: link: sub_elem_len=%zu",
 1273|  1.87k|			   sub_elem_len);
 1274|       |
 1275|  1.87k|		if (sub_elem_len)
  ------------------
  |  Branch (1275:7): [True: 1.67k, False: 204]
  ------------------
 1276|  1.67k|			res = __ieee802_11_parse_elems(pos, sub_elem_len,
 1277|  1.67k|						       elems, show_errors);
 1278|    204|		else
 1279|    204|			res = ParseOK;
 1280|  1.87k|		break;
 1281|  2.50k|	}
 1282|       |
 1283|  47.1k|out:
 1284|  47.1k|	return res;
 1285|  42.9k|}

ieee802_11_common.c:element_hdr_size:
   29|  1.07M|{
   30|  1.07M|	if (elem->id == WLAN_EID_EXT_LENGTH)
  ------------------
  |  |  498|  1.07M|#define WLAN_EID_EXT_LENGTH 227
  ------------------
  |  Branch (30:6): [True: 12.4k, False: 1.06M]
  ------------------
   31|  12.4k|		return sizeof(struct ext_len_element);
   32|  1.06M|	return sizeof(struct element);
   33|  1.07M|}
ieee802_11_common.c:element_datalen:
   36|  1.06M|{
   37|  1.06M|	if (elem->id == WLAN_EID_EXT_LENGTH)
  ------------------
  |  |  498|  1.06M|#define WLAN_EID_EXT_LENGTH 227
  ------------------
  |  Branch (37:6): [True: 11.5k, False: 1.05M]
  ------------------
   38|  11.5k|		return le_to_host16(
  ------------------
  |  |  175|  11.5k|#define le_to_host16(n) ((__force u16) (le16) (n))
  ------------------
   39|  1.06M|			((const struct ext_len_element *) elem)->datalen);
   40|  1.05M|	return elem->datalen;
   41|  1.06M|}
ieee802_11_common.c:element_next:
   51|   530k|{
   52|   530k|	return (const struct element *)(element_data(elem) +
   53|   530k|					element_datalen(elem));
   54|   530k|}
ieee802_11_common.c:element_data:
   44|   530k|{
   45|   530k|	if (elem->id == WLAN_EID_EXT_LENGTH)
  ------------------
  |  |  498|   530k|#define WLAN_EID_EXT_LENGTH 227
  ------------------
  |  Branch (45:6): [True: 5.47k, False: 525k]
  ------------------
   46|  5.47k|		return ((const struct ext_len_element *) elem)->data;
   47|   525k|	return elem->data;
   48|   530k|}
ieee802_11_common.c:for_each_element_completed:
  439|  4.92k|{
  440|  4.92k|	return (const u8 *) element == (const u8 *) data + datalen;
  441|  4.92k|}

ieee802_11_common.c:WPA_GET_BE24:
  236|  8.24k|{
  237|  8.24k|	return (a[0] << 16) | (a[1] << 8) | a[2];
  238|  8.24k|}
ieee802_11_common.c:WPA_GET_LE16:
  225|  49.2k|{
  226|  49.2k|	return (a[1] << 8) | a[0];
  227|  49.2k|}

os_zalloc:
  507|  55.2k|{
  508|  55.2k|	return calloc(1, size);
  509|  55.2k|}

wpa_printf:
  224|   130k|{
  225|   130k|	va_list ap;
  226|       |
  227|   130k|	if (level >= wpa_debug_level) {
  ------------------
  |  Branch (227:6): [True: 0, False: 130k]
  ------------------
  228|       |#ifdef CONFIG_ANDROID_LOG
  229|       |		va_start(ap, fmt);
  230|       |		__android_log_vprint(wpa_to_android_level(level),
  231|       |				     ANDROID_LOG_NAME, fmt, ap);
  232|       |		va_end(ap);
  233|       |#else /* CONFIG_ANDROID_LOG */
  234|       |#ifdef CONFIG_DEBUG_SYSLOG
  235|       |		if (wpa_debug_syslog) {
  236|       |			va_start(ap, fmt);
  237|       |			vsyslog(syslog_priority(level), fmt, ap);
  238|       |			va_end(ap);
  239|       |		}
  240|       |#endif /* CONFIG_DEBUG_SYSLOG */
  241|      0|		wpa_debug_print_timestamp();
  242|       |#ifdef CONFIG_DEBUG_FILE
  243|       |		if (out_file) {
  244|       |			va_start(ap, fmt);
  245|       |			vfprintf(out_file, fmt, ap);
  246|       |			fprintf(out_file, "\n");
  247|       |			va_end(ap);
  248|       |		}
  249|       |#endif /* CONFIG_DEBUG_FILE */
  250|      0|		if (!wpa_debug_syslog && !out_file) {
  ------------------
  |  Branch (250:7): [True: 0, False: 0]
  |  Branch (250:28): [True: 0, False: 0]
  ------------------
  251|      0|			va_start(ap, fmt);
  252|      0|			vprintf(fmt, ap);
  253|      0|			printf("\n");
  254|      0|			va_end(ap);
  255|      0|		}
  256|      0|#endif /* CONFIG_ANDROID_LOG */
  257|      0|	}
  258|       |
  259|       |#ifdef CONFIG_DEBUG_LINUX_TRACING
  260|       |	if (wpa_debug_tracing_file != NULL) {
  261|       |		va_start(ap, fmt);
  262|       |		fprintf(wpa_debug_tracing_file, WPAS_TRACE_PFX, level);
  263|       |		vfprintf(wpa_debug_tracing_file, fmt, ap);
  264|       |		fprintf(wpa_debug_tracing_file, "\n");
  265|       |		fflush(wpa_debug_tracing_file);
  266|       |		va_end(ap);
  267|       |	}
  268|       |#endif /* CONFIG_DEBUG_LINUX_TRACING */
  269|   130k|}
wpa_hexdump:
  400|  1.59k|{
  401|  1.59k|	_wpa_hexdump(level, title, buf, len, 1, 0);
  402|  1.59k|}
wpa_debug.c:_wpa_hexdump:
  274|  1.59k|{
  275|  1.59k|	size_t i;
  276|       |
  277|       |#ifdef CONFIG_DEBUG_LINUX_TRACING
  278|       |	if (wpa_debug_tracing_file != NULL) {
  279|       |		fprintf(wpa_debug_tracing_file,
  280|       |			WPAS_TRACE_PFX "%s - hexdump(len=%lu):",
  281|       |			level, title, (unsigned long) len);
  282|       |		if (buf == NULL) {
  283|       |			fprintf(wpa_debug_tracing_file, " [NULL]\n");
  284|       |		} else if (!show) {
  285|       |			fprintf(wpa_debug_tracing_file, " [REMOVED]\n");
  286|       |		} else {
  287|       |			for (i = 0; i < len; i++)
  288|       |				fprintf(wpa_debug_tracing_file,
  289|       |					" %02x", buf[i]);
  290|       |		}
  291|       |		fflush(wpa_debug_tracing_file);
  292|       |	}
  293|       |#endif /* CONFIG_DEBUG_LINUX_TRACING */
  294|       |
  295|  1.59k|	if (level < wpa_debug_level)
  ------------------
  |  Branch (295:6): [True: 1.59k, False: 0]
  ------------------
  296|  1.59k|		return;
  297|       |#ifdef CONFIG_ANDROID_LOG
  298|       |	{
  299|       |		const char *display;
  300|       |		char *strbuf = NULL;
  301|       |		size_t slen = len;
  302|       |		if (buf == NULL) {
  303|       |			display = " [NULL]";
  304|       |		} else if (len == 0) {
  305|       |			display = "";
  306|       |		} else if (show && len) {
  307|       |			/* Limit debug message length for Android log */
  308|       |			if (slen > 32)
  309|       |				slen = 32;
  310|       |			strbuf = os_malloc(1 + 3 * slen);
  311|       |			if (strbuf == NULL) {
  312|       |				wpa_printf(MSG_ERROR, "wpa_hexdump: Failed to "
  313|       |					   "allocate message buffer");
  314|       |				return;
  315|       |			}
  316|       |
  317|       |			for (i = 0; i < slen; i++)
  318|       |				os_snprintf(&strbuf[i * 3], 4, " %02x",
  319|       |					    buf[i]);
  320|       |
  321|       |			display = strbuf;
  322|       |		} else {
  323|       |			display = " [REMOVED]";
  324|       |		}
  325|       |
  326|       |		__android_log_print(wpa_to_android_level(level),
  327|       |				    ANDROID_LOG_NAME,
  328|       |				    "%s - hexdump(len=%lu):%s%s",
  329|       |				    title, (long unsigned int) len, display,
  330|       |				    len > slen ? " ..." : "");
  331|       |		bin_clear_free(strbuf, 1 + 3 * slen);
  332|       |		return;
  333|       |	}
  334|       |#else /* CONFIG_ANDROID_LOG */
  335|       |#ifdef CONFIG_DEBUG_SYSLOG
  336|       |	if (wpa_debug_syslog) {
  337|       |		const char *display;
  338|       |		char *strbuf = NULL;
  339|       |
  340|       |		if (buf == NULL) {
  341|       |			display = " [NULL]";
  342|       |		} else if (len == 0) {
  343|       |			display = "";
  344|       |		} else if (show && len) {
  345|       |			strbuf = os_malloc(1 + 3 * len);
  346|       |			if (strbuf == NULL) {
  347|       |				wpa_printf(MSG_ERROR, "wpa_hexdump: Failed to "
  348|       |					   "allocate message buffer");
  349|       |				return;
  350|       |			}
  351|       |
  352|       |			for (i = 0; i < len; i++)
  353|       |				os_snprintf(&strbuf[i * 3], 4, " %02x",
  354|       |					    buf[i]);
  355|       |
  356|       |			display = strbuf;
  357|       |		} else {
  358|       |			display = " [REMOVED]";
  359|       |		}
  360|       |
  361|       |		syslog(syslog_priority(level), "%s - hexdump(len=%lu):%s",
  362|       |		       title, (unsigned long) len, display);
  363|       |		bin_clear_free(strbuf, 1 + 3 * len);
  364|       |		if (only_syslog)
  365|       |			return;
  366|       |	}
  367|       |#endif /* CONFIG_DEBUG_SYSLOG */
  368|      0|	wpa_debug_print_timestamp();
  369|       |#ifdef CONFIG_DEBUG_FILE
  370|       |	if (out_file) {
  371|       |		fprintf(out_file, "%s - hexdump(len=%lu):",
  372|       |			title, (unsigned long) len);
  373|       |		if (buf == NULL) {
  374|       |			fprintf(out_file, " [NULL]");
  375|       |		} else if (show) {
  376|       |			for (i = 0; i < len; i++)
  377|       |				fprintf(out_file, " %02x", buf[i]);
  378|       |		} else {
  379|       |			fprintf(out_file, " [REMOVED]");
  380|       |		}
  381|       |		fprintf(out_file, "\n");
  382|       |	}
  383|       |#endif /* CONFIG_DEBUG_FILE */
  384|      0|	if (!wpa_debug_syslog && !out_file) {
  ------------------
  |  Branch (384:6): [True: 0, False: 0]
  |  Branch (384:27): [True: 0, False: 0]
  ------------------
  385|      0|		printf("%s - hexdump(len=%lu):", title, (unsigned long) len);
  386|      0|		if (buf == NULL) {
  ------------------
  |  Branch (386:7): [True: 0, False: 0]
  ------------------
  387|      0|			printf(" [NULL]");
  388|      0|		} else if (show) {
  ------------------
  |  Branch (388:14): [True: 0, False: 0]
  ------------------
  389|      0|			for (i = 0; i < len; i++)
  ------------------
  |  Branch (389:16): [True: 0, False: 0]
  ------------------
  390|      0|				printf(" %02x", buf[i]);
  391|      0|		} else {
  392|      0|			printf(" [REMOVED]");
  393|      0|		}
  394|      0|		printf("\n");
  395|      0|	}
  396|      0|#endif /* CONFIG_ANDROID_LOG */
  397|      0|}

wpabuf_resize:
   48|  34.8k|{
   49|  34.8k|	struct wpabuf *buf = *_buf;
   50|       |#ifdef WPA_TRACE
   51|       |	struct wpabuf_trace *trace;
   52|       |#endif /* WPA_TRACE */
   53|       |
   54|  34.8k|	if (buf == NULL) {
  ------------------
  |  Branch (54:6): [True: 0, False: 34.8k]
  ------------------
   55|      0|		*_buf = wpabuf_alloc(add_len);
   56|      0|		return *_buf == NULL ? -1 : 0;
  ------------------
  |  Branch (56:10): [True: 0, False: 0]
  ------------------
   57|      0|	}
   58|       |
   59|       |#ifdef WPA_TRACE
   60|       |	trace = wpabuf_get_trace(buf);
   61|       |	if (trace->magic != WPABUF_MAGIC) {
   62|       |		wpa_printf(MSG_ERROR, "wpabuf: invalid magic %x",
   63|       |			   trace->magic);
   64|       |		wpa_trace_show("wpabuf_resize invalid magic");
   65|       |		abort();
   66|       |	}
   67|       |#endif /* WPA_TRACE */
   68|       |
   69|  34.8k|	if (buf->used + add_len > buf->size) {
  ------------------
  |  Branch (69:6): [True: 34.8k, False: 0]
  ------------------
   70|  34.8k|		unsigned char *nbuf;
   71|  34.8k|		if (buf->flags & WPABUF_FLAG_EXT_DATA) {
  ------------------
  |  |   13|  34.8k|#define WPABUF_FLAG_EXT_DATA BIT(0)
  |  |  ------------------
  |  |  |  |  458|  34.8k|#define BIT(x) (1U << (x))
  |  |  ------------------
  ------------------
  |  Branch (71:7): [True: 0, False: 34.8k]
  ------------------
   72|      0|			nbuf = os_realloc(buf->buf, buf->used + add_len);
  ------------------
  |  |  508|      0|#define os_realloc(p, s) realloc((p), (s))
  ------------------
   73|      0|			if (nbuf == NULL)
  ------------------
  |  Branch (73:8): [True: 0, False: 0]
  ------------------
   74|      0|				return -1;
   75|      0|			os_memset(nbuf + buf->used, 0, add_len);
  ------------------
  |  |  529|      0|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
   76|      0|			buf->buf = nbuf;
   77|  34.8k|		} else {
   78|       |#ifdef WPA_TRACE
   79|       |			nbuf = os_realloc(trace, sizeof(struct wpabuf_trace) +
   80|       |					  sizeof(struct wpabuf) +
   81|       |					  buf->used + add_len);
   82|       |			if (nbuf == NULL)
   83|       |				return -1;
   84|       |			trace = (struct wpabuf_trace *) nbuf;
   85|       |			buf = (struct wpabuf *) (trace + 1);
   86|       |			os_memset(nbuf + sizeof(struct wpabuf_trace) +
   87|       |				  sizeof(struct wpabuf) + buf->used, 0,
   88|       |				  add_len);
   89|       |#else /* WPA_TRACE */
   90|  34.8k|			nbuf = os_realloc(buf, sizeof(struct wpabuf) +
  ------------------
  |  |  508|  34.8k|#define os_realloc(p, s) realloc((p), (s))
  ------------------
   91|  34.8k|					  buf->used + add_len);
   92|  34.8k|			if (nbuf == NULL)
  ------------------
  |  Branch (92:8): [True: 0, False: 34.8k]
  ------------------
   93|      0|				return -1;
   94|  34.8k|			buf = (struct wpabuf *) nbuf;
   95|  34.8k|			os_memset(nbuf + sizeof(struct wpabuf) + buf->used, 0,
  ------------------
  |  |  529|  34.8k|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
   96|  34.8k|				  add_len);
   97|  34.8k|#endif /* WPA_TRACE */
   98|  34.8k|			buf->buf = (u8 *) (buf + 1);
   99|  34.8k|			*_buf = buf;
  100|  34.8k|		}
  101|  34.8k|		buf->size = buf->used + add_len;
  102|  34.8k|	}
  103|       |
  104|  34.8k|	return 0;
  105|  34.8k|}
wpabuf_alloc:
  114|  55.2k|{
  115|       |#ifdef WPA_TRACE
  116|       |	struct wpabuf_trace *trace = os_zalloc(sizeof(struct wpabuf_trace) +
  117|       |					       sizeof(struct wpabuf) + len);
  118|       |	struct wpabuf *buf;
  119|       |	if (trace == NULL)
  120|       |		return NULL;
  121|       |	trace->magic = WPABUF_MAGIC;
  122|       |	buf = (struct wpabuf *) (trace + 1);
  123|       |#else /* WPA_TRACE */
  124|  55.2k|	struct wpabuf *buf = os_zalloc(sizeof(struct wpabuf) + len);
  125|  55.2k|	if (buf == NULL)
  ------------------
  |  Branch (125:6): [True: 0, False: 55.2k]
  ------------------
  126|      0|		return NULL;
  127|  55.2k|#endif /* WPA_TRACE */
  128|       |
  129|  55.2k|	buf->size = len;
  130|  55.2k|	buf->buf = (u8 *) (buf + 1);
  131|  55.2k|	return buf;
  132|  55.2k|}
wpabuf_alloc_copy:
  161|  55.2k|{
  162|  55.2k|	struct wpabuf *buf = wpabuf_alloc(len);
  163|  55.2k|	if (buf)
  ------------------
  |  Branch (163:6): [True: 55.2k, False: 0]
  ------------------
  164|  55.2k|		wpabuf_put_data(buf, data, len);
  165|  55.2k|	return buf;
  166|  55.2k|}
wpabuf_free:
  187|  55.2k|{
  188|       |#ifdef WPA_TRACE
  189|       |	struct wpabuf_trace *trace;
  190|       |	if (buf == NULL)
  191|       |		return;
  192|       |	trace = wpabuf_get_trace(buf);
  193|       |	if (trace->magic != WPABUF_MAGIC) {
  194|       |		wpa_printf(MSG_ERROR, "wpabuf_free: invalid magic %x",
  195|       |			   trace->magic);
  196|       |		wpa_trace_show("wpabuf_free magic mismatch");
  197|       |		abort();
  198|       |	}
  199|       |	if (buf->flags & WPABUF_FLAG_EXT_DATA)
  200|       |		os_free(buf->buf);
  201|       |	os_free(trace);
  202|       |#else /* WPA_TRACE */
  203|  55.2k|	if (buf == NULL)
  ------------------
  |  Branch (203:6): [True: 0, False: 55.2k]
  ------------------
  204|      0|		return;
  205|  55.2k|	if (buf->flags & WPABUF_FLAG_EXT_DATA)
  ------------------
  |  |   13|  55.2k|#define WPABUF_FLAG_EXT_DATA BIT(0)
  |  |  ------------------
  |  |  |  |  458|  55.2k|#define BIT(x) (1U << (x))
  |  |  ------------------
  ------------------
  |  Branch (205:6): [True: 0, False: 55.2k]
  ------------------
  206|      0|		os_free(buf->buf);
  ------------------
  |  |  511|      0|#define os_free(p) free((p))
  ------------------
  207|  55.2k|	os_free(buf);
  ------------------
  |  |  511|  55.2k|#define os_free(p) free((p))
  ------------------
  208|  55.2k|#endif /* WPA_TRACE */
  209|  55.2k|}
wpabuf_put:
  222|  90.0k|{
  223|  90.0k|	void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf);
  224|  90.0k|	buf->used += len;
  225|  90.0k|	if (buf->used > buf->size) {
  ------------------
  |  Branch (225:6): [True: 0, False: 90.0k]
  ------------------
  226|      0|		wpabuf_overflow(buf, len);
  227|      0|	}
  228|  90.0k|	return tmp;
  229|  90.0k|}

ieee802_11_common.c:wpabuf_head:
   94|  47.1k|{
   95|  47.1k|	return buf->buf;
   96|  47.1k|}
ieee802_11_common.c:wpabuf_put_data:
  174|  34.8k|{
  175|  34.8k|	if (data)
  ------------------
  |  Branch (175:6): [True: 34.8k, False: 0]
  ------------------
  176|  34.8k|		os_memcpy(wpabuf_put(buf, len), data, len);
  ------------------
  |  |  523|  34.8k|#define os_memcpy(d, s, n) memcpy((d), (s), (n))
  ------------------
  177|  34.8k|}
ieee802_11_common.c:wpabuf_mhead_u8:
  114|  93.8k|{
  115|  93.8k|	return (u8 *) wpabuf_mhead(buf);
  116|  93.8k|}
ieee802_11_common.c:wpabuf_mhead:
  109|  93.8k|{
  110|  93.8k|	return buf->buf;
  111|  93.8k|}
ieee802_11_common.c:wpabuf_len:
   59|   140k|{
   60|   140k|	return buf->used;
   61|   140k|}
wpabuf.c:wpabuf_put_data:
  174|  55.2k|{
  175|  55.2k|	if (data)
  ------------------
  |  Branch (175:6): [True: 55.2k, False: 0]
  ------------------
  176|  55.2k|		os_memcpy(wpabuf_put(buf, len), data, len);
  ------------------
  |  |  523|  55.2k|#define os_memcpy(d, s, n) memcpy((d), (s), (n))
  ------------------
  177|  55.2k|}
wpabuf.c:wpabuf_len:
   59|  90.0k|{
   60|  90.0k|	return buf->used;
   61|  90.0k|}
wpabuf.c:wpabuf_mhead:
  109|  90.0k|{
  110|  90.0k|	return buf->buf;
  111|  90.0k|}
wpabuf.c:wpabuf_mhead_u8:
  114|  90.0k|{
  115|  90.0k|	return (u8 *) wpabuf_mhead(buf);
  116|  90.0k|}
ml-elems.c:wpabuf_len:
   59|  3.25k|{
   60|  3.25k|	return buf->used;
   61|  3.25k|}
ml-elems.c:wpabuf_head:
   94|  4.82k|{
   95|  4.82k|	return buf->buf;
   96|  4.82k|}

wpa_fuzzer_set_debug_level:
   15|  3.25k|{
   16|  3.25k|	static int first = 1;
   17|       |
   18|  3.25k|	if (first) {
  ------------------
  |  Branch (18:6): [True: 1, False: 3.25k]
  ------------------
   19|      1|		char *env;
   20|       |
   21|      1|		first = 0;
   22|      1|		env = getenv("WPADEBUG");
   23|      1|		if (env)
  ------------------
  |  Branch (23:7): [True: 0, False: 1]
  ------------------
   24|      0|			wpa_debug_level = atoi(env);
   25|      1|		else
   26|      1|			wpa_debug_level = MSG_ERROR + 1;
   27|       |
   28|      1|		wpa_debug_show_keys = 1;
   29|      1|	}
   30|  3.25k|}

LLVMFuzzerTestOneInput:
   66|  3.25k|{
   67|  3.25k|	struct ieee802_11_elems elems;
   68|  3.25k|	struct wpabuf *buf;
   69|  3.25k|	u8 type;
   70|       |
   71|  3.25k|	wpa_fuzzer_set_debug_level();
   72|       |
   73|  3.25k|	if (size > 10000)
  ------------------
  |  Branch (73:6): [True: 8, False: 3.25k]
  ------------------
   74|      8|		return 0;
   75|       |
   76|       |	/* Full element parsing; dispatches to the Multi-Link element handling
   77|       |	 * and to element fragment reassembly. */
   78|  3.25k|	ieee802_11_parse_elems(data, size, &elems, 1);
   79|       |
   80|       |	/* Each Multi-Link element variant the parser recognised, handed on in
   81|       |	 * the same shape the real callers use. */
   82|  3.25k|	fuzz_link_profile(elems.basic_mle, elems.basic_mle_len);
   83|  3.25k|	fuzz_link_profile(elems.probe_req_mle, elems.probe_req_mle_len);
   84|  3.25k|	fuzz_link_profile(elems.reconf_mle, elems.reconf_mle_len);
   85|  3.25k|	fuzz_link_profile(elems.tdls_mle, elems.tdls_mle_len);
   86|  3.25k|	fuzz_link_profile(elems.prior_access_mle, elems.prior_access_mle_len);
   87|       |
   88|       |	/* Basic Multi-Link element accessors, both on the element payload the
   89|       |	 * parser found and on the raw input, so the short-buffer rejection
   90|       |	 * paths are covered too. */
   91|  3.25k|	if (elems.basic_mle) {
  ------------------
  |  Branch (91:6): [True: 1.45k, False: 1.79k]
  ------------------
   92|  1.45k|		get_basic_mle_mld_addr(elems.basic_mle, elems.basic_mle_len);
   93|  1.45k|		get_basic_mle_eml_capa(elems.basic_mle, elems.basic_mle_len);
   94|  1.45k|		get_basic_mle_link_id(elems.basic_mle, elems.basic_mle_len);
   95|  1.45k|	}
   96|  3.25k|	get_basic_mle_mld_addr(data, size);
   97|  3.25k|	get_basic_mle_eml_capa(data, size);
   98|  3.25k|	get_basic_mle_link_id(data, size);
   99|       |
  100|  29.2k|	for (type = 0; type < 8; type++)
  ------------------
  |  Branch (100:17): [True: 26.0k, False: 3.25k]
  ------------------
  101|  26.0k|		get_ml_ie(data, size, type);
  102|       |
  103|       |	/* Element defragmentation, both element and extended-element forms. */
  104|  3.25k|	buf = ieee802_11_defrag(data, size, true);
  105|  3.25k|	if (buf) {
  ------------------
  |  Branch (105:6): [True: 3.25k, False: 0]
  ------------------
  106|       |		/* Also drive subelement defragmentation straight off the input,
  107|       |		 * not only via a Multi-Link element the parser recognised. */
  108|  3.25k|		if (wpabuf_len(buf) >= 2) {
  ------------------
  |  Branch (108:7): [True: 3.24k, False: 2]
  ------------------
  109|  3.24k|			size_t defrag_len = 0;
  110|       |
  111|  3.24k|			ieee802_11_defrag_mle_subelem(buf, wpabuf_head(buf),
  112|  3.24k|						      &defrag_len);
  113|  3.24k|		}
  114|  3.25k|		wpabuf_free(buf);
  115|  3.25k|	}
  116|  3.25k|	buf = ieee802_11_defrag(data, size, false);
  117|  3.25k|	wpabuf_free(buf);
  118|       |
  119|  3.25k|	return 0;
  120|  3.25k|}
ml-elems.c:fuzz_link_profile:
   24|  16.2k|{
   25|  16.2k|	struct ieee802_11_elems elems;
   26|  16.2k|	struct wpabuf *mlbuf;
   27|  16.2k|	u8 link_id;
   28|       |
   29|  16.2k|	if (!mle || !mle_len)
  ------------------
  |  Branch (29:6): [True: 14.6k, False: 1.57k]
  |  Branch (29:14): [True: 0, False: 1.57k]
  ------------------
   30|  14.6k|		return;
   31|       |
   32|  25.1k|	for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
  ------------------
  |  |  581|  25.1k|#define MAX_NUM_MLD_LINKS 15
  ------------------
  |  Branch (32:20): [True: 23.5k, False: 1.57k]
  ------------------
   33|  23.5k|		mlbuf = ieee802_11_defrag(mle, mle_len, true);
   34|  23.5k|		if (!mlbuf)
  ------------------
  |  Branch (34:7): [True: 0, False: 23.5k]
  ------------------
   35|      0|			return;
   36|  23.5k|		os_memset(&elems, 0, sizeof(elems));
  ------------------
  |  |  529|  23.5k|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
   37|  23.5k|		ieee802_11_parse_link_assoc_req(&elems, mlbuf, link_id, 1);
   38|  23.5k|		wpabuf_free(mlbuf);
   39|       |
   40|  23.5k|		mlbuf = ieee802_11_defrag(mle, mle_len, true);
   41|  23.5k|		if (!mlbuf)
  ------------------
  |  Branch (41:7): [True: 0, False: 23.5k]
  ------------------
   42|      0|			return;
   43|  23.5k|		os_memset(&elems, 0, sizeof(elems));
  ------------------
  |  |  529|  23.5k|#define os_memset(s, c, n) memset(s, c, n)
  ------------------
   44|  23.5k|		ieee802_11_parse_link_assoc_resp(&elems, mlbuf, link_id, 1);
   45|  23.5k|		wpabuf_free(mlbuf);
   46|  23.5k|	}
   47|       |
   48|       |	/* parent_subelem must point inside mlbuf and, as every in-tree caller
   49|       |	 * guarantees by looping on "len > 2", must have a readable two octet
   50|       |	 * subelement header. Passing anything shorter breaks the callee's
   51|       |	 * contract and would only report a defect in this harness. */
   52|  1.57k|	if (mle_len >= 2) {
  ------------------
  |  Branch (52:6): [True: 1.57k, False: 0]
  ------------------
   53|  1.57k|		mlbuf = ieee802_11_defrag(mle, mle_len, true);
   54|  1.57k|		if (mlbuf) {
  ------------------
  |  Branch (54:7): [True: 1.57k, False: 0]
  ------------------
   55|  1.57k|			size_t defrag_len = 0;
   56|       |
   57|  1.57k|			ieee802_11_defrag_mle_subelem(mlbuf, wpabuf_head(mlbuf),
   58|  1.57k|						      &defrag_len);
   59|  1.57k|			wpabuf_free(mlbuf);
   60|  1.57k|		}
   61|  1.57k|	}
   62|  1.57k|}

