build wpa_supplicant on NetBSD?

Jeremy C. Reed reed
Wed Dec 10 13:33:49 PST 2008


On Wed, 10 Dec 2008, Dan Williams wrote:

> This is because 'driver_hostap' is a Linux specific driver, like
> driver_wext and a few others.  You probably just want to enable
> 'driver_bsd' and 'driver_wired' in your .config, and leave the rest out.

Thank you Dan.

I know have for .config:

# for NetBSD
CONFIG_DRIVER_BSD=y
CONFIG_DRIVER_WIRED=y
CONFIG_CTRL_IFACE=y

And a patch (for 0.6.6):

--- src/drivers/driver_bsd.c.orig	2008-11-23 07:02:06.000000000 
-0800
+++ src/drivers/driver_bsd.c	2008-12-10 13:12:13.000000000 -0800
@@ -21,7 +21,13 @@
 #include "ieee802_11_defs.h"
 
 #include <net/if.h>
+
+#ifdef __NetBSD__
+#include <net/if_ether.h>
+#define COMPAT_FREEBSD_NET80211
+#else
 #include <net/ethernet.h>
+#endif
 
 #include <net80211/ieee80211.h>
 #include <net80211/ieee80211_crypto.h>
@@ -449,7 +455,12 @@
 }
 
 #include <net/route.h>
+#if __FreeBSD__
 #include <net80211/ieee80211_freebsd.h>
+#endif
+#if __NetBSD__
+#include <net80211/ieee80211_netbsd.h>
+#endif
 
 static void
 wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx)


This fails like:

Initializing interface (2) 'iwi0'
Own MAC address: 00:16:6f:31:5c:47
wpa_driver_bsd_set_wpa: enabled=1
wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1
wpa_driver_bsd_del_key: keyidx=0
wpa_driver_bsd_del_key: keyidx=1
wpa_driver_bsd_del_key: keyidx=2
wpa_driver_bsd_del_key: keyidx=3
wpa_driver_bsd_set_countermeasures: enabled=0
wpa_driver_bsd_set_drop_unencrypted: enabled=1
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
Added interface iwi0
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Trying to get current scan results first without requesting a new scan to 
speed up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Cached scan results are empty - not posting
Selecting BSS from priority group 0
Try to find WPA-enabled AP
Try to find non-WPA AP
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
ioctl[SIOCS80211, op 1, len 0]: Invalid argument
Failed to initiate AP scan.
Setting scan request: 10 sec 0 usec

Looks to be FreeBSD specific still.  I will still be hunting this down, 
but decided to at least post here just in case others already know.



More information about the Hostap mailing list