• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/arch/cris/arch-v32/drivers/

Lines Matching refs:cipher_ctx

719 	struct cryptocop_tfrm_ctx cipher_ctx = {
832 if (cipher_ctx.tcfg != NULL){
838 cipher_ctx.cbcmode = 0;
839 cipher_ctx.decrypt = 0;
840 cipher_ctx.blocklength = 1;
841 cipher_ctx.ciph_conf = 0;
842 cipher_ctx.unit_no = src_dma;
843 cipher_ctx.tcfg = tcfg;
844 cipher_ctx.tctx = tctx;
850 if (cipher_ctx.tcfg != NULL){
855 cipher_ctx.tcfg = tcfg;
856 cipher_ctx.tctx = tctx;
857 if (cipher_ctx.tcfg->flags & CRYPTOCOP_DECRYPT){
858 cipher_ctx.decrypt = 1;
862 cipher_ctx.cbcmode = 0;
865 cipher_ctx.cbcmode = 1;
868 DEBUG_API(printk("cryptocop_setup_dma_list: cipher_ctx, bad cipher mode==%d\n", tctx->init.cipher_mode));
872 DEBUG(printk("cryptocop_setup_dma_list: cipher_ctx, set CBC mode==%d\n", cipher_ctx.cbcmode));
875 cipher_ctx.ciph_conf = 0;
876 cipher_ctx.unit_no = src_des;
877 cipher_ctx.blocklength = DES_BLOCK_LENGTH;
880 cipher_ctx.ciph_conf = 1;
881 cipher_ctx.unit_no = src_des;
882 cipher_ctx.blocklength = DES_BLOCK_LENGTH;
885 cipher_ctx.ciph_conf = 2;
886 cipher_ctx.unit_no = src_aes;
887 cipher_ctx.blocklength = AES_BLOCK_LENGTH;
940 if (cipher_ctx.tcfg && (cipher_ctx.tctx->init.alg != cryptocop_alg_mem2mem)){
943 failed = setup_key_dl_desc(&cipher_ctx, &key_desc, alloc_flag);
953 if ((cipher_ctx.tctx->init.cipher_mode == cryptocop_cipher_mode_cbc) && (cipher_ctx.tcfg->flags & CRYPTOCOP_EXPLICIT_IV)) {
958 failed = setup_cipher_iv_desc(&cipher_ctx, &iv_desc, alloc_flag);
988 } else if (cipher_ctx.tcfg && (cipher_ctx.tcfg->tid == dcfg->tid)){
989 tc = &cipher_ctx;
1039 } else if (cipher_ctx.unit_no == tc->current_src){
1040 tc->curr_src = &cipher_ctx;
1077 if (cipher_ctx.active && (cipher_ctx.curr_src != NULL) && !cipher_ctx.curr_src->active){
1078 DEBUG_API(printk("cryptocop_setup_dma_list: cipher source from inactive unit %d\n", cipher_ctx.curr_src->unit_no));
1122 if (cipher_ctx.active) {
1124 assert(cipher_ctx.current_src == src_dma);
1125 cipher_ctx.consumed += desc_len;
1126 cipher_ctx.produced = cipher_ctx.blocklength * (cipher_ctx.consumed / cipher_ctx.blocklength);
1127 if (cipher_ctx.cbcmode && !(cipher_ctx.tcfg->flags & CRYPTOCOP_EXPLICIT_IV) && cipher_ctx.produced){
1128 cipher_ctx.produced -= cipher_ctx.blocklength; /* Compensate for CBC iv. */
1130 DEBUG(printk("cryptocop_setup_dma_list: cipher_ctx producing: consumed=%d, produced=%d, blocklength=%d.\n", cipher_ctx.consumed, cipher_ctx.produced, cipher_ctx.blocklength));
1137 if (cipher_ctx.active) {
1139 if (cipher_ctx.unit_no == src_dma){
1143 meta_out.ciphsel = cipher_ctx.current_src;
1145 meta_out.ciphconf = cipher_ctx.ciph_conf;
1146 meta_out.cbcmode = cipher_ctx.cbcmode;
1147 meta_out.decrypt = cipher_ctx.decrypt;
1149 if (cipher_ctx.done) ++eop_needed_count;
1211 assert(cipher_ctx.active && cipher_ctx.done);
1213 if (cipher_ctx.unit_no == src_dma){
1217 ed_mo.ciphsel = cipher_ctx.current_src;
1219 ed_mo.ciphconf = cipher_ctx.ciph_conf;
1220 ed_mo.cbcmode = cipher_ctx.cbcmode;
1221 ed_mo.decrypt = cipher_ctx.decrypt;
1240 if (cipher_ctx.done && cipher_ctx.active) cipher_ctx.active = 0;
1247 if (cipher_ctx.tcfg && (cipher_ctx.active || !cipher_ctx.done)){
1263 failed = append_input_descriptors(operation, &current_in_cdesc, &current_out_cdesc, &cipher_ctx, alloc_flag);
1265 DEBUG_API(printk("cryptocop_setup_dma_list: append_input_descriptors cipher_ctx %d\n", failed));
1270 DEBUG_API(printk("cryptocop_setup_dma_list: append_input_descriptors cipher_ctx %d\n", failed));
1275 DEBUG_API(printk("cryptocop_setup_dma_list: append_input_descriptors cipher_ctx %d\n", failed));
1341 assert(cipher_ctx.pad_descs == NULL); /* The ciphers are never padded. */