if_wl.c (29677) | if_wl.c (32350) |
---|---|
1/* $Id: if_wl.c,v 1.8 1997/08/25 22:34:25 bde Exp $ */ | 1/* $Id: if_wl.c,v 1.9 1997/09/21 21:41:13 gibbs Exp $ */ |
2/* 3 * Redistribution and use in source and binary forms, with or without 4 * modification, are permitted provided that the following conditions 5 * are met: 6 * 1. Redistributions of source code must retain all copyright 7 * notices, this list of conditions and the following disclaimer. 8 * 2. The names of the authors may not be used to endorse or promote products 9 * derived from this software withough specific prior written permission --- 176 unchanged lines hidden (view full) --- 186 * though the hardware is capable of chaining and possibly 187 * even batching. The problem is that we only make one 188 * transmit buffer available in sram space. 189 */ 190 191#include "wl.h" 192#include "opt_wavelan.h" 193#include "bpfilter.h" | 2/* 3 * Redistribution and use in source and binary forms, with or without 4 * modification, are permitted provided that the following conditions 5 * are met: 6 * 1. Redistributions of source code must retain all copyright 7 * notices, this list of conditions and the following disclaimer. 8 * 2. The names of the authors may not be used to endorse or promote products 9 * derived from this software withough specific prior written permission --- 176 unchanged lines hidden (view full) --- 186 * though the hardware is capable of chaining and possibly 187 * even batching. The problem is that we only make one 188 * transmit buffer available in sram space. 189 */ 190 191#include "wl.h" 192#include "opt_wavelan.h" 193#include "bpfilter.h" |
194#include "opt_inet.h" |
|
194 195#include <sys/param.h> 196#include <sys/systm.h> 197#include <sys/sockio.h> 198#include <sys/mbuf.h> 199#include <sys/socket.h> 200#include <sys/syslog.h> 201#include <sys/proc.h> 202 203#include <sys/kernel.h> 204#include <sys/sysctl.h> 205 | 195 196#include <sys/param.h> 197#include <sys/systm.h> 198#include <sys/sockio.h> 199#include <sys/mbuf.h> 200#include <sys/socket.h> 201#include <sys/syslog.h> 202#include <sys/proc.h> 203 204#include <sys/kernel.h> 205#include <sys/sysctl.h> 206 |
207#include <net/ethernet.h> |
|
206#include <net/if.h> | 208#include <net/if.h> |
209#include <net/if_arp.h> |
|
207#include <net/if_dl.h> 208 209#ifdef INET 210#include <netinet/in.h> 211#include <netinet/in_systm.h> 212#include <netinet/ip.h> 213#include <netinet/if_ether.h> 214#endif --- 2361 unchanged lines hidden (view full) --- 2576 int ipflag = wl_cache_iponly; 2577 2578 /* filters: 2579 * 1. ip only 2580 * 2. configurable filter to throw out unicast packets, 2581 * keep multicast only. 2582 */ 2583 | 210#include <net/if_dl.h> 211 212#ifdef INET 213#include <netinet/in.h> 214#include <netinet/in_systm.h> 215#include <netinet/ip.h> 216#include <netinet/if_ether.h> 217#endif --- 2361 unchanged lines hidden (view full) --- 2579 int ipflag = wl_cache_iponly; 2580 2581 /* filters: 2582 * 1. ip only 2583 * 2. configurable filter to throw out unicast packets, 2584 * keep multicast only. 2585 */ 2586 |
2587#ifdef INET |
|
2584 /* reject if not IP packet 2585 */ 2586 if ( wl_cache_iponly && (ntohs(eh->ether_type) != 0x800)) { 2587 return; 2588 } 2589 2590 /* check if broadcast or multicast packet. we toss 2591 * unicast packets --- 79 unchanged lines hidden (view full) --- 2671 signal = sc->w_sigcache[w_insertcache].signal = wlmmcread(base, MMC_SIGNAL_LVL) & 0x3f; 2672 silence = sc->w_sigcache[w_insertcache].silence = wlmmcread(base, MMC_SILENCE_LVL) & 0x3f; 2673 sc->w_sigcache[w_insertcache].quality = wlmmcread(base, MMC_SIGN_QUAL) & 0x0f; 2674 if (signal > 0) 2675 sc->w_sigcache[w_insertcache].snr = 2676 signal - silence; 2677 else 2678 sc->w_sigcache[w_insertcache].snr = 0; | 2588 /* reject if not IP packet 2589 */ 2590 if ( wl_cache_iponly && (ntohs(eh->ether_type) != 0x800)) { 2591 return; 2592 } 2593 2594 /* check if broadcast or multicast packet. we toss 2595 * unicast packets --- 79 unchanged lines hidden (view full) --- 2675 signal = sc->w_sigcache[w_insertcache].signal = wlmmcread(base, MMC_SIGNAL_LVL) & 0x3f; 2676 silence = sc->w_sigcache[w_insertcache].silence = wlmmcread(base, MMC_SILENCE_LVL) & 0x3f; 2677 sc->w_sigcache[w_insertcache].quality = wlmmcread(base, MMC_SIGN_QUAL) & 0x0f; 2678 if (signal > 0) 2679 sc->w_sigcache[w_insertcache].snr = 2680 signal - silence; 2681 else 2682 sc->w_sigcache[w_insertcache].snr = 0; |
2683#endif /* INET */ |
|
2679 2680} 2681#endif /* WLCACHE */ 2682 2683/* 2684 * determine if in all multicast mode or not 2685 * 2686 * returns: 1 if IFF_ALLMULTI should be set --- 33 unchanged lines hidden --- | 2684 2685} 2686#endif /* WLCACHE */ 2687 2688/* 2689 * determine if in all multicast mode or not 2690 * 2691 * returns: 1 if IFF_ALLMULTI should be set --- 33 unchanged lines hidden --- |