linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pondering: how to improve mac80211 roaming ...
@ 2008-08-12  6:38 Holger Schurig
  2008-08-12  8:22 ` Jouni Malinen
  2008-08-14  6:42 ` Kalle Valo
  0 siblings, 2 replies; 20+ messages in thread
From: Holger Schurig @ 2008-08-12  6:38 UTC (permalink / raw)
  To: linux-wireless

Hi !

The last days I looked a bit at mac80211 and how it works. While
doing this, I detected that mac80211 does virtually no roaming.
That is, it is very usable for a hot-spot setup (Office, Home,
Starbucks), but not for a place where you have 20 Access-Points
and move between them.

It looks like that somebody (Jiri?) also detected this, because
I found he following TODO in mlme.c:

    /* TODO: start monitoring current AP signal quality and number of
     * missed beacons. Scan other channels every now and then and search
     * for better APs. */

While pondering about this, I had some thought which I wanted to
confirm with the greater community, so that I don't make a patch
that won't be accepted.


How to detect missed beacons?
-----------------------------
When I know the beacon period, I could setup a timer
with "beacon_period + beacon_period*0.5". In the timer function I
could then increase a missed beacon counter and act accordingly,
e.g. search for APs, roam etc.

But how would I determine the beacon period?


Is detection of missed beacons good enought?
--------------------------------------------
For me this approach seems like driving a car into the wall of a
house. Then crash-detection notifies me and I'd search for a new
way to drive.

Certainly it's better to act before the accident happens, so I'd
rather do it differently. With a fullmac driver I looked at the
RSSI and, when it fell below a certain threshhold, started the
roaming.

In mac80211, I could do this in ieee80211_rx_bss_info(), in the
vincinity of those lines:

        bss->timestamp = beacon_timestamp;
        bss->last_update = jiffies;
        bss->signal = rx_status->signal;
        bss->noise = rx_status->noise;
        bss->qual = rx_status->qual;
        if (!beacon && !bss->probe_resp)
                bss->probe_resp = true;

        /*
         * In STA mode, the remaining parameters should not be overridden
         * by beacons because they're not necessarily accurate there.
         */
        if (sdata->vif.type != IEEE80211_IF_TYPE_IBSS &&
            bss->probe_resp && beacon) {
                ieee80211_rx_bss_put(local, bss);
                return;
        }


In-kernel or in-userspace?   --- or hybrid?
-------------------------------------------
Some people say that in-userspace roaming is the way to go.
Maybe. But in-kernel, I have more information. In the mac80211
case, the above quoted code is executed whenever I receive a
beacon. So I can very quickly react to declining SNR. Userspace
would have to issue periodically scan requests and process them,
quite a bit of overhead.

But there is existing user-space code that does roaming, e.g. WPA
Supplicant and (probably, not sure) Network-Manager.

So I think I'd opt to a hybrid approach. Userspace uses cfg80211
to configure some roaming threshold to mac80211. mac80211 would
gain AP-is-about-to-fail detection and, if it detects this, it
would signal via cfg80211 (is this possible?) to user-space that
it should now roam.

Userspace then could, while still associated, scan for other APs
(e.g. first on preferred channels, like 1,6,11, then on all
channels) and if it finds something, trigger association to
another AP.


For a WEP or non-encrypted environment a in-kernel-roaming would
be possible, this would bring a similar behavior to mac80211 that
common fullmac drivers exhibit. But my first goal would not be in
this area.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-08-14 18:28 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-12  6:38 Pondering: how to improve mac80211 roaming Holger Schurig
2008-08-12  8:22 ` Jouni Malinen
2008-08-12  9:56   ` Holger Schurig
2008-08-12 12:40   ` Helmut Schaa
2008-08-12 15:42     ` Jouni Malinen
2008-08-12 17:56       ` Luis R. Rodriguez
2008-08-13  6:41         ` Holger Schurig
2008-08-13  6:50           ` Jouni Malinen
2008-08-13 12:26       ` Helmut Schaa
2008-08-13 12:49         ` Dan Williams
2008-08-13 12:53           ` Helmut Schaa
2008-08-13 14:18         ` Holger Schurig
2008-08-13 14:26           ` Helmut Schaa
2008-08-13  6:52   ` Holger Schurig
2008-08-13 12:02     ` Dan Williams
2008-08-13 14:28       ` Holger Schurig
2008-08-14  7:05   ` Kalle Valo
2008-08-14  8:25     ` Jouni Malinen
2008-08-14 18:30       ` Dan Williams
2008-08-14  6:42 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).