cube
cf80f73d17
Split device_t and softc for the NE2000 Ethernet chip and all its variants
...
and attachments. Use device_t accessors, correct types, and ANSIfy when
appropriate.
2008-03-12 14:31:11 +00:00
dyoung
29e838604a
Convert a complicated if/else if/else chain to a switch statement
...
that is a bit more readable.
ENODEV and ENOTTY are appropriate error codes for indicating
unsupported ioctls, but EINVAL is definitely not! If an operation
is not supported, return ENODEV instead of EINVAL.
2008-02-23 02:26:53 +00:00
ad
a2a3828545
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
2007-10-19 11:59:34 +00:00
dyoung
dcd8923429
Change a bazillion occurrences of code resembling this,
...
error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ec) :
ether_delmulti(ifr, &sc->sc_ec);
if (error == ENETRESET) {
to this,
if ((error = ether_ioctl(ifp, cmd, data)) == ENETRESET) {
which does the same thing.
(A bazillion is a very large number. This seems to make the i386
ALL kernel smaller by 3kB to 4kB.)
Use ifreq_getaddr() twice in es(4).
Whitespace nits.
2007-09-01 07:32:22 +00:00
dyoung
71e77a61b4
Constify: LLADDR -> CLLADDR. I'm aiming here to make it easier to
...
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).
2007-08-26 22:45:55 +00:00
christos
53524e44ef
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
2007-03-04 05:59:00 +00:00
cube
2f04b55c8c
Make the IPKDB code compile.
2007-01-13 19:46:21 +00:00
christos
168cd830d2
__unused removal on arguments; approved by core.
2006-11-16 01:32:37 +00:00
christos
4d595fd7b1
- sprinkle __unused on function decls.
...
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
dogcow
f2d329dca0
remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.
2006-09-07 02:40:31 +00:00
thorpej
3ddf26777f
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
...
directly.
2006-02-20 16:50:36 +00:00
perry
3d4ed1fbc7
__inline__ -> inline
2005-12-24 23:41:33 +00:00
christos
95e1ffb156
merge ktrace-lwp.
2005-12-11 12:16:03 +00:00
perry
18db93c7f6
de-__P
2005-02-04 02:10:35 +00:00
thorpej
e9818f5b5e
When adding/deleting multicast addresses, only whack the address
...
filter if the interface is marked RUNNING.
Fixes kern/27678.
2004-10-30 18:08:34 +00:00
martin
657b6abe1d
Do not count ipackets twice. From Dave Barnes in PR port-i386/26906.
2004-09-16 10:02:59 +00:00
bouyer
bcae687139
Zero out the NIC memory when padding packet to ETHER_MIN_LEN-ETHER_CRC_LEN
...
sc->write_mbuf now return len of buffer, including padding.
Tested with a PCI ne2000.
2003-01-15 22:20:03 +00:00
kristerw
14d4c7d175
Move dp8390_debug to the #ifdef DEBUG section.
2002-12-21 15:24:42 +00:00
provos
0f09ed48a5
remove trailing \n in panic(). approved perry.
2002-09-27 15:35:29 +00:00
lukem
a4bae8b066
add/cleanup RCSID
2001-11-13 13:14:31 +00:00
wiz
456dff6cb8
Spell 'occurred' with two 'r's.
2001-09-16 16:34:23 +00:00
thorpej
04ad3b5316
There is no need to use M_EOR here.
2001-08-09 11:54:32 +00:00
thorpej
150ca9d41a
bcopy -> memcpy, strcpy
2001-07-07 15:59:37 +00:00
thorpej
c2c26e1362
bcmp -> memcmp
2001-07-07 05:35:39 +00:00
thorpej
ec0ab7054b
Add a "stop_card", which is the opposite of "init_card", and
...
call it from dp8390_stop().
2001-02-12 18:56:26 +00:00
thorpej
b17ef220b5
Print the Ethernet address before attaching media.
2001-02-12 18:52:22 +00:00
thorpej
043e519d55
Adjust the way that media is initialized on DP8390-compatible
...
chips. The dp8390_softc now has media_init and media_fini
function pointers that do the work.
2001-02-12 18:49:03 +00:00
thorpej
6b16911a43
ALTQ'ify.
2000-12-14 06:27:23 +00:00
thorpej
b84f740be0
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
2000-11-15 01:02:11 +00:00
bouyer
5cc13a273b
Support ETHERCAP_VLAN_MTU. It seems the chip doesn't check the frame size.
...
Tested with a NetVin 5000 and a WD8013EBT.
2000-10-17 16:14:42 +00:00
thorpej
7ca3fb9ef0
Move the check for "promisc + unicast + not for us" into ether_input(),
...
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
jhawk
1e59d99d28
For all network drivers that call ether_ifattach(), and also
...
have _detach() functions:
Ensure that softc keeps state about whether the attach succeeded,
and make the detach function return immediately if the attach did
not complete.
2000-05-29 17:37:12 +00:00
thorpej
692e54c43d
Use ether_crc32_be().
2000-05-12 16:44:19 +00:00
ws
7da71e5f9e
Make IPKDB working again.
...
Add support for i386 debugging and pci-based ne2000 boards.
2000-03-22 20:58:25 +00:00
ws
1b83998bd7
Add bus_space_barrier.
...
Add DELAY in some busy loops to allow the dma engine to actually do something
(neccessary on fast processors).
2000-03-22 18:02:59 +00:00
enami
e00270524e
ASIX AX88190 support (Planex FNW-3700-T and Melco LPC3-TX) from FreeBSD/PAO3.
2000-02-09 15:40:23 +00:00
enami
99f529f0b3
- Since all resources are mandatory, no need to manage individually.
...
- KNF some code.
- Factor out some code into function.
- Disestablish an interrupt handler when failed to enable card power.
2000-02-09 14:42:33 +00:00
itojun
7a7a3bcfdf
handle attach failure in ne/pcmcia more carefully. (otherwise we'll
...
have trouble on detach)
2000-02-02 13:06:15 +00:00
itojun
f4e8883ccd
use a bit more standard (sys/device.h) prototype for {dp8390,ne2000}_detach().
2000-02-02 11:41:56 +00:00
enami
60e57afedd
- Check also DVF_ACTIVE bit in dp8390_intr.
...
- Delete ifmedia instances on detach.
2000-02-02 10:50:56 +00:00
itojun
17f5887294
implement if_detach code for ne/pcmcia.
...
XXX still incomplete, ne_pcmcia_detach() commented out for safery - please test
2000-02-02 10:00:06 +00:00
enami
bb03434a5f
Support Planex Communications Inc, FNW-3600-T.
1999-09-27 23:19:12 +00:00
thorpej
90b9deda72
When padding short packets on transmit, don't include the CRC length
...
in the computation. kern/8194.
1999-08-25 22:41:42 +00:00
abs
b02dbae17e
In xxx_mediachange(), if there is no callback to the front-end, just
...
return 0 instead of EINVAL. In this case, there will only be one media
type, and the upper-level if_media code will ensure that the user is
setting to that type.
This matches changes Jason made a while back to sys/dev/ic/lance.c
1999-06-23 04:17:10 +00:00
thorpej
f98d358a1f
Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
...
directly, call the function pointer (*if_input)(ifp, m). The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary. Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
thorpej
ad22c1dd58
Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
...
ourselves.
1999-03-25 23:16:37 +00:00
explorer
3ebb419571
Update to slightly altered rnd_attach_source() api
1999-02-28 17:08:05 +00:00
thorpej
69a4436f8b
Avoid initializing the interface in the SIOCSIFFLAGS if ! UP and ! RUNNING.
1999-02-17 03:40:59 +00:00
thorpej
6eedee5c9d
Add entropy gathering.
1999-02-07 01:54:50 +00:00
mycroft
a6717054a4
Slight simplification to previous.
1998-12-12 16:31:34 +00:00