net/ena/base: use min/max macros with type conversion