Commit Graph

349 Commits

Author SHA1 Message Date
mentor 129ddd7051 Errant brace from r3554
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3556 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-20 23:43:45 +00:00
mentor 1e1bf2cb6b Remove code superceded by r3551
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3555 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-20 22:27:45 +00:00
mentor 528a01e3d7 Formatting for r3552
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3554 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-20 22:25:54 +00:00
benoit ae11ec5e49 Added debug in case the TX queue locked up (You need to do athdebug +watchdog
to see those debug message).
Fixed a bug where we removed TX descriptors too early. This should fix NETDEV
WATCHDOG error messages. Apparently, TX descriptor status is updated by the
hardware before TXDP.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3552 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-20 21:06:15 +00:00
benoit 4cb21704e2 Change ATH_TXQ_REMOVE_HEAD macro to sure we reset axq_link whenever we remove
the last TX descriptor.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3551 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-20 21:04:13 +00:00
mentor 2b06287f11 More cases of r3549. Further, add a reminder to check ath_node_move_data, which look shorribly broken, but is used for XR only.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3550 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-19 19:00:14 +00:00
mentor a4078f91f2 Update TX queue properties, caused by removal of the last item, while the same lock is still held during removal of that item. Thanks to benoit for coming across this while investigating a TX queue stoppage.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3549 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-19 16:04:07 +00:00
mentor 361fac4be9 Remove the 'lastds' parameter to ath_tx_txqaddbuf as it is always bf->bf_desc, and, further, most buffer handling logic assumes that the the descriptor is held in bf_desc.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3548 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-19 14:57:50 +00:00
mtaylor 405b1f16af Fix regression in r3532
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3534 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 23:57:24 +00:00
mtaylor dc1f1c8425 Fix non-debug compilation warnings about unused functions/variables
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3532 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 23:48:41 +00:00
mtaylor 28ecfa570d Get rid of extra mdelay(5) after hardware reset, which isnt necessary anymore and is even causing problems in some cases.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3524 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 09:01:08 +00:00
mtaylor 119e3f308b Bug fix for the ath_buf scan code that resulted in mismatched
lock/unlock calls on SMP systems.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3523 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 08:24:58 +00:00
mtaylor a6f6c80c73 Add another 160 buffers, 60 more to rx and 100 more to tx.
The rx overruns should dissapear with the previous performance improvements and a little bit more runway here.  The 100 more to tx should only help in cases where large numbers of small packets are set and you are going for maximum throughput.  Even then, I haven't proven you will ever need this many tx buffers.  I've also bumped the reserve pool for management frames from 5 to 20.

These settings tested well in the lab with multiple station links running bandwidth tests.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3521 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 06:27:10 +00:00
mtaylor 9b8af6f68a ath_rx_tasklet improvements...
*  Only hold the RX queue lock while removing and while re-inserting a buffer -
   allowing pre-emption to work properly while the tasklet is reaping and 
   recycling rx buffers.

*  All skb and bus handling is managed in the ath_rxbuf_init function now.

*  Do not stop processing when ath_rxbuf_init fails, because that means low
   free skb but does NOT mean the queue is fully processed.  Since we also keep
   our skbuff except during a very brief period when we free one and reallocate
   one - unless pre-emption or SMP steals it, chances are very good we can keep
   processing the queue even under low memory conditions -- and avoid dreaded
   rx overruns.

*  Add missing locks around code blocks that iterate over rx buffer list in
   flush/drain/init/cleanup/etc helper functions.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3519 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 06:19:53 +00:00
mtaylor fcb3fdbe90 ath_rxbuf_init fixes...
I've simplified the buffer initialization code so that it 
always allocates things as if there were one or more monitor VAPs.  This is 
defensive since monitor VAPs can are created and/or destroyed while the radio is
up. 

The old logic was basically changing the behavior of the initialization function
dynamically based on the presence of a monitor VAP but could lead to a mixed set
of buffers.

The revised code keeps all the buffers the same and make sure there is room for a radiotap
or prism header if necessary in advance.

