Browse Source

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 <j@w1.fi>
Jouni Malinen 13 years ago
parent
commit
a6d94e1b56
1 changed files with 3 additions and 0 deletions
  1. 3 0
      wpa_supplicant/events.c

+ 3 - 0
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) {
 		/*