Maintain internal copy of Probe Response offload capabilities
authorArik Nemtsov <arik@wizery.com>
Sat, 10 Dec 2011 15:17:43 +0000 (17:17 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 10 Dec 2011 19:11:32 +0000 (21:11 +0200)
Signed-hostap: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
hostapd/main.c
src/ap/hostapd.h
wpa_supplicant/ap.c
wpa_supplicant/wpa_supplicant.c
wpa_supplicant/wpa_supplicant_i.h

index 99c137d..da8135b 100644 (file)
@@ -303,8 +303,10 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
        }
 
        if (hapd->driver->get_capa &&
-           hapd->driver->get_capa(hapd->drv_priv, &capa) == 0)
+           hapd->driver->get_capa(hapd->drv_priv, &capa) == 0) {
                iface->drv_flags = capa.flags;
+               iface->probe_resp_offloads = capa.probe_resp_offloads;
+       }
 
        return 0;
 }
index b717b45..5b72768 100644 (file)
@@ -192,6 +192,13 @@ struct hostapd_iface {
        struct ap_info *ap_iter_list;
 
        unsigned int drv_flags;
+
+       /*
+        * A bitmap of supported protocols for probe response offload. See
+        * struct wpa_driver_capa in driver.h
+        */
+       unsigned int probe_resp_offloads;
+
        struct hostapd_hw_modes *hw_features;
        int num_hw_features;
        struct hostapd_hw_modes *current_mode;
index 4d186b9..a3b460e 100644 (file)
@@ -466,6 +466,7 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
                return -1;
        hapd_iface->owner = wpa_s;
        hapd_iface->drv_flags = wpa_s->drv_flags;
+       hapd_iface->probe_resp_offloads = wpa_s->probe_resp_offloads;
 
        wpa_s->ap_iface->conf = conf = hostapd_config_defaults();
        if (conf == NULL) {
index 9fa39b2..675b592 100644 (file)
@@ -2326,6 +2326,7 @@ next_driver:
        if (wpa_drv_get_capa(wpa_s, &capa) == 0) {
                wpa_s->drv_capa_known = 1;
                wpa_s->drv_flags = capa.flags;
+               wpa_s->probe_resp_offloads = capa.probe_resp_offloads;
                wpa_s->max_scan_ssids = capa.max_scan_ssids;
                wpa_s->max_sched_scan_ssids = capa.max_sched_scan_ssids;
                wpa_s->sched_scan_supported = capa.sched_scan_supported;
index 37237f0..5469129 100644 (file)
@@ -340,6 +340,13 @@ struct wpa_supplicant {
        int normal_scans; /* normal scans run before sched_scan */
 
        unsigned int drv_flags;
+
+       /*
+        * A bitmap of supported protocols for probe response offload. See
+        * struct wpa_driver_capa in driver.h
+        */
+       unsigned int probe_resp_offloads;
+
        int max_scan_ssids;
        int max_sched_scan_ssids;
        int sched_scan_supported;