DIRS_MODULES is always used in the context when the Makefile is
processed directly, not from the kernel build system. Therefore, it's
equivalent to obj-y.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2986 0192ed92-7a03-0410-a25b-9323aeb14dbd
The new crypto API uses VAP, so allocate one. Use keys from
vap->iv_nw_keys with the provided key index (0 for TKIP), don't allocate
another key on the stack. Synchronize context structures with the
current code.
Return -ENXIO on failure. It's hard to find a sensible code for crypto
test failure, but -1 (-EPERM) was misleading. Fix TKIP test that was
ignoring failures.
Update module parameters for Linux 2.6. Provide makefiles to facilitate
compilation. Fix all sparse warnings.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2983 0192ed92-7a03-0410-a25b-9323aeb14dbd
Split skb and node debug flags - one ending in _ref tracks minute changes to reference counts, while the non _ref flag trackes more coarse grained debug events.
Fix a node reference leak before skb_orphan detected by the debug destructor.
Fix debug flag display order for athdebug and 80211debug so that the shorter
name comes first and matches, otherwise only the _ref flags match.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2964 0192ed92-7a03-0410-a25b-9323aeb14dbd
ath_key_alloc() was using pointer subtraction to determine the group key
index. This is not optimal, as it's done by dividing a pointer-sized
integer by a number that is generally not a power of two.
Since there are only 4 (IEEE80211_WEP_NKID) keys to try, it's easier to
try them all in a loop. It also makes the code more reliable, as it now
detects the cases when the key pointer is within the valid range, but
doesn't point to the beginning of an array element.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2954 0192ed92-7a03-0410-a25b-9323aeb14dbd
Preprocessor flag now used to toggle printk output prior to blocking on
a spinlock.
There is of course a chance that the spinlock will be taken between the time we check it and print our little message, but this should still be of some assistance troubleshoot locking mistakes that come up in the future.
If you turn on the flag, you can find out what locks are being contended for and from which functions... i.e. ath_intr fights for a particular lock, etc.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2944 0192ed92-7a03-0410-a25b-9323aeb14dbd
The architectures that don't set CONFIG_GENERIC_IOMAP are supposed to
provide replacements for functions in lib/iomap.c, but not all provide
iowrite32be() and ioread32be().
Only MIPS, PARISC and PowerPC implement iowrite32be and ioread32be as
functions, while SH and AVR32 provide macros. Other architectures, in
particular ARM, provide no replacement at all.
This should fix ticket #1539.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2932 0192ed92-7a03-0410-a25b-9323aeb14dbd
Fix inconsistent formatting of the comments. Fix the text along the
way. Run the file through madwifi-indent, but undo some overzealous
formatting.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2931 0192ed92-7a03-0410-a25b-9323aeb14dbd
Pointers don't fit u_int32_t on 64-bit systems. Besides, conversion
from pointers to integers and vice versa should be generally avoided.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2906 0192ed92-7a03-0410-a25b-9323aeb14dbd
* Counters for total outstanding instances for each resource type (skb, ath_node and ath_buf)
* One pair of acquisition/release functions per resource type in unlocked and one in locked
* Adds some more _debug versions of functions in the call chain that acquire/release resources so that the original func/line in the driver as well as the func/line that affected the resource use can be shown in the trace. Intermediate stack frames aren't necessary to trace the leaks.
* Changes naming convention for "lock-required" functions to suffix _locked for the versions that expect locking, to be consistent with some other places in the code.
* Consolidate debug messages to the helper functions that actually affect the reference count or acquire/release a resource
* Additional sanity checks and leak detection (esp for detecting node ref leaks through skb)
* skb references are nulled out by the new sbk unref/free function.
I've tested these changes extensively and found lots of cases where we didn't get enough node references when cloning skbuff, and where the kernel drops packets due to performance issues and leaks our node references.
With these changes and the tracing enabled I have verified that:
* TX BUF: tx buffers always go down to zero when the tx queue is done, and you can watch tx queue usage ratio go up and down again as the driver is working. There are no leaks here at the moment, although there *are* some in the madwifi-dfs branch during CAC at the moment.
* skbuff leaks in all the common flows are fixed. We were leaking node references in a lot of places where kernel was dropping skb's due to congestion and we were failing to increment node references when cloning skbuffs. These are now detected, as are skbuffs that are reaped by the kernel while still holding a node reference.
* the ath_node count works correctly and on an idle system we get about 5 references per station table node, with 2 node instances per VAP. One for the bss and one for the node in the station table, I believe. The ath_node count goes up and down but always lands back at the stable number based on the vaps you have configured and the number of actual stations in the station table. The point here is that it's pretty constant what you will see over time, despite excessive node creation/release in our code during input (esp input_all). Thank god for the slab allocator.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2902 0192ed92-7a03-0410-a25b-9323aeb14dbd
Move the outer ni_tmp in ieee80211_deliver_data() to the scope where
it's used. Don't set it to NULL, it goes out of scope and cannot be
used elsewhere.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2901 0192ed92-7a03-0410-a25b-9323aeb14dbd