Fix RTW_DEBUG compilation and add a few more sanity checks in addition to rtw.c -r 1.45 from dyoung@NetBSD:
Fix RTW_DEBUG compilation and add a few more sanity checks in addition to
rtw.c -r 1.45 from dyoung@NetBSD:

Log Message:
Misc. changes to improve ad hoc mode and to enable hostap mode:

  Fix the work-around for the NIC bug where it skips to rx
  descriptor 0.  The driver used to skip to rx descriptor 1.
  Hopefully this stops the out-of-order packet reception that
  Charles Hannum saw.

When debugging is enabled, print rx-descriptor status flags
before printing the rx bit rate.

Add a debug message for when a beacon tx buffer reclamation.

Reset IFF_OACTIVE when we reset the transmitter.

Pass the consolidated LED state, a struct rtw_led_state,
to rtw_led_attach.

Choose the bit-rate for management frames (1Mb/s) at the
same place we choose for all other frames.

Do not use the NIC's short preamble or RTS options for
management frames.  Label beacons for the NIC.

Following a Linux driver, take care not to zero arbitrary
bits in the TPPOLL register.

Use the new idiom for IBSS merges: disable transmitter,
kick the state machine.

Add a second descriptor to the beacon ring.
The NIC seems to like this much better.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars