<div dir="ltr"><div>Hi Jouni,</div><div><br></div><div>On Fri, Nov 8, 2013 at 10:10 AM, Jithu Jance <span dir="ltr"><<a href="mailto:jithujance@gmail.com" target="_blank">jithujance@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hi Jouni,<div><br></div><div><br><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Maybe an additional "int own_request" argument for<br>wpas_select_network_from_last_scan() and using that to determine whether<br>to start the scan request at the end of the selected == NULL && ssid ==<br>
NULL case?</blockquote><div> </div></div><div>Makes sense. Thanks for your feedback. I will change the patch accordingly and resubmit it.<br></div><div> </div></div></div></div></div></blockquote></div><div>Kindly see whether the below patch is fine.</div>
<div><br></div><div><br></div><div>Signed-hostap: Jithu Jance <<a href="mailto:jithu@broadcom.com">jithu@broadcom.com</a>></div><div>---</div><div> wpa_supplicant/events.c | 15 ++++++++++-----</div><div> 1 file changed, 10 insertions(+), 5 deletions(-)</div>
<div><br></div><div>diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c</div><div>index 4493772..ae2c07c 100644</div><div>--- a/wpa_supplicant/events.c</div><div>+++ b/wpa_supplicant/events.c</div><div>@@ -46,7 +46,7 @@</div>
<div><br></div><div> #ifndef CONFIG_NO_SCAN_PROCESSING</div><div> static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,</div><div>-<span class="" style="white-space:pre">                                        </span> int new_scan);</div>
<div>+<span class="" style="white-space:pre">                                        </span> int new_scan, int own_request);</div><div> #endif /* CONFIG_NO_SCAN_PROCESSING */</div><div><br></div><div><br></div><div>@@ -1302,12 +1302,12 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,</div>
<div><br></div><div> <span class="" style="white-space:pre">        </span>wpa_scan_results_free(scan_res);</div><div><br></div><div>-<span class="" style="white-space:pre">        </span>return wpas_select_network_from_last_scan(wpa_s, 1);</div>
<div>+<span class="" style="white-space:pre">        </span>return wpas_select_network_from_last_scan(wpa_s, 1, own_request);</div><div> }</div><div><br></div><div><br></div><div> static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,</div>
<div>-<span class="" style="white-space:pre">                                        </span> int new_scan)</div><div>+<span class="" style="white-space:pre">                                        </span> int new_scan, int own_request)</div><div> {</div><div> <span class="" style="white-space:pre">        </span>struct wpa_bss *selected;</div>
<div> <span class="" style="white-space:pre">        </span>struct wpa_ssid *ssid = NULL;</div><div>@@ -1342,7 +1342,12 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,</div><div> <span class="" style="white-space:pre">                        </span>wpa_supplicant_associate(wpa_s, NULL, ssid);</div>
<div> <span class="" style="white-space:pre">                        </span>if (new_scan)</div><div> <span class="" style="white-space:pre">                                </span>wpa_supplicant_rsn_preauth_scan_results(wpa_s);</div><div>-<span class="" style="white-space:pre">                </span>} else {</div>
<div>+<span class="" style="white-space:pre">                </span>} else if (own_request) {</div><div>+<span class="" style="white-space:pre">                        </span>/*</div><div>+<span class="" style="white-space:pre">                        </span> * No SSID found. If SCAN results are as a result of</div>
<div>+<span class="" style="white-space:pre">                        </span> * own scan request and not due to a scan request on</div><div>+<span class="" style="white-space:pre">                        </span> * another shared interface, try another scan.</div>
<div>+<span class="" style="white-space:pre">                        </span> * */</div><div> <span class="" style="white-space:pre">                        </span>int timeout_sec = wpa_s->scan_interval;</div><div> <span class="" style="white-space:pre">                        </span>int timeout_usec = 0;</div>
<div> #ifdef CONFIG_P2P</div><div>@@ -1446,7 +1451,7 @@ int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s)</div><div> <span class="" style="white-space:pre">                </span>return -1;</div><div> <span class="" style="white-space:pre">        </span>}</div>
<div><br></div><div>-<span class="" style="white-space:pre">        </span>return wpas_select_network_from_last_scan(wpa_s, 0);</div><div>+<span class="" style="white-space:pre">        </span>return wpas_select_network_from_last_scan(wpa_s, 0, 1);</div>
<div> #endif /* CONFIG_NO_SCAN_PROCESSING */</div><div> }</div><div><br></div><div>--</div><div>1.7.9.5</div><div><br></div><div class="gmail_extra"><div><div><br></div><div><b style="color:rgb(102,102,102)"><font face="'courier new', monospace">> Jithu Jance</font></b></div>
<div><br></div></div></div></div>