Automatically selecting channel

Jouni Malinen jkmaline at cc.hut.fi
Sun Feb 1 12:05:01 EST 2004


On Sun, Feb 01, 2004 at 02:19:29PM +0000, Roy Badami wrote:

> The examples I recall seeing of wireless networking under Linux seem to
> explicitly set the channel.

For adhoc and master modes, but not for managed..

> But I've just realized that my hostap client associates with my AP
> just fine, even if I don't set the channel (indeed, even if I
> explicitly set an incorrect channel).
> 
> Is this a standard feature of wi-fi under Linux that I'd missed, or is
> this some special feature of hostap or perhaps of the way
> wpa_supplicant probes for networks (I'm using WPA-PSK on my home AP;
> haven't had a chance to see if I get the same behaviour on a non-WPA
> AP).

Managed mode clients are scanning for APs from all channels and then
select one of them. At this point the channel already known from the
scan results. With many cards, e.g., Prism2/2.5/3, this is implemented
in the card firmware and it doesn't really matter whether you are using
Windows or Linux. With cards that use host system for things like IEEE
802.11 management, e.g., Atheros ar521x-based cards, this needs to be
implemented in the driver.

Running wpa_supplicant with the Host AP driver differs a bit, since this
actually disables automatic roaming done by the firmware. wpa_supplicant
requests scan whenever it needs BSS information (like WPA information
element) and then selects which AP to use. It will also set the channel
to match with the selected AP. I haven't yet done much testing of
wpa_supplicant as far as roaming is concerned, but it is certainly
supposed to automatically roam to another AP if the current AP goes out
of range.

> Or has it never been necessary to set a channel in managed mode, and
> I was just confused?

I don't remember seeing any released Linux driver that would have
required channel to be set in managed mode. Maybe some early development
versions have required this if scanning was not implemented in card
firmware.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the HostAP mailing list