Both; but honestly, the latter was more important. Simply having a
name for the reasons why, no matter how hard I tried and no matter how much I really, genuinely, truly
wanted to, there were certain things I just
couldn't do... that alone was extremely relieving. And infuriating. And vindicating. But mostly, genuinely relieving.
I was able to accept that I wasn't an incompetent fool, incapable of being useful - I had ADHD.[1] That was OK. That meant I could accept what I was bad at, focus on the things I was good at, and use techniques to adjust for the things I've now accepted I'm bad at, instead of incessantly trying to do the same thing over and over that works for other people but ... just doesn't work for me.
Medication has also helped, and I use it on an as-needed basis, but it is not, alone, a cure for anything - it is a tool, often an incredibly helpful one, but still just that. The education and understanding about what ADHD is has been far more helpful, though I'm glad I have the medication as a tool, too.
[1] Incidentally, not understanding your own effect on other people, and devaluing your own contributions and successes? Also a symptom of ADHD. Think about it: most people choose, simply, to try to do the things they are likely to be successful at; they choose carefully. ADHD people do not choose; they can't. They do all of the things they might be excited about, meaning they fail, frankly, at most of them. But in those that they succeed, they are often wildly successful; to everyone else, this is objectively obvious. To the ADHD person, they know they've failed 98 times for every 2 successes, and often fall into a depression (though not as deep as someone who has clinical depression or BPD, unless that's a separate symptom) after nearly every success.