I don't know much of how wpa_supplicant work, but I've encountered
the following problem: apart from usual WPA wlans I use secure wired
connection at work which requires wpa_supplicant as well. The problem
is that the wired connection requires ap_scan=0 set in the config and
doesn't work otherwise (wireless connections, on the contrary, do
not work with ap_scan=0 and only work with ap_scan=1 which is the
default). Since ap_scan is set config-wide (e.g. cannot be set on
per-network basis), the only solution I've came to is to have separate
configs for wired and wireless connections.
The change to /etc/rc.d/wpa_supplicant is minimal and backwards
compatible, however I suspect that documentation changes are also
needed if this patch is accepted.