Lines Matching refs:lnkid

454 static int wpa_tdls_ftie_mic(const u8 *kck, u8 trans_seq, const u8 *lnkid,  in wpa_tdls_ftie_mic()  argument
462 int len = 2 * ETH_ALEN + 1 + 2 + lnkid[1] + 2 + rsnie[1] + in wpa_tdls_ftie_mic()
471 _lnkid = (const struct wpa_tdls_lnkid *) lnkid; in wpa_tdls_ftie_mic()
481 os_memcpy(pos, lnkid, 2 + lnkid[1]); in wpa_tdls_ftie_mic()
482 pos += 2 + lnkid[1]; in wpa_tdls_ftie_mic()
517 u8 dtoken, const u8 *lnkid, in wpa_tdls_key_mic_teardown() argument
525 if (lnkid == NULL) in wpa_tdls_key_mic_teardown()
528 len = 2 + lnkid[1] + sizeof(rcode) + sizeof(dtoken) + in wpa_tdls_key_mic_teardown()
539 os_memcpy(pos, lnkid, 2 + lnkid[1]); in wpa_tdls_key_mic_teardown()
540 pos += 2 + lnkid[1]; in wpa_tdls_key_mic_teardown()
565 const u8 *lnkid, const u8 *timeoutie, in wpa_supplicant_verify_tdls_mic() argument
571 wpa_tdls_ftie_mic(peer->tpk.kck, trans_seq, lnkid, in wpa_supplicant_verify_tdls_mic()
594 const u8 *lnkid, const struct wpa_tdls_ftie *ftie) in wpa_supplicant_verify_tdls_mic_teardown() argument
600 dtoken, lnkid, (u8 *) ftie, mic); in wpa_supplicant_verify_tdls_mic_teardown()
709 struct wpa_tdls_lnkid *lnkid) in wpa_tdls_linkid() argument
711 lnkid->ie_type = WLAN_EID_LINK_ID; in wpa_tdls_linkid()
712 lnkid->ie_len = 3 * ETH_ALEN; in wpa_tdls_linkid()
713 os_memcpy(lnkid->bssid, sm->bssid, ETH_ALEN); in wpa_tdls_linkid()
715 os_memcpy(lnkid->init_sta, sm->own_addr, ETH_ALEN); in wpa_tdls_linkid()
716 os_memcpy(lnkid->resp_sta, peer->addr, ETH_ALEN); in wpa_tdls_linkid()
718 os_memcpy(lnkid->init_sta, peer->addr, ETH_ALEN); in wpa_tdls_linkid()
719 os_memcpy(lnkid->resp_sta, sm->own_addr, ETH_ALEN); in wpa_tdls_linkid()
729 struct wpa_tdls_lnkid lnkid; in wpa_tdls_send_teardown() local
800 wpa_tdls_linkid(sm, peer, &lnkid); in wpa_tdls_send_teardown()
802 dialog_token, (u8 *) &lnkid, (u8 *) ftie, in wpa_tdls_send_teardown()
914 struct wpa_tdls_lnkid *lnkid; in wpa_tdls_recv_teardown() local
952 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_recv_teardown()
957 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_recv_teardown()
972 (u8 *) lnkid, ftie) < 0) { in wpa_tdls_recv_teardown()
1220 struct wpa_tdls_lnkid *lnkid, in wpa_tdls_send_tpk_m2() argument
1290 wpa_tdls_ftie_mic(peer->tpk.kck, 2, (u8 *) lnkid, peer->rsnie_p, in wpa_tdls_send_tpk_m2()
1311 struct wpa_tdls_lnkid *lnkid, in wpa_tdls_send_tpk_m3() argument
1380 wpa_tdls_ftie_mic(peer->tpk.kck, 3, (u8 *) lnkid, peer->rsnie_p, in wpa_tdls_send_tpk_m3()
1498 const struct wpa_tdls_lnkid *lnkid; in wpa_tdls_process_discovery_request() local
1527 if (!kde.lnkid) { in wpa_tdls_process_discovery_request()
1533 lnkid = (const struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_discovery_request()
1535 if (os_memcmp(sm->bssid, lnkid->bssid, ETH_ALEN) != 0) { in wpa_tdls_process_discovery_request()
1537 " BSS " MACSTR, MAC2STR(lnkid->bssid)); in wpa_tdls_process_discovery_request()
1757 struct wpa_tdls_lnkid *lnkid; in wpa_tdls_process_tpk_m1() local
1837 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m1()
1843 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m1()
1844 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m1()
1845 if (os_memcmp(sm->bssid, lnkid->bssid, ETH_ALEN) != 0) { in wpa_tdls_process_tpk_m1()
2083 if (wpa_tdls_send_tpk_m2(sm, src_addr, dtoken, lnkid, peer) < 0) { in wpa_tdls_process_tpk_m1()
2143 struct wpa_tdls_lnkid *lnkid; in wpa_tdls_process_tpk_m2() local
2226 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m2()
2232 kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m2()
2233 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m2()
2235 if (os_memcmp(sm->bssid, lnkid->bssid, ETH_ALEN) != 0) { in wpa_tdls_process_tpk_m2()
2360 if (wpa_supplicant_verify_tdls_mic(2, peer, (u8 *) lnkid, in wpa_tdls_process_tpk_m2()
2387 if (wpa_tdls_send_tpk_m3(sm, src_addr, dtoken, lnkid, peer) < 0) in wpa_tdls_process_tpk_m2()
2421 struct wpa_tdls_lnkid *lnkid; in wpa_tdls_process_tpk_m3() local
2468 if (kde.lnkid == NULL || kde.lnkid_len < 3 * ETH_ALEN) { in wpa_tdls_process_tpk_m3()
2473 (u8 *) kde.lnkid, kde.lnkid_len); in wpa_tdls_process_tpk_m3()
2474 lnkid = (struct wpa_tdls_lnkid *) kde.lnkid; in wpa_tdls_process_tpk_m3()
2476 if (os_memcmp(sm->bssid, lnkid->bssid, ETH_ALEN) != 0) { in wpa_tdls_process_tpk_m3()
2533 if (wpa_supplicant_verify_tdls_mic(3, peer, (u8 *) lnkid, in wpa_tdls_process_tpk_m3()