]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Replace direct driver call to wpa_ft_rrb_rx() with driver event
authorJouni Malinen <j@w1.fi>
Sat, 12 Dec 2009 20:43:26 +0000 (22:43 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Dec 2009 20:43:26 +0000 (22:43 +0200)
This avoids need to include hostapd/wpa.h into the driver wrappers.

hostapd/drv_callbacks.c
src/drivers/driver.h
src/drivers/driver_test.c

index af9c4c8b050ef21b06b6dd33046c7ddadba0480b..db6b19f4b07107833df2eca2805fab571cacd57e 100644 (file)
@@ -466,6 +466,11 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
                if (hapd->iface->scan_cb)
                        hapd->iface->scan_cb(hapd->iface);
                break;
+#ifdef CONFIG_IEEE80211R
+               wpa_ft_rrb_rx(hapd->wpa_auth, data->ft_rrb_rx.src,
+                             data->ft_rrb_rx.data, data->ft_rrb_rx.data_len);
+               break;
+#endif /* CONFIG_IEEE80211R */
        default:
                wpa_printf(MSG_DEBUG, "Unknown event %d", event);
                break;
index c889ba9f3c6149a6641589f39b4b2dd723532fd2..4825cb550ecaa79b9e0c907e20a2ec33fa8ffb48 100644 (file)
@@ -1681,7 +1681,12 @@ typedef enum wpa_event_type {
        /**
         * EVENT_ASSOC_TIMED_OUT - Association timed out
         */
-       EVENT_ASSOC_TIMED_OUT
+       EVENT_ASSOC_TIMED_OUT,
+
+       /**
+        * EVENT_FT_RRB_RX - FT (IEEE 802.11r) RRB frame received
+        */
+       EVENT_FT_RRB_RX
 } wpa_event_type;
 
 
@@ -1863,6 +1868,15 @@ union wpa_event_data {
        struct timeout_event {
                u8 addr[ETH_ALEN];
        } timeout_event;
+
+       /**
+        * struct ft_rrb_rx - Data for EVENT_FT_RRB_RX events
+        */
+       struct ft_rrb_rx {
+               const u8 *src;
+               const u8 *data;
+               size_t data_len;
+       } ft_rrb_rx;
 };
 
 /**
index c6147a650bdcdfae90c48a4db3d63fa98730501b..787ae9530c06eead1580a58e3edbda217081457e 100644 (file)
@@ -35,7 +35,6 @@
 #include "common/ieee802_11_defs.h"
 
 #include "../../hostapd/hostapd.h"
-#include "../../hostapd/wpa.h"
 
 
 struct test_client_socket {
@@ -744,10 +743,11 @@ static void test_driver_ether(struct wpa_driver_test_data *drv,
 
 #ifdef CONFIG_IEEE80211R
        if (be_to_host16(eth->h_proto) == ETH_P_RRB) {
-#ifdef HOSTAPD
-               wpa_ft_rrb_rx(drv->hapd->wpa_auth, eth->h_source,
-                             data + sizeof(*eth), datalen - sizeof(*eth));
-#endif /* HOSTAPD */
+               union wpa_event_data ev;
+               os_memset(&ev, 0, sizeof(ev));
+               ev.ft_rrb_rx.src = eth->h_source;
+               ev.ft_rrb_rx.data = data + sizeof(*eth);
+               ev.ft_rrb_rx.data_len = datalen - sizeof(*eth);
        }
 #endif /* CONFIG_IEEE80211R */
 }