Lines Matching refs:kde

922 	struct wpa_eapol_ie_parse kde;  in wpa_tdls_recv_teardown()  local
955 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) in wpa_tdls_recv_teardown()
959 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_recv_teardown()
964 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_recv_teardown()
969 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie)) { in wpa_tdls_recv_teardown()
974 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_recv_teardown()
1504 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_discovery_request() local
1529 &kde) < 0) { in wpa_tdls_process_discovery_request()
1534 if (!kde.lnkid) { in wpa_tdls_process_discovery_request()
1540 lnkid = (const struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_discovery_request()
1568 static int copy_supp_rates(const struct wpa_eapol_ie_parse *kde, in copy_supp_rates() argument
1571 if (!kde->supp_rates) { in copy_supp_rates()
1577 kde->supp_rates + 2, kde->supp_rates_len - 2, in copy_supp_rates()
1578 kde->ext_supp_rates ? kde->ext_supp_rates + 2 : NULL, in copy_supp_rates()
1579 kde->ext_supp_rates_len - 2); in copy_supp_rates()
1584 static int copy_peer_ht_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_ht_capab() argument
1587 if (!kde->ht_capabilities) { in copy_peer_ht_capab()
1600 os_memcpy(peer->ht_capabilities, kde->ht_capabilities, in copy_peer_ht_capab()
1610 static int copy_peer_vht_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_vht_capab() argument
1613 if (!kde->vht_capabilities) { in copy_peer_vht_capab()
1626 os_memcpy(peer->vht_capabilities, kde->vht_capabilities, in copy_peer_vht_capab()
1636 static int copy_peer_ext_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_ext_capab() argument
1639 if (!kde->ext_capab) { in copy_peer_ext_capab()
1645 if (!peer->ext_capab || peer->ext_capab_len < kde->ext_capab_len - 2) { in copy_peer_ext_capab()
1648 peer->ext_capab = os_zalloc(kde->ext_capab_len - 2); in copy_peer_ext_capab()
1653 peer->ext_capab_len = kde->ext_capab_len - 2; in copy_peer_ext_capab()
1654 os_memcpy(peer->ext_capab, kde->ext_capab + 2, peer->ext_capab_len); in copy_peer_ext_capab()
1660 static int copy_peer_wmm_capab(const struct wpa_eapol_ie_parse *kde, in copy_peer_wmm_capab() argument
1665 if (!kde->wmm) { in copy_peer_wmm_capab()
1670 if (kde->wmm_len < sizeof(struct wmm_information_element)) { in copy_peer_wmm_capab()
1675 wmm = (struct wmm_information_element *) kde->wmm; in copy_peer_wmm_capab()
1685 static int copy_peer_supp_channels(const struct wpa_eapol_ie_parse *kde, in copy_peer_supp_channels() argument
1688 if (!kde->supp_channels) { in copy_peer_supp_channels()
1694 peer->supp_channels_len < kde->supp_channels_len) { in copy_peer_supp_channels()
1696 peer->supp_channels = os_zalloc(kde->supp_channels_len); in copy_peer_supp_channels()
1701 peer->supp_channels_len = kde->supp_channels_len; in copy_peer_supp_channels()
1703 os_memcpy(peer->supp_channels, kde->supp_channels, in copy_peer_supp_channels()
1711 static int copy_peer_supp_oper_classes(const struct wpa_eapol_ie_parse *kde, in copy_peer_supp_oper_classes() argument
1714 if (!kde->supp_oper_classes) { in copy_peer_supp_oper_classes()
1720 peer->supp_oper_classes_len < kde->supp_oper_classes_len) { in copy_peer_supp_oper_classes()
1722 peer->supp_oper_classes = os_zalloc(kde->supp_oper_classes_len); in copy_peer_supp_oper_classes()
1727 peer->supp_oper_classes_len = kde->supp_oper_classes_len; in copy_peer_supp_oper_classes()
1728 os_memcpy(peer->supp_oper_classes, kde->supp_oper_classes, in copy_peer_supp_oper_classes()
1758 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m1() local
1840 if (wpa_supplicant_parse_ies(cpos, ielen, &kde) < 0) in wpa_tdls_process_tpk_m1()
1844 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m1()
1850 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m1()
1851 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m1()
1861 if (copy_supp_rates(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1864 if (copy_peer_ht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1867 if (copy_peer_vht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1870 if (copy_peer_ext_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1873 if (copy_peer_supp_channels(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1876 if (copy_peer_supp_oper_classes(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1879 peer->qos_info = kde.qosinfo; in wpa_tdls_process_tpk_m1()
1882 if (copy_peer_wmm_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m1()
1885 peer->aid = kde.aid; in wpa_tdls_process_tpk_m1()
1915 if (kde.rsn_ie) { in wpa_tdls_process_tpk_m1()
1924 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie) || in wpa_tdls_process_tpk_m1()
1925 kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m1()
1931 if (kde.rsn_ie_len > TDLS_MAX_IE_LEN) { in wpa_tdls_process_tpk_m1()
1938 if (wpa_parse_wpa_ie_rsn(kde.rsn_ie, kde.rsn_ie_len, &ie) < 0) { in wpa_tdls_process_tpk_m1()
1964 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m1()
1969 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m1()
2002 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m1()
2003 os_memcpy(peer->rsnie_i, kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m1()
2004 peer->rsnie_i_len = kde.rsn_ie_len; in wpa_tdls_process_tpk_m1()
2027 hdr = (struct rsn_ie_hdr *) kde.rsn_ie; in wpa_tdls_process_tpk_m1()
2145 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m2() local
2229 if (wpa_supplicant_parse_ies(pos, ielen, &kde) < 0) in wpa_tdls_process_tpk_m2()
2241 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m2()
2247 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m2()
2248 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m2()
2256 if (copy_supp_rates(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2259 if (copy_peer_ht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2262 if (copy_peer_vht_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2265 if (copy_peer_ext_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2268 if (copy_peer_supp_channels(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2271 if (copy_peer_supp_oper_classes(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2274 peer->qos_info = kde.qosinfo; in wpa_tdls_process_tpk_m2()
2277 if (copy_peer_wmm_capab(&kde, peer) < 0) in wpa_tdls_process_tpk_m2()
2280 peer->aid = kde.aid; in wpa_tdls_process_tpk_m2()
2288 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie) || in wpa_tdls_process_tpk_m2()
2289 kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m2()
2295 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2297 if (kde.rsn_ie_len > TDLS_MAX_IE_LEN) { in wpa_tdls_process_tpk_m2()
2310 if (kde.rsn_ie_len != peer->rsnie_i_len || in wpa_tdls_process_tpk_m2()
2311 os_memcmp(peer->rsnie_i, kde.rsn_ie, peer->rsnie_i_len) != 0) { in wpa_tdls_process_tpk_m2()
2317 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2322 if (wpa_parse_wpa_ie_rsn(kde.rsn_ie, kde.rsn_ie_len, &ie) < 0) { in wpa_tdls_process_tpk_m2()
2339 kde.ftie, sizeof(*ftie)); in wpa_tdls_process_tpk_m2()
2340 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m2()
2351 os_memcpy(peer->rsnie_p, kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m2()
2352 peer->rsnie_p_len = kde.rsn_ie_len; in wpa_tdls_process_tpk_m2()
2356 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m2()
2361 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m2()
2434 struct wpa_eapol_ie_parse kde; in wpa_tdls_process_tpk_m3() local
2479 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) { in wpa_tdls_process_tpk_m3()
2484 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m3()
2489 (u8 *) kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m3()
2490 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m3()
2500 if (kde.ftie == NULL || kde.ftie_len < sizeof(*ftie)) { in wpa_tdls_process_tpk_m3()
2505 kde.ftie, sizeof(*ftie)); in wpa_tdls_process_tpk_m3()
2506 ftie = (struct wpa_tdls_ftie *) kde.ftie; in wpa_tdls_process_tpk_m3()
2508 if (kde.rsn_ie == NULL) { in wpa_tdls_process_tpk_m3()
2513 kde.rsn_ie, kde.rsn_ie_len); in wpa_tdls_process_tpk_m3()
2514 if (kde.rsn_ie_len != peer->rsnie_p_len || in wpa_tdls_process_tpk_m3()
2515 os_memcmp(kde.rsn_ie, peer->rsnie_p, peer->rsnie_p_len) != 0) { in wpa_tdls_process_tpk_m3()
2533 if (kde.key_lifetime == NULL) { in wpa_tdls_process_tpk_m3()
2537 timeoutie = (struct wpa_tdls_timeoutie *) kde.key_lifetime; in wpa_tdls_process_tpk_m3()