Replace your network interface name (eth1) and your wireless network's ESSID (MYESSID), and chmod +x the file. From now on, NetworkManager connects to my wireless network flawlessly every time. I tried simpler things such as "iwconfig eth1 rate 11M" or "ifconfig eth1 up", but it seems that setting your wireless ESSID manually before NetworkManager kicks in is the only way to fix the issue. Setting a dummy ESSID also doesn't help, it has to be your real ESSID.
I whipped up a script that essentially fixes the problem, but it's working around what I suspect to be a driver or NetworkManager issue.
/etc/network/ if.pre- up.d/hackwirele ss:
#!/bin/sh
iwconfig eth1 essid MYESSID
sleep 2
Replace your network interface name (eth1) and your wireless network's ESSID (MYESSID), and chmod +x the file. From now on, NetworkManager connects to my wireless network flawlessly every time. I tried simpler things such as "iwconfig eth1 rate 11M" or "ifconfig eth1 up", but it seems that setting your wireless ESSID manually before NetworkManager kicks in is the only way to fix the issue. Setting a dummy ESSID also doesn't help, it has to be your real ESSID.
What logs do you need to troubleshoot this issue?