Without this change, even after adding a monitor VAP you are going to pull SKBs that are too small for a while.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3518 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 05:59:23 +00:00
mtaylor 25a3a9f3db ath_hardstart bug fixes...
*  Fix a bug where we would copy any cloned skb received in ath_hardstart, 
   and free the original... before returning the original to the queue!
   The result of this would be memory corruption at best, randomly placed panic 
   at worst.

*  In one case we returned -ENETDOWN from hard start, which in current kernels
   is NOT NETDEV_TX_OK so it would therefore requeue the packet which we just
   released.

*  Fixes the logic for both requeue and drop in hardstart fail so that we never
   leak, never double-free, and never leave the kernel with an invalid pointer
   to an SKB we just freed.




git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3517 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 05:45:59 +00:00
mtaylor 0438f82469 * Eliminate an_halstats as it is unused. The HAL doesn't know about nodes.
*  Replace an_halstats it with an_avgrssi (EWMA)
*  Only update stats in ath_softc* when we are on-channel and acting as a station,
   as there is no meaning to these stats as an AP.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3515 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 05:26:44 +00:00
mtaylor 735fc50dc2 * Rename ath_uapsd_processtriggers to ath_intr_process_rx_descriptors since
this is what it does.

*  Rename ATH_BUFSTATUS_DONE to ATH_BUFSTATUS_RXDESC_DONE since this is what
we mean - has the descriptor been processed.

*  Eliminate a case where we were processing each descriptor twice and 
double-counting the statistics.

*  Delegate decision on whether to schedule the rx queue to 
ath_intr_process_rx_descriptors so we do not schedule it when there is no work.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3514 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 05:11:35 +00:00
mtaylor b1aeabad06 Calibration and noise reading fixes...
*  Beacon calibration interval needs to be per-radio, not global because
   each radio is going to have it's IQ gain calibration reached at different 
   times.  With multi-radio systems, you could have one radio calibrated and one
   in sorry shape and the calibration interval would be dropped back to the 
   longer intervals for both.  This also necessitated removal of the sysctl var
   for "calibrate" since it was the wrong thing.

*  Fix for jiffies rollover bugs - use macros and mod_timer calls rather than 
   hacking timer structures directly.

*  Always process noise floor before retrieving it.  That is to say, the process 
   noise floor call and the get channel noise call should always be one after the
   other, owing to things like channel changes and scanning.

	ath_hal_process_noisefloor(sc->sc_ah);
 	ic->ic_channoise = ath_hal_get_channel_noise(sc->sc_ah, &(sc->sc_curchan));

*  Calculate noise floor and read noise level at more opportune times/places.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3513 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 04:17:27 +00:00
mtaylor 98dc20d2e4 Deleted a dead block of code and fixed continuous transmit function incompatibility with HAL's TPC control. The continuous transmit function is used to test emissions at different power levels, so having the levels fixed in the HAL defeated the settings for the continous transmit power level.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3512 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:58:32 +00:00
mtaylor 1246a7c612 A couple of minor cleanups
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3511 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:54:50 +00:00
mtaylor 334f390f9c We need to update beacon configuration when the channel changes, the tswitch condition doesnt factor into the decision
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3510 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:53:25 +00:00
mtaylor 436eb24f42 Replace references to ath_hal_reset with a local wrapper, ath_hw_reset and remove cloned code that immdiately follows all the ath_hal_reset code.
This makes sure that the post-hw-reset stuff we do is done consistently in all cases for improved stability and predictability everywhere hardware reset is necessary.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3509 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:51:31 +00:00
mtaylor afadc9b41d Move slot-time, CTS/RTS, and ACK timeout calculations into the driver. Corrected logic for the relationships between slot time and cts timeout and ack timeout have been added and the athctrl now delegates to the driver instead.
You can override:
- slottime
- ctstimeout
- acktimeout

acktimeout and ctstimeout will be selected from the first available of: 

1) the explicitly specified override value [if present]
2) a value derived from an explicitly specified slottime [if present]
3) the HALs default behavior / standard settings for the PHY mode

