Browse Source

Silenced some sparse warnings

Jouni Malinen 16 years ago
parent
commit
3904625396
4 changed files with 7 additions and 6 deletions
  1. 1 1
      hostapd/driver_madwifi.c
  2. 1 1
      hostapd/preauth.c
  3. 1 0
      hostapd/tkip_countermeasures.c
  4. 4 4
      src/drivers/driver_broadcom.c

+ 1 - 1
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);

+ 1 - 1
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,

+ 1 - 0
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,

+ 4 - 4
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