Commit Graph

37 Commits

Author SHA1 Message Date
Pavel Roskin 19e85c5f13 Don't rely on typedef for struct ctl_table, it's going away 2014-06-17 11:52:02 -04:00
Pavel Roskin eb53410664 Don't show kernel pointers to procfs, just show if ni is NULL 2013-11-12 14:32:14 -05:00
Pavel Roskin 4f4d17ea6e Fix compatibility with procfs API changes in Linux 3.10 2013-11-11 11:57:32 -05:00
Pavel Roskin f83c3d758e Use netdev_notifier_info_to_dev(), needed for Linux 3.11+
Not using netdev_notifier_info_to_dev() gives no compile warnings but
crashes the kernel, so this patch is intentionally applied before Linux
3.10 procfs support is enabled to avoid a revision that compiles and
crashes on new kernels.
2013-11-08 17:01:34 -05:00
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 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 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 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 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 bc1810756f Support compilation with procfs disabled
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4088 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-08-24 22:04:45 +00:00
benoit 1b019e9b0d Merge madwifi-dfs back to trunk: this change is only about DFS, excluding
DFS pulse analysis. Untested.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4076 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-07-11 17:20:58 +00:00
proski 530d6494db Compile fix with VLAN support on recent kernels
VLAN operations should be in net_device_ops.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4059 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-06-25 22:22:58 +00:00
proski e846fff3ea Fix compilation for mips64
On some 64-bit architectures u_int64_t is not unsigned long long.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4024 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-05-24 01:09:25 +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 43c86cb332 Convert to net_device_ops for Linux 2.6.29+
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4002 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-15 04:21:12 +00:00
proski 3e70e4f8c1 Compile fixes for Linux 2.6.29
Use netdev_priv() for Linux 2.4.27 and newer.  Provide compatibility
wrapper for older kernels.

Imply CONFIG_KMOD for Linux 2.6.27 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3902 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-01-14 02:36:53 +00:00
mentor 70e6e83fc8 Add an informational message when debug flags are changed.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3744 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-22 05:32:29 +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
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
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 d3842998ca Remove now unused FF next field in ieee80211_cb. This makes ieee80211_cb under 48 bytes on 64-bit with IEEE80211_DEBUG_REFCNT
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3617 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-06 11:22:31 +00:00
mentor ef6d84125b Convert as many things as possible to use kzalloc
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3573 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 14:10:42 +00:00
mtaylor e507ef4964 Another SKB_NI
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3493 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:23:40 +00:00
mentor 4be10b5ba8 Some cleaning. Mostly cosmetic, but:
* Restructure one set of control blocks into a more readable form
 * Add some additional debug output


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3456 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-06 03:02:25 +00:00
mentor ebc79fce38 Cleanup up de-MIC failure (in hardware) handling. Apparently, HW sometimes gets this wrong and spuriusly fails valid packets. In all cases, the packets are dropped, but we do extra processing to record statistics correctly.
This changeset adds a node statistic. If this is not liked, I encourage it to be fixed; I might learn something.
Thanks nbd.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3334 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-04 00:16:24 +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 d959c28466 Lots and lots of formatting and trivial changes that I have been collecting
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3069 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-21 17:55:45 +00:00
proski 0de09d5a5a Remove separate versions for ath_pci and wlan modules
They are of no use, because they are not updated as the developmnet
continues.  It's better to have a single version for MadWifi.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3039 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-13 02:00:00 +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 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
mtaylor 0624a5b03e More SKB_CB macro use and cleanup of dropped references from kernel dropped skbuff
structures.  More refcount bumps due to skb_clone/skb_copy.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2896 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 11:47:50 +00:00
mtaylor 76ef1fd56b Support for setting default VAP debug flags at module load time, so you can
catch messages that occur during VAP startup (before you can possibly invoke 
80211debug).

Support for shared debug flags where they take effect across all devices
(i.e. shared flags in athdebug), and when they take effect across all VAPs
(i.e. shared flags in 80211debug).

Some additional debugging flags, including some in preparation for more leak 
detection code to be merged shortly as well as some from madwifi-dfs.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2888 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 10:45:58 +00:00
proski 120d309bc3 Fix sysctl support in Linux 2.6.24
Linux 2.6.24 introduces a sysctl checker that disallows using arbitrary
ctl_name values for sysctl entries.  The entries with non-standard
values should set ctl_name to CTL_UNNUMBERED.

On the other hand, using consistent non-zero ctl_name values is required
for older kernels (tested on Linux 2.4.33.3 from Slackware 11).

Thus the solution is to use CTL_UNNUMBERED on Linux 2.6.24+ and the
original values in the older kernels.  Move CTL_AUTO and DEV_ATH to
include/compat.h and define them correspondingly.

When copying sysctl entries, check procname for being non-zero, since
ctl_name is zero (CTL_UNNUMBERED) on Linux 2.6.24 and newer.

For the same reason, don't use ctl_name to distinguish entries in
ath_sysctl_template, use extra2 instead.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2814 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-31 05:39:41 +00:00
proski b7186f5480 Fix oops due to sysctl table check failure in Linux 2.6.24
Linux 2.6.24 has a sysctl table checker that rejects the tables
presented by the driver.  Make the code survive this condition.  Free
devname (or dev_name) before freeing the table.  Don't do it at the
unregister time, it's too late.

The sysctl tables still need to be fixed.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2795 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-29 04:19:27 +00:00
proski 854dfb1ec8 Linux 2.6.24 moves proc_net inside init_net
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2756 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-17 16:59:45 +00:00
mrenzmann 2c0d8db912 Restructuring the repository layout in response to ath5k.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2721 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-04 13:07:51 +00:00