Setting the distance is shorthand for updating the slottime, and both cts and ack timeout values based upon the usual equations for air propagation, speed of light, etc..etc..



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3508 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:46:54 +00:00
mtaylor cee1c3f7f9 Add init/destroy for locks to correct places, including the new beacon buffer and group poll buffer locks which will be used in a subsequent checkin.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3507 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:30:01 +00:00
mtaylor 449f6e1220 This commit updates the descriptions of the parameters to indicate default values, and makes those default values explicit in the global variables in the module.
Further, the tpc module parameter was based upon a misunderstanding of what the HAL really supports and has been re-characterized.

Originally I believed that the HAL implemented per-node power level tuning but they apparently felt the specifications were too complicated and instead they implemented the minimum requirement for ETSI aggregate power limit compliance.

In short, "tpc" really uses a fixed power level for all packets of the regulatory maximum less 3dBm.  It also defeats the fine-grained control (per descriptor) we have over the power levels of transmitted packets.

Therefore, I have renamed this to "hal_tpc" and updated the comments to reflect that this really is ETSI-style TPC hack for aggregate power.  Since the user can set the power level to max -3dBm just as easily, I don't see the point of it after all, but it's still supported just in case someone finds value in it.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3506 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:28:20 +00:00
mtaylor 0d6c6d0c6c This update uses the recently added HAL extensions for controlling noise immunity settings in order to correctly re-implement disabling of interference mitigation.
A module parameter and sysctl parameter are provided for changing whether interference mitigation is enabled or disabled.  

When interference mitigation is disabled, we work around a HAL defect where the interference mitigation auto-tuning algorithm still starts and/or sets some initially high mitigation levels.  

With this fix, disabling interference mitigation with the current HAL behaves like it did in prior HALs.  

Far greater receive sensitivity and increased range is supported with this disabled.  This is especially useful for long distance point-to-point links.

As a part of this fix, a severe bug that was originally a workaround for the HAL issue has been corrected.  When interference mitigation is enabled, we NEVER want to eat or throttle the MIB interrupts as the hardware counter callbacks to the HAL are what drives the interference mitigation calibration state machine.  Conversely, if interferference mitigation is being blocked by our driver but the hAL may still be enabling the HAL_INT_MIB in the IMR, then we want to force the interrupt OFF in the mask and eat the interrupt.

The failure case was where the interrupt would fire continually and never get properly handled because the HAL wasn't configured to handle interfernece mitigation - now we mask the interrupt OFF.  With the 'throttling' hack, we didn't fix hte problem but made it worse - when interfernce mitigation was enabled we just blocked the necessary signals to get the counters updated and stop the interrupt from continuing to fire.  

The timer to re-enable the MIB interrupt after it fired was also wrong cause it would make sure the interrupt could never be disabled by the HAL or the driver.




git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3505 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 03:21:59 +00:00
mtaylor 2477d20c5e Eliminate ath_buf's bf_node pointer.
This pointer is entirely redundant with the pointer already in the SKB.  This eliminates an unnecessary source of possible node reference leaks.  In all cases this variable was being populated from the SKB's node pointer and was never referenced outside of the context of processing an skb, for obvious reasons.

Use BF_NI(bf) or SKB_NI(skb) macros to obtain the node of a buffer or skb.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3504 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 00:07:55 +00:00
mtaylor 3a132792ff Simplification of kernel queue start/stop logic.
We had a local flag that was being used inconsistently to mirror the queue state, but was really brain dead.  sc_devstopped could be off even when the queue was stopped and no matter how many buffers were freed, we would never restart the queue.  This could lead to liveness issues (mostly after a buffer leak caused excessive buffers to be used).  
The kernel has an easy call to find out if the queue is stopped or not, so this checkin uses that.  

We will re-awaken the queue if:

1) we have some buffers we are willing to use for data
2) the channel is available (as opposed to being in DFS CAC)
3) the queue is stopped

This is what we were originally going for with reap counters and sc_dev_stopped and all this other nonsense.  The new logic is much simpler and cleaner.

This also fixes a performance problem where the queue was being re-awakened when no buffers were available resulting in a constant ping-pong of buffers between the kernel and madwifi and a very very heavy CPU utilization at exactly the wrong time.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3503 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:58:06 +00:00
mtaylor 9148c7a79a The RX tasklet must process the CABQ when it is setup and non-empty, even if the HAL says it is not "active".
HAL will say the CABQ is not active if the trigger has fired and the CABQ has been serviced.  Therefore, the conditions under which we were skipping CABQ are EXACTLY when we need to check it.

