Damien Bergamini, ported and submitted by FUKAUMI Naoki per PR kern/30449
I've modified the USB "ural" driver for recent changes to the NetBSD
ieee80211 framework, possibly not completely, but with an ASUS wireless
adapter I'm getting some signs of life.
Didn't care about pci/cardbus for now, hopefully someone with hardware
will do it.
frontend for the split re(4) to files.cardbus, and to the generic x86
laptop config (sys/i386/conf/GENERIC_LAPTOP).
NB: as best I know, there are still unresolved issues in attach and
powersave, with the NetGear cardbus cards and re(4).
debug flags.
From Linux: handle an RTL8180 bug. Sometimes the NIC skips from
the middle of the ring to the 0th rx descriptor. Now the driver
resynchronizes.
Handle a receive descriptor underrun or Rx FIFO overflow condition
in the way that the Linux driver does. This kind of seems like
overkill, but whatever.
Protect rtw_ioctl with splnet().
Do not load a tx descriptor with a buffer shorter than 4 bytes.
Handle a transmit timeout less disruptively.
bus-independent backend, with PCI and CardBus attachment code.
The committed code has two serious bugs:
1. The driver makes no attempt to recover resources when a (Cardbus)
instance is removed; bus resources are leaked.
2. In testing with a NetGear GA-511, the Cardbus card never responded
to a reset/wakeup if the card is powered down after attachment.
So for now, leave cardbus instances powered up at attachment
(insertion, or at boot if a card is already present).
That aside, it acutally works on my GA-511. Committed as-is despite
the bugs, after repeated requests to make the code available for
further testing. Also requires sys/dev/mii/miidevs rev 1.54 -> 1.55,
and consequent regen of miidevs{,_data}.h.
My card now probes as:
rtw0 at cardbus1 dev 0 function 0: Belkin F5D5020v3 802.11b (RTL8180 MAC/BBP)
rtw0: rtw_cardbus_attach mapped 512 bytes mem space
rtw0: interrupting at 10
rtw0: hardware version D
rtw0: SROM version 1.2
rtw0: RF: Philips SA2400A, PA: Philips SA2411
rtw0: Geographic Location USA
rtw0: 802.11 address 00:30:bd:4d:ed:de
rtw0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mb
XXX The driver still doesn't actually _work_...
-convert submatch() style functions (passed to config_search() or
config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
on "locators.h"
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
This code needs cleanup, at least a reasonable linked list
implementation (fixed a bug in detach_card() in the process which
left a dangling pointer around).
Also removed a questionable and undocumented use of the parent's
device unit number as locator value.
(As with the pcmcia code: someone please review wrt powerup/down etc.)
* cardbusdevs -> pcidevs
* Add a Microsoft product.
* Use tlp_cardbus_{disable,enable}() in the powerhook. This is an experiment
and may need more work.
Begin conditioning device configuration on revision number. Four
revisions are known:
1.1/1.5 -> ADM8211A,
2.0 -> ADM8211B,
3.0 -> ADM8211C.
The B and C parts, which are not supported yet, have AP capability.