stripclose(). In strip_watchdog(), make abort if the line has been closed.
This fixes kern/4470 (Wolfgang Rupprecht), which was a bad pointer passed
to b_to_q() from strip_proberadio() called via strip_watchdog(); the tty
hadn't yet been attached to the strip interface.
* Fix radio error-message parsing bug: old comparison against error
prefix string off by the size of the Starmode link-level protocol field.
* Fix radio reset finite state machine, given that parsing works properly.
* Add debugging messages about reset FSM if IFF_DEBUG is set.
* Remove #ifdefs notdef around back the check that discards newlines at
the beginning of a frame. Every error message from the radio has a newline,
as the radio send error messages terminated by \r\n, not just \r like data
frames. Not dropping the \n garbles the following data frame.
* Remove unused low-level debugging routines.
* Reformat the low-level bytestuff/RLL code to match the canonical source.
* Reduce MTU to 1100 bytes; 1200 bytes can overflow the radio buffers if the
bytestuff/RLL does poorly.
* Fix radio-probe string to _not_ include a frame delimiter (\r): sending
a \r to the radio tickles a bug in the firmware, causing the radio to
smash the next frame sent after the "**\r" probe string.
* Add calls to the tty t_oproc routine to make sure the probe and reset
strings get sent to the modem promptly, rather than waiting for the next
packet.
* Add PPP-style calls to the tty start-output function; seems to
reduce latency marginally.
still to do:
* Flush output queue if resetting, since the radio is going to drop
frames on the floor anyway if it needs resetting.
* Reduce tty start-output calls.
somehow got lost between NetBSD and Linux. Output side mbuf-walking
code now correctly bytestuffs mbuf chains, as well as single mbufs
and clusters.
* Update radio error-parsing code to Stuart's latest stable code.
We now parse error messages the older code didn't.
* Note where radio-crash watchdogs should be added (the linux code
is there, #ifdef'ed out). This still just doesn't work.
The radio reset doesn't always work even when slattatch is first started,
but I have a radio with old firmware, which may be a contributing factor.
* Correct the checks for the tty output queue being overfull; estimate
the stuffed pkt size as (original * 65/64) + STRIP_HDRLEN + 2,
instead of SLIP's (2*SLMTU). Re-enable the disabled check now the
size estimate isn't excessively large.
* Fix BPF tapping of strip interfaces, STRIP packets are wrapped
in a SLIP bpf header. This implies no BPF support for arp or atalk,
even though Linux boxes are sending arp requests and gratuitous arps.
There may be no good fix short of adding explicit STRIP encapsulation
support to bpf/tcpdump.
* Still need a solid walkthrough, and rewrite to eliminate redundant
receive-side mbuf copying.