Personally, I'd worry about your source code. I use nl80211, and I can get online without issue.
nl80211 is used as an argument to wpa_supplicant, presuming you're using that. You can also use the other driver (wext?)but check if there's capitals in that. Also check the libraries to wpa_supplicant
Code:
ldd /usr/sbin/wpa_supplicant |grep found
There's often a log file kept of connections to help debugging, but if you use networkmanager, I don't know much about setting that up.