Federer beats Wawrinka to seal Djokovic final