Commit Graph

4712 Commits

Author SHA1 Message Date
ad 6874e511b7 lockmgr -> mutex 2007-12-05 07:58:29 +00:00
ad 598ab03ad0 Match the docs: MUTEX_DRIVER/SPIN are now only for porting code written
for Solaris.
2007-12-05 07:06:50 +00:00
spz 3d1270e2c8 try fixing up broken revision string again 2007-12-04 15:42:05 +00:00
spz 5bfaf1ebca fix up broken revision string 2007-12-04 15:41:20 +00:00
jmcneill 490542edae aprintify, on behalf of xtraeme 2007-12-01 23:40:28 +00:00
ad 3c1048714b Noisy printf. 2007-12-01 16:51:22 +00:00
dyoung 2db1c5cdfa Bug fix: in ath_init(), if ath_enable() fails, ATH_UNLOCK() before
returning.
2007-11-27 00:07:42 +00:00
dyoung e45771984e Don't process the CAB queue twice in ath_tx_proc_q0123. 2007-11-26 23:54:48 +00:00
dyoung 37bdac8857 Eliminate redundant check for read-only mbuf data, since
M_TRAILINGSPACE() does a more complete check on NetBSD.
2007-11-26 23:52:40 +00:00
dyoung 84a52560a3 Bug fix: restore antenna diversity settings after reset. 2007-11-26 23:49:55 +00:00
dyoung ecfc7c1996 Use device_xname(). Make device_printf() take a device_t argument.
Add __attribute__((__format__(__printf__,2,3))) to device_printf()
so that the compiler will help us detect bad arguments.

Retire unused subroutine m_defrag(), and unused declaration m_getcl().
2007-11-26 23:48:37 +00:00
dyoung ca57c50be5 Make this compile. Use callout_init() instead of ATH_CALLOUT_INIT(),
since callout_init() on FreeBSD and NetBSD are the same, now.
2007-11-26 20:45:01 +00:00
ad b7b14106bd Don't rely on others being kind enough to pull in sys/device.h 2007-11-20 14:33:58 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
jnemeth 237d2dd7e7 fix 'm' used unitialized 2007-11-18 12:40:15 +00:00
kefren c61259ee1f initialize via sysmon_envsys_create()
make sensors valid
2007-11-17 08:23:46 +00:00
dyoung aadb8be251 Count received frames, Rx PLCP errors, Rx FCS (CRC32) errors, and
Rx ICV errors using evcnt(9).

In promiscuous mode, and when scanning (hmm), ask the NIC for bad
packets (e.g., those that do not pass CRC32).  Pass bad packets to
radiotap listeners.  Pass packets to radiotap listeners before
stripping FCS.  Re-order operations in atw_rxintr() to accomplish
all of this without passing bad packets up to net80211.

Set radiotap channel once in atw_tune() instead of in atw_rxintr().

Fix an endianness bug: it_len is little-endian, but bpf_mtap2()'s
argument needs to be in host order.
2007-11-16 23:51:02 +00:00
dyoung 5c5f8f488c Accommodate the variety of RF front-ends when radiotapping frames:
tap only RSSI when there is a Philips RF front-end.  Tap both Barker
lock quality and RSSI when there is any other RF front-end.

Provide radiotap listeners a more complete picture of channel
activity:

    in promiscuous mode, tap frames who do not pass the CRC32 check.
    Flag packets that were received with a short preamble.  Ask
    the NIC to pass us 802.11 Control frames.  Pass frames to
    radiotap listeners before stripping the FCS.  Re-order operations
    in rtw_intr_rx() in order to accomplish all of this, taking
    care not to pass a broken packet to net80211!

Do not provide a flags field when tapping xmitted frames.

Assert sane Rx packet lengths.  Really should check and drop instead
of KASSERTing.  I will revisit this, soon.

Update copyright.
2007-11-16 23:35:19 +00:00
xtraeme 31962fc6e5 Extend the envsys2 API (one more time, sorry) as defined in:
http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
2007-11-16 08:00:11 +00:00
dyoung fba210bf0b Use uintXX_t instead of u_intXX_t. 2007-11-16 06:06:15 +00:00
dyoung c58de3c983 Cosmetic: rename some variables and constants. Move some constants
from atw.c to atwreg.h.
2007-11-16 05:53:16 +00:00
dyoung b66951c216 Replace some magic numbers with HFA3861A register names.
Do not alias the Rx descriptor word ar_ctl to ar_rssi with a #define.
Instead, call the member ar_ctlrssi.

Convert the ugly macro ATW_RXDESC_INIT() to an inline subroutine,
atw_rxdesc_init().

