minor patch to wpa_supplicant_select_bss()

Andriy Tkachuk andriy.tkachuk
Tue Sep 16 02:51:18 PDT 2008


Hi all.

To avoid printing of odd debug message "Try to find non-WPA AP" when WPA 
AP already found (that may be confusing) there might be useful following 
patch:

index 0f9b338..dd9134e 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -432,17 +432,17 @@ wpa_supplicant_select_bss(struct wpa_supplicant *wpa_s, struct wpa_ssid *group,
                         }
                         if (wpa_supplicant_ssid_bss_match(ssid, bss)) {
                                 selected = bss;
                                 *selected_ssid = ssid;
                                 wpa_printf(MSG_DEBUG, "   selected WPA AP "
                                            MACSTR " ssid='%s'",
                                            MAC2STR(bss->bssid),
                                            wpa_ssid_txt(ssid_, ssid_len));
-                               break;
+                               return selected;
                         }
                 }
         }

         /* If no WPA-enabled AP found, try to find non-WPA AP, if configuration
          * allows this. */
         wpa_printf(MSG_DEBUG, "Try to find non-WPA AP");
         for (i = 0; i<  wpa_s->scan_res->num&&  !selected; i++) {


Regards,
    Andriy



More information about the Hostap mailing list