Fixed a typo in printf -> wpa_printf changes
[wpasupplicant] / hostapd / driver_madwifi.c
index b0afc87..6238976 100644 (file)
@@ -63,6 +63,7 @@
 
 #include "common.h"
 #include "wps_hostapd.h"
+#include "ieee802_11_defs.h"
 
 
 struct madwifi_driver_data {
@@ -202,6 +203,7 @@ set80211param(struct madwifi_driver_data *drv, int op, int arg)
        return 0;
 }
 
+#ifndef CONFIG_NO_STDOUT_DEBUG
 static const char *
 ether_sprintf(const u8 *addr)
 {
@@ -213,6 +215,7 @@ ether_sprintf(const u8 *addr)
                snprintf(buf, sizeof(buf), MACSTR, 0,0,0,0,0,0);
        return buf;
 }
+#endif /* CONFIG_NO_STDOUT_DEBUG */
 
 /*
  * Configure WPA parameters.
@@ -1199,7 +1202,7 @@ madwifi_send_eapol(void *priv, const u8 *addr, const u8 *data, size_t data_len,
        eth = (struct l2_ethhdr *) bp;
        memcpy(eth->h_dest, addr, ETH_ALEN);
        memcpy(eth->h_source, own_addr, ETH_ALEN);
-       eth->h_proto = htons(ETH_P_EAPOL);
+       eth->h_proto = host_to_be16(ETH_P_EAPOL);
        memcpy(eth+1, data, data_len);
 
        wpa_hexdump(MSG_MSGDUMP, "TX EAPOL", bp, len);