<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Arial","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hello Jouni and All,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Current kernel cfg80211 framework seems to have a problem
handling roaming. Upon scan event, wpa_supplicant will roam if a BSSID with
better signal strength is found (in wpa_supplicant_need_to_roam). It calls
wpa_supplicant_connect and eventually to kernel’s __cfg80211_connect.
However __cfg80211_connect check current status and returns -EALREADY if
it is already connected<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>In compat-linux/net/wireless/sme.c<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>int __cfg80211_connect(struct cfg80211_registered_device
*rdev,<o:p></o:p></p>
<p class=MsoNormal>
struct net_device *dev,<o:p></o:p></p>
<p class=MsoNormal>
struct cfg80211_connect_params *connect,<o:p></o:p></p>
<p class=MsoNormal>
struct cfg80211_cached_keys *connkeys,<o:p></o:p></p>
<p class=MsoNormal>
const u8 *prev_bssid)<o:p></o:p></p>
<p class=MsoNormal>{<o:p></o:p></p>
<p class=MsoNormal>
… <o:p></o:p></p>
<p class=MsoNormal>
if (wdev->sme_state != CFG80211_SME_IDLE)<o:p></o:p></p>
<p class=MsoNormal>
return –EALREADY;<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>The wpa_supplicant then goes into a loop in retrying
association. NL80211 has a NL80211_CMD_ROAM command but it is implemented yet.
We can work around this by dissociating from previous AP but it not roaming..<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Anyone has a solution for this? <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Thanks,<o:p></o:p></p>
<p class=MsoNormal>Lin<o:p></o:p></p>
</div>
</body>
</html>