Lines Matching refs:dstate
911 struct dev_crypto_state *dstate = to->md_data;
915 if (dstate == NULL || fstate == NULL)
918 memcpy(dstate, fstate, sizeof(struct dev_crypto_state));
920 sess = &dstate->d_sess;
924 sess->mackey = dstate->dummy_mac_key;
928 dstate->d_fd = get_dev_crypto();
930 if (ioctl(dstate->d_fd, CIOCGSESSION, sess) < 0) {
931 put_dev_crypto(dstate->d_fd);
932 dstate->d_fd = -1;
939 dstate->mac_data = OPENSSL_malloc(fstate->mac_len);
940 memcpy(dstate->mac_data, fstate->mac_data, fstate->mac_len);
941 dstate->mac_len = fstate->mac_len;