Managed Mode -- Use of wifi0 and wlan0 devices?
jkmaline at cc.hut.fi
Sun Apr 3 12:23:55 EDT 2005
On Mon, Mar 28, 2005 at 07:02:32PM -0500, Tony Espy wrote:
> One of the first things I ran into was that when killed, pump marked the
> interface as DOWN. Since HostAP requires one or more of it's device(s)
> to be UP in order function, I had to run some extra code to make sure
> "wlan0" was marked UP before associating with a new AP.
> It also seems to me that the right way to handle changing IP addresses,
> is to mark the interface DOWN, muck with the IP parameters, then mark
> the interface UP.
I don't see why this would be necessary for IP parameters, but yes, many
DHCP clients do it.
> So, I came up with the idea of using both HostAP devices; "wifi0" for
> association, and "wlan0" as my actual IP interface. This allows
> toggling of "wlan0"'s UP/DOWN flag ( by pump, or other code ) without
> disabling the HostAP driver as "wifi0" remains UP and thus
> wpa_supplicant is free to do it's thing.
In order to allow users to completely ignore wifi0, Host AP driver
sets it UP automatically when needed. If this has happened, it will also
be set DOWN automatically when the other interface is being set DOWN. If
wifi0 is set UP manually, the driver does not set it down automatically.
In other wrods, what you describe here is indeed expected behavior and
one way of making sure the driver keeps the wlan card operational all
> Am I correct to be using both HostAP devices in such a manner while in
> managed (STA) mode?
Yes, it is ok to set wifi0 UP manually in any mode.
Jouni Malinen PGP id EFC895FA
More information about the HostAP