OpenWrt Forum Archive

Topic: in hostapd-0.4.5 driver_madwifi.c doesn't compile

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

While compiling current SVN checkout I get:

/home/miernik/ar3/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -MMD -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time  -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include/madwifi -DHOSTAPD_DUMP_STATE -I. -I. -I../utils -I. -DCONFIG_IAPP -DCONFIG_RSN_PREAUTH -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_MADWIFI -DEAP_MD5 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_PSK -DEAP_TLV -DEAP_SERVER -DEAP_TLS_FUNCS -DPKCS12_FUNCS -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include/madwifi  -c -o driver_madwifi.o driver_madwifi.c
driver_madwifi.c:36:22: wireless.h: No such file or directory
driver_madwifi.c: In function `set80211priv':
driver_madwifi.c:81: error: storage size of 'iwr' isn't known
driver_madwifi.c:122: error: `SIOCIWFIRSTPRIV' undeclared (first use in this function)
driver_madwifi.c:122: error: (Each undeclared identifier is reported only once
driver_madwifi.c:122: error: for each function it appears in.)

I tried to fix it by changing #include <wireless.h> in driver_madwifi.c to #include <linux/wireless.h> but that didn't help much as now I get:

make[5]: Entering directory `/home/miernik/ar3/openwrt/build_mipsel/hostapd-0.4.5'
/home/miernik/ar3/openwrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -MMD -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time  -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include/madwifi -DHOSTAPD_DUMP_STATE -I. -I. -I../utils -I. -DCONFIG_IAPP -DCONFIG_RSN_PREAUTH -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_MADWIFI -DEAP_MD5 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_PSK -DEAP_TLV -DEAP_SERVER -DEAP_TLS_FUNCS -DPKCS12_FUNCS -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include -I/home/miernik/ar3/openwrt/staging_dir_mipsel/usr/include/madwifi  -c -o driver_madwifi.o driver_madwifi.c
driver_madwifi.c: In function `madwifi_wireless_event_wireless':
driver_madwifi.c:816: error: `IWEVMICHAELMICFAILURE' undeclared (first use in this function)
driver_madwifi.c:816: error: (Each undeclared identifier is reported only once
driver_madwifi.c:816: error: for each function it appears in.)
driver_madwifi.c:825: error: `IW_EV_POINT_OFF' undeclared (first use in this function)
driver_madwifi.c: In function `madwifi_get_we_version':
driver_madwifi.c:963: error: structure has no member named `enc_capa'
driver_madwifi.c:964: error: structure has no member named `enc_capa'
driver_madwifi.c:976: error: structure has no member named `enc_capa'
make[5]: *** [driver_madwifi.o] Error 1
make[5]: Leaving directory `/home/miernik/ar3/openwrt/build_mipsel/hostapd-0.4.5'

hostapd needs wireless-tools development files installed in STAGING_DIR, this step is done when compiling the wireless-tools package.

I believe the problem has been fixed by changeset:2449 in trunk, can you confirm ?

Hi Nico,

Can this be enabled by simply selecting:

'BR2_PACKAGE_MADWIFI_TOOLS=m'

in the kernel .config?

Many thanks,

C.

The discussion might have continued from here.