Move to using /sys/dev/ray for driver
Backport -current ray_res code - most are stubs.
Make ray_attr stuff look like currents layout.
Make attribute memory access use a macro and ripple through.
Drop FIXUP as we always need it
Move the code that checks the card into _probe and out of _attach and
shuffle a couple of things around in attach.
Set ifp in the variable block - catches unused variables.
of some function names, dropping the ISA bits that were never used and
removing __P
We've renamed the _pccard_ stuff as nothing else probes or attaches.
In the next commit we will move some routines around and split out some of the
structure definitions to another file.
I've dropped the SYSCTL as I never got it working. APM is gone too as it
is broken.
Note, that the attr_read/write will be in both this and NEWCARD/NEWBUS so
I've moved the prototypes to the right place.
Add a few casts.
Removed NETBSDTX spares.
Renamed a load of functions - specifcally
start -> tx
init has download, sj and assoc as sub-functions
report_params and update params move to repparams/upparams
Tidied up old #define's
Got rid of old DPRINTF, made printf's RAY_PRINTF and panic's RAY_PANIC
All code KNF
Removed checking the ECF_TO_HOST area in ray_init - this gets hosed
when someone updates/read a parameter from the card so causes
unneeded grief. This required moving the tib check into ray_attach.
Changed handling of interface flags in ioctl so that promiscous mode
changes are only done as needed.
Sequences of comq entries can be added to an array and automatically
dealt with - used in ray_init_user and others.
Moved IFF_RUNNING checks from the comq commands to com_runq - still
not sure what to do so we PANIC - will be fixed.
ray_sj now checks to see if any of the parameters it can update can be
updated.
ray_sj_done now updates parameters to the current n/w set if we changed
them earlier. I was being a bit thick in earlier comments as to why this
check was done - the ECF never changes the parameters.
Assocication with APs is handled outside of ray_sj - need to add
WEP stuff if I ever get my hands on an AP.
ray_stop, ray_unload and ray_reset are currently broken - reset isn't used anyway.
ray_tx_XXX and ray_rx only have cosmetic changes.
Interrupt handler now gets command out of ccs. This is so ray_intr_ccs and
ray_intr_rcs don't need to remap CM (I'm trying to roll things up a bit as
it must be slowing us down).
ray_intr_ccs just vectors commands to functions or error checks - a
jump table could replace it in ray_intr.
Ditto for ray_intr_rcs.
mcast is currently broken - I need to do more work for ALLMULTI etc. This is reasonably easy to fix becuase of the comq array stuff.
Added a few more checks into repparams so that it is firmware version aware. It also uses the new comq framework.
Parameter updating is also much better with the update parameter return routine re-worked.
Added a couple of runq entry helper functions - one that malloc's a new
entry and fills it in with sensible defaults and another that adds and
runs a seqencue of entries.
Working download and start/join network. What's nice is that I didn't touch
TX or RX code at all.
Not fully done yet - stubs for assoc, cast, promisc and user param updating. I
can't work out the "nicest" way to get the mcast and promisc interactions
sorted without needing to abort runq commands half way through. And, as
mcast/promisc used elsewhere I want to get this right.
Other stuff
Fancy new debugging with __FUNCTION__ and __LINE__.
Lots of panic's inserted until I check some stuff out.
Removed all of the old scheduler.
Removed start join timeout as I don't need it.
Removed the promiscuous broadcast code that waas ifdef'd out.
New CCS allocation
before I rip out the scheduler - whilst v. nice 'n all, it is doing the
wrong job. We need something that sends commands to the card atomically
so dhcp etc. works right.
I've renamed and moved a lot of the scheduler code so that it is all
in one place and all starts with ray_cmd_
ray_stop has some debugging crap left in - to be deleted rsn
robust enough to work with dhcp. Essentially the driver returns to userland
before certain commands have been completed by the card. I'm trying to
work out the best way to fix this. There are very minor functional changes,
most of this is debugging.
Rework of debugging so a bit mask is used and re-allocation around the place.
Tried to protect ray_init with a tsleep until the network has been joined. I think this is only a partial fix as we also update the mcast and promisc
values.
* i needed it anyway
* remove startccs and startcmd - done
* as those were used for the NetBSD start timeout
* multicast - done but UNTESTED
* I don't have the ability/facilty to test this
* rxlevel - done
* stats reported via raycontrol
* getparams ioctl - done
* reported via raycontrol
* start_join_done needs a restart in download_done - done
* now use netbsd style start up
removed spare timerh
implemented start_assoc in ray_ccs_done
bit more knfing
requires current and desired network parameters, so I have created a network parameter structure and used two on them in the softc. This gives a bit of room of expansion. Re-wrote the update check in _net to work with this.
Tidyed up softc due to above.
Removed startccs and startcmd as they were only used by NetBSDs startup timeout.
not actually used yet. This created a lot of prototypes.
I moved code around so that the functions are in the same order as NetBSD - this helps diff a lot.
Things that are missing are the TX routine and ifmedia stuff and ioctls
Not all of the stuff is enabled - we are missing calls in ccs_done and ioctl.
Promiscious mode is working.
Am almost ready to use the NetBSD start up routine - essentially all I need
to do is not use a seperate timer to call download_timo.
Other misc. things:
callout_stop is a newish feature for cancelling a timer without
argument checking it.
tried to add a sysctl knob but it doesn't work in the module
enabled infrastructure code to call netbsd bits.
card configuration hassles.
Added a TODO list so I don't forget to finish stuff.
Tidyed up a lot of XXX.
Tidy'd and documented debugging - all DPRINTF have a debug level associated.
RAY_DEBUG = 1, will log packet errors.
#if protect common memory hacking
Don't rely on pccardd for common memory settings.
Added a simple transmit mode - reasonable performance but not great. Will do a version of the NetBSD chained buffers soon. Yup we have two way transmisson!
Fix a stupid bug in the common memory code - the ioctl call was
hidden behind a debug test!
Added receive code and support for Webgear encapsulation.
More debugging macros/functions.
conditionalised timeout for start/join network
conditonalised attribute/common memory hacks
identified tracking code with XXX_TRACK
sorted out initialistion of instance structure to some extent
finished docuementing the start/join sequence
The code doesn't compile (I'll do that in a minute), but functionally
it gets to receveing the interrupt from the start or join net command.
There is a lot of code to deal with the limitations of the PCCard memory
mapping code - I'm changing some of it hence the check in to preserve something
that worked.