Subject: CVS commit: src/sys/dev/ic
To: None <source-changes@NetBSD.org>
From: David Young <dyoung@netbsd.org>
List: source-changes
Date: 12/12/2004 06:37:59
Module Name:	src
Committed By:	dyoung
Date:		Sun Dec 12 06:37:59 UTC 2004

Modified Files:
	src/sys/dev/ic: rtw.c rtwphy.c rtwvar.h sa2400reg.h

Log Message:
Miscellaneous changes.  Details below.  Important changes flagged
with [].  Using the driver with my Linksys WPC11 ver. 4, it seems
to be receiving packets for a change.  The WPC11 ver. 4 has a Maxim
RF section.  My no-name rtw with Philips RF section still does not
receive any packets.

Keep access-level (analog params > config[0123] registers > none)
in sc_access.  Add rtw_set_access for changing the access level.

Make rtw_continuous_tx_enable and other subroutines use rtw_set_access
instead of rtw_config0123_enable and rtw_anaparm_enable.

Factor part of the chip-reset code into rtw_chip_reset1.

Change the 'struct foo (*bar)[N]'-style arguments to
'struct foo *bar'-style arguments.

Consolidate software/hardware Tx/Rx ring setup in rtw_hwring_setup,
rtw_swring_setup.

Add a new constant, SA2400_OPMODE_DEFAULTS, for the bits that we
*always* set in the SA2400 OPMODE register.

Factor some code out into rtw_sa2400_calibrate.  (Inspired by the
Linux driver.)

[] When the receiver goes into underrun/overflow state, call a new
   subroutine, rtw_kick() that stops the Rx/Tx processes, resets
   the chip, reinitializes the Tx/Rx rings, and restarts Rx/Tx
   processes.  (Inspired by the Linux driver.)

[] In rtw_intr_rx, check for too-short packets before calling
   ieee80211_find_rxnode.  I believe this will prevent a repeat of
   the MCHK exception I saw once on macppc.

[] Use seconds-elapased as well as microseconds-elapsed to set the
   next "due date" for the timeout interrupt.  This keeps the driver
   from programming the timeout to expire too early.

[] In rtw_intr, read RTW_ISR at most 10 times, then get out.  If
   the interface is not enabled (RTW_F_ENABLED), then get out.

[] In rtw_stop, get out if the interface is not enabled (RTW_F_ENABLED).
   Block IPL_NET interrupts.  Don't read/write any registers if
   the interface is invalid (RTW_F_INVALID).

[] Call rtw_stop in rtw_detach.


To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 src/sys/dev/ic/rtw.c
cvs rdiff -r1.1 -r1.2 src/sys/dev/ic/rtwphy.c src/sys/dev/ic/rtwvar.h \
    src/sys/dev/ic/sa2400reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.