Lines Matching refs:u8

52 	u8 ie_type; /* FTIE */
53 u8 ie_len;
54 u8 mic_ctrl[2];
55 u8 mic[TDLS_MIC_LEN];
56 u8 Anonce[WPA_NONCE_LEN]; /* Responder Nonce in TDLS */
57 u8 Snonce[WPA_NONCE_LEN]; /* Initiator Nonce in TDLS */
62 u8 ie_type; /* Timeout IE */
63 u8 ie_len;
64 u8 interval_type;
65 u8 value[TDLS_TIMEOUT_LEN];
69 u8 ie_type; /* Link Identifier IE */
70 u8 ie_len;
71 u8 bssid[ETH_ALEN];
72 u8 init_sta[ETH_ALEN];
73 u8 resp_sta[ETH_ALEN];
78 u8 payloadtype; /* IEEE80211_TDLS_RFTYPE */
79 u8 category; /* Category */
80 u8 action; /* Action (enum tdls_frame_type) */
83 static u8 * wpa_add_tdls_timeoutie(u8 *pos, u8 *ie, size_t ie_len, u32 tsecs);
88 static int wpa_tdls_send_teardown(struct wpa_sm *sm, const u8 *addr,
99 u8 addr[ETH_ALEN]; /* other end MAC address */
100 u8 inonce[WPA_NONCE_LEN]; /* Initiator Nonce */
101 u8 rnonce[WPA_NONCE_LEN]; /* Responder Nonce */
102 u8 rsnie_i[TDLS_MAX_IE_LEN]; /* Initiator RSN IE */
104 u8 rsnie_p[TDLS_MAX_IE_LEN]; /* Peer RSN IE */
108 u8 dtoken;
111 u8 kck[16]; /* TPK-KCK */
112 u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */
120 u8 dest[ETH_ALEN];
123 u8 action_code; /* TDLS frame type */
124 u8 dialog_token;
128 u8 *buf; /* buffer for TPK message */
133 u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
139 u8 qos_info;
143 u8 *ext_capab;
146 u8 *supp_channels;
149 u8 *supp_oper_classes;
152 u8 wmm_capable;
170 static u8 * wpa_add_ie(u8 *pos, const u8 *ie, size_t ie_len)
192 u8 key_len;
193 u8 rsc[6];
240 static int wpa_tdls_send_tpk_msg(struct wpa_sm *sm, const u8 *dst,
241 u8 action_code, u8 dialog_token,
243 int initiator, const u8 *buf, size_t len)
251 static int wpa_tdls_tpk_send(struct wpa_sm *sm, const u8 *dest, u8 action_code,
252 u8 dialog_token, u16 status_code, u32 peer_capab,
253 int initiator, const u8 *msg, size_t msg_len)
384 u8 action_code)
409 const u8 *own_addr, const u8 *bssid)
411 u8 key_input[SHA256_MAC_LEN];
412 const u8 *nonce[2];
414 u8 data[3 * ETH_ALEN];
453 (u8 *) &peer->tpk, sizeof(peer->tpk));
473 static int wpa_tdls_ftie_mic(const u8 *kck, u8 trans_seq, const u8 *lnkid,
474 const u8 *rsnie, const u8 *timeoutie,
475 const u8 *ftie, u8 *mic)
477 u8 *buf, *pos;
535 static int wpa_tdls_key_mic_teardown(const u8 *kck, u8 trans_seq, u16 rcode,
536 u8 dtoken, const u8 *lnkid,
537 const u8 *ftie, u8 *mic)
539 u8 *buf, *pos;
582 static int wpa_supplicant_verify_tdls_mic(u8 trans_seq,
584 const u8 *lnkid, const u8 *timeoutie,
587 u8 mic[16];
591 peer->rsnie_p, timeoutie, (u8 *) ftie,
612 u8 trans_seq, u16 rcode, u8 dtoken, struct wpa_tdls_peer *peer,
613 const u8 *lnkid, const struct wpa_tdls_ftie *ftie)
615 u8 mic[16];
619 dtoken, lnkid, (u8 *) ftie, mic);
743 static int wpa_tdls_send_teardown(struct wpa_sm *sm, const u8 *addr,
749 u8 dialog_token;
750 u8 *rbuf, *pos;
804 pos = (u8 *) (ftie + 1);
816 (u8 *) ftie, pos - (u8 *) ftie);
821 dialog_token, (u8 *) &lnkid, (u8 *) ftie,
837 int wpa_tdls_teardown_link(struct wpa_sm *sm, const u8 *addr, u16 reason_code)
873 void wpa_tdls_disable_unreachable_link(struct wpa_sm *sm, const u8 *addr)
906 const char * wpa_tdls_get_link_status(struct wpa_sm *sm, const u8 *addr)
928 static int wpa_tdls_recv_teardown(struct wpa_sm *sm, const u8 *src_addr,
929 const u8 *buf, size_t len)
936 const u8 *pos;
967 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0)
991 (u8 *) lnkid, ftie) < 0) {
1016 static int wpa_tdls_send_error(struct wpa_sm *sm, const u8 *dst,
1017 u8 tdls_action, u8 dialog_token, int initiator,
1029 wpa_tdls_add_peer(struct wpa_sm *sm, const u8 *addr, int *existing)
1065 u8 *rbuf, *pos, *count_pos;
1087 pos = (u8 *) (hdr + 1);
1180 (u8 *) ftie, sizeof(struct wpa_tdls_ftie));
1182 pos = (u8 *) (ftie + 1);
1209 pos = wpa_add_tdls_timeoutie(pos, (u8 *) &timeoutie,
1239 const unsigned char *src_addr, u8 dtoken,
1243 u8 *rbuf, *pos;
1280 (u8 *) ftie, sizeof(*ftie));
1282 pos = (u8 *) (ftie + 1);
1304 pos = wpa_add_tdls_timeoutie(pos, (u8 *) &timeoutie,
1310 wpa_tdls_ftie_mic(peer->tpk.kck, 2, (u8 *) lnkid, peer->rsnie_p,
1311 (u8 *) &timeoutie, (u8 *) ftie, ftie->mic);
1330 const unsigned char *src_addr, u8 dtoken,
1334 u8 *rbuf, *pos;
1372 pos = (u8 *) (ftie + 1);
1394 pos = wpa_add_tdls_timeoutie(pos, (u8 *) &timeoutie,
1400 wpa_tdls_ftie_mic(peer->tpk.kck, 3, (u8 *) lnkid, peer->rsnie_p,
1401 (u8 *) &timeoutie, (u8 *) ftie, ftie->mic);
1429 u8 dialog_token)
1434 u8 *rbuf, *pos, *count_pos;
1448 pos = (u8 *) (hdr + 1);
1476 hdr->len = (pos - (u8 *) hdr) - 2;
1480 (u8 *) hdr, hdr->len + 2);
1501 pos = wpa_add_tdls_timeoutie(pos, (u8 *) &timeoutie,
1514 wpa_tdls_process_discovery_request(struct wpa_sm *sm, const u8 *addr,
1515 const u8 *buf, size_t len)
1522 u8 dialog_token;
1569 int wpa_tdls_send_discovery_request(struct wpa_sm *sm, const u8 *addr)
1616 (u8 *) peer->ht_capabilities,
1642 (u8 *) peer->vht_capabilities,
1719 (u8 *) peer->supp_channels, peer->supp_channels_len);
1744 (u8 *) peer->supp_oper_classes,
1767 static int tdls_nonce_set(const u8 *nonce)
1780 static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
1781 const u8 *buf, size_t len)
1787 const u8 *cpos;
1794 u8 *pos;
1798 u8 dtoken;
2066 pos = (u8 *) (hdr + 1);
2169 static int wpa_tdls_process_tpk_m2(struct wpa_sm *sm, const u8 *src_addr,
2170 const u8 *buf, size_t len)
2180 u8 dtoken;
2183 const u8 *pos;
2403 if (wpa_supplicant_verify_tdls_mic(2, peer, (u8 *) lnkid,
2404 (u8 *) timeoutie, ftie) < 0) {
2457 static int wpa_tdls_process_tpk_m3(struct wpa_sm *sm, const u8 *src_addr,
2458 const u8 *buf, size_t len)
2467 const u8 *pos;
2506 if (wpa_supplicant_parse_ies((const u8 *) pos, ielen, &kde) < 0) {
2516 (u8 *) kde.lnkid, kde.lnkid_len);
2566 (u8 *) timeoutie, sizeof(*timeoutie));
2576 if (wpa_supplicant_verify_tdls_mic(3, peer, (u8 *) lnkid,
2577 (u8 *) timeoutie, ftie) < 0) {
2616 static u8 * wpa_add_tdls_timeoutie(u8 *pos, u8 *ie, size_t ie_len, u32 tsecs)
2639 int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr)
2691 void wpa_tdls_remove(struct wpa_sm *sm, const u8 *addr)
2722 static void wpa_supplicant_rx_tdls(void *ctx, const u8 *src_addr,
2723 const u8 *buf, size_t len)
2919 void wpa_tdls_ap_ies(struct wpa_sm *sm, const u8 *ies, size_t len)
2941 void wpa_tdls_assoc_resp_ies(struct wpa_sm *sm, const u8 *ies, size_t len)
2978 int wpa_tdls_enable_chan_switch(struct wpa_sm *sm, const u8 *addr,
2979 u8 oper_class,
3027 int wpa_tdls_disable_chan_switch(struct wpa_sm *sm, const u8 *addr)