/* Check if the key_len is supported by the HW. Returns 0 if it is, a positive number if it is not and software fallback is required or a negative number in case the key size is not valid  */
static int need_fallback(unsigned int key_len)
/* Check if the key_len is supported by the HW. Returns 0 if it is, a positive number if it is not and software fallback is required or a negative number in case the key size is not valid  */
static int need_fallback(unsigned int key_len)
{
	switch (key_len) {
	case 16:
		if (!(keylen_flag & AES_KEYLEN_128))
			return 1;
		break;
	case 24:
		if (!(keylen_flag & AES_KEYLEN_192))
			return 1;
		break;
	case 32:
		if (!(keylen_flag & AES_KEYLEN_256))
			return 1;
		break;
	default:
		return -1;
		break;
	}
	return 0;
}