Lines Matching refs:gd

683 				      const struct wpa_gtk_data *gd,  in wpa_supplicant_install_gtk()  argument
686 const u8 *_gtk = gd->gtk; in wpa_supplicant_install_gtk()
689 wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len); in wpa_supplicant_install_gtk()
692 gd->keyidx, gd->tx, gd->gtk_len); in wpa_supplicant_install_gtk()
693 wpa_hexdump(MSG_DEBUG, "WPA: RSC", key_rsc, gd->key_rsc_len); in wpa_supplicant_install_gtk()
696 os_memcpy(gtk_buf, gd->gtk, 16); in wpa_supplicant_install_gtk()
697 os_memcpy(gtk_buf + 16, gd->gtk + 24, 8); in wpa_supplicant_install_gtk()
698 os_memcpy(gtk_buf + 24, gd->gtk + 16, 8); in wpa_supplicant_install_gtk()
702 if (wpa_sm_set_key(sm, gd->alg, NULL, in wpa_supplicant_install_gtk()
703 gd->keyidx, 1, key_rsc, gd->key_rsc_len, in wpa_supplicant_install_gtk()
704 _gtk, gd->gtk_len) < 0) { in wpa_supplicant_install_gtk()
711 } else if (wpa_sm_set_key(sm, gd->alg, broadcast_ether_addr, in wpa_supplicant_install_gtk()
712 gd->keyidx, gd->tx, key_rsc, gd->key_rsc_len, in wpa_supplicant_install_gtk()
713 _gtk, gd->gtk_len) < 0) { in wpa_supplicant_install_gtk()
717 gd->alg, gd->gtk_len, gd->keyidx); in wpa_supplicant_install_gtk()
750 struct wpa_gtk_data gd; in wpa_supplicant_pairwise_gtk() local
760 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_pairwise_gtk()
764 if (gtk_len < 2 || gtk_len - 2 > sizeof(gd.gtk)) in wpa_supplicant_pairwise_gtk()
767 gd.keyidx = gtk[0] & 0x3; in wpa_supplicant_pairwise_gtk()
768 gd.tx = wpa_supplicant_gtk_tx_bit_workaround(sm, in wpa_supplicant_pairwise_gtk()
773 os_memcpy(gd.gtk, gtk, gtk_len); in wpa_supplicant_pairwise_gtk()
774 gd.gtk_len = gtk_len; in wpa_supplicant_pairwise_gtk()
779 &gd.key_rsc_len, &gd.alg) || in wpa_supplicant_pairwise_gtk()
780 wpa_supplicant_install_gtk(sm, &gd, key->key_rsc))) { in wpa_supplicant_pairwise_gtk()
783 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_pairwise_gtk()
786 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_pairwise_gtk()
1259 struct wpa_gtk_data *gd) in wpa_supplicant_process_1_of_2_rsn() argument
1277 maxkeylen = gd->gtk_len = ie.gtk_len - 2; in wpa_supplicant_process_1_of_2_rsn()
1280 gd->gtk_len, maxkeylen, in wpa_supplicant_process_1_of_2_rsn()
1281 &gd->key_rsc_len, &gd->alg)) in wpa_supplicant_process_1_of_2_rsn()
1286 gd->keyidx = ie.gtk[0] & 0x3; in wpa_supplicant_process_1_of_2_rsn()
1287 gd->tx = wpa_supplicant_gtk_tx_bit_workaround(sm, in wpa_supplicant_process_1_of_2_rsn()
1289 if (ie.gtk_len - 2 > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_rsn()
1295 os_memcpy(gd->gtk, ie.gtk + 2, ie.gtk_len - 2); in wpa_supplicant_process_1_of_2_rsn()
1309 u16 ver, struct wpa_gtk_data *gd) in wpa_supplicant_process_1_of_2_wpa() argument
1329 &gd->key_rsc_len, &gd->alg)) in wpa_supplicant_process_1_of_2_wpa()
1332 gd->gtk_len = gtk_len; in wpa_supplicant_process_1_of_2_wpa()
1333 gd->keyidx = (key_info & WPA_KEY_INFO_KEY_INDEX_MASK) >> in wpa_supplicant_process_1_of_2_wpa()
1337 if (key_data_len > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
1345 os_memcpy(gd->gtk, key_data, key_data_len); in wpa_supplicant_process_1_of_2_wpa()
1346 if (rc4_skip(ek, 32, 256, gd->gtk, key_data_len)) { in wpa_supplicant_process_1_of_2_wpa()
1360 if (maxkeylen > sizeof(gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
1369 key_data, gd->gtk)) { in wpa_supplicant_process_1_of_2_wpa()
1380 gd->tx = wpa_supplicant_gtk_tx_bit_workaround( in wpa_supplicant_process_1_of_2_wpa()
1438 struct wpa_gtk_data gd; in wpa_supplicant_process_1_of_2() local
1446 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_process_1_of_2()
1457 &gd); in wpa_supplicant_process_1_of_2()
1461 key_info, ver, &gd); in wpa_supplicant_process_1_of_2()
1469 if (wpa_supplicant_install_gtk(sm, &gd, key->key_rsc) || in wpa_supplicant_process_1_of_2()
1472 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_process_1_of_2()
1491 os_memset(&gd, 0, sizeof(gd)); in wpa_supplicant_process_1_of_2()
2823 struct wpa_gtk_data gd; in wpa_wnmsleep_install_key() local
2825 os_memset(&gd, 0, sizeof(gd)); in wpa_wnmsleep_install_key()
2827 gd.key_rsc_len = wpa_cipher_rsc_len(sm->group_cipher); in wpa_wnmsleep_install_key()
2828 gd.alg = wpa_cipher_to_alg(sm->group_cipher); in wpa_wnmsleep_install_key()
2829 if (gd.alg == WPA_ALG_NONE) { in wpa_wnmsleep_install_key()
2836 gd.gtk_len = keylen; in wpa_wnmsleep_install_key()
2837 if (gd.gtk_len != buf[4]) { in wpa_wnmsleep_install_key()
2839 gd.gtk_len, buf[4]); in wpa_wnmsleep_install_key()
2842 gd.keyidx = keyinfo & 0x03; /* B0 - B1 */ in wpa_wnmsleep_install_key()
2843 gd.tx = wpa_supplicant_gtk_tx_bit_workaround( in wpa_wnmsleep_install_key()
2846 os_memcpy(gd.gtk, buf + 13, gd.gtk_len); in wpa_wnmsleep_install_key()
2849 gd.gtk, gd.gtk_len); in wpa_wnmsleep_install_key()
2850 if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) { in wpa_wnmsleep_install_key()
2851 os_memset(&gd, 0, sizeof(gd)); in wpa_wnmsleep_install_key()
2856 os_memset(&gd, 0, sizeof(gd)); in wpa_wnmsleep_install_key()