depends on which DS you have. They have a bunch of different models that act differently and they are all quirky. I can almost guarantee the problem isn't the router although you may need to tweak settings.
For instance, on the original DS you had to use WEP and your password had to be 13 characters long no more no less and the wireless channel has to be set to 1 or 11 nothing else. I was actually on the phone with Nintendo when I found tucked away on their website about the 13 character password. They had no clue so I did their job for them and informed them how to help their other customers.
Nintendo really needs to get their **** together when it comes to connecting to the internet. It would be nice if they had a halfway decent service as well.