Lines Matching refs:kde
939 struct wpa_eapol_ie_parse kde; in wpa_tdls_recv_teardown() local
972 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) in wpa_tdls_recv_teardown()
976 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_recv_teardown()
981 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_recv_teardown()
986 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie)) { in wpa_tdls_recv_teardown()
991 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_recv_teardown()
1523 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_discovery_request() local
1548 &kde) < 0) { in wpa_tdls_process_discovery_request()
1553 if (!kde.lnkid) { in wpa_tdls_process_discovery_request()
1559 lnkid = (const struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_discovery_request()
1587 static int copy_supp_rates(const struct wpa_eapol_ie_parse *kde, in copy_supp_rates() argument
1590 if (!kde->supp_rates) { in copy_supp_rates()
1596 kde->supp_rates + 2, kde->supp_rates_len - 2, in copy_supp_rates()
1597 kde->ext_supp_rates ? kde->ext_supp_rates + 2 : NULL, in copy_supp_rates()
1598 kde->ext_supp_rates ? kde->ext_supp_rates_len - 2 : 0); in copy_supp_rates()
1603 static int copy_peer_ht_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_ht_capab() argument
1606 if (!kde->ht_capabilities) { in copy_peer_ht_capab()
1619 os_memcpy(peer->ht_capabilities, kde->ht_capabilities, in copy_peer_ht_capab()
1629 static int copy_peer_vht_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_vht_capab() argument
1632 if (!kde->vht_capabilities) { in copy_peer_vht_capab()
1645 os_memcpy(peer->vht_capabilities, kde->vht_capabilities, in copy_peer_vht_capab()
1655 static int copy_peer_ext_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_ext_capab() argument
1658 if (!kde->ext_capab) { in copy_peer_ext_capab()
1664 if (!peer->ext_capab || peer->ext_capab_len < kde->ext_capab_len - 2) { in copy_peer_ext_capab()
1667 peer->ext_capab = os_zalloc(kde->ext_capab_len - 2); in copy_peer_ext_capab()
1672 peer->ext_capab_len = kde->ext_capab_len - 2; in copy_peer_ext_capab()
1673 os_memcpy(peer->ext_capab, kde->ext_capab + 2, peer->ext_capab_len); in copy_peer_ext_capab()
1679 static int copy_peer_wmm_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_wmm_capab() argument
1684 if (!kde->wmm) { in copy_peer_wmm_capab()
1689 if (kde->wmm_len < sizeof(struct wmm_information_element)) { in copy_peer_wmm_capab()
1694 wmm = (struct wmm_information_element *) kde->wmm; in copy_peer_wmm_capab()
1704 static int copy_peer_supp_channels(const struct wpa_eapol_ie_parse *kde, in copy_peer_supp_channels() argument
1707 if (!kde->supp_channels) { in copy_peer_supp_channels()
1713 peer->supp_channels_len < kde->supp_channels_len) { in copy_peer_supp_channels()
1715 peer->supp_channels = os_zalloc(kde->supp_channels_len); in copy_peer_supp_channels()
1720 peer->supp_channels_len = kde->supp_channels_len; in copy_peer_supp_channels()
1722 os_memcpy(peer->supp_channels, kde->supp_channels, in copy_peer_supp_channels()
1730 static int copy_peer_supp_oper_classes(const struct wpa_eapol_ie_parse *kde, in copy_peer_supp_oper_classes() argument
1733 if (!kde->supp_oper_classes) { in copy_peer_supp_oper_classes()
1739 peer->supp_oper_classes_len < kde->supp_oper_classes_len) { in copy_peer_supp_oper_classes()
1741 peer->supp_oper_classes = os_zalloc(kde->supp_oper_classes_len); in copy_peer_supp_oper_classes()
1746 peer->supp_oper_classes_len = kde->supp_oper_classes_len; in copy_peer_supp_oper_classes()
1747 os_memcpy(peer->supp_oper_classes, kde->supp_oper_classes, in copy_peer_supp_oper_classes()
1790 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m1() local
1872 if (wpa_supplicant_parse_ies(cpos, ielen, &kde) < 0) in wpa_tdls_process_tpk_m1()
1876 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m1()
1882 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m1()
1883 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m1()
1893 if (copy_supp_rates(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1896 if (copy_peer_ht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1899 if (copy_peer_vht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1902 if (copy_peer_ext_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1905 if (copy_peer_supp_channels(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1908 if (copy_peer_supp_oper_classes(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1911 peer->qos_info = kde.qosinfo; in wpa_tdls_process_tpk_m1()
1914 if (copy_peer_wmm_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1917 peer->aid = kde.aid; in wpa_tdls_process_tpk_m1()
1950 if (kde.rsn_ie) { in wpa_tdls_process_tpk_m1()
1959 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie) || in wpa_tdls_process_tpk_m1()
1960 kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m1()
1966 if (kde.rsn_ie_len > TDLS_MAX_IE_LEN) { in wpa_tdls_process_tpk_m1()
1973 if (wpa_parse_wpa_ie_rsn(kde.rsn_ie, kde.rsn_ie_len, &ie) < 0) { in wpa_tdls_process_tpk_m1()
1999 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m1()
2004 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m1()
2037 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m1()
2038 os_memcpy(peer->rsnie_i, kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m1()
2039 peer->rsnie_i_len = kde.rsn_ie_len; in wpa_tdls_process_tpk_m1()
2064 hdr = (struct rsn_ie_hdr *) kde.rsn_ie; in wpa_tdls_process_tpk_m1()
2189 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m2() local
2273 if (wpa_supplicant_parse_ies(pos, ielen, &kde) < 0) in wpa_tdls_process_tpk_m2()
2285 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m2()
2291 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m2()
2292 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m2()
2300 if (copy_supp_rates(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2303 if (copy_peer_ht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2306 if (copy_peer_vht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2309 if (copy_peer_ext_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2312 if (copy_peer_supp_channels(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2315 if (copy_peer_supp_oper_classes(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2318 peer->qos_info = kde.qosinfo; in wpa_tdls_process_tpk_m2()
2321 if (copy_peer_wmm_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2324 peer->aid = kde.aid; in wpa_tdls_process_tpk_m2()
2332 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie) || in wpa_tdls_process_tpk_m2()
2333 kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m2()
2339 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2341 if (kde.rsn_ie_len > TDLS_MAX_IE_LEN) { in wpa_tdls_process_tpk_m2()
2354 if (kde.rsn_ie_len != peer->rsnie_i_len || in wpa_tdls_process_tpk_m2()
2355 os_memcmp(peer->rsnie_i, kde.rsn_ie, peer->rsnie_i_len) != 0) { in wpa_tdls_process_tpk_m2()
2361 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2366 if (wpa_parse_wpa_ie_rsn(kde.rsn_ie, kde.rsn_ie_len, &ie) < 0) { in wpa_tdls_process_tpk_m2()
2383 kde.ftie, sizeof(*ftie)); in wpa_tdls_process_tpk_m2()
2384 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m2()
2395 os_memcpy(peer->rsnie_p, kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2396 peer->rsnie_p_len = kde.rsn_ie_len; in wpa_tdls_process_tpk_m2()
2400 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m2()
2405 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m2()
2478 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m3() local
2523 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) { in wpa_tdls_process_tpk_m3()
2528 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m3()
2533 (u8 *) kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m3()
2534 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m3()
2544 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie)) { in wpa_tdls_process_tpk_m3()
2549 kde.ftie, sizeof(*ftie)); in wpa_tdls_process_tpk_m3()
2550 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m3()
2552 if (kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m3()
2557 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m3()
2558 if (kde.rsn_ie_len != peer->rsnie_p_len || in wpa_tdls_process_tpk_m3()
2559 os_memcmp(kde.rsn_ie, peer->rsnie_p, peer->rsnie_p_len) != 0) { in wpa_tdls_process_tpk_m3()
2577 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m3()
2581 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m3()