]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make channel_info available to authenticator
authorMathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
Mon, 6 Aug 2018 19:46:21 +0000 (15:46 -0400)
committerJouni Malinen <j@w1.fi>
Sun, 16 Dec 2018 16:35:30 +0000 (18:35 +0200)
This adds the necessary functions and callbacks to make the channel_info
driver API available to the authenticator state machine that implements
the 4-way and group key handshake. This is needed for OCV.

Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
src/ap/wpa_auth.h
src/ap/wpa_auth_glue.c

index fad5536f740e93ef369d3488e52e45c2ce547902..564387917346cfb30dff1ba745769514e56d8f72 100644 (file)
@@ -145,6 +145,7 @@ struct wpa_state_machine;
 struct rsn_pmksa_cache_entry;
 struct eapol_state_machine;
 struct ft_remote_seq;
+struct wpa_channel_info;
 
 
 struct ft_remote_r0kh {
@@ -265,6 +266,7 @@ struct wpa_auth_callbacks {
                          size_t data_len);
        int (*send_oui)(void *ctx, const u8 *dst, u8 oui_suffix, const u8 *data,
                        size_t data_len);
+       int (*channel_info)(void *ctx, struct wpa_channel_info *ci);
 #ifdef CONFIG_IEEE80211R_AP
        struct wpa_state_machine * (*add_sta)(void *ctx, const u8 *sta_addr);
        int (*set_vlan)(void *ctx, const u8 *sta_addr,
index 812740301c8b210f0ccf9ea0dade8b06ea51d618..2e24b1c73872e940c54d243fab2d4f6157026be3 100644 (file)
@@ -776,6 +776,13 @@ static int hostapd_wpa_auth_send_oui(void *ctx, const u8 *dst, u8 oui_suffix,
 }
 
 
+static int hostapd_channel_info(void *ctx, struct wpa_channel_info *ci)
+{
+       struct hostapd_data *hapd = ctx;
+
+       return hostapd_drv_channel_info(hapd, ci);
+}
+
 #ifdef CONFIG_IEEE80211R_AP
 
 static int hostapd_wpa_auth_send_ft_action(void *ctx, const u8 *dst,
@@ -1189,6 +1196,7 @@ int hostapd_setup_wpa(struct hostapd_data *hapd)
                .for_each_auth = hostapd_wpa_auth_for_each_auth,
                .send_ether = hostapd_wpa_auth_send_ether,
                .send_oui = hostapd_wpa_auth_send_oui,
+               .channel_info = hostapd_channel_info,
 #ifdef CONFIG_IEEE80211R_AP
                .send_ft_action = hostapd_wpa_auth_send_ft_action,
                .add_sta = hostapd_wpa_auth_add_sta,