Replace direct driver call to wpa_ft_rrb_rx() with driver event
This avoids need to include hostapd/wpa.h into the driver wrappers.
This commit is contained in:
parent
c779b04ab6
commit
08fd8c15a0
3 changed files with 25 additions and 6 deletions
|
@ -466,6 +466,11 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
|
||||||
if (hapd->iface->scan_cb)
|
if (hapd->iface->scan_cb)
|
||||||
hapd->iface->scan_cb(hapd->iface);
|
hapd->iface->scan_cb(hapd->iface);
|
||||||
break;
|
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:
|
default:
|
||||||
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
|
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1681,7 +1681,12 @@ typedef enum wpa_event_type {
|
||||||
/**
|
/**
|
||||||
* EVENT_ASSOC_TIMED_OUT - Association timed out
|
* 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;
|
} wpa_event_type;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1863,6 +1868,15 @@ union wpa_event_data {
|
||||||
struct timeout_event {
|
struct timeout_event {
|
||||||
u8 addr[ETH_ALEN];
|
u8 addr[ETH_ALEN];
|
||||||
} timeout_event;
|
} 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;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "common/ieee802_11_defs.h"
|
#include "common/ieee802_11_defs.h"
|
||||||
|
|
||||||
#include "../../hostapd/hostapd.h"
|
#include "../../hostapd/hostapd.h"
|
||||||
#include "../../hostapd/wpa.h"
|
|
||||||
|
|
||||||
|
|
||||||
struct test_client_socket {
|
struct test_client_socket {
|
||||||
|
@ -744,10 +743,11 @@ static void test_driver_ether(struct wpa_driver_test_data *drv,
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211R
|
#ifdef CONFIG_IEEE80211R
|
||||||
if (be_to_host16(eth->h_proto) == ETH_P_RRB) {
|
if (be_to_host16(eth->h_proto) == ETH_P_RRB) {
|
||||||
#ifdef HOSTAPD
|
union wpa_event_data ev;
|
||||||
wpa_ft_rrb_rx(drv->hapd->wpa_auth, eth->h_source,
|
os_memset(&ev, 0, sizeof(ev));
|
||||||
data + sizeof(*eth), datalen - sizeof(*eth));
|
ev.ft_rrb_rx.src = eth->h_source;
|
||||||
#endif /* HOSTAPD */
|
ev.ft_rrb_rx.data = data + sizeof(*eth);
|
||||||
|
ev.ft_rrb_rx.data_len = datalen - sizeof(*eth);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211R */
|
#endif /* CONFIG_IEEE80211R */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue