Commit Graph

31 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 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 35db352fc7 Don't reference vlan_group without IEEE80211_VLAN_TAG_USED set
struct vlan_group will be removed in Linux 3.3.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4177 0192ed92-7a03-0410-a25b-9323aeb14dbd
2012-01-30 19:55:03 +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 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 0d741ab467 Adjust for procfs changes in Linux 2.6.32
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4099 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-09-28 23:06:53 +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 193615c0df Initialize do_ioctl together with other device operations
It's better to keep initialization in one place to simplify conversion
to the new style netdev ops.

Declare ieee80211_ioctl() in ieee80211_linux.h next to other
ieee80211_ioctl* functions defined in ieee80211_wireless.c.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4000 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-15 03:11:34 +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 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
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
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 f577062ef7 Move the monitor physical parameter struct inside ieee80211_cb. Have same struct actually be an array. Add an evil struct definition that breaks if ieee80211_cb is bigger than 48 bytes; it serves no other purpose.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3615 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 23:51:16 +00:00
proski a49a973027 Use __skb_queue_after() instead of __skb_append()
Follow the rule of coding for the latest API.  Use __skb_queue_after()
in the code rather than __skb_append(), which is due to be removed in
Linux 2.6.26.  Provide compatibility definitions for __skb_queue_after()
in include/compat.h.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3605 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 12:12:43 +00:00
proski 32df5a67ce Provide __skb_append() replacement for Linux 2.6.26
__skb_append() will be removed in Linux 2.6.26.  __skb_queue_after()
should be used instead.  Use the new interface on Linux 2.6.25 and
newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3602 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 01:41:23 +00:00
mentor 380c55d9c9 Rename and move, into the right headers, the SKB and BF macros
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3596 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-04 17:48:59 +00:00
mtaylor 4957e2ea41 Additional macros to cleanup SKB CB data access, minor corrections to style of a couple of macros, and some additional missed locking macros.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3485 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 20:49:53 +00:00
mtaylor a78d83bb0d Debugging function cleanup:
1) Move all debug preprocessor flags out into make files
2) Add support for remaining preprocessor flags to be set by ENV variables
3) Add support for HAL tracing to include device name



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3481 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 19:55:49 +00:00
mtaylor e00f351af1 Restore the evil printf macro I accidentally damaged
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3269 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 20:56:20 +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
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 e3a6ae05f5 Add linefeeds to block warnings
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2947 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-24 08:40:15 +00:00
mtaylor 5d546c1ea1 Doh! Fix boneheaded mistake.
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
2007-11-24 06:46:19 +00:00
mtaylor e5854bed77 Added lock assertion macros for all locks. Assert locks in all new _locked functions. Assert lock state in all LOCK/UNLOCK macros.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2938 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-23 23:42:38 +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 3511ea0ea9 Add SKB_CB macro and begin using it in a few places, eventually everywhere
we use skb->cb (will be in a subsequent commit/merge) should use 
   this macro.  This is part of a larger batch of changes I am in the process
   of merging that add better visibility into skbuff usage/leaks in the driver.

ieee80211_node_refcnt use atomic_read for consistency and because it is 
   the correct thing to do.  atomic_read is a macro that expands to the same 
   thing in most architectures anyway.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2887 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 10:39:06 +00:00
mtaylor 0d6e81e270 Relocate refcounting macro defines so they are visible in more places, in preparation for
merging some other changes that need this.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2881 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 09:24:56 +00:00
proski a08cab1f36 Merge some whitespace changes from the DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2864 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-20 17:18:36 +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