This is a known limitation rather than a fault with your console, and it is worth understanding before you spend hours on settings.
The DSi's Advanced Setup works fine for DSiWare and the shop, which is why those connect without complaint. Older DS games are the problem: they were written before WPA and WPA2 existed and generally only connect to open networks or ones secured with WEP. No amount of Advanced Setup configuration changes that, because the limitation is in the game itself.
So the practical options are to use a network you can set to WEP or leave open temporarily, or to accept that those titles will not go online on a modern secured router. The old Nintendo Wi-Fi USB Connector worked around this, though it is long discontinued and its drivers are a nuisance on current versions of Windows.