This was leading to large numbers of rx buffers consumed in the CABQ (multicast, etc) and thus the RX queue would deteriorate over time until RX overruns would eventually start to be a big problem.

I also include better diagnostics.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3502 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:41:07 +00:00
mtaylor 7c6997619e This commit fixes problems with skbuff cloning and reference counting in input handling. The biggest problem with this code was corruption of memory.
ieee80211_input can receive cloned skb from the bridge layer, and thus makes copies to modify and use.  The original was being freed immediately upon copying.  The problem is that when you issue ANY response other than NETDEV_TX_OK the skb is returned to the kernel queue.  So, basically there were wild pointers to skb in the skb queue, and these skb were being re-used by other applications and drivers - resulting in crashes all over the place.

With this new logic, we keep the original around until we know whether or not we will requeue it NETDEV_TX_BUSY or consume it NETDEV_TX_OK and we correctly free the skb only when appropriate.

We also get rid of the net80211_input_all function which was doing a bunch of unnecessary (and broken) copies and noe updates.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3501 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:34:44 +00:00
mtaylor 017c006628 Improved debug tracing and support for cleaning up stalled CABQ.
When CABQ transfer finishes, HAL reports the queue as inactive.  Thus, if
we switch modes or change state the CABQ can be left with some ath_buf 
referenced by it.  The changes in this patch cause the CABQ to be checked
at DTIM even when no multicast is pending for the VAP and if "stalled"
then the queue is drained.  

A subsequent patch will fix the tx tasklet logic for CABQ.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3499 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:17:18 +00:00
mtaylor a388f3a80c if iwpriv turbo is set before first beacon update it will segfault because the update for dturbo comes
before the allocation and initial configuration.  Since there shouldn't be any dturbo switches at this point, some null checks prevent the problem.  I'm not sure where the code should be moved to, but probably further down in the function.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3498 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:10:05 +00:00
mtaylor 43de3ce1a0 Debugging updates:
*  Updated register dump based on ath5k database (refresh the list)
*  Added a generic debug iwpriv delegation method to if_ath
*  Added some functions to help diagnose lost ath_buf pointers
	[resultant fixes will be checked in subsequent commits]



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3497 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 22:25:51 +00:00
mtaylor 534e25b569 These extensions are for interference/noise immunity control and will be used in a subsequent commit
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3495 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:51:36 +00:00
mtaylor 24f048e954 Make sure radar is not enabled if disabled by iwpriv, flag IEEE80211_F_DOTH is unset
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3482 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 20:02:37 +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 8d91a54cea More complete set of locking macros.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3480 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 04:11:35 +00:00
mtaylor 80c58504d7 This patch cleans up the VAP creation API.
The need to use software instead of hardware for beacon timers in AP+STA mode (aka nosbeacon) is now just determined in software, as we always knew whether or not to enable this.

The confusing bssid and -bssid parameters are now deprecated.

The "uniquebssid" flag is equivalent to "bssid" and can be used to force IEEE80211_CLONE_BSSID flag.  If this is not specified, then the BSSID used will be the next unused BSSID in the sequence, which could very well be the parent device's MAC address.

"uniquebssid" equates directly to IEEE80211_CLONE_BSSID" flag therefore.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3476 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 03:24:05 +00:00
mentor 4be10b5ba8 Some cleaning. Mostly cosmetic, but:
* Restructure one set of control blocks into a more readable form
 * Add some additional debug output


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3456 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-06 03:02:25 +00:00
mentor ce589c7ae3 Add node and SKB pointers to ath_buf in ath_mgtstart, so they are managed by the ath_buf logic. Also, remove unnecessary(?) comment.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3401 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-20 03:27:24 +00:00
proski 328929d76c Use resource_size_t for physical memory addresses
PCI resource addresses are 64-bit on i386 with PAE, so they won't fit
unsigned long.  Provide compatibility for older kernels.  Reported by
Diego Dujovne.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3399 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-19 21:28:16 +00:00
mentor eec0d88182 Annoyingly pedantic updates
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3390 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-17 04:57:52 +00:00
mentor b1a451321f The SIOCGATHDIAG ioctl tries to overlay a new struct defintion (struct ath_diag) onto the struct ifreq. Unfortunately, this structure appears to be too large on 64-bit platforms due to a larger pointer size; the technique may also suffer other problems.
Remove the old SIOCGATHDIAG ioctl (return -EOPNOTSUPP), and add a new ioctl (SIOCGATHHALDIAG) that passes the struct through ifr_data. Also, return -EOPNOTSUPP for unknown IOCTL numbers.

