Commit Graph

4169 Commits

Author SHA1 Message Date
jmcneill b74d978f79 Prevent vga from attaching if vesafb is the console. Accessing VGA
registers after switching to a VESA linear framebuffer mode is not
guaranteed to work. This should fix the majority of the problems people
have been experiencing with vesafb.

XXX: Still doesn't fix the assertion in wscons with options DIAGNOSTIC.
2006-02-19 15:16:53 +00:00
dyoung 255487c5d5 Support newer firmwares. From Eric Auge. 2006-02-19 08:20:46 +00:00
dyoung 1a85ac8d6d Add radiotap support to an(4). From Eric Auge. 2006-02-19 08:20:02 +00:00
dyoung a43fc3c20c When rtw_enable is called, power may have been removed and re-applied,
so invalidate the WEP key registers to force us to write the keys
back to the hardware.

Revamp key handling: use the hardware WEP engine for 40-bit and
104-bit keys, only; use software WEP for all other key lengths.
Set the hardware key length to the length of the default Tx key,
or if there is no default Tx key, use the length of the longest
WEP key.
2006-02-19 08:10:06 +00:00
dyoung e1a75e8134 ADM8211 hardware WEP is not working (probably due to a bug in 802.11
Duration / PLCP Length calculation), so temporarily switch to
software WEP, which is working.
2006-02-19 08:02:46 +00:00
dyoung e315c6b227 When atw_enable is called, power may have been removed and re-applied,
so invalidate the WEP SRAM to force us to write the keys back to
the hardware.
2006-02-18 22:12:01 +00:00
dyoung f66ad201c4 Fix serious regression in AP-client mode: program adapter's BSSID
as we enter the IEEE80211_S_AUTH and IEEE80211_S_ASSOC states, so
that we don't send 802.11 Authentication and Association frames
with BSSID=00:00:00:00:00:00.
2006-02-18 22:07:11 +00:00
perry fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
xtraeme fd8cfc5edb Add missing $NetBSD$ tags and __KERNEL_RCSID(). 2006-02-05 06:03:26 +00:00
dyoung e46f0f4008 In rtw_{rx,tx}ring_fixup, do not set the tx/rx ring index to
something out of bounds if we read an invalid pointer form the
hardware.  Prevents a panic when an rtw@cardbus is ejected.
2006-02-04 23:22:27 +00:00
dsl 6f0f9f8763 Make almost everything #include <sys/bswap.h> instead of <machine/bswap.h>
The bswap.h and endian.h files are all rather incestuous, but I want to
get the constant folding stuff into one place - sys/bswap.h
2006-01-29 21:42:40 +00:00
jdolecek 0a5be6a731 add cast to compile with AAC_DPRINTF 2006-01-29 09:48:09 +00:00
bouyer 72d6450048 Revert part of previous: checking the drive's status after a read seems to
cause interrupt timeouts on some hardware.
2006-01-24 21:43:26 +00:00
bouyer 1af9387585 Make some debug printf more verbose.
In wdccommand_intr(), after a data read check that the drive is ready again.
2006-01-22 16:44:45 +00:00
bouyer bf1a4d2af5 properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
  for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.
2006-01-16 20:30:18 +00:00
itohy 690b61f41b - Fix panic when the DMA buffer is not 4byte aligned.
In this case, the transfer count becomes larger than the reality,
  and this fix works around it.

- Add missing bus_dmamap_unload() in attach failure path.
2006-01-14 07:14:45 +00:00
dsl a6d7f81261 Save console baud rate as both the input and output rates.
This is what I thought I'd done in rev 1.237
2006-01-08 22:19:59 +00:00
heas b6a4c18d48 Contribute to the rnd entropy pool (already attached as a source). 2006-01-02 05:46:25 +00:00
dyoung 92e2a6beb6 Add support for the GCT Semiconductor GRF5101 transceiver/synthesizer.
From OpenBSD.

GCT will not provide any documentation, so there are many magic
numbers in this code.
2005-12-29 22:27:17 +00:00
dyoung 6910fdde2a Update rtw(4) for the new IBSS merge idiom, where ieee80211_ibss_merge()
does not return ENETRESET if the driver should change its BSSID,
but it makes a RUN->RUN transition, instead.
2005-12-29 22:23:52 +00:00
dyoung a44e108963 Remove declaration of deleted subroutine, atw_change_ibss(). 2005-12-29 22:20:03 +00:00
dyoung 8f13266467 Extract subroutine is_running().
If ieee80211_ioctl() returns ERESTART, reinitialize interface with
atw_init().

