This fix is a backport from the lantiq UGW-6.1.1-MR1
Signed-off-by: Martin Schiller <mschiller@tdt.de>
//tc.chen : copy iv_arg back
if (mode > 0) {
- *((u32 *) iv_arg) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg));
- *((u32 *) iv_arg + 1) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 1));
- *((u32 *) iv_arg + 2) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 2));
- *((u32 *) iv_arg + 3) = DEU_ENDIAN_SWAP(*((u32 *) iv_arg + 3));
+ *((u32 *) iv_arg) = DEU_ENDIAN_SWAP(aes->IV3R);
+ *((u32 *) iv_arg + 1) = DEU_ENDIAN_SWAP(aes->IV2R);
+ *((u32 *) iv_arg + 2) = DEU_ENDIAN_SWAP(aes->IV1R);
+ *((u32 *) iv_arg + 3) = DEU_ENDIAN_SWAP(aes->IV0R);
}
CRTCL_SECT_END;