Commit Graph

183 Commits

Author SHA1 Message Date
mtaylor
e3d16ecc8f More stuff that should have been in r3140. Sorry, teasing apart a rather long diff.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3148 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:40:11 +00:00
mtaylor
132f01bad9 Fix for bridging. We modify the packet's contents. Linux bridging code assumes it can clone the packet and send it to multiple interfaces without having it changed out from under it. Therefore, we need to clone each skb prior to modifying the copy. This fixes some very nasty bugs with bridged VAPs (esp with multiple VAPs in a bridge and multicast/broadcast traffic).
The symptom would be fragments of 802.11 header showing up in the ethernet header because of skb header offsets being corrupted by MadWifi devices on lower ports which then get forwarded as-is to wired ports.

Sorry for the lame explanation, but the short end of the story is that you have to copy the skb before you modify it if you are going to play nice with bridging.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3146 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:21:23 +00:00
mtaylor
d246553128 Switch from clone to copy. Contents may be changed.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3144 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:16:07 +00:00
mtaylor
a5f8c2e99b I missed part of r3140. Pinning the node with an extra refcount that is released on cleanup.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3142 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:14:02 +00:00
mtaylor
56d4a86372 Fix for a defect where WDS nodes were expired. Never time them out.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3140 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:08:14 +00:00
mtaylor
050d239b51 Log an error when node allocation fails
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3138 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 00:06:30 +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
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
mtaylor
f2bbcd9fa2 Use clone instead of copy because the contents of the frame may be modified.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3130 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-15 23:46:22 +00:00
mtaylor
d2db9e2fc0 Show more flags in interrupt debugging output. Continuation of r3126.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3128 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-15 23:40:36 +00:00
mtaylor
cf28881cdf Port r3126 from madwifi-dfs
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3127 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-15 23:35:11 +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
benoit
b4d7a14f0a Merge madwifi-dfs to trunk : r3121
When hardware queue is full, stop the linux device queue.
This fix a bug where CPU was 100% in softirq context


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3122 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-08 15:59:33 +00:00
mentor
7fd69f6877 Merge -dfs to trunk - r3116
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3117 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-04 23:57:35 +00:00
benoit
93474aed34 Put an appropriate condition for starting CABQ (same as in madwifi-dfs
code). Don't process XR queue separately as it's already done in the 
loop


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3114 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-03 15:42:29 +00:00
mentor
48c02dc865 Update comments and value handling for key indexes to make clear which values should /never/ be used (as per discussion with benoit).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3111 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-02 23:43:23 +00:00
benoit
b7051ec95d Merge madwifi-dfs to trunk : r3109
Revert to the same API/ABI for crypto (used by hostapd/wpa_supplicant)
as used in 0.9.3.3. Tested with hostapd & wpa_supplicant.
Fixed a minor error in athkey usage display


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3110 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-02 21:48:29 +00:00
benoit
e429bd14fb Packets might still be needed by other VAPs (like station VAP)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3107 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-02 11:21:37 +00:00
benoit
a3aa87eeb8 Removed u_int64_t that slipped into last commit
Changed FUDGE to 3 to have the very same value as computed before


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3101 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-29 18:23:48 +00:00
mentor
c3677b3c7e * Add not about TU variables as the TSF (64-bit) is truncated into a TU (32-bit), even though it is right shifted by 10, but this is OK.
* Use roundup() to calculate the next intval boundary for nexttbtt. This method is more simple to understand and computationally simpler.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3099 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-29 17:27:55 +00:00
mentor
90e92ad904 Revert r3905
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3098 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-29 17:21:10 +00:00
mentor
fd43343eb6 * Update TU variables to be u_int64_t as they are only 10 bits shorter than TSFs which are 64 bit.
* Use roundup() to calculate the next intval boundary for nexttbtt. This method is more simple to understand and computationally simpler.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3095 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-29 02:28:36 +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
br1
f23be2b4ce cleaning up dynamic sysctl enum
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3085 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-26 03:15:42 +00:00
br1
5549b4f0c7 set release version to "trunk"
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3083 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-26 02:00:04 +00:00
br1
132e306707 safer bitfield declaration in struct ath_softc
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3082 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-26 01:58:12 +00:00
br1
62274c42c9 fixup r3013: remove duplicate line
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3081 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-25 03:17:23 +00:00
mentor
36d29a3180 Update TSTAMP MASK defines missed in last commit
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3077 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-24 01:10:25 +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
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
987156394d Remove some conditional SKB/reference handling.
* packets dropped in ath_hardstart are cleaned up there, so cleaning up in parent_queue_xmit is an error
* packets in ieee80211_pwrsave must always have a reference in the cb, so it is better that is fails noisily otherwise


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3074 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-23 20:03:13 +00:00
mentor
2de63dd9d2 Update dev->trans_start in ieee80211_hardstart. This helps with bonding and ARP monitoring.
Signed-Off-By: Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
Ticket: http://madwifi.org/ticket/1700


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3073 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-23 02:57:45 +00:00
mentor
972e313a8e Whitespace near r3071
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3072 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-22 23:39:14 +00:00
nbd
806f7b46e7 fix a double-free bug
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3071 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-22 17:16:06 +00:00
nbd
6cef2b96e6 The attached trivial patch attempts to correct a problem whereby minstrel
does not increment rs_rateattempts for successfully sent packets, and
therefore the rate adaptation does not take place.

