<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 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I am using wpa_supplicant on Edison platform (kernel 3.10.17)<o:p></o:p></p>
<p class="MsoNormal">and I have an issue with the group negociation when Edison device
<o:p></o:p></p>
<p class="MsoNormal">tries to become GO (intent value is 15).<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">When the P2P virtual group interface is created and first action frame sent,
<o:p></o:p></p>
<p class="MsoNormal">I have the event RTM_NEWLINKwith the interface state not yet UP since the group negociation<o:p></o:p></p>
<p class="MsoNormal">is not yet completed. See trace below :<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; .....<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; nl80211: Frame TX command accepted; cookie 0x6<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; RTM_NEWLINK: ifi_index=17 ifname=p2p-wlan0-0 operstate=2 linkmode=0 ifi_flags=0x1002 ()<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; Could not read interface p2p-dev-wlan0 flags : No such device<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The problem is that the rest of processing in this situation shuts down the interface<o:p></o:p></p>
<p class="MsoNormal">and group negociation fails.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">The current WLAN driver/chipset on Edison, works fine one platform Android/Kitkat 4.4.2.
<o:p></o:p></p>
<p class="MsoNormal">On Android, for the same sequence, I have the below traces :<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; .....<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; nl80211: Frame TX command accepted; cookie 0x9<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; nl80211: Ignore RTM_NEWLINK event for foreign ifindex 5<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp; ......<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">By looking at the diff between the 2 supplicants, I can see one diff related to the above<o:p></o:p></p>
<p class="MsoNormal">traces. The function have_ifidx() always returns 0 on Android and the codes is only built under flag HOSTAPD.<o:p></o:p></p>
<p class="MsoNormal">Now, when I apply this small patch to the Linux wpa_supplicant 2.2, the group negociation works fine<o:p></o:p></p>
<p class="MsoNormal">(I have the above trace &quot;Ignore ...&quot;, the interface becomes UP after negociation) but the side-effect is that
<o:p></o:p></p>
<p class="MsoNormal">the wpa_supplicant 2.2 crashes on &quot;wpa_cli p2p_group_remove ...&quot;.<o:p></o:p></p>
<p class="MsoNormal">There is memory corruption that makes the sendto() on wpa_cli unix socket
<o:p></o:p></p>
<p class="MsoNormal">crashing when sending the response after the removal.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I am wondering who is faultly in this case.<o:p></o:p></p>
<p class="MsoNormal">Is there a bug in wpa_supplicant 2.2 regarding have_ifidx() vs P2P sequence or
<o:p></o:p></p>
<p class="MsoNormal">there would be an issue in the driver regarding &nbsp;the state of P2P virtual group interface ?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal">&nbsp; Franck<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p>---------------------------------------------------------------------<br>
Intel Corporation SAS (French simplified joint stock company)<br>
Registered headquarters: "Les Montalets"- 2, rue de Paris, <br>
92196 Meudon Cedex, France<br>
Registration Number:&nbsp; 302 456 199 R.C.S. NANTERRE<br>
Capital: 4,572,000 Euros</p>

<p>This e-mail and any attachments may contain confidential material for<br>
the sole use of the intended recipient(s). Any review or distribution<br>
by others is strictly prohibited. If you are not the intended<br>
recipient, please contact the sender and delete all copies.</p></body>
</html>