Do not load an empty IEEE80211_RADIOTAP_FLAGS field into the Tx
radiotap header.
2007-11-16 04:58:38 +00:00
dyoung 67612c1e03 Define some more registers. 2007-11-16 04:52:36 +00:00
dyoung 5167b8ef99 Add missing */, RCS Id, and license. 2007-11-16 04:31:34 +00:00
dyoung 93ac8c75eb Add part of the Intersil HFA3861A register set so that eventually
I can remove magic numbers from atw(4).
2007-11-16 04:24:06 +00:00
dyoung c0297f3ac1 Fix order of operations:
rtw_rxdesc_init: before initializing a Rx descriptor's
            control word, synchronize the Rx buffer

        rtw_start, be paranoid: set the "NIC owns" bit on a Tx
            descriptor dead last.  Always reinitialize the "next
            Tx descriptor" pointer, just in case it got clobbered
            somehow.

Let the compiler decide whether to inline rtw_collect_txring or
not.
2007-11-15 22:55:50 +00:00
dyoung 57103df331 Use __arraycount(). 2007-11-15 22:49:46 +00:00
bouyer 637a7b4433 Add ATAPI support to ahcisata(4). lightly tested with a DVD burner, by
mounting a CD and reading from it, and blanking a DVD-RW using cdrecord.
2007-11-12 21:25:14 +00:00
joerg 2053e6a730 Merge refactoring from jmcneill-pm. 2007-11-12 20:10:32 +00:00
ad 2ea87a5b7a Back out revision 1.26. 2007-11-12 17:28:23 +00:00
bouyer d64cd0dda9 Move a delay() inside a loop, so that the 1s delay is really 1s. 2007-11-11 18:03:46 +00:00
ad d6bd505623 zsstart, zstty_txsoft: don't acquire tty_lock, it's already held. 2007-11-10 18:07:53 +00:00
macallan f9f695f535 turn the channel lock into a spin mutex at IPL_NONE so it resembles the
simplelock it used to be
With this my macppc boxes no longer deadlock when init sets up serial ports
2007-11-09 20:31:16 +00:00
ad ca6954d465 Use zs_lock_init() to set up the chanstate's lock. 2007-11-09 00:05:38 +00:00
ad d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00
ad afc64ea58c Use the softint_* API. 2007-11-06 21:51:07 +00:00
dogcow 55d73ac843 callout_init has two args. 2007-11-06 12:30:42 +00:00
itohy 6d75b40284 - Reset the bus if a Bus Reset condition is detected to make sure
all devices on the bus are really reset.

- Block interrupts on Bus Reset, and check it periodically until the
  reset is released.  On some 32UDE devices (probably the earlier ones)
  the RST line looks unstable without the termination power and may
  suffer ~continuous Bus Reset interrupts.

- Change number of scatter/gather segments from 16 to 17, to allow
  non-page-aligned 64KB transfer on 4KB/page platforms.
2007-11-06 11:35:35 +00:00
uwe 8531d31a58 Use device_t and device_private(). Convert attach to use aprint_*. 2007-11-06 02:29:19 +00:00
uwe 58197290f3 Use aprint_* 2007-11-06 01:46:02 +00:00
tsutsui a3bf2627a4 Fix some random LCD corruption on cobalt:
- make sure to set HD_ROW1_ADDR before putting characters at the first line
  in hd44780_ddram_redraw()
- use memmove(9) rather than bcopy(9) for possibly overlapped copies
2007-11-01 13:05:32 +00:00
itohy d3de8bec66 Fix problem where targets with ID 0, 1, or 2 couldn't be reconnected.
It seems I have always tested with targets those ID >= 3,
and that I am the only user of this driver.
2007-10-29 03:17:24 +00:00
degroote 0e9691e3e3 Fix a number of driver which doesn't check wep flag in *_tx_mgt.
It is incorrect because we need to encrypt some management frame in case of
shared authentification.
2007-10-21 17:03:37 +00:00
briggs 83967b2fba Use AAC_PREALLOCATE_FIBS with the softc as a parameter to catch up with
revision 1.10 of aacvar.h.
2007-10-21 12:59:33 +00:00
briggs 1687b85a45 Preallocate all of our FIBs. This needs more work, but currently avoids
a case where we could need more FIBs and try to allocate them inside an
interrupt handler, which is sub-par--a problem pointed out ages ago by ad@.
2007-10-20 01:46:30 +00:00
ad a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
ad 155ff6bf05 Make it build without IPL_SERIAL. 2007-10-17 17:44:19 +00:00
ad 6d904cb986 Reapply rev 1.262 and add a comment about it. 2007-10-17 17:20:41 +00:00
ad 2823fb7428 Defer wakeup() to a soft interrupt, since lptintr() can be called above
IPL_SCHED.
2007-10-09 12:45:27 +00:00
ad be0770a433 Merge from vmlocking: use mutexes and the softint API. 2007-10-08 16:50:45 +00:00