I haven't seen this solution posted anywhere and it's pretty simple. You have to prepend a $ on WEP and WPA keys on your Mac computer when attaching to a non-apple wireless access point.
I first came across this about 10 years ago, when B first came out and the big issue was what level WEP key you needed (56 vs 128). For proprietary reasons, Apple did not want people using industry standard IEEE non-Apple wireless access points, so intentionally made it difficult to attach to them. This is not a slam on Apple, it's an unfortunate fact.
After digging through Apple's support for a few days trying to troubleshoot why all my Mac clients were unable to attach to other manufacturer's WAP's, I finally found this little snippet. It said when you attach to a WAP that is not an Airport, you need to put a $ at the beginning of the string.
Last week, I had a student with a Macbook Pro unable to attach to a Netgear router in his new apartment. We looked at all the obvious things (wireless overlap, etc), and I finally suggested the $ option. Turns out that it worked. The Netgear is configured to WPA PSK encryption, and the Macbook Pro still needed that $ at the beginning of the key in order to make it work. Don't know why it would still be a problem after all these years, but it's still hiding there in the code on the Mac.
Hope that helps if you ever have trouble attaching a Mac to a non-Apple WAP.
titus