Don't discard the error returned by atw_init() in atw_media_change().
2005-12-29 22:04:21 +00:00
dyoung bca4a72a2a atw_start() need not update IFF_OACTIVE if it hasn't put a new
packet on the transmit ring, so don't do that.
2005-12-29 22:01:43 +00:00
dyoung 17fde28ad0 Assert consistency of IFF_OACTIVE / out of sw/hw transmit descriptors
state.
2005-12-29 21:59:07 +00:00
dyoung c64e4a2b46 Cosmetic: shift atw flags right by 4 bits. 2005-12-29 21:53:02 +00:00
dyoung 512b9ec012 Always tickle the Receive Demand Register (ATW_RDR) after re-enabling
the receiver.
2005-12-29 21:51:43 +00:00
dyoung 38c346abf0 A couple changes to the hardware reset:
Wait for the SWR bit in ATW_PAR to turn to 0, instead of waiting
for the whole register to turn to 0.

For ease of comparison with a reference driver, re-order operations.
2005-12-29 21:49:59 +00:00
dyoung 67f05eef6b Cosmetic: make a three-step staircase out of a four-step staircase. 2005-12-29 21:45:56 +00:00
dyoung 0a56b050db Revamp state machine:
1 Only stop beacon generation on an ->INIT transition.

        2 Merge AUTH and ASSOC cases, they do the same thing (tune
          a new channel).

        3 Start beacon generation in IBSS, AP, *and* "adhoc demo"
          mode.

Cosmetic tweak: rewrap a statement.
2005-12-29 21:44:33 +00:00
dyoung 3c1ba11dc5 Adapt atw(4) to the new IBSS merge idiom, where ieee80211_ibss_merge()
does not return ENETRESET to indicate the station should adopt a
new BSSID, but it triggers a RUN->RUN transition, instead.
2005-12-29 21:40:41 +00:00
dyoung 271d64132c Delete atw_media_status(). Let SIOCGIFMEDIA call ieee80211_media_status()
directly for media status.
2005-12-29 21:37:27 +00:00
dyoung 4875b8dbae Use the fragmentation threshold in the ieee80211com.
XXX Need to condition on frame type = data.
2005-12-29 21:34:53 +00:00
dyoung 2e64aa7e41 In atw_init(), always call atw_write_wep() to write the WEP state
to the h/w.  This prevents a spurious call to atw_write_wep() later,
in IEEE80211_S_RUN state, when net80211 times-out ieee80211_nodes.
It is important to avoid a spurious atw_write_wep() call because
in IBSS mode, at least, WEP re-initialization reliably locks up
the transmitter.

XXX There must be a bug in atw_write_wep() that causes it to lock
XXX up the transmitter.  I will revisit it later.
2005-12-29 21:32:06 +00:00
dyoung 13283d6e4f In atw(4), use ieee80211_compute_duration() to compute IEEE 802.11
Duration and PLCP Length fields, and delete the abominable
atw_frame_setdurs() subroutine.

Make rtw(4) use the new ieee80211_compute_duration() calling
convention.

Add an ieee80211_key argument to ieee80211_compute_duration() and
lightly constify arguments.  Get the crypto header length from the
key argument instead of blithely assuming a WEP header.  Add some
inline documentation.  Account for data padding (IEEE80211_F_DATAPAD).
2005-12-29 21:08:26 +00:00
chs 599510004a use %z when printing a sizeof. 2005-12-27 17:25:41 +00:00
chs 6cb72218d4 switch macppc to use the MI zstty driver.
add macppc's ZS_TXDMA hooks there.
2005-12-27 17:20:54 +00:00
chs 33d70de438 remove the COM_MPLOCK option. always include the spinlock in the softc
and always call the simple_* locking functions.  the locking functions
are compiled out if they are not needed anyway, so a separate option
for this doesn't gain anything.

this also fixes the serial console on my alpha ES40 (which doesn't make much
sense since the com driver should still be under the big lock on alpha,
but whatever).
2005-12-27 00:46:38 +00:00
rpaulo 333596ccdb PR/32386: Dawid Szymanski (arhea). Add support for the 8169SB chipset. 2005-12-25 19:55:40 +00:00
perry 3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
dyoung 47b698d0b8 Fix comments and debug printfs: Tx FIFOs underflow, they don't
overflow.
2005-12-13 05:10:55 +00:00
dyoung 830e4be4c8 On a transmit FIFO overflow (err, actually an underflow...) reset
both the transmit & receive sections of the MAC.
2005-12-13 05:07:14 +00:00
christos dac64af055 more proc -> lwp 2005-12-12 01:18:29 +00:00
christos d014803b83 more proc->lwp changes. 2005-12-12 01:14:22 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
xtraeme efc3770d53 Not everyone want to see debugging printf()s unless "options DEBUG"
is compiled in.
2005-12-08 18:06:42 +00:00
bouyer b898e14a29 Wrap debug printf in AHC_DEBUG. Pointed out by Izumi Tsutsui. 2005-12-05 18:29:45 +00:00
rpaulo bcb67e15ae s/NBFILTER/NBPFILTER 2005-12-03 21:20:07 +00:00
rpaulo de470a4422 Make this compile without bpf(4). 2005-12-03 21:18:32 +00:00
bouyer 2ac6595656 Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback.
Fix a panic in uvm reported by John R. Shannon on port-xen; patch tested on
ahc by me and on ahd by John.
2005-11-28 21:03:19 +00:00