Signed-off-by: Brian Candler <B.Candler@pobox.com>



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3070 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-22 16:14:21 +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
mentor
efd52870b7 Change delete key IOCTL request structure to use ieee80211_keyix_t.
Ticket: http://madwifi.org/ticket/1702

WARNING: This changes userspace ABI - hostapd WILL need to be recompiled


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3068 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-21 17:46:02 +00:00
mentor
78670fc260 Remove long lingering references to wlan_auth and wlan_radius.
Ticket: #467


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3067 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-19 23:46:41 +00:00
mentor
86b3543c14 Use standard boolean normalisation in r3062
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3065 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-17 01:16:06 +00:00
proski
03538d0225 Protect against NULL in ath_beacon_config()
It's called with NULL vap in several places, and the old
ath_beacon_config() had such protection.  Without this check, the kernel
panics after association in managed mode.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3064 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-16 16:40:42 +00:00
mentor
9fbdb5c7a2 Formatting for r3027
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3063 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-14 17:23:33 +00:00
scottr
e7f80f68cf Remove the use of a bitwise XOR operation which wrongly assumes its
arguments are boolean.

Originally the arguments were converted to booleans, but r2345 removed
this conversion. I've added the conversion to booleans back again and
removed the use of XOR as it's confusing and unnecessary. 



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3062 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-14 08:24:27 +00:00
nbd
07554543db remove the call to ath_phydisable, which is causing crashes on various platforms (e.g. data bus error on the next card reset on broadcom 47xx)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3053 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-13 04:16:35 +00:00
proski
d7fcb75ea8 Use compatibility definition for IRQF_SHARED
IRQF_SHARED appeared in Linux 2.6.18.  Define it in compat.h for older
kernels.  Stop using obsolete SA_SHIRQ in if_ath_ahb.c and if_ath_pci.c

This fixes compilation of if_ath_ahb.c for Linux 2.6.22 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3041 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-13 02:18:16 +00:00
proski
10560f6b2a Fix compiling on non-MIPS platforms
Define dma_cache_wback_inv(), move compatibility definitions before they
are needed.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3040 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-13 02:08:52 +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
br1
9055c25cc8 fix two more instances of using the wrong bssid in IBSS mode. there are more
places where we could use vap->iv_bss->ni_bssid instead of ni->ni_bssid but i'm
not sure about the other ones.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3036 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-12 11:29:19 +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
6e15444bd5 this ports, with some changes, the IBSS merging work benoit has done in the dfs
branch to trunk. especially notable is, that due to improved nexttbtt (next
"target beacon transmit time") calculation we will now get the correct backoff
behaviour for beacons, resulting in only one beacon per beacon interval (the
current head version will send N beacons for N stations in the beacon interval
because they are poorly synchronized). also because of the better timer
synchronization there is no more time lag of up to 1 minute until we see
beacons after a merge. thanks to benoit for figuring that out!

the difference between this patch and the version in the dfs-branch is that it 
still uses self linked descriptors and uses the SWBA interrupt only for 
updating the nexttbtt. this is necessary to recognize HW merges, for which we
don't get any notification by the hardware (see the thread "IBSS testing" on
this list for more details).

also i tried to clean up a bit, use a more descriptive function name for timer 
updates (ath_beacon_update_timers instead of ath_beacon_config) and generally 
better distingush between a HW merge and a SW merge.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3027 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-12 01:32:51 +00:00