Lines Matching defs:rsn
142 static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr)
160 cb.ctx = rsn;
166 rsn->auth = wpa_init(addr, &conf, &cb);
167 if (rsn->auth == NULL) {
173 if (random_get_bytes(rsn->mgtk, 16) < 0) {
174 wpa_deinit(rsn->auth);
179 wpa_drv_set_key(rsn->wpa_s, WPA_ALG_IGTK, NULL, 4, 1,
180 seq, sizeof(seq), rsn->mgtk, sizeof(rsn->mgtk));
183 wpa_drv_set_key(rsn->wpa_s, WPA_ALG_CCMP, NULL, 1, 1,
184 seq, sizeof(seq), rsn->mgtk, sizeof(rsn->mgtk));
190 static void mesh_rsn_deinit(struct mesh_rsn *rsn)
192 os_memset(rsn->mgtk, 0, sizeof(rsn->mgtk));
193 wpa_deinit(rsn->auth);
327 void mesh_rsn_get_pmkid(struct mesh_rsn *rsn, struct sta_info *sta, u8 *pmkid)
330 rsn_pmkid(sta->sae->pmk, PMK_LEN, rsn->wpa_s->own_addr,
337 mesh_rsn_derive_aek(struct mesh_rsn *rsn, struct sta_info *sta)
339 u8 *myaddr = rsn->wpa_s->own_addr;
433 int mesh_rsn_protect_frame(struct mesh_rsn *rsn, struct sta_info *sta,
439 const u8 *aad[] = { rsn->wpa_s->own_addr, sta->addr, cat };
472 os_memcpy(ampe->mgtk, rsn->mgtk, 16);