Why does the Torah see fit to mention here, the fact that Cham was the father of Kena'an?
Rashi: Because the Parshah is about to record the episode of Noach's drunkenness, in which his son Cham, sinned, as a result of which his son Kena'an would be cursed. Had the Torah not informed us first, we would not have known who Kena'an was. 1
Seforno: To explain Cham's behavior (in the forthcoming Parshah); the Torah is telling us that Cham's characteristics resembled those of the infamous Kena'anim
This answer is problematic however, seeing as the Torah repeats the fact that Cham was Kena'an's father (9:22) before he was cursed. So why mention it here?
When the Torah writes that "Noach knew what his youngest son had done" (9:24), it refers to the youngest son of Cham, who was mentioned two Pesukim earlier.
The Ramban himself cites 9:22, leaving us with the question that we posed on Rashi (above, note 1).
Had he cursed Cham, that would have included any children that he may (or may not) have fathered from now on, but not Kena'an, who was already born.