Commit Graph

271 Commits

Author SHA1 Message Date
mtaylor 6fbbcf00a0 This patch makes some debug messages about
dropped frames a little more consistent and
fixes an issue in hardstart where I was being
too aggressive about requeing.

I thought the slab allocator would stop handing
out skbuff instances before the system was out
of free memory based upon some kind of limit on
the number of buffers, but this was nonsense.

Therefore, it is NOT a good idea to requeue
when skb allocation fails because this pretty
much basically means we are out of free memory.

Keeping the packets we do not have the RAM to
send and then stopping the transmit queue has
very bad side effects under low/zero memory 
conditions.  

Symptoms may include OOM killer and panics,
among other things.

It's better to drop tx packets when there's no
more RAM than to lock all the tx packets up
in the transmit queue.  Even if more skb
become freed up in the slab cache due to 
transmissions already in progress, evil things
still happen.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3308 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 19:33:38 +00:00
mtaylor 874abd03ab Reduce the maximum message length for node
messages from 1000 to 192 and drop the length
needed to display the [atomic] node count.

Slamming this much data on the stack can cause
stack overflows with 4k stacks quite easily,
especially when hard interrupts occur and 
extend a stack that is already almost full.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3307 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 19:26:13 +00:00
mentor 5d4e93939c Add CONFIG_CRYPTO as a Kconfig dependency when patching into the kernel
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3306 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 15:26:06 +00:00
mentor b8e6b99d2c De-FAIL previous revisions
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3305 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 17:46:15 +00:00
mentor b0f92899f4 Formatting - calming...
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3304 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 11:18:15 +00:00
mentor 3202c2a0de Change reset_bss semantics so that the node reference is passed to iv_bss, and then use the iv_bss reference.
I believe that this is semantically correct, and so have removed the comment.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3303 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 11:17:57 +00:00
mtaylor 2411a87efc During reset_bss we were incrementing the ref
count of the new bss node.  The allocation 
function gives us a reference.  With this extra
reference, every invocation of reset_bss was
causing a leak of one node ~4kb every time the
interface was brought back up (or the BSS was reset
for other reasons).

This fixes ticket #1682.  I can run ifconfig down/up
cycle for a long time.  I'll run it overnight next
to be sure.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3301 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 07:08:29 +00:00
mtaylor 602be360fc Move the node reference up that pins the WDS peer
node in the node table.  The node reference was
being taken in any path where the wds node was found
and not just when the wds node was first added.

This would have caused wds nodes to get inflated
reference counts, and be leaked on bss reset when
nodes were flushed from the node tables.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3300 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 07:00:09 +00:00
mtaylor dead14502d Fix a few more leaked node references when a
copy of the bss node is used to send a message
we need to make sure all code paths release
it when done.  This bug combined with repeated
auth failures would cause node references to 
grow with every failure.  Then, if you were 
taking down the interface and bringing it back
up you would leak one page (4kb) every time the
the node table was flushed on transition to UP.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3299 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 06:58:22 +00:00
mentor 8e8ba8882b Some extra SKB operation return code checks. This deviates from nbd's original patch, because I don't think that if the aligning operation fails that we should return the unaligned one.
Thanks nbd


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3297 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 23:49:26 +00:00
mentor 521e00a7c6 Turn on long pre-amble in ERP IE if we have non-ERP stations
Thanks NBD


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3296 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 23:40:44 +00:00
mentor 32b36e8f10 Fix compilation when there is no debugging
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3295 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 23:35:29 +00:00
nbd 27c02f3829 add missing #include statement
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3294 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 21:04:23 +00:00
mtaylor 3f689304d6 Fix regression in reverse engineering iwpriv functions now requiring access to sc.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3293 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 21:02:07 +00:00
benoit 314dd3b3d8 Merge of madwifi-dfs r3189:
Replace ath_buf_counter by sc->sc_txbuf_counter. Counter is specific to 
a madwifi instance.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3291 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:44:43 +00:00
mtaylor d25a86ffe3 Restore some of the BSS synchronization code, but only add the goto that skips the beacon timer updates for IBSS.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3290 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:32:04 +00:00
mtaylor e2ac8356c2 Restore some of the BSS synchronization code, but only add the goto that skips the beacon timer updates for IBSS.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3288 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:26:25 +00:00
mentor a04a25ead0 This looks ungood, lets not leave it lying around
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3287 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:15:23 +00:00
mentor 456aaa276a Use standard kernel interface for AHB bus access.
Thanks nbd


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3286 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:14:20 +00:00
mtaylor f0a1f3d537 Null protection for skb1 in multicast node fix
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3285 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 20:05:31 +00:00
mtaylor 6600ba247b Restore changes to if_ath_ahb.c from r3267, and move statics and includes to the top of the file.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3284 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 19:39:44 +00:00
mtaylor 0037b77ceb Revert changes to if_ath_ahb.c from r3267
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3283 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 19:36:03 +00:00
mtaylor 43f0aa1604 Undo regression from madwifi-dfs merge
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3282 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 19:34:03 +00:00
mtaylor c61bd72fbc Remove improper handling of non-cloned frames in hardstart.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3281 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 19:27:26 +00:00
mentor db307a76c6 Move rate control module parameter text to the correct section in INSTALL
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3280 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 14:31:55 +00:00
mentor d136b9b1f9 Edit token names for clarity, consistency and length.
This changes some iwpriv names, because I believe they will be more readily usable and understandable


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3279 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 01:36:25 +00:00
mentor 70be1ef404 Edit token names for clarity, consistency, and to remove EXTREME length TO THE MAX
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3278 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 01:21:19 +00:00
mentor b165b8b28c Typo
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3277 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 20:00:41 +00:00
mentor 4a60ebccec 'Context:' is used to denote the kernel context that the process is running in (i.e., hard IRQ, soft IRQ, process, preemption disabled, etc.)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3276 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 19:50:09 +00:00
mentor c4952a9d3d Make CHANNEL_FOREACH slightly more readable
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3275 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 06:49:24 +00:00
mentor cf6e609462 Formatting
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3274 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 05:48:23 +00:00
mentor 60e9b06ffa Use a logical XOR
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3273 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 04:40:14 +00:00
mentor 28cf53aa95 Fix merge failures - pass one
mdtaylor: bad merging like this really must not continue any longer


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3272 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 04:26:38 +00:00
mtaylor 8041aa65bc in ath_intr, we will need HW TSF value if we get
HAL_INT_RX, HAL_INT_RXPHY, or HAL_INT_SWBA.  In
such cases, we will collect the earliest hw tsf
sample we can get and this is passed into send_beacon
and the trigger processing helper functions.

