[PATCH 1/1] STA: update scan results for ap_scan = 1 case also

Jithu Jance jithujance at gmail.com
Thu Aug 14 02:21:53 EDT 2014


Hi Jouni,

>
> Thanks! Yes, It's the latter one (wpa_supplicant_update_scan_results).
> Your patch looks good to me. That should do the job. I will test it
> and re-submit the patch.
>

Your patch works fine. Could you commit it?

>
Signed-off-by: Jithu Jance <jithu at broadcom.com>
---
 wpa_supplicant/events.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 4e84f6e..975bc78 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -89,8 +89,19 @@ static int wpa_supplicant_select_config(struct
wpa_supplicant *wpa_s)
    struct wpa_bss *bss;
    int res;

-   if (wpa_s->conf->ap_scan == 1 && wpa_s->current_ssid)
+   if (wpa_s->conf->ap_scan == 1 && wpa_s->current_ssid) {
+       bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
+       if (!bss) {
+           wpa_dbg(wpa_s, MSG_DEBUG, "Update scan results");
+           wpa_supplicant_update_scan_results(wpa_s);
+
+           /* Get the BSS from the new scan results */
+           bss = wpa_supplicant_get_new_bss(wpa_s, wpa_s->bssid);
+       }
+       if (bss)
+           wpa_s->current_bss = bss;
        return 0;
+   }

    wpa_dbg(wpa_s, MSG_DEBUG, "Select network based on association "
        "information");
--
1.7.9.5


More information about the HostAP mailing list