From: fchristl on
> Is my wpa_supplicant.conf used at all?

Hey Boris,

I had right the same problem, needing to use ndiswrapper and therefore
the option "ap_scan=2" in my wpa_supplicant.conf
Your just quoted question got me on the right direction - and its
answer is definately: no. Your wpa_supplicant.conf is not used at all.
NetworkManager sets ap_scan to 1 by default - the only value that does
not work for me.

The settings are all created on the fly (which basically works out
pretty fine) - the only problem is the option ap_scan. The values for
ap_scan are hard coded and so the only fast way I see to get around
our problem is to edit directly in the code. My way was:

1. Follow the instructions on http://www.gnome.org/projects/NetworkManager/developers/
until it comes to compiling NetworkManager itself
2. Do execute the autogen.sh script as described
3. Now - that's the only important part - let's change any ap_scan
value that's hardcoded to 2! From the NetworkManager source directory,
open the file "src/supplicant-manager/nm-supplicant-config.c" with an
editor of your choice
4. Search for "ap_scan" in this file. The first important occurance I
found was in line 85 (second search result) - change it to "priv-
>ap_scan = 2;". Next important result is #11 - line 343 for me. Do the
same as before. And right the next - #12, line 349 - same prodedure,
again.
5. Save the file and continue as usual

Please obey: This is not a clean method, it's just meant to get
everything working as fast as possible. Since the used code is SVN
based, the line numbers and search results can vary! It's just the
general way to fix this problem dirty and fast.

I hope I helped you...

Greetings,
Felix

From: fchristl on
A patch for the current SVN version:

--- nm-supplicant-config.c 2008-01-29 22:01:36.000000000 +0100
+++ nm-supplicant-config-fc.c 2008-01-29 21:59:58.000000000 +0100
@@ -82,7 +82,7 @@
(GDestroyNotify) g_free,
(GDestroyNotify)
blob_free);

- priv->ap_scan = 1;
+ priv->ap_scan = 2;
priv->dispose_has_run = FALSE;
}

@@ -346,6 +346,7 @@
* ap_scan=1, while those that do not should use
ap_scan=2.
*/
priv->ap_scan = has_scan_capa_ssid ? 1 : 2;
+ priv->ap_scan = 2;
}

if (!nm_supplicant_config_add_option (self, "ssid",