| Submitter | Pandiyarajan Pitchaimuthu |
|---|---|
| Date | Nov. 15, 2012, 12:51 p.m. |
| Message ID | <1352983865-3684-1-git-send-email-c_ppitch@qca.qualcomm.com> |
| Download | mbox | patch |
| Permalink | /patch/199269/ |
| State | Accepted |
| Commit | 602c6b8340b5521c82df0535698137dd73ae2350 |
| Headers | show |
Comments
On Thu, Nov 15, 2012 at 06:21:05PM +0530, Pandiyarajan Pitchaimuthu wrote: > Cancel the existing supplicant scan and start a new supplicant > scan on pno start and stop respectively. This makes sure that > supplicant scan is in progress when the device resumes. Thanks, applied.
Patch
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index a4b2611..749d39f 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -58,6 +58,11 @@ static int pno_start(struct wpa_supplicant *wpa_s) if (wpa_s->pno) return 0; + if(wpa_s->wpa_state == WPA_SCANNING) { + wpa_supplicant_cancel_sched_scan(wpa_s); + wpa_supplicant_cancel_scan(wpa_s); + } + os_memset(¶ms, 0, sizeof(params)); num_ssid = 0; @@ -113,11 +118,17 @@ static int pno_start(struct wpa_supplicant *wpa_s) static int pno_stop(struct wpa_supplicant *wpa_s) { + int ret = 0; + if (wpa_s->pno) { wpa_s->pno = 0; - return wpa_drv_stop_sched_scan(wpa_s); + ret = wpa_drv_stop_sched_scan(wpa_s); } - return 0; + + if (wpa_s->wpa_state == WPA_SCANNING) + wpa_supplicant_req_scan(wpa_s, 0, 0); + + return ret; }
Cancel the existing supplicant scan and start a new supplicant scan on pno start and stop respectively. This makes sure that supplicant scan is in progress when the device resumes. Signed-off-by: Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> --- wpa_supplicant/ctrl_iface.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)