Compaq AA-RNG2A-TE Network Card User Manual


 
ifp->if_unit, lan_media_strings_10[sc->lm_media]);
good_xmits = 100;
1 Uses the default from ROM.
5.3.9 Setting the Media in the Hardware
The following code shows how the el_autosense_thread( ) routine sets
the media setting in the hardware:
el_reset(ifp->if_unit);
1
break; 2
} else {
1 Directs the hardware to use the media setting that was selected in the
previous section.
2 Breaks out of the packet transmit loop because the media setting has
been determined.
5.3.10 Building the Test Packet
The following code shows how the el_autosense_thread( ) routine builds
a test packet to transmit:
bcopy(el_junk_msg, mtod(m, caddr_t), EL_JUNK_SIZE);
1
bcopy(sc->is_addr, mtod(m, caddr_t), 6); 2
bcopy(sc->is_addr, mtod(m, caddr_t)+6, 6); 3
m->m_pkthdr.len = m->m_len = EL_JUNK_SIZE;
1 Loads the junk message into the mbuf data structure.
2 Sets the destination address as the address of the adapter.
3 Sets the source address as the address of the adapter.
5.3.11 Transmitting the Test Packet
The following code shows how the el_autosense_thread( ) routine
transmits the test packet:
s = splimp();
simple_lock(&sc->el_softc_lock);
IF_ENQUEUE(&ifp->if_snd, m);
el_start_locked(sc, ifp);
simple_unlock(&sc->el_softc_lock);
splx(s);
522 Implementing the Autoconfiguration Support Section (probe)