Roger Federer has done pretty much everything there is to do in tennis and will go down as probably the greatest of all time - but he's still learning some of the rules.

Federer was speaking with journalists at the ATP Tour finals in London when the 2022 Tokyo Olympics came up.

Federer, however, was not aware that he would have to alter his schedule if he wanted to compete.

The Swiss legend will be 40-years-old by the time the competition rolls around, although age might not hold back his motivation to win the one major singles prize he's never won.

He missed the 2016 Rio Olympics because of knee surgery, but did reach the final at London 2012 before losing to an emotionally charged Andy Murray.

Beijing 2008 did see Federer go home with a gold medal, however, as he won the men's doubles with Stan Wawrinka.

If he does want to compete for the gold in singles, Federer needs to meet the qualification requirements - requirements he didn't know existed until a journalist made him aware.

Federer was asked if he would be competing in the Davis Cup, a competition that hasn't seen him since 2015, with the journalist letting the reigning Wimbledon champion know that he is required to feature in two matches before the next Olympics if he wants to compete.

“I didn’t even know the rule, so thanks for the information,” he said

“I haven’t officially retired from the Davis Cup, so not because of that reason. It’s just because it’s always highly unlikely that I’ll play at this stage of my career."

Federer has limited his schedule so far this year, deciding to forego certain events to save himself for others.

The Davis Cup didn't seem high on his list of "must-plays", but perhaps this new information could change that.