Lines Matching refs:ethhdr
48 struct l2_ethhdr *ethhdr; in rsn_preauth_receive() local
52 if (len < sizeof(*ethhdr) + sizeof(*hdr)) { in rsn_preauth_receive()
58 ethhdr = (struct l2_ethhdr *) buf; in rsn_preauth_receive()
59 hdr = (struct ieee802_1x_hdr *) (ethhdr + 1); in rsn_preauth_receive()
61 if (os_memcmp(ethhdr->h_dest, hapd->own_addr, ETH_ALEN) != 0) { in rsn_preauth_receive()
63 MACSTR, MAC2STR(ethhdr->h_dest)); in rsn_preauth_receive()
67 sta = ap_get_sta(hapd, ethhdr->h_source); in rsn_preauth_receive()
74 sta = ap_sta_add(hapd, ethhdr->h_source); in rsn_preauth_receive()
92 ieee802_1x_receive(hapd, ethhdr->h_source, (u8 *) (ethhdr + 1), in rsn_preauth_receive()
93 len - sizeof(*ethhdr)); in rsn_preauth_receive()
235 struct l2_ethhdr *ethhdr; in rsn_preauth_send() local
250 ethhdr = os_malloc(sizeof(*ethhdr) + len); in rsn_preauth_send()
251 if (ethhdr == NULL) in rsn_preauth_send()
254 os_memcpy(ethhdr->h_dest, sta->addr, ETH_ALEN); in rsn_preauth_send()
255 os_memcpy(ethhdr->h_source, hapd->own_addr, ETH_ALEN); in rsn_preauth_send()
256 ethhdr->h_proto = host_to_be16(ETH_P_PREAUTH); in rsn_preauth_send()
257 os_memcpy(ethhdr + 1, buf, len); in rsn_preauth_send()
259 if (l2_packet_send(piface->l2, sta->addr, ETH_P_PREAUTH, (u8 *) ethhdr, in rsn_preauth_send()
260 sizeof(*ethhdr) + len) < 0) { in rsn_preauth_send()
264 os_free(ethhdr); in rsn_preauth_send()