Commit Graph

17 Commits

Author SHA1 Message Date
mtaylor
e6a0fd9b49 This patch refactors the layer 2 update frame sending logic into two routines. Both RNR and XID frames are sent to update bridges. The RNR is probably not the best way to update L2 bridges. It's basically telling the bridges and switches that the MAC is not able to receive traffic (i.e. congested or down) and we never send any other L2 packets to counteract any side effects of this. I also found that it didn't seem to be updating every MAC table on every bridge. XID, however, is the correct way, according to my research and we send XID to inform the bridges of the new location of the MAC as dictated by the standards. I left the RNR in there for good measure, since it doesn't appear to have any ill effects for anyone. (Hostapd ALSO sends XID when you are using hostapd... the redundancy is harmless and allows madwifi to operate correctly when using open or WEP protected modes without hostapd).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3134 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:01:06 +00:00
mtaylor
e7ccdf6be3 When IFF_MULTICAST was not enabled on the vap, we used to skip some filtering that prevents reception of your own multicast traffic. Then we would procede to ignore the fact that IFF_MULTICAST flag was disabled and send anyway.
I've fixed the logic so that multicast is dropped, with an error when disabled.  I don't think this is a valid configuration.  Also, we don't skip the filtering logic so that our own multicast traffic doesn't come back to us (looking like a bridging loop). 


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3132 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-15 23:54:34 +00:00
benoit
56f411f3c0 Fixed a kernel panic due to incorrect linux API use
hard_start_xmit() functions must either return NETDEV_TX_OK or 
NETDEV_TX_BUSY (they might also return negative errno values as well, 
like -ENETDOWN)
Correct a small missing static reported by sparse
This revert part of r3075


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3123 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-10 20:10:41 +00:00
br1
fd0bc7d1b2 Added lots of debug to understand & test IBSS merges
from the madwifi-dfs branch (benoit) r3086

Added MAC_FMT & MAC_ADDR macros that can be used as a drop-in
replacement for ether_sprintf(). Fixed some use of ether_sprintf() that
uses the same static buffer twice.

- Without the functional changes.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3091 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-28 04:35:23 +00:00
mentor
6d28f9cb8e Have net80211 hard_start functions return NETDEV_TX_* codes; tidy some headers in the process.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3075 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-23 20:11:05 +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
br1
13e0b924cc fixing up r3013: can't use IEEE80211_VERIFY_ELEMENT on extended rates since that discards beacons which dont contain that element.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3035 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-12 11:04:17 +00:00
br1
45c427d337 guard against 0 rates which can be caused by wrong received frames.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3013 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-10 13:15:06 +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
proski
4ea262da0e Fix sparse warning about ni_tmp
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
2007-11-21 19:43:25 +00:00
mtaylor
0c4e2a41e9 Refcount fix for netif_rx() and friends, returning error and dropping SKB but we were not releasing our node reference.
Refcount fix for skb_clone/etc where we were not keeping reference counter matching the number of skbuff instances and were not having enough references.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2894 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 11:38:42 +00:00
mtaylor
09e974b2db since ieee80211_input() can be called by ieee80211_input_all(), we need to check that we are not
updating statistics of all known nodes for every inbound packet for an unknown node. 

Merging this fix back from DFS branch, found by Benoit.
-gThis line, and those below, will be ignored--

M    ieee80211_input.c


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2882 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 09:39:42 +00:00
mtaylor
12aa3fb33e Add parent device to debug output lines from ieee80211_* debug functions.
Add VAP mac address to debug output lines from ieee80211_* debug functions.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2880 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 09:15:37 +00:00
mentor
bd6e91ee85 Move pointer reference to after null pointer check.
Ticket: http://madwifi.org/ticket/1650
Original Patch: Signed-off-by: Josef Kriegl <Josef.Kriegl@gmail.com>


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2856 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-16 11:24:22 +00:00
mentor
3fbb1d543d Modify ieee80211_saveie and ieee80211_saveath(ewww) to take a NULL source parameter, and to cleanup in this case.
On reception of an Associatiion request, always save IEs correctly (i.e., cleanup up any no longer valid IEs in the case that no new, valid IE is received).

Ticket: http://madwifi.org/ticket/1188
Original Patch: Signed-Off-By: Bas


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2847 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-13 17:45:58 +00:00
mentor
c6eac77db1 Audit of node referencing:
* Enhance readability of some functions WRT node referencing by putting blocks around areas where node references are held
 * Various bits of consistency of the usage of node references; always unreference them at the point at which they are no longer used. Don't reuse variables implicitly.
 * Significant overhaul of the usage of bf_node and ieee80211_cb.ni. Always hold a reference with aforementioned variable and always unreference it properly.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2839 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-08 16:55:02 +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