Deleted Added
full compact
5c5
< * $FreeBSD: head/sys/netatalk/ddp_input.c 101937 2002-08-15 18:58:44Z rwatson $
---
> * $FreeBSD: head/sys/netatalk/ddp_input.c 111888 2003-03-04 23:19:55Z jlemon $
21,22d20
< #include <net/intrq.h>
< #include <net/netisr.h>
41,42c39,40
< static void
< atintr( void )
---
> void
> at2intr(struct mbuf *m)
44,47d41
< struct elaphdr *elhp, elh;
< struct ifnet *ifp;
< struct mbuf *m;
< int s;
49,53c43,48
< /*
< * First pull off all the phase 2 packets.
< */
< for (;;) {
< s = splimp();
---
> /*
> * Phase 2 packet handling
> */
> ddp_input(m, m->m_pkthdr.rcvif, NULL, 2);
> return;
> }
55c50,53
< IF_DEQUEUE( &atintrq2, m );
---
> void
> at1intr(struct mbuf *m)
> {
> struct elaphdr *elhp, elh;
57,60c55,60
< splx( s );
<
< if ( m == 0 ) { /* no more queued packets */
< break;
---
> /*
> * Phase 1 packet handling
> */
> if (m->m_len < SZ_ELAPHDR && ((m = m_pullup(m, SZ_ELAPHDR)) == 0)) {
> ddpstat.ddps_tooshort++;
> return;
63,88d62
< ifp = m->m_pkthdr.rcvif;
< ddp_input( m, ifp, (struct elaphdr *)NULL, 2 );
< }
<
< /*
< * Then pull off all the phase 1 packets.
< */
< for (;;) {
< s = splimp();
<
< IF_DEQUEUE( &atintrq1, m );
<
< splx( s );
<
< if ( m == 0 ) { /* no more queued packets */
< break;
< }
<
< ifp = m->m_pkthdr.rcvif;
<
< if ( m->m_len < SZ_ELAPHDR &&
< (( m = m_pullup( m, SZ_ELAPHDR )) == 0 )) {
< ddpstat.ddps_tooshort++;
< continue;
< }
<
90c64
< * this seems a little dubios, but I don't know phase 1 so leave it.
---
> * This seems a little dubious, but I don't know phase 1 so leave it.
92,93c66,67
< elhp = mtod( m, struct elaphdr *);
< m_adj( m, SZ_ELAPHDR );
---
> elhp = mtod(m, struct elaphdr *);
> m_adj(m, SZ_ELAPHDR);
95,96c69,70
< if ( elhp->el_type == ELAP_DDPEXTEND ) {
< ddp_input( m, ifp, (struct elaphdr *)NULL, 1 );
---
> if (elhp->el_type == ELAP_DDPEXTEND) {
> ddp_input(m, m->m_pkthdr.rcvif, NULL, 1);
98,99c72,73
< bcopy((caddr_t)elhp, (caddr_t)&elh, SZ_ELAPHDR );
< ddp_input( m, ifp, &elh, 1 );
---
> bcopy((caddr_t)elhp, (caddr_t)&elh, SZ_ELAPHDR);
> ddp_input(m, m->m_pkthdr.rcvif, &elh, 1);
101,102c75
< }
< return;
---
> return;
106,113d78
< netisr_atalk_setup(void *dummy __unused)
< {
<
< register_netisr(NETISR_ATALK, atintr);
< }
< SYSINIT(atalk_setup, SI_SUB_CPU, SI_ORDER_ANY, netisr_atalk_setup, NULL);
<
< static void