summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-04-06 22:21:57 +0000
committeralfred <alfred@FreeBSD.org>2001-04-06 22:21:57 +0000
commitdcd243cca859f0baac61f785ab8c6cc164ce85e6 (patch)
tree343f2c91b7e0cc25501a668202d7cef61db450de
parent35b0ef95d05e7397d5b91f41401ce0460a067bce (diff)
downloadFreeBSD-src-dcd243cca859f0baac61f785ab8c6cc164ce85e6.zip
FreeBSD-src-dcd243cca859f0baac61f785ab8c6cc164ce85e6.tar.gz
use correct contants (from net/ethernet.h)
ETHER_TYPE_LEN instead of sizeof(u_int16_t) when looking at an ethernet header ETHERTYPE_IP instead of 0x800
-rw-r--r--sys/dev/wi/if_wi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 2cbaa58..8a527be 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -578,7 +578,7 @@ static void wi_rxeof(sc)
(char *)&eh->ether_shost, ETHER_ADDR_LEN);
}
bcopy((char *)&rx_frame.wi_type,
- (char *)&eh->ether_type, sizeof(u_int16_t));
+ (char *)&eh->ether_type, ETHER_TYPE_LEN);
if (wi_read_data(sc, id, WI_802_11_OFFSET,
mtod(m, caddr_t) + sizeof(struct ether_header),
@@ -1832,7 +1832,7 @@ void wi_cache_store (struct wi_softc *sc, struct ether_header *eh,
* keep multicast only.
*/
- if ((ntohs(eh->ether_type) == 0x800)) {
+ if ((ntohs(eh->ether_type) == ETHERTYPE_IP)) {
sawip = 1;
}
OpenPOWER on IntegriCloud