Detach ctrl_iface monitor if the client socket is removed
[wpasupplicant] / hostapd / driver_prism54.c
index be16e44..02c18af 100644 (file)
 #include <sys/select.h>
 
 #ifdef USE_KERNEL_HEADERS
+/* compat-wireless does not include linux/compiler.h to define __user, so
+ * define it here */
+#ifndef __user
+#define __user
+#endif /* __user */
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>   /* The L2 protocols */
@@ -752,7 +757,7 @@ static void prism54_handle_assoc(struct prism54_driver_data *drv,
                        resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                        goto fail;
                }
-               if (ieee802_11_parse_elems(drv->hapd, cb + ieofs,
+               if (ieee802_11_parse_elems(cb + ieofs,
                                           le_to_host16(mlme->size) - ieofs,
                                           &elems, 1) == ParseFailed) {
                        printf("STA " MACSTR " sent invalid association "
@@ -928,8 +933,8 @@ static void handle_802_3(int sock, void *eloop_ctx, void *sock_ctx)
                 return;
         }
         if (hdr->type == htons(ETH_P_PAE)) {
-                ieee802_1x_receive(hapd, (u8 *) &hdr->sa[0], (u8 *) &hdr[1],
-                                  len - sizeof(*hdr));
+                hostapd_eapol_receive(hapd, (u8 *) &hdr->sa[0], (u8 *) &hdr[1],
+                                     len - sizeof(*hdr));
         }
        free(hdr);
 }
@@ -1047,7 +1052,7 @@ static void * prism54_driver_init(struct hostapd_data *hapd)
        }
        prism54_init_1x(drv);
        /* must clean previous elems */
-       hostapd_set_generic_elem(hapd, NULL, 0);
+       prism54_set_generic_elem(drv->iface, drv, NULL, 0);
 
        return drv;
 }