Commit Graph

691 Commits

Author SHA1 Message Date
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
br1
f0d51a7a43 clean up after my last commit. better comments and error reporting (from mentor's patch).
i verified that 0 rates also create the same problem in G mode so i removed the reference to A bands.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3015 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-11 06:37:53 +00:00
scottr
91fcb5214d Stop writing a bogus IEEE80211_RADIOTAP_DBM_TX_POWER field.
We were setting this field to 0 as we had no easy way of determining
what TX power was used to transmit a frame. However, by including this
field and setting it to 0dBm we are saying that each frame is being
transmitted at 1mW, which is incorrect. Better to simply not write the
field at all, however this introduces the need for padding in the TX
header to ensure that the TX_FLAGS field is aligned to a 16-bit
boundary.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3014 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-10 23:13:33 +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
br1
d09703c049 introduce new debug flag "tsf" (ATH_DEBUG_TSF) so TSF timestamp processing
doesn't get into the way of debugging beacon stuff



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3008 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-07 07:00:31 +00:00
mentor
adb4a563ba Spelling
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3005 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-05 00:55:31 +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
br1
07bd310cd3 always use the configured bssid (vap->iv_bss->ni_bssid) as the bssid for
beacons and management frames.

this includes benoits r2993 (from dfs branch) and the patch i sent to the list
for review a couple of days ago.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3002 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-03 08:52:34 +00:00
br1
b76a3ed537 allow the use of the ratiotap field IEEE80211_RADIOTAP_DATA_RETRIES to specify
the number of retries for injected frames



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2992 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-29 01:41:21 +00:00
mentor
79bf489a8d Only try to remove padding in frames where a data body exists. Otherwise, aligning the data pushes some of it out of the buffer.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2991 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 21:32:50 +00:00
proski
d67559b719 Minor changes to make the TKIP test look more like the other two tests
Use t->keyix in the ic_encap argument instead of the hardcoded 0.  Print
"FAIL" on failure and "PASS" on success.  Take an exact copy of struct
tkip_ctx from ieee80211_crypto_tkip.c


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2990 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 07:37:53 +00:00
proski
0db003c452 Provide means for testing multiple TKIP test vectors
This makes the TKIP test more similar to the CCMP and WEP tests.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2989 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 05:52:26 +00:00
proski
2f1668b916 Standardize on ARRAY_SIZE, stop defining and undefining N
ARRAY_SIZE is present in all kernel versions we support.  Use it instead
of other definitions.  Define ARRAY_SIZE in the userspace tools as well.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2988 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 05:36:29 +00:00
proski
212d62c469 Preload crypto module to be tested with ieee80211_crypto_available()
ieee80211_crypto_newkey() will fail if the crypto module for the cipher
is not loaded.  ieee80211_crypto_available() will try to load the module
first.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2987 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 03:42:55 +00:00
proski
752da93f47 Eliminate DIRS_MODULES
DIRS_MODULES is always used in the context when the Makefile is
processed directly, not from the kernel build system.  Therefore, it's
equivalent to obj-y.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2986 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-28 00:51:25 +00:00
proski
613b48e369 Better fix for warning in ath_return_txbuf_locked
bufaddr doesn't need to be (void *).  Make it (struct ath_buf *).


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2984 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-27 21:55:45 +00:00
proski
261fcaa170 Update regression tests for current API, add makefiles
The new crypto API uses VAP, so allocate one.  Use keys from
vap->iv_nw_keys with the provided key index (0 for TKIP), don't allocate
another key on the stack.  Synchronize context structures with the
current code.

Return -ENXIO on failure.  It's hard to find a sensible code for crypto
test failure, but -1 (-EPERM) was misleading.  Fix TKIP test that was
ignoring failures.

Update module parameters for Linux 2.6.  Provide makefiles to facilitate
compilation.  Fix all sparse warnings.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2983 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-27 21:40:19 +00:00
mtaylor
4df2d580a7 port of r2879 from madwifi-dfs
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2980 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-27 10:06:02 +00:00
nbd
ebcc658008 fix wrong hal type usage for interference mitigation
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2978 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 14:26:15 +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
mentor
9d7916a961 Formatting (whitespace only) for r2857
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2967 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-26 01:25:35 +00:00
mtaylor
5c221193fd Fix ATH_DEBUG_GLOBAL mask
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2966 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 09:21:09 +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
15587c9e84 Do not assign buf->bf_skb to null before cleanup code runs
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2962 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:58:23 +00:00
mtaylor
70c6a99d95 Restore call to skb_orphan, as the implementation varies by kernel and we cannot elide some of the steps without screwing with others we dont know about.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2961 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:55:48 +00:00
mtaylor
394706c826 Allow node reference to be cleaned up normally
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2960 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:53:41 +00:00
mtaylor
9e643fab44 remove superfluous null assignment and do not use _locked version of ath_take_txbuf for txcont
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2959 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:51:08 +00:00
mtaylor
479c140cde Missed call during r2902 changes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2958 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:49:33 +00:00
mtaylor
652f013b99 Cleanup some null checks
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2957 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:48:04 +00:00
mtaylor
7b3e465558 Fix a typo.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2956 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 07:42:12 +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
proski
09e5677445 Fix the last sparse warning - find key index in a loop
ath_key_alloc() was using pointer subtraction to determine the group key
index.  This is not optimal, as it's done by dividing a pointer-sized
integer by a number that is generally not a power of two.

Since there are only 4 (IEEE80211_WEP_NKID) keys to try, it's easier to
try them all in a loop.  It also makes the code more reliable, as it now
detects the cases when the key pointer is within the valid range, but
doesn't point to the beginning of an array element.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2954 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 05:42:23 +00:00
mentor
3f9f5f6a53 Modify function names for brevity and consistency
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2953 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-25 04:13:49 +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
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
99f62ecfab backout 2942.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2943 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-24 05:24:53 +00:00
mtaylor
f91e998352 Two places we did not unlock txq lock
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2942 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-24 05:22:31 +00:00
mtaylor
734a08b321 dont call netif_stop_queue if only one txq is full.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2940 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-24 04:46:15 +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
benoit
8f7da38c30 Fixed a double locking bug - Merge from madwifi-dfs branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2936 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-23 22:50:01 +00:00
benoit
230a7edfe9 Removed sc_last_tsf alltogether (was just for debugging anyway)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2934 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-23 22:18:33 +00:00