/* Returns a bit field marking the highest possibility lower than value.  */
static int value_highest_bit(__u32 value, __u32 *array, int size, __u16 *field)
/* Returns a bit field marking the highest possibility lower than value.  */
static int value_highest_bit(__u32 value, __u32 *array, int size, __u16 *field)
{
	int	i;
	__u16	mask = 0x1;
	__u16	result = 0x0;
	for (i=0; i < size; i++) {
		if (array[i] <= value)
			break;
		mask <<= 1;
	}
	result |= mask;
	if(i >= size)
	  i = size - 1;
	*field = result;
	return i;
}