Federer's legacy at risk