Lines Matching defs:hapd
27 struct hostapd_data *hapd = priv;
29 if (!hapd->driver->macsec_init)
31 return hapd->driver->macsec_init(hapd->drv_priv, params);
37 struct hostapd_data *hapd = priv;
39 if (!hapd->driver->macsec_deinit)
41 return hapd->driver->macsec_deinit(hapd->drv_priv);
47 struct hostapd_data *hapd = priv;
49 if (!hapd->driver->macsec_get_capability)
51 return hapd->driver->macsec_get_capability(hapd->drv_priv, cap);
57 struct hostapd_data *hapd = priv;
59 if (!hapd->driver->enable_protect_frames)
61 return hapd->driver->enable_protect_frames(hapd->drv_priv, enabled);
67 struct hostapd_data *hapd = priv;
69 if (!hapd->driver->enable_encrypt)
71 return hapd->driver->enable_encrypt(hapd->drv_priv, enabled);
77 struct hostapd_data *hapd = priv;
79 if (!hapd->driver->set_replay_protect)
81 return hapd->driver->set_replay_protect(hapd->drv_priv, enabled,
88 struct hostapd_data *hapd = priv;
90 if (!hapd->driver->set_current_cipher_suite)
92 return hapd->driver->set_current_cipher_suite(hapd->drv_priv, cs);
98 struct hostapd_data *hapd = priv;
100 if (!hapd->driver->enable_controlled_port)
102 return hapd->driver->enable_controlled_port(hapd->drv_priv, enabled);
108 struct hostapd_data *hapd = priv;
110 if (!hapd->driver->get_receive_lowest_pn)
112 return hapd->driver->get_receive_lowest_pn(hapd->drv_priv, sa);
118 struct hostapd_data *hapd = priv;
120 if (!hapd->driver->get_transmit_next_pn)
122 return hapd->driver->get_transmit_next_pn(hapd->drv_priv, sa);
128 struct hostapd_data *hapd = priv;
130 if (!hapd->driver->set_transmit_next_pn)
132 return hapd->driver->set_transmit_next_pn(hapd->drv_priv, sa);
153 struct hostapd_data *hapd = priv;
155 if (!hapd->driver->create_receive_sc)
157 return hapd->driver->create_receive_sc(hapd->drv_priv, sc,
164 struct hostapd_data *hapd = priv;
166 if (!hapd->driver->delete_receive_sc)
168 return hapd->driver->delete_receive_sc(hapd->drv_priv, sc);
174 struct hostapd_data *hapd = priv;
176 if (!hapd->driver->create_receive_sa)
178 return hapd->driver->create_receive_sa(hapd->drv_priv, sa);
184 struct hostapd_data *hapd = priv;
186 if (!hapd->driver->delete_receive_sa)
188 return hapd->driver->delete_receive_sa(hapd->drv_priv, sa);
194 struct hostapd_data *hapd = priv;
196 if (!hapd->driver->enable_receive_sa)
198 return hapd->driver->enable_receive_sa(hapd->drv_priv, sa);
204 struct hostapd_data *hapd = priv;
206 if (!hapd->driver->disable_receive_sa)
208 return hapd->driver->disable_receive_sa(hapd->drv_priv, sa);
216 struct hostapd_data *hapd = priv;
218 if (!hapd->driver->create_transmit_sc)
220 return hapd->driver->create_transmit_sc(hapd->drv_priv, sc,
227 struct hostapd_data *hapd = priv;
229 if (!hapd->driver->delete_transmit_sc)
231 return hapd->driver->delete_transmit_sc(hapd->drv_priv, sc);
237 struct hostapd_data *hapd = priv;
239 if (!hapd->driver->create_transmit_sa)
241 return hapd->driver->create_transmit_sa(hapd->drv_priv, sa);
247 struct hostapd_data *hapd = priv;
249 if (!hapd->driver->delete_transmit_sa)
251 return hapd->driver->delete_transmit_sa(hapd->drv_priv, sa);
257 struct hostapd_data *hapd = priv;
259 if (!hapd->driver->enable_transmit_sa)
261 return hapd->driver->enable_transmit_sa(hapd->drv_priv, sa);
267 struct hostapd_data *hapd = priv;
269 if (!hapd->driver->disable_transmit_sa)
271 return hapd->driver->disable_transmit_sa(hapd->drv_priv, sa);
275 int ieee802_1x_alloc_kay_sm_hapd(struct hostapd_data *hapd,
282 ieee802_1x_dealloc_kay_sm_hapd(hapd);
284 if (!hapd->conf || hapd->conf->macsec_policy == 0)
287 if (hapd->conf->macsec_policy == 1) {
288 if (hapd->conf->macsec_integ_only == 1)
296 wpa_printf(MSG_DEBUG, "%s: if_name=%s", __func__, hapd->conf->iface);
301 kay_ctx->ctx = hapd;
328 hapd->conf->macsec_replay_protect,
329 hapd->conf->macsec_replay_window,
330 hapd->conf->macsec_offload,
331 hapd->conf->macsec_port,
332 hapd->conf->mka_priority,
333 hapd->conf->macsec_csindex,
334 hapd->conf->iface,
335 hapd->own_addr);
340 hapd->kay = res;
346 void ieee802_1x_dealloc_kay_sm_hapd(struct hostapd_data *hapd)
348 if (!hapd->kay)
351 ieee802_1x_kay_deinit(hapd->kay);
352 hapd->kay = NULL;
356 static int ieee802_1x_auth_get_msk(struct hostapd_data *hapd,
384 void * ieee802_1x_notify_create_actor_hapd(struct hostapd_data *hapd,
394 if (!hapd->kay || hapd->kay->policy == DO_NOT_SECURE)
408 if (ieee802_1x_auth_get_msk(hapd, sta, msk->key, &msk->len)) {
420 wpa_hexdump(MSG_DEBUG, "own_addr", hapd->own_addr, ETH_ALEN);
425 if (ieee802_1x_cak_aes_cmac(msk->key, msk->len, hapd->own_addr,
434 if (ieee802_1x_ckn_aes_cmac(msk->key, msk->len, hapd->own_addr,
441 res = ieee802_1x_kay_create_mka(hapd->kay, ckn, cak, 0, EAP_EXCHANGE,
453 void * ieee802_1x_create_preshared_mka_hapd(struct hostapd_data *hapd,
460 if ((hapd->conf->mka_psk_set & MKA_PSK_SET) != MKA_PSK_SET)
471 if (ieee802_1x_alloc_kay_sm_hapd(hapd, sta) < 0 || !hapd->kay)
474 if (hapd->kay->policy == DO_NOT_SECURE)
477 cak->len = hapd->conf->mka_cak_len;
478 os_memcpy(cak->key, hapd->conf->mka_cak, cak->len);
480 ckn->len = hapd->conf->mka_ckn_len;;
481 os_memcpy(ckn->name, hapd->conf->mka_ckn, ckn->len);
483 res = ieee802_1x_kay_create_mka(hapd->kay, ckn, cak, 0, PSK, true);
489 ieee802_1x_dealloc_kay_sm_hapd(hapd);