<div dir="ltr"><div><span class="" style="white-space:pre">Hi all,</span></div><div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre">I've been looking through the wpa_supplicant source code trying to work out how wpa_supplicant manages switch-over between BSSIDs in a mesh network, and I found the following code in wpa_supplicant_req_sched_scan():</span></div>
<div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre"><br></span></div><div><span class="" style="white-space:pre">        </span>/* If we have more SSIDs to scan, add a timeout so we scan them too */</div>
<div><span class="" style="white-space:pre">        </span>if (ssid || !wpa_s->first_sched_scan) {</div><div><span class="" style="white-space:pre">                </span>wpa_s->sched_scan_timed_out = 0;</div><div><span class="" style="white-space:pre">                </span>eloop_register_timeout(wpa_s->sched_scan_timeout, 0,</div>
<div><span class="" style="white-space:pre">                                </span> wpa_supplicant_sched_scan_timeout,</div><div><span class="" style="white-space:pre">                                </span> wpa_s, NULL);</div><div><span class="" style="white-space:pre">                </span>wpa_s->first_sched_scan = 0;</div>
<div><span class="" style="white-space:pre">                </span>wpa_s->sched_scan_timeout /= 2;</div><div><span class="" style="white-space:pre">                </span>wpa_s->sched_scan_interval *= 2;</div><div><span class="" style="white-space:pre">                </span>if (wpa_s->sched_scan_timeout < wpa_s->sched_scan_interval) {</div>
<div><span class="" style="white-space:pre">                        </span>wpa_s->sched_scan_interval = 10;</div><div><span class="" style="white-space:pre">                        </span>wpa_s->sched_scan_timeout = max_sched_scan_ssids * 2;</div><div><span class="" style="white-space:pre">                </span>}</div>
<div><span class="" style="white-space:pre">        </span>}</div><div><br></div><div><br></div><div>What's the reasoning behind halving the timeout? If you were trying to scan more SSIDs, wouldn't it make more sense to double it?</div>
<div><br></div><div>Cheers,</div><div>Matthew</div><div><br></div></div>