Commit Graph

32 Commits

Author SHA1 Message Date
Pavel Roskin 3e8afe45d0 Make skb_total_counter and skb_refs_counter static
Both have exported accessor functions, so they should not be accessible
directly.
2013-11-12 17:01:27 -05:00
Pavel Roskin 27463c4ea4 Fix compilation with IEEE80211_DEBUG_REFCNT set and no VLAN support 2013-11-12 17:00:36 -05:00
Pavel Roskin 8c73cc55b1 Remove support for Linux kernels older than 2.6.13
Linux 2.6.13 introduced Wireless Extension 18 with WPA support.  It was
released in August 2005.  People making changes to MadWifi should not be
required to be software archeologistists to test their changes.
2013-11-12 11:46:06 -05:00
proski 2fc801acdb Fix compilation with IEEE80211_DEBUG_REFCNT=1
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4164 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-08-15 18:59:53 +00:00
proski 2774fa543e Fix compilation on Linux 3.1 broken by VLAN API changes
Don't define IEEE80211_VLAN_TAG_USED on Linux 3.1 and newer.  Don't use
vlan_hwaccel_rx() if IEEE80211_VLAN_TAG_USED is not 1.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4163 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-08-15 18:59:22 +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 ba3592a8cd Fix all cases of stack usage exceeding 1024 bytes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4022 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-12 20:05:46 +00:00
proski 0a63a44b94 Don't call dump_stack() for mere debugging, without major errors
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3941 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-02-04 21:43:58 +00:00
mentor 78cbb40469 Convert various _debug style char *func and int line passing to use dump_stack. This may possibly be a tad noisy still.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3743 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-22 02:12:53 +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
mentor 1a24cb141a Use vlan_hwaccel_rx instead of vlan_hwaccel_receive_skb, as this is the non-polling (non-NAPI) version.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3709 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 19:42:24 +00:00
mentor 18682f3d29 SKB handling code cleanup:
* Convert last SKB_CB()->ni to SKB_NI
 * Lots of comments
 * Refactor various pieces of code for consistency, readability, and removal of goto


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3666 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-22 12:58:24 +00:00
mentor ef47acefdd Convert tracked member of ieee80211_cb to be a flag
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3618 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-06 11:31:26 +00:00
mtaylor bd5f871a85 Switch to easier to read SKB_NI macros
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3487 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:01:03 +00:00
mtaylor c2bce77197 Merge madwifi-dfs branch to trunk.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3268 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 20:48:11 +00:00
mtaylor e479155497 Eliminate ether_sprintf in favor of new MAC_FMT and MAC_ADDR macros (which are faster and thread safe).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3254 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-25 22:49:48 +00:00
mentor 981463bb22 Minor formatting
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3200 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 23:31:09 +00:00
mentor bd7108a853 Do not try and find a device from a non-existent SKB
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3199 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 23:22:51 +00:00
mtaylor e43eb9472d Fix for NULL dereference in skb tracking code
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3136 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:02:50 +00:00
mentor ff673bb684 Rework monitor mode SKB handling, touching shared and cloned SKB handling in the TX path. This patch removes any such processing based on the assumption that the current processing is wrong even in the most conservative case (cloned SKB).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3076 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-24 01:01:47 +00:00
mentor 59982ec746 Formatting changes:
* Remove comments that merely duplicate the code (i.e., they don't provide information on Why or explain the opaque)
 * Rename some variable for consistency
 * Line length -> 80 chars
 * Reorder non-dependent code blocks in a function to make it more readable (at least to me)


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3003 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-04 00:43:10 +00:00
mtaylor 369b43180b Make skb_destructor debug conditional, even within IEEE80211_DEBUG_REFCNT you need IEEE80211_DEBUG_REFCNT_SKBDEST now... until I figure it out. Reports of problems with aircrack-ng injection.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2972 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 07:58:30 +00:00
mtaylor 573cc60660 Uninstall skb debug destructor when skb is passed up
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2970 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 06:38:21 +00:00
mtaylor ec5e8e0a11 Re-enable skb debug destructor, chaining to original when present.
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
2007-11-25 09:09:24 +00:00
mtaylor 4a2fbe421e Only install debug destructor if destructor is not already used by the kernel,
otherwise we can interfere with normal cleanup.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2955 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:39:48 +00:00
mentor 79e3ccd6ae Formatting changes, parentheses style this time
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2952 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 04:08:38 +00:00
mtaylor ea868797b6 Comment out some stuff added after 2.4 kernel. 2.6.0 is just a guess, but should serve as a starting point.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2927 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 07:57:43 +00:00
mtaylor c428bb7406 Remove references to skbuff.input_dev as it seems to have had a relatively short lifespan, despite the references in the textbooks on network internals. ;-)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2925 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 06:57:45 +00:00
mentor 5afdef8cae Formatting changes. Mostly line lengths with some whitespace. Also, remove author info from any comments.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2915 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 02:08:35 +00:00
mtaylor 9dc2e2884a Wrap use of input_dev in preprocessor conditionals. Went away in 2.6.20.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2913 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 01:02:08 +00:00
mtaylor 54d2029f21 Fix sparse warnings and compile errors reported with includes in ieee80211_skb.h
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2908 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 00:24:26 +00:00
mtaylor ebe8ee9736 This patch augments the current reference counting code with:
* 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
2007-11-21 20:14:11 +00:00