]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Avoid direct call to hostapd_new_assoc_sta from ieee802_11.c
authorJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 21:42:13 +0000 (23:42 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Dec 2009 21:42:13 +0000 (23:42 +0200)
hostapd/hostapd.c
hostapd/hostapd.h
hostapd/ieee802_11.c

index 0027850b02584ddb1b6bffa1e02da2949e891613..8af1c04cfb49e51ef2a267db8dd63cb8fac2d0c7 100644 (file)
@@ -1381,6 +1381,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
                return NULL;
 
        hostapd_set_driver_ops(&hapd->drv);
+       hapd->new_assoc_sta_cb = hostapd_new_assoc_sta;
        hapd->iconf = conf;
        hapd->conf = bss;
        hapd->iface = hapd_iface;
index 005d7de66e35c6bffe87390fed2f1d2379d2dddc..3937fbff8b9546424954296fe72bfe1501a58599 100644 (file)
@@ -95,6 +95,9 @@ struct hostapd_data {
        void *drv_priv;
        struct hostapd_driver_ops drv;
 
+       void (*new_assoc_sta_cb)(struct hostapd_data *hapd,
+                                struct sta_info *sta, int reassoc);
+
        void *msg_ctx; /* ctx for wpa_msg() calls */
 
        struct radius_client_data *radius;
index d74bb0baffab51c797c3f576ee39382c0fcea4d4..a198003a9d01bd2de30ee6e6e764668cb4e651b5 100644 (file)
@@ -1578,7 +1578,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
                wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC_FT);
        else
                wpa_auth_sm_event(sta->wpa_sm, WPA_ASSOC);
-       hostapd_new_assoc_sta(hapd, sta, !new_assoc);
+       hapd->new_assoc_sta_cb(hapd, sta, !new_assoc);
 
        ieee802_1x_notify_port_enabled(sta->eapol_sm, 1);