From: Jouni Malinen Date: Sun, 30 Oct 2011 09:41:22 +0000 (+0200) Subject: Skip rate set matching if BSS frequency is not known X-Git-Tag: hostap-1-bp~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6d94e1b5648b6421ef7d6847b4f08257eca2585;p=thirdparty%2Fhostap.git Skip rate set matching if BSS frequency is not known At least with driver_test.c, the BSS table may not include frequency information. In such a case, we need to skip rate set matching during BSS selection to avoid rejecting valid AP. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 74e3bb58f..d86fe1118 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -503,6 +503,9 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_scan_res *bss) const u8 *rate_ie; int i, j, k; + if (bss->freq == 0) + return 1; /* Cannot do matching without knowing band */ + modes = wpa_s->hw.modes; if (modes == NULL) { /*