Deleted Added
full compact
if_wl.c (38505) if_wl.c (40565)
1/* $Id: if_wl.c,v 1.14 1998/08/20 05:49:59 msmith Exp $ */
1/* $Id: if_wl.c,v 1.15 1998/08/24 02:28:15 bde 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

--- 66 unchanged lines hidden (view full) ---

76 * from the kernel config (if an explicit IRQ is set) or from the
77 * PSA on the card if not.
78 * The hw also magically just uses the IRQ set in the nvram.
79 * The NWID is used magically as well by the radio-modem
80 * to determine which packets to keep or throw out.
81 *
82 * sample config:
83 *
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

--- 66 unchanged lines hidden (view full) ---

76 * from the kernel config (if an explicit IRQ is set) or from the
77 * PSA on the card if not.
78 * The hw also magically just uses the IRQ set in the nvram.
79 * The NWID is used magically as well by the radio-modem
80 * to determine which packets to keep or throw out.
81 *
82 * sample config:
83 *
84 * device wl0 at isa? port 0x300 net irq ? vector wlintr
84 * device wl0 at isa? port 0x300 net irq ?
85 *
86 * Ifdefs:
87 * 1. WLDEBUG. (off) - if turned on enables IFF_DEBUG set via ifconfig debug
88 * 2. MULTICAST (on) - turned on and works up to and including mrouted
89 * 3. WLCACHE (off) - define to turn on a signal strength
90 * (and other metric) cache that is indexed by sender MAC address.
91 * Apps can read this out to learn the remote signal strength of a
92 * sender. Note that it has a switch so that it only stores

--- 204 unchanged lines hidden (view full) ---

297 */
298static int gathersnr = 0;
299SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, "");
300
301static void wlstart(struct ifnet *ifp);
302static void wlinit(void *xsc);
303static int wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
304static timeout_t wlwatchdog;
85 *
86 * Ifdefs:
87 * 1. WLDEBUG. (off) - if turned on enables IFF_DEBUG set via ifconfig debug
88 * 2. MULTICAST (on) - turned on and works up to and including mrouted
89 * 3. WLCACHE (off) - define to turn on a signal strength
90 * (and other metric) cache that is indexed by sender MAC address.
91 * Apps can read this out to learn the remote signal strength of a
92 * sender. Note that it has a switch so that it only stores

--- 204 unchanged lines hidden (view full) ---

297 */
298static int gathersnr = 0;
299SYSCTL_INT(_machdep, OID_AUTO, wl_gather_snr, CTLFLAG_RW, &gathersnr, 0, "");
300
301static void wlstart(struct ifnet *ifp);
302static void wlinit(void *xsc);
303static int wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
304static timeout_t wlwatchdog;
305static ointhand2_t wlintr;
305static void wlxmt(int unt, struct mbuf *m);
306static int wldiag(int unt);
307static int wlconfig(int unit);
308static int wlcmd(int unit, char *str);
309static void wlmmcstat(int unit);
310static u_short wlbldru(int unit);
311static u_short wlmmcread(u_int base, u_short reg);
312static void wlinitmmc(int unit);

--- 125 unchanged lines hidden (view full) ---

438 register short base = id->id_iobase;
439 int i,j;
440 u_char unit = id->id_unit;
441 register struct ifnet *ifp = &sc->wl_if;
442
443#ifdef WLDEBUG
444 printf("wlattach: base %x, unit %d\n", base, unit);
445#endif
306static void wlxmt(int unt, struct mbuf *m);
307static int wldiag(int unt);
308static int wlconfig(int unit);
309static int wlcmd(int unit, char *str);
310static void wlmmcstat(int unit);
311static u_short wlbldru(int unit);
312static u_short wlmmcread(u_int base, u_short reg);
313static void wlinitmmc(int unit);

--- 125 unchanged lines hidden (view full) ---

439 register short base = id->id_iobase;
440 int i,j;
441 u_char unit = id->id_unit;
442 register struct ifnet *ifp = &sc->wl_if;
443
444#ifdef WLDEBUG
445 printf("wlattach: base %x, unit %d\n", base, unit);
446#endif
447 id->id_ointr = wlintr;
446 sc->base = base;
447 sc->unit = unit;
448 sc->flags = 0;
449 sc->mode = 0;
450 sc->hacr = HACR_RESET;
451 callout_handle_init(&sc->watchdog_ch);
452 CMD(unit); /* reset the board */
453 DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */

--- 1013 unchanged lines hidden (view full) ---

1467 * board. This routine will be called whenever either a packet
1468 * is received, or a packet has successfully been transfered and
1469 * the unit is ready to transmit another packet.
1470 *
1471 * input : board number that interrupted
1472 * output : either a packet is received, or a packet is transfered
1473 *
1474 */
448 sc->base = base;
449 sc->unit = unit;
450 sc->flags = 0;
451 sc->mode = 0;
452 sc->hacr = HACR_RESET;
453 callout_handle_init(&sc->watchdog_ch);
454 CMD(unit); /* reset the board */
455 DELAY(DELAYCONST); /* >> 4 clocks at 6MHz */

--- 1013 unchanged lines hidden (view full) ---

1469 * board. This routine will be called whenever either a packet
1470 * is received, or a packet has successfully been transfered and
1471 * the unit is ready to transmit another packet.
1472 *
1473 * input : board number that interrupted
1474 * output : either a packet is received, or a packet is transfered
1475 *
1476 */
1475void
1477static void
1476wlintr(unit)
1477int unit;
1478{
1479 register struct wl_softc *sc = &wl_softc[unit];
1480 scb_t scb;
1481 ac_t cb;
1482 short base = sc->base;
1483 int next, x, opri;

--- 1230 unchanged lines hidden ---
1478wlintr(unit)
1479int unit;
1480{
1481 register struct wl_softc *sc = &wl_softc[unit];
1482 scb_t scb;
1483 ac_t cb;
1484 short base = sc->base;
1485 int next, x, opri;

--- 1230 unchanged lines hidden ---