Commit Graph

67 Commits

Author SHA1 Message Date
proski 5890429464 Fix typos found by codespell
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4166 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-08-26 15:31:01 +00:00
proski e9c7901f6e Don't use "{ 0 }" to initialize structures, use "{ }"
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4161 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-08-03 05:43:55 +00:00
proski 098decda6c Fix protection against multiple inclusion of headers
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4142 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-05-11 15:19:10 +00:00
proski ea28c77afc Fix all instances of unused variables reported by gcc 4.6.0.
Change IEEE80211_NODE_SAVEQ_DEQUEUE to a compound statement returning a
value, which may or may not be ignored by the caller.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4137 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-05-03 21:56:02 +00:00
proski e408c071a2 Add support for the latest kernels that don't define AUTOCONF_INCLUDED
Use CONFIG_LOCALVERSION as an alternative to check that the
configuration settings have been included.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4134 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-02-02 21:10:53 +00:00
proski a252469c71 Add support for AR9280 from FreeBSD HAL
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4107 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-01-13 06:50:17 +00:00
proski 00b7ee3649 Port ah_writeIni and ar5416SpurMitigate from FreeBSD HAL
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4106 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-01-13 06:48:05 +00:00
proski da9812696d Use LDOPTS instead of LDFLAGS to avoid an ld warning on Linux 2.4
The warning is
ld: warning: cannot find entry symbol stext; defaulting to 0000000000000000

LDFLAGS may have been a better choice when HAL was binary, but now
LDOPTS is the right thing for consistency with the makefiles in other
directories.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4104 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-01-11 14:52:01 +00:00
proski 4bbde45a51 Don't set ctl_name in Linux 2.6.33+, it was removed
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4102 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-01-09 08:34:37 +00:00
proski ec0aeb9411 ar5416: initialize AR_CFG on little-endian systems
Reference: FreeBSD r195426


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4084 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-08-11 22:10:26 +00:00
proski 4462df298c Fix mismatching prototypes in HAL
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4082 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-08-05 17:48:41 +00:00
proski f1873dba18 Allow compilation with BUS=AHB in 64-bit systems
Don't enable AHB support in HAL on 64-bit systems, it's not 64-bit clean
and is not meant to be.  Provide replacement definition for KSEG1ADDR
when it's not defined (that includes 64-bit mips).  Remove other
replacement definitions, they are not needed anymore.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4064 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-06-26 02:06:16 +00:00
proski e0712b8175 Fix compiler warning on some big-endian systems
Don't assume that both iowrite32() and iowrite32be() return values in
the _OS_REG_WRITE definition.  _OS_REG_WRITE discards the value anyway.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4061 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-06-26 01:31:05 +00:00
proski 97b4d431f7 Fix compilation for 32-bit PowerPC on old kernels
32-bit PowerPC only gets iowrite32be() and ioread32be() in version
2.6.20.  This applies only to the merged "powerpc" architecture
identified by CONFIG_PPC_MERGE.  The old "ppc" architecture goes away in
Linux 2.6.27, so CONFIG_PPC_MERGE is no longer valid.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4029 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-24 06:30:27 +00:00
proski 14247bc74f Provide compatibility iowrite32() and ioread() for old sparc32
32-bit sparc only gets those functions in Linux 2.6.18.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4028 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-24 06:14:18 +00:00
proski 4f4275f9dc Rename u32 to up32, u32 is a type in Linux
This fixes compilation on sh64.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4027 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-24 05:00:20 +00:00
proski 731ebf0d39 Reduce stack usage in ar5112SetPowerTable() - eliminate tmpPowerTable
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4021 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-12 16:44:36 +00:00
proski 58395167ee Remove all references to _trace_regop() and MMIOTRACE
It's obsolete and useless now, when the HAL sources are open.  It also
misuses ath_hal_debug in a way incompatible with the use of
ath_hal_debug inside the HAL.

The mmiotrace facility is available in the kernel and doesn't require
any changes to the sources.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4020 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-07 21:11:03 +00:00
proski 200f8b8a6a Fix compilation with HAL_DEBUG=1
Provide forward declaration of struct ath_hal in ah_osdep.h.  Implement
OS_GETUPTIME (the implementation is quite primitive, as it's only used
once for some obscure condition in 5212 chips).  Implement HALDEBUG()
and ath_hal_ether_sprintf().


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4019 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-07 20:40:54 +00:00
proski 0e32b2c2a3 Fix a warning in ar5416GetGainBoundariesAndPdadcs
If numXpdGains is 0, minPwrT4[0] would not be initialized.  Make sure
numXpdGains is more than 0.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4018 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-07 19:35:22 +00:00
proski 2975ae47f2 Eliminate __CONCAT1 and __CONCAT, we don't need that complexity
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4009 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-22 22:07:23 +00:00
proski ec2664e900 Make ath_hal_eepromDetach() safer
Check that AH_PRIVATE(_ah)->ah_eepromDetach is not NULL before calling
it.  This fixes kernel oops in case if the attach function for the chip
fails before EEPROM support initialization and calls the corresponding
detach function.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3991 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-08 22:25:50 +00:00
proski 519d1b2a2e List only actually used options, enable what can be enabled
In particular, enable AH_SUPPORT_AR5312, which enables large parts of
HAL code for SoC devices.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3990 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-08 21:44:06 +00:00
proski 1c2147eb68 Fix compiler errors with -O3
When the compiler tries inlining static functions, it can notice that
some variables may not be initialized in the functions being inlined.
Provide initialization for output variables in all branches of
execution, no matter how anomalous.  Add asserts in some cases.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3988 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-08 09:15:22 +00:00
proski c135dc326c Simplify linker set implementation, fix compiler warning with -O3
gcc warns that "array subscript is above array bounds" with -O3 since
pvar is assigned before _i is checked.

