diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c index b0afc87fa..0ce2fe990 100644 --- a/hostapd/driver_madwifi.c +++ b/hostapd/driver_madwifi.c @@ -1199,7 +1199,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); diff --git a/hostapd/preauth.c b/hostapd/preauth.c index 36af4e31f..1cea5d556 100644 --- a/hostapd/preauth.c +++ b/hostapd/preauth.c @@ -255,7 +255,7 @@ void rsn_preauth_send(struct hostapd_data *hapd, struct sta_info *sta, os_memcpy(ethhdr->h_dest, sta->addr, ETH_ALEN); os_memcpy(ethhdr->h_source, hapd->own_addr, ETH_ALEN); - ethhdr->h_proto = htons(ETH_P_PREAUTH); + ethhdr->h_proto = host_to_be16(ETH_P_PREAUTH); os_memcpy(ethhdr + 1, buf, len); if (l2_packet_send(piface->l2, sta->addr, ETH_P_PREAUTH, (u8 *) ethhdr, diff --git a/hostapd/tkip_countermeasures.c b/hostapd/tkip_countermeasures.c index a2f6769ea..f18f44bf0 100644 --- a/hostapd/tkip_countermeasures.c +++ b/hostapd/tkip_countermeasures.c @@ -20,6 +20,7 @@ #include "sta_info.h" #include "mlme.h" #include "wpa.h" +#include "tkip_countermeasures.h" static void ieee80211_tkip_countermeasures_stop(void *eloop_ctx, diff --git a/src/drivers/driver_broadcom.c b/src/drivers/driver_broadcom.c index f24b9b8ec..d1d177935 100644 --- a/src/drivers/driver_broadcom.c +++ b/src/drivers/driver_broadcom.c @@ -375,12 +375,12 @@ static int wpa_driver_broadcom_set_drop_unencrypted(void *priv, int enabled) { struct wpa_driver_broadcom_data *drv = priv; /* SET_EAP_RESTRICT, SET_WEP_RESTRICT */ - int restrict = (enabled ? 1 : 0); + int _restrict = (enabled ? 1 : 0); if (broadcom_ioctl(drv, WLC_SET_WEP_RESTRICT, - &restrict, sizeof(restrict)) < 0 || + &_restrict, sizeof(_restrict)) < 0 || broadcom_ioctl(drv, WLC_SET_EAP_RESTRICT, - &restrict, sizeof(restrict)) < 0) + &_restrict, sizeof(_restrict)) < 0) return -1; return 0; @@ -512,7 +512,7 @@ static int wpa_driver_broadcom_disassociate(void *priv, const u8 *addr, int reason_code) { struct wpa_driver_broadcom_data *drv = priv; - return broadcom_ioctl(drv, WLC_DISASSOC, 0, 0); + return broadcom_ioctl(drv, WLC_DISASSOC, NULL, 0); } static int