When not plugging in the radio we expect to only see timeout errors.
However due to timeout being checked AFTER the read() call the len parameter
was updated and no longer was 0 returned.
If less then 4 was read (a short read) then uninitialized data was used,
for length and/or magic check.
If the magic byte does not match then the rx buffer should be flushed before
trying again. Otherwise sync will probably never be achieved. This
solves the bug where plugging in the radio show continues streams of
magic packet errors. For me k5prog -Y -D now always works, while before
it could fail.