Eliminate _i, use a new ppvar variable, which is a pointer to the
reference table.  Terminate reference tables with NULL instead of using
ARRAY_SIZE.  Fix types of reference tables to match those actually used
by the code.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3987 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-08 08:52:59 +00:00
proski 5702465321 Merge madwifi-free branch into the trunk
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3978 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-07 01:26:53 +00:00
proski 25fbd8a072 Remove all references to ALQ from makefiles
ALQ has never been functional in MadWifi, and now it's pointless.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3967 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-01 21:30:10 +00:00
proski f011860a49 Remove *.bin on "make clean"
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3965 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-01 21:21:33 +00:00
proski 4a596a2c5b Fix make warning on Linux 2.4 introduced by the last commit
Don't use two targets, simply omit $(obj)/ if it evaluates to "./"


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3837 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-08-01 02:51:19 +00:00
proski 20bd7616c4 Fix Linux 2.4 compatibility, introduce variables for HAL file names
Add targets for both HAL binaries without $(obj), which is needed for
Linux 2.4 build system.  Keep targets with $(obj) for Linux 2.6.

Use $(HALBIN) for non-unmangled HAL and $(HALOBJ) for unmangled HAL.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3836 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-08-01 02:26:30 +00:00
proski 01eddadfb7 Split unmangling from uudecoding, don't unmangle in place
Conversions in place should be avoided in the build system because make
doesn't know if the conversion has taken place.  Use a different name
for HAL before unmangling.  Respect the build quietness settings.

Simplify Linux 2.4 rules so that the commands for decoding and
unmangling are written only once.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3815 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-23 21:15:34 +00:00
proski e74121f314 Add printk priorities to ah_os.c
Reference: madwifi-dfs@3264


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3780 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-17 02:48:19 +00:00
mentor 03dbd3568d Make module loading and unloading much less noisy. I don't believe any of this ifnromation is particularly useful for dbeugging, and definitely not for operational use.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3742 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-21 14:40:43 +00:00
mentor fbfef80115 Use POSIX preferred (and easier to read) $() form rather than ``
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3732 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-19 00:33:04 +00:00
mentor f3a89f4353 Typo in CONFIG_PARISC. Guess PARISC users are a bit thin on the ground then.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3731 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-19 00:22:42 +00:00
kelmo 0a1bf29ca4 Fix format string bugs.
Closes: #1999


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3726 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-16 08:50:30 +00:00
proski c47c360b48 Be very careful about using ioread32be() and iowrite32()
They appeared:
- in generic code and PARISC - in 2.6.12
- in PPC64 - in 2.6.14
- in merged PowerPC - in 2.6.15 (when the merge occurred)
- in MIPS - in 2.6.21

Improve comments and indentation, as the logic is getting more complex.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3712 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-08 01:28:58 +00:00
mentor 76cade5dac Make pointer declarations and casting consistent. Some other formatting changes are made in passing
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3710 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 20:32:29 +00:00
proski 1b5e6019b1 Don't show comments while compiling
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3707 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 05:39:54 +00:00
proski 798e0eb3fb Registers between 0x7000 and 0x8000 are always little-endian
According to FreeBSD changelog, this area is present in 5416 and newer
and must be byteswapped on big-endian systems.  Testing confirms it.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3701 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-05 07:22:51 +00:00
proski 8c141cdc58 Reapply r3402 (ARM compile fix), it was reverted by mistake
This should fix compilation on little-endian ARM and possibly other
platforms with little or no optimization.  This closes #1783.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3700 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-05 07:13:41 +00:00
kelmo 4b2cf1393a Remove modules.order files in Makefile clean targets.
Remove kbuild by-products in regression/Makefile. Also allow
regression/tkip/test_tkip.c to compile (too few arguments to function
ieee80211_crypto_demic).

Closes: #1973


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3699 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-04 12:25:31 +00:00
mentor 2cb3887369 Add lots of .PHONY to Makefiles and remove a duplicate rule definition
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3678 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-23 03:49:25 +00:00
proski 78731b81b8 Compile ath_hal_reg_write() and ath_hal_reg_read() only if needed
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3664 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-22 12:39:24 +00:00
mentor 6abd8285aa Whitespace for control statements
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3627 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-14 19:11:57 +00:00
proski 1941f3990b Add $(obj)/ to the dependencies of ath_hal.o
Otherwise, $(TARGET).hal.o is not built for Linux 2.4 kernels.  The rule
for ath_hal.o is for Linux 2.4 only and should not affect Linux 2.6
builds.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3604 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 12:05:10 +00:00
proski 2913278884 Adjust build system for Linux 2.6.26
During the second stage of the module build, Linux 2.6.26 does not
define $(obj).  Try using $(SUBDIRS) as $(obj) before falling back to
the current directory.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3603 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 02:00:56 +00:00
mentor 658d470ad5 Revert now unnecessary compile fix for INITIAL_JIFFIES - r3598. The other code using this define looked like it should not be using it too.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3601 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 01:02:51 +00:00
mentor 63436cbc14 Kill dead uptime calculating code; not needed in a driver...
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3600 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 01:00:11 +00:00
proski 9230ae95d4 Fix Linux 2.4 compatibility
Filter out harmful options from OBJCOPY.  Linux 2.4 adds "-O binary" and
"-S" for i386 and x86_64, which would break the build.

Use $(TOP) in hal_unmangle.objcopy path.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3599 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-04 23:30:34 +00:00