Silenced some sparse warnings
authorJouni Malinen <j@w1.fi>
Sun, 11 Jan 2009 08:42:07 +0000 (10:42 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 11 Jan 2009 08:42:07 +0000 (10:42 +0200)
hostapd/driver_madwifi.c
hostapd/preauth.c
hostapd/tkip_countermeasures.c
src/drivers/driver_broadcom.c

index b0afc87..0ce2fe9 100644 (file)
@@ -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);
index 36af4e3..1cea5d5 100644 (file)
@@ -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,
index a2f6769..f18f44b 100644 (file)
@@ -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,
index f24b9b8..d1d1779 100644 (file)
@@ -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