From dcd243cca859f0baac61f785ab8c6cc164ce85e6 Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 6 Apr 2001 22:21:57 +0000 Subject: [PATCH] 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 --- sys/dev/wi/if_wi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 2cbaa581550..8a527beab88 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; } -- 2.45.2