Fix driver_bsd.c build for FreeBSD
[wpasupplicant] / hostapd / driver_bsd.c
index 05210b7..134894e 100644 (file)
 
 #include "hostapd.h"
 #include "driver.h"
-#include "ieee802_1x.h"
 #include "eloop.h"
 #include "l2_packet/l2_packet.h"
 
 #include "eapol_sm.h"
-#include "ieee802_11.h"
 #include "common.h"
 
 struct bsd_driver_data {
@@ -506,7 +504,7 @@ bsd_new_sta(struct bsd_driver_data *drv, u8 addr[IEEE80211_ADDR_LEN])
 {
        struct hostapd_data *hapd = drv->hapd;
        struct ieee80211req_wpaie ie;
-       int new_assoc, ielen = 0, res;
+       int ielen = 0;
        u8 *iebuf = NULL;
 
        /*
@@ -525,6 +523,7 @@ bsd_new_sta(struct bsd_driver_data *drv, u8 addr[IEEE80211_ADDR_LEN])
        else
                ielen += 2;
 
+no_ie:
        return hostapd_notif_assoc(hapd, addr, iebuf, ielen);
 }
 
@@ -568,7 +567,7 @@ bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
                        break;
                case RTM_IEEE80211_LEAVE:
                        leave = (struct ieee80211_leave_event *) &ifan[1];
-                       hostapd_notif_disassoc(drv, leave->iev_addr);
+                       hostapd_notif_disassoc(drv->hapd, leave->iev_addr);
                        break;
                case RTM_IEEE80211_JOIN:
 #ifdef RTM_IEEE80211_REJOIN
@@ -586,7 +585,7 @@ bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
                                "Michael MIC failure wireless event: "
                                "keyix=%u src_addr=" MACSTR, mic->iev_keyix,
                                MAC2STR(mic->iev_src));
-                       ieee80211_michael_mic_failure(hapd, mic->iev_src, 1);
+                       hostapd_michael_mic_failure(hapd, mic->iev_src);
                        break;
                }
                break;
@@ -671,10 +670,9 @@ static void
 handle_read(void *ctx, const u8 *src_addr, const u8 *buf, size_t len)
 {
        struct bsd_driver_data *drv = ctx;
-       struct hostapd_data *hapd = drv->hapd;
-
-       ieee802_1x_receive(hapd, src_addr, buf + sizeof(struct l2_ethhdr),
-                          len - sizeof(struct l2_ethhdr));
+       hostapd_eapol_receive(drv->hapd, src_addr,
+                             buf + sizeof(struct l2_ethhdr),
+                             len - sizeof(struct l2_ethhdr));
 }
 
 static int