Incidently, I can't find anything that actually uses the old IOCTL.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3389 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-17 04:46:00 +00:00
mentor d72a04fc2e Rewrite ath_ioctl_diag to handle cases where buffer sizes are zero.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3388 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-17 04:08:25 +00:00
mentor 3252f8852e Merge -dfs to trunk - r3366
This commit should have been in trunk all along. Also, make one codepath sligthly less verbose.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3367 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-01 07:59:04 +00:00
nbd b99d972b64 revert an accidental change to the handling of errors at ath_tx_start from r3346, thx. bruno
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3362 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-23 14:13:09 +00:00
mentor 7d5824e65c In some situations have the hardware PHY calibrations synchronised with beacon sending. There is a greater chance that the mediuim will be quiet during this time, which appears to imporive calibration results.
This patch differs from the original in that beacon synchronised calibration is not condifured during CAC as no beacons are sent.
Thanks to nbd.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3358 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-14 06:34:28 +00:00
mentor 6b76be7f11 Merge -dfs to trunk - r3345: This probably should be in trunk
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3348 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-10 20:41:19 +00:00
mtaylor dd740cbeef Fix for #1769. Now that maximum supported VAPs is up to 64, 32 bits is not large enough for a bit set and rolls over, resulting in VAPs that are not configured to be accessed.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3347 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-08 20:59:47 +00:00
nbd 625d3f967d fix some memory leaks triggered by memory allocation errors, which were most visible in ath_mgtstart
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3346 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-08 05:38:41 +00:00
mentor c3365b93bf Revert r3342 :(
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3344 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-06 23:23:48 +00:00
mentor d3ab3181b0 Move DTIM and CFP count processing out of a loop into closed form
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3343 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-06 21:37:05 +00:00
mentor dc1e5a74cd Also call ath_hal_rxmonitor in IBSS. Maybe this will make Ge0rg all happy.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3342 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-06 21:30:48 +00:00
mentor 8c0469176d Add radar stuff to Makefile.kernel
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3338 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-05 06:27:17 +00:00
mentor c9cc0e7dee Correct pointer arithmetic in the SKB CB.
With thanks (but not copyright ;) to Alessandro Erta


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3337 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-05 06:22:32 +00:00
mentor ebc79fce38 Cleanup up de-MIC failure (in hardware) handling. Apparently, HW sometimes gets this wrong and spuriusly fails valid packets. In all cases, the packets are dropped, but we do extra processing to record statistics correctly.
This changeset adds a node statistic. If this is not liked, I encourage it to be fixed; I might learn something.
Thanks nbd.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3334 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-04 00:16:24 +00:00
mentor c7fba7a6ce This is a HACK.
With 0.9.30.13 ANI control appears to be broken. ANI is designed only for client (STA/AHDEMO) only mode. This function updates the data used for ANI, so we will only call it for client only mode. This may will not affect ANI problems in client only mode.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3321 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-02 17:47:59 +00:00
mentor c0c3125da1 Demote these messages to debug only from informational as they are noisy and unneeded
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3320 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-02 17:36:29 +00:00
mentor a9788959cd Move some static declarations around for no particular reason
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3316 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-31 03:54:19 +00:00
mtaylor 4d5de4b5a2 This patch adds iwpriv values for setting the
time in ms, or the number of beacons for the
beacon miss alarm.  If we haven't had a beacon
in this period, the alarm is sounded and 
action (i.e. roaming) is taken.

This patch changes the storage of the beacon
miss threshold to integral beacon count but 
corrects the previous intent.

The default beacon miss alarm is going to be
850ms which is half way between the two hard
coded limits that were there before.

The old hard coded limits assumed that the
beacon interval was 100ms and set the limit to
10 (1000ms) for software beacon miss timer 
and 7 for hardware beacon miss timer.

The new default is 850ms (the midpoint between
the two previous defaults).  This value is rounded
up to the next nearest beacon interval.

There is no upper bound on the beacon miss
threshold specified, since it may need to be
wildly inflated with 25ms beacon interval, or
wildly reduced with 1000ms beacon interval.

The minimum is still 2 beacons, regardless of
the beacon interval.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3314 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 23:50:16 +00:00
proski 99b36fbd0f Fix section mismatch warning in forthcoming Linux 2.6.25
Section mismatch checker in the forthcoming Linux 2.6.25 complains about
ath_pci_drv_id and recommends to rename it.  Rename ath_pci_drv_id to
ath_pci_driver, which is consistent with other PCI drivers.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3312 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 21:01:05 +00:00
mentor 0ad2c8981a Linux 2.4 series compatibility fixes
* Based on patches from nbd
 * av_beacon_alloc code has been reimplemented using atomic bit operations; I think this is safe for SMP


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3310 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 20:23:49 +00:00
mtaylor 2b8281ba31 Update comment for why we set sc_beacons to one when resetting for calibration after txcont, cac, or calibration.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3309 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 19:34:49 +00:00
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
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 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 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 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 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 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 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
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
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
mentor 751589f640 Revert r3220
Since r3076 ath_tx_capture no longer exists, and ath_capture no longer frees the SKB because it was a confusing place to do that. The reverted changeset has been tested to cause leaks, and once reverted the code operates correctly.i

*fwap*


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3222 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-19 15:45:28 +00:00
mtaylor 70339802ca Fix a bug where bf->bf_skb needs to be set to NULL because the skbuff have already been freed by
ath_tx_capture, for each frame in the list we have already freed the skb but the original pointer to
the list of skbs is still in bf->bf_skb.  So when bf is returned with ath_return_txbuf it tries to 
double-free, resuilting a spew of backtraces/warnings when reference debugging is enabled.  

Not to mention the fact that the skb is double-freed.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3220 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-19 01:02:26 +00:00
mtaylor 583f54226e Do not count requeued packets as discarded.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3217 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-19 00:56:25 +00:00
mtaylor f5245bf3d0 Trivial spelling error
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3215 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-19 00:52:41 +00:00
mtaylor 9132c847c9 Add state debug messages when AP or STA returns to RUN state, indicating
whether or not beacons were going to be reconfigured.  Add logic so that
any time a STA on an AP mode radio comes back to RUN state we will
reconfigure beacons.  Also reconfigure beacons on AP return to RUN state
in a AP+STA configuration.  In this AP+STA mode, we need to be careful to update the beacons any time a STA or AP comes online to make sure the APs start beaconing.  This fixes issues where beacons are not restarted correctly after the station returns from SCAN/ASSOC/AUTH/INIT to RUN state while APs are pending completation of the STAs activity.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3213 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 22:14:41 +00:00
mtaylor 9e039dcd6a Two more places where running out of txbuf should cause requeue
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3211 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 22:01:03 +00:00
mtaylor ac89d5ecc3 For any hardstart failure resulting from insufficient resources, set requeue.
On requeue, stop the kernel queue and flag the fact that we stopped it in sc_dev_stopped so that it can be restarted automatically when resources become available.  This is already done in the case of taking a txbuf, but can/should be done for every code path leading to requeuing.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3208 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 21:32:17 +00:00
mtaylor 278c57c4e7 Move channel non-occupancy limits out of ieee80211_channel structure to
avoid hitting the size limitations of wireless extensions.  wext is a real pain.
Now the values are stored in ic_chan_non_occupy[] instead.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3207 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 21:25:05 +00:00
mentor a27f996ac4 Comment cleanup. No tagging in comments
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3205 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 17:28:43 +00:00
mentor ac2124cce3 Another pass on r3156:r3200:
* Lots of coding style and formatting, tedious and annoying
 * Quite a few bad merges as far as I can tell; at least one of which was serious - reintroduced a leak


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3202 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-18 01:28:43 +00:00
mentor beb3ffc4eb Formatting; grammar - r3179
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3197 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 02:51:32 +00:00
mentor 307d970bf5 Formatting r3185
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3196 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 02:49:14 +00:00
mentor 3dd1a89219 Formatting r3187 - getting slightly annoying now
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3195 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 02:48:09 +00:00
mentor 86891cd55e Formatting and style for r3189
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3194 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 02:45:41 +00:00
mentor 09ffca4d23 Formatting - r3191
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3193 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-17 02:30:15 +00:00
mtaylor f1d15f48ce Invoke netif_stop_queue and requeue skb if we run out of txbuf instances in the pool
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3191 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:46:31 +00:00
mtaylor 7559e86881 Add support for variable number of VAPs. The hard coded maximum of 4 VAPs is replaced by a module parameter so that you can specify from 2 to 64 VAPs. The only quirk with high numbers of VAPs is that you must not attempt to use staggered beacons because the hardware cannot fire them fast enough. If more than 4 VAP maximum is specified, beacons are always bursted. This code has been tested successfully against 16-VAP APs without problems.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3189 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:43:30 +00:00
mtaylor 4bf21e04c5 More meaningful error message
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3187 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:29:57 +00:00
mtaylor 1da2be285c Debug output when beacons are reconfigured.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3185 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:28:49 +00:00
mtaylor d25dbe6d49 Add the VAP pointer and nickname when dumping state transitions
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3183 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:26:32 +00:00
mtaylor 876563aeb1 Turn off beacon debug
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3181 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:24:46 +00:00
mtaylor 6322355756 Add an error if bursted beacons fails to set the buffer address.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3179 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:21:51 +00:00
mtaylor 4183b417a2 This is another case where we are getting clones of SKB and then modifying the header or the data. In a bridge, this is bad behavior. This fixes more bridge anomalies where incorrect header/data are sent to wired ports when packets are previously forwarded over madwifi port(s).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3176 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:17:53 +00:00
mtaylor 00a96b9d09 Do not allow rs_rssi to go negative due to stale noise floor values. In this case we know that RSSI is 'real low' so zero is as good a value as any.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3174 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:13:23 +00:00
mtaylor 406f509bd5 More non-DFS changes merged from madwifi-dfs to trunk
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3173 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 22:09:13 +00:00
mtaylor 934d2aea42 Cleanup merge wierdness
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3153 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-16 01:08:28 +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
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 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
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 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
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
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 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
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
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 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 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
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
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 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
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 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
mtaylor aa7fddfba7 Allow WDS nodes with cloned BSSID
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2920 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 03:36:48 +00:00
mentor 5afdef8cae Formatting changes. Mostly line lengths with some whitespace. Also, remove author info from any comments.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2915 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 02:08:35 +00:00
mtaylor 3edfc8a644 Restore error message on alloc_skb failure
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2910 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 00:49:31 +00:00
proski 932d54e246 Make ath_buf_counter static. Reported by sparse.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2907 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 22:49:25 +00:00
proski 562bdbac4a Use void* to keep an address, not u_int32_t
Pointers don't fit u_int32_t on 64-bit systems.  Besides, conversion
from pointers to integers and vice versa should be generally avoided.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2906 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 22:44:32 +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 61e57408ea Port some formatting fixes from DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2898 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 17:18:09 +00:00
mtaylor 6f471d5f17 Backport of continous transmit function from madwifi-dfs.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2889 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 11:08:51 +00:00
mtaylor 76ef1fd56b Support for setting default VAP debug flags at module load time, so you can
catch messages that occur during VAP startup (before you can possibly invoke 
80211debug).

Support for shared debug flags where they take effect across all devices
(i.e. shared flags in athdebug), and when they take effect across all VAPs
(i.e. shared flags in 80211debug).

Some additional debugging flags, including some in preparation for more leak 
detection code to be merged shortly as well as some from madwifi-dfs.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2888 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 10:45:58 +00:00
mtaylor c717e369fd Move DEV_NAME macro from if_ath.c to ieee80211_var.h, and expand on it.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2879 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 09:13:44 +00:00
benoit 8173daf0ad Merge changeset 2877 to trunk. Fixed sc_last_tsf.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2878 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-21 08:45:54 +00:00
proski 3bb4181d67 Unexpand tabs in the lines different from the DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2871 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-20 20:33:58 +00:00
proski 6b697f9589 Merge whitespace changes made on the DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2869 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-20 18:19:55 +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
benoit b2be90d89d Merge RX timestamps changes from madwifi-dfs branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2859 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-18 22:04:47 +00:00
mentor aebfe2bea0 Change the default VAP interface type to ARPHRD_ETHER
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2855 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-15 18:32:03 +00:00
proski 5eaff3b779 Add semicolon lost in the previous commit
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2851 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-14 20:53:41 +00:00
mentor de3fb8a58e Always set the correct network device type
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2850 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-14 20:47:56 +00:00
mentor c0c7d05e2f Turn off Interference Mitigation/Ambient Noise Imunity when the HAL is not in Station mode as it apparently causes problems with OFDM receive sensitivty.
It strikes me that we should always reset the hardware through a common function, though.

Ticket: http://madwifi.org/ticket/705
Original Patch: Signed-off-by: Tjalling Hattink <tjalling.hattink@ti-wmc.nl>


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2843 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-11 01:47:55 +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
scottr d07ba1953d Install modules with mode set to 0644 instead of 0755.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2834 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-06 00:41:19 +00:00
scottr 6ffd0b8a29 Fix compilation with GCC 4.1.2 on 64-bit hosts
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2833 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-06 00:33:49 +00:00
mtaylor 1d4d9ddb6b Fix for r1106. Perform HAL reset twice, once with chanchange = TRUE and once without.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2831 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-05 23:18:44 +00:00
benoit c4d1172910 Merge changes @2825 back to trunk
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2826 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-04 16:17:39 +00:00
proski 120d309bc3 Fix sysctl support in Linux 2.6.24
Linux 2.6.24 introduces a sysctl checker that disallows using arbitrary
ctl_name values for sysctl entries.  The entries with non-standard
values should set ctl_name to CTL_UNNUMBERED.

On the other hand, using consistent non-zero ctl_name values is required
for older kernels (tested on Linux 2.4.33.3 from Slackware 11).

Thus the solution is to use CTL_UNNUMBERED on Linux 2.6.24+ and the
original values in the older kernels.  Move CTL_AUTO and DEV_ATH to
include/compat.h and define them correspondingly.

When copying sysctl entries, check procname for being non-zero, since
ctl_name is zero (CTL_UNNUMBERED) on Linux 2.6.24 and newer.

For the same reason, don't use ctl_name to distinguish entries in
ath_sysctl_template, use extra2 instead.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2814 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-31 05:39:41 +00:00
proski b7186f5480 Fix oops due to sysctl table check failure in Linux 2.6.24
Linux 2.6.24 has a sysctl table checker that rejects the tables
presented by the driver.  Make the code survive this condition.  Free
devname (or dev_name) before freeing the table.  Don't do it at the
unregister time, it's too late.

The sysctl tables still need to be fixed.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2795 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-29 04:19:27 +00:00
proski 6807bc078f Fix compilation for the forthcoming Linux 2.6.24
SET_MODULE_OWNER() is not defined in 2.6.24, but it's already a no-op in
2.6.23.  Make sure that it will be a no-op in 2.6.23 and newer kernels.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2754 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-17 03:39:50 +00:00
mentor 66c5993fc6 Try not to dereference null pointers; the loop above might not have run
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2745 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-14 17:48:45 +00:00
mentor 3465554a3a Refactor beacon buffer generating loop for readability
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2742 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-13 21:19:49 +00:00
mentor 11f13a1752 Significantly lower the PCI_LATENCY_TIMER value that we were setting. This is essentially hte total time we are allowed to hold onto the PCI bus, before we see if anyone else wants a go. Higher means better throuhgput at the expense of the latency of other devices, and vice versa.
This value is roughly around the value that other devices are setting. The previous value appeared to be stupidly high.

This may solve some interactivity problems and machine performance issues.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2732 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-08 12:02:22 +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