Commit Graph

40 Commits

Author SHA1 Message Date
nakayama 506b14959f Make ath(4) work again on sparc64 (and other big-endian machines). 2007-08-28 00:12:46 +00:00
ad 8b381466db The Atheros HAL on MIPS uses %s7 as a general purpose register, but the
rest of the kernel uses it to store the value of curlwp. Sam won't
recompile the HAL for us (fair enough), and we can't modify the HAL
to use another register because doing so could put us in breach of
the license (v. crappy). So, do a save/set/restore on %s7 in KernIntr()
and in the stubs that the HAL uses to call back into the kernel.
2007-08-24 23:52:10 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
cube 0676a294c8 Use consistent option names (i.e., those that are defflag'd). Ok dyoung@. 2007-01-14 01:05:49 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos a4037f35ea depend on the cardbus version too. 2006-10-30 01:31:04 +00:00
elad 815337c3da Kill KAUTH_GENERIC_ISSUSER usage. 2006-10-21 00:13:57 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 35ca6c8b5b Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!
2006-08-17 17:11:27 +00:00
ad 3029ac48c7 - Use the LWP cached credentials where sane.
- Minor cosmetic changes.
2006-07-21 16:48:45 +00:00
christos f73658ad42 put depend back. 2006-07-04 18:43:35 +00:00
christos e619d191dd more typos. 2006-07-04 18:43:13 +00:00
christos 8fed18e200 another dependency. 2006-07-04 00:16:05 +00:00
christos 4914e0cd44 typo 2006-07-04 00:13:35 +00:00
christos 8ace01b173 athrate_sample.o needs the generated header file 2006-07-04 00:10:34 +00:00
christos 0279cf0176 add a missing dependency. 2006-06-25 22:39:51 +00:00
kardel de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
gdamore 4aa924bc70 For cases where AH_REGOPS_FUNC is not defined, the bus tag is not defined.
In these cases, passing NULL for it solves a problem on AMD64 where the bus
tag is an integer rather than uintptr_t.  (I.e. fix the cast warning on
amd64.)
2006-06-07 17:07:33 +00:00
gdamore 1a366dbe11 Add missing file (forgot to commit this) for AR531X systems. 2006-06-07 06:43:36 +00:00
gdamore b38b3d39ad Import new HAL 0.9.17.2. Approved by sam@
New HAL includes some driver changes to register accesses.
Adds support for WLAN devices on AR5312 family devices.
Adds support 32-bit SPARC ath devices (untested).
ath enabled in SPARC64 GENERIC builds.
This HAL is tested and known to work for i386 PCI devices, SPARC64 PCI devices,
and AR5312 WiSoC devices.  MIPS PCI devices appear to be busted (possibly only
on Alchemy hardware, unconfirmed), and cardbus support is untested due to
lack of test hardware.

Please report any new problems with this import to garrett@.
2006-06-05 05:14:37 +00:00
elad 874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
gdamore 1d7621eed4 Undo an accidental commit of ah.h from an unreleased version of the HAL. 2006-04-06 15:57:58 +00:00
gdamore 6af18224ef Use a -I to add path to netbsd/ah_osdep, and remove #ifdef __NetBSD__
logic from ah.h.  This was done at the request of sam@.
2006-04-05 23:41:03 +00:00
tron be0bc38f31 Move "depend" target into block which is only used if ath(4) is enabled
in the kernel configuration. This makes it possible to build kernels
without that driver again.
2006-04-05 09:01:28 +00:00
gdamore ca7d761296 Rename AH_DEBUG, AH_ASSERT, and AH_DEBUG_ALQ to ATH_XXX.
Use the opt_ah.h for the provided HAL to get options like AH_REGOPS_FUNC.
Add AH_REGOPS_FUNC to a few opt_ah.h that don't have it in this version
of the HAL but need it.  (The next version from Sam should have this fixed
in it.  If it doesn't, then we'll have to take care at import time.)

Ultimately, this should make future imports even easier, and individual ports
should not have to worry about whether AH_REGOPS_FUNC is properly defined or
not, since the opt_ah.h will just take care of it automatically.

Ok'd by dyoung@.
2006-04-05 06:54:26 +00:00
gdamore c79321a24b Add rule to make athhal_options.h from ${ATH_HAL}.opt_ah.h, so that we
can automatically use the AH_XXX options that the HAL was built, without
requiring additional machine-specific configuration.

A follow up commit will activate this change.
2006-04-05 05:07:38 +00:00
nakayama 616dcaceb9 Add missing "-elf" suffix to ATH_HAL for sparc and sparc64. 2006-04-04 13:00:23 +00:00
gdamore 75670ddc44 Convert existing ath users to new Makefile, except for amd64, which needs
the rules due to needing to conditionally postprocess the HAL object file.

Macppc needs a a non-ELF HAL (EABI) object, so take care of that by default
in the atheros include file.
2006-04-04 03:13:12 +00:00
gdamore 27ea646343 Centralize rules for building atheros HAL for various supported platforms,
including easy override mechanism for ports that need it.

To use this, just .include this file instead of listing explicit rules
for building the target.  A change to std/conf/files will be made shortly
that lists /athhal.o as an object if "ath" is defined.

If you need to override the default HAL selected for some reason (for example
to use an xscale version of the HAL on evbarm kernels that support it), add
a "makeoptions ATH_MACHINE_HAL=<hal>", for example to select the XScale
LE configuration you could use "makeoptions ATH_MACHINE_HAL=xscale-le-elf".
2006-04-04 01:26:53 +00:00
gdamore 9a2b9dd63b Reorganize ath layout as requested by sam@ and suggested by dyoung@ in
http://mail-index.netbsd.org/tech-net/2006/03/15/0000.html.

The new layout almost precisely matches FreeBSD, and should make
future imports much easier.

At the same time, import the current 0.9.16.16 HAL from FreeBSD.  According
to sam@, this is the proper version we should be using.
2006-04-02 05:52:14 +00:00
lukem a1f606d3fd Use the SI capitalization for "Hz", "kHz", and "MHz" in comments and strings.
Add a space between numbers and Hz unit.
2006-03-08 23:46:22 +00:00
dyoung 25e9e914b4 Miscellaneous ath(4) and net80211 updates and bug-fixes coming from
sam@ and various open source repositories:

ath(4):

        Ignore "phantom" beacon misses: should stabilize connections
        to access points (no more ceaseless link-UP/DOWN indications).
        Also, re-synchronize beacon timer using the TSF in the
        first beacon received after joining a BSS---this should
        also help suppress spurious beacon misses.  I am hopeful
        that this will help ath(4) lossage reported by perry@ and
        smb@.

        Add new configuration through sysctl.

        Use a shorter calibration interval until IQ calibration
        finishes.

        Report antenna noise through radiotap.

        Rudiments of Radar Detection / Dynamic Frequency Selection.

        Update to HAL version 0.9.16.13.

        Update open sources for changes to the HAL API.

        Add HALs for additional architectures: add big-endian ELF
        HALs for sparc64 and for PowerPC.  Also add a Alpha HAL.
        These new HALs are untested under NetBSD.

ath(4) + net80211:

        Make the multicast transmit rate configurable by ioctl.

        Miscellaneous bug fixes.
2006-03-02 03:38:26 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
dyoung 2a007394bf For clarify, use the name opt_athhal.h instead of opt_ah.h for the
file where Atheros HAL options go.
2005-10-19 09:04:23 +00:00
martin 30895fa9a4 The entity passed to the HAL as a HAL_BUS_HANDLE needs to be an integral
or pointer type. So on sparc64 (and maybe others too?) where
bus_space_handle_t is a struct, pass the address of the bus_space_handle_t
and adjust the register access functions accordingly.

While there, slightly optimize the bus_space_* usage in the register
access functions and macros.
2005-09-13 05:50:29 +00:00
dyoung 458bd292c0 Our bus_space_{read,write}_4 routines convert from host to bus
byte-order, but FreeBSD's does not.  ath(4) expects the FreeBSD
convention.  Meet ath(4)'s expectations, use
bus_space_{read,write}_stream_4, instead.

Now, the HAL seems to work on macppc.
2005-07-04 05:35:09 +00:00
dyoung eaadb988fd #define AH_REGOPS_FUNC 1 to match athhal-powerpc-be-eabi.opt_ah.h. 2005-07-04 05:32:16 +00:00
dyoung 6a0e52d84e Move the definitions in dev/pci/files.ath into dev/pci/files.pci.
Stop including dev/pci/files.ath in arch/i386/conf/files.i386,
since we get the same definitions by including dev/pci/files.pci,
now.  Remove dev/pci/files.ath.

Add arch/macppc/conf/Makefile.macppc with directives for linking
the Atheros HAL for PowerPC.

In athhal-powerpc-be-eabi.opt_ah.h, #define AH_REGOPS_FUNC 1, since
otherwise the linker complains that the PowerPC HAL cannot link
with register-read/write subroutines.

Add ath(4) to the GENERIC macppc kernel configuration; comment it
out.
2005-06-25 22:08:54 +00:00
dyoung 9063402978 Resolve conflicts in importation of 18-May-2005 ath(4) / net80211(9)
from FreeBSD.  Introduce compatibility shims (sys/dev/ic/ath_netbsd.[ch],
sys/net80211/ieee80211_netbsd.[ch]).  Update drivers (an, atu, atw,
awi, ipw, iwi, rtw, wi) for the new net80211(9) API.
2005-06-22 06:14:51 +00:00
dyoung d1f006118e Import FreeBSD's ath(4) of 2005-05-18 2005-06-21 20:37:47 +00:00