Browse Source

Enable Beacon Report using beacon table for all drivers

The special parameters for beacon report scan are not needed for the
beacon report when using the beacon table measurement mode. Advertise
support for this case regardless of whether the driver supports the scan
parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 8 years ago
parent
commit
de6ec8b558
2 changed files with 7 additions and 5 deletions
  1. 5 3
      wpa_supplicant/rrm.c
  2. 2 2
      wpa_supplicant/sme.c

+ 5 - 3
wpa_supplicant/rrm.c

@@ -1030,11 +1030,13 @@ wpas_rm_handle_beacon_req(struct wpa_supplicant *wpa_s,
 	u32 _rand;
 	int ret = 0, res;
 
-	if (!(wpa_s->drv_rrm_flags & WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT))
-		return 0;
-
 	if (len < sizeof(*req))
 		return -1;
+
+	if (req->mode != BEACON_REPORT_MODE_TABLE &&
+	    !(wpa_s->drv_rrm_flags & WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT))
+		return 0;
+
 	subelems = req->variable;
 	elems_len = len - sizeof(*req);
 	rand_interval = le_to_host16(req->rand_interval);

+ 2 - 2
wpa_supplicant/sme.c

@@ -189,8 +189,8 @@ static void sme_auth_handle_rrm(struct wpa_supplicant *wpa_s,
 
 	if (wpa_s->drv_rrm_flags & WPA_DRIVER_FLAGS_SUPPORT_BEACON_REPORT)
 		*pos |= WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
-			WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
-			WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
+			WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE;
+	*pos |= WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
 
 	if (wpa_s->lci)
 		pos[1] |= WLAN_RRM_CAPS_LCI_MEASUREMENT;