diff options
author | Eyal Shapira <eyal@wizery.com> | 2012-08-07 03:42:30 +0300 |
---|---|---|
committer | Eyal Shapira <eyal@wizery.com> | 2012-08-09 13:16:15 +0300 |
commit | 1cb767508ec7f760e81d5f1c832fc8263c570c99 (patch) | |
tree | bf81a13ac574b430fec578526998524146264351 | |
parent | c856b3aa7811c0d948a1608fb42dd8f0d9ae9d40 (diff) | |
download | external_wpa_supplicant_8_ti-1cb767508ec7f760e81d5f1c832fc8263c570c99.zip external_wpa_supplicant_8_ti-1cb767508ec7f760e81d5f1c832fc8263c570c99.tar.gz external_wpa_supplicant_8_ti-1cb767508ec7f760e81d5f1c832fc8263c570c99.tar.bz2 |
Fix wpa_s crash and kickstart sched scan (INTERNAL-SQ)
data may be NULL and should be checked before dereferencing it.
This can happen when scan times out for example.
Another bug fixed is that sched scan wouldn't be kick started
from anywhere. Previously it was started following a normal scan
which didn't find any results. Fix it by start it if it's not running.
(These issues were introduced by commit
a523a28 wpa_s: don't reschedule the sched scan on each scan complete event
and the fix should be squashed into it)
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
-rw-r--r-- | wpa_supplicant/events.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index adf0d24..56ae94c 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1231,7 +1231,8 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s, return 0; } #endif /* CONFIG_P2P */ - if (data->scan_info.is_sched_scan_res) + if ((data && data->scan_info.is_sched_scan_res) || + !wpa_s->sched_scanning) wpa_supplicant_req_sched_scan(wpa_s); wpa_supplicant_req_new_scan(wpa_s, timeout_sec, timeout_usec); |