This cuts the number of hardware TSF reads by a 
factor of three per interrupt.  We should be reading
the hardware TSF now once on interrupt entry, and 
once in the second part of trigger processing when
we correct for hardware TSF rollover.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3271 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-27 00:46:22 +00:00
mtaylor 30e6030d36 Remove one unreferenced (but populated) hw tsf and the expensive call.
Move one hw tsf read into a conditional block as it is only used in a debug printout.
Replace one hw tsf read with a reference to the existing hw tsf in the buffer (which is more accurate anyway).



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3270 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 23:55:10 +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
mentor 0b74c2ebe0 More cases to use ieee80211_skb_copy_noderef
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3262 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 17:46:36 +00:00
mentor 776a840f28 The netif_queue appears to be causing some performance problems. I'm going to go ahead and guess that we always want to prod the networking system to start sending packets; thus use netif_wake_queue()
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3261 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 17:31:51 +00:00
mentor c14fa8bf98 Merge -dfs to trunk - r3246:r3254
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3260 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 02:47:27 +00:00
mentor d05f18eef2 Have internal bridged packets belong to the BSS node
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3259 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-26 02:30:35 +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 77d9f966c0 - Add a iwpriv function that dumps a mapping of nasty obfuscated
symbol names to their corresponding HAL function names (ah.h) 
- Add a script to generate a SED script from the current HAL (ah.h)
    that will replace instances of obfuscated names with the correct names.
- Add the SED script for cleaning up text containing obfuscated function names for the current HAL


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3244 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-25 00:29:30 +00:00
mtaylor 8f5e980418 From madwifi-dfs. If ieee80211_find_channel is passed 0 for flags, then omit flag comparisons from the search criteria.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3235 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-23 18:53:34 +00:00
br1 2bfb48c560 frame injection: let IEEE80211_RADIOTAP_DATA_RETRIES specify the number of
retries instead of the total number of tries.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3233 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-22 07:11:13 +00:00
br1 c585507798 beacon backoff configuration like the 802.11 standard describes
in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says, each
STA should...

"b) Calculate a random delay uniformly distributed in the range between zero
and twice aCWmin × aSlotTime,"


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3232 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-22 07:04:39 +00:00
mtaylor e04d68cce7 ieee80211_dev_kfree_skb will NULL ni_rxfrag.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3226 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-21 23:19:39 +00:00
proski 72a19df0ff Fix svnversion.h generation
Dollar signs should be written as two dollar signs to be interpreted by
the shell rather than by the make.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3225 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-21 15:55:13 +00:00
mentor 3f942d694e Add git svnversion.h generation code
Signed-off-by: Russell Harmon <eatnumber1@gmail.com>

Switch from `` to POSIX preferred (and more readable) $()


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3224 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-21 08:59:27 +00:00
mentor 52319f4d34 Remove humourous typo
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3223 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-20 03:34:45 +00:00