Commit Graph

63 Commits

Author SHA1 Message Date
proski
0d741ab467 Adjust for procfs changes in Linux 2.6.32
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4099 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-09-28 23:06:53 +00:00
proski
763e90cdda Allow compilation for 2.4 kernels that backport the workqueue API
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4086 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-08-13 17:00:26 +00:00
benoit
1b019e9b0d Merge madwifi-dfs back to trunk: this change is only about DFS, excluding
DFS pulse analysis. Untested.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4076 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-07-11 17:20:58 +00:00
benoit
5b3bc6b37c Removed sc_dfs_cac. Replaced it by checking the timer sc_dfs_cac_timer directly
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4075 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-07-11 15:30:58 +00:00
proski
c62003532a Remove all reverse engineering support, it's pointless now
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4008 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-22 22:05:57 +00:00
proski
0cc57971d2 Fix Linux 2.6.30 compatibility
Linux 2.6.30 doesn't define IRQ_NONE as a macro.  Assume irqreturn_t,
IRQ_NONE and IRQ_HANDLED to be present on Linux 2.6.29 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3985 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-08 06:09:58 +00:00
proski
ea9d467903 Warning fix for old Linux 2.6 for i386
av_beacon_alloc should be unsigned long, not unsigned int to match
signatures of bitmask manupulation functions on i386.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3856 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-09-02 21:30:32 +00:00
proski
65b2749123 Typo fixes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3808 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-18 21:50:53 +00:00
benoit
bc6b795455 Merge some changes from -dfs:r3800:3803
Replace ath_hal_puttxbuf by ath_hw_puttxbuf


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3804 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-18 21:34:22 +00:00
proski
03fc511969 Replace "analyse" with "analyze"
Reference: madwifi-dfs@3544


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3779 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-17 02:26:04 +00:00
mentor
78cbb40469 Convert various _debug style char *func and int line passing to use dump_stack. This may possibly be a tad noisy still.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3743 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-22 02:12:53 +00:00
mentor
cc4fba0582 Diversity and Antenna code cleanup:
* Tidy, including refactoring and variable rename for clarity and consistency
 * Move some variable initialisation out of sysctl register where it does not belong.
 * Only change antenna based on RX traffic if both diversity and an RX antenna is not set
 * Set HW/HAL diversity setting on HW/HAL reset


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3717 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-10 15:32:45 +00:00
mentor
76cade5dac Make pointer declarations and casting consistent. Some other formatting changes are made in passing
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3710 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 20:32:29 +00:00
mentor
7045e12375 Aid debugging by helpfully not dereferencing NULL pointers and oopsing when debugging messages are turned on.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3679 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-24 12:15:44 +00:00
benoit
99ead2121d Merge madwifi-dfs r3676
Fixed type of all variables storing jiffies
Converted add_timer() to mod_timer()


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3677 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-22 20:25:48 +00:00
br1
8d0833e60d move all HAL extensions (everything including direct register read and writes
or reverse engineered information) to if_ath_hal_extensions.[ch]


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3657 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-21 13:44:03 +00:00
br1
9ba85e9edf drop packets if a WME queue gets too long.
similar code was removed in r3503, but it was wrong before as well, because
the packet needs to be dropped instead of requeued to actually achieve
prioritization between different packet types (WME classes). if we allow
one queue to consume all TX buffers then there is no buffer left to service
packets on higher priority queues.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3648 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-20 13:46:02 +00:00
mentor
c4093cb5c8 Manually stomp the DMA size to 128B for AR5418 devices. This patch should probably be extended to do this for all PCIe devices.
The register defines were taken from ath5k.

This patch has been only lightly tested, I'm afraid - trying for more coverage.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3641 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-17 04:53:35 +00:00
br1
86d8de1785 let ieee80211_recv_mgmt() return 0 if the frame is to be discarded and don't
process discarded frames in ath_recv_mgmt(). this reduces the number of times
we attempt to merge IBSS to invalid beacons.

this patch is based on the work of Derek Smithies


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3634 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-16 16:09:28 +00:00
mentor
6abd8285aa Whitespace for control statements
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3627 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-14 19:11:57 +00:00
mentor
dfdda8ca55 Remove axq_link, for benoit.
The last descriptor is now implicit in the structure and meta-data of the buffers; axq_link does not need to be maintained separately.
Add macros to to return the last buffer, descriptor, and link them as necessary.
Make the queue moving macro implicitly link descriptors, and remove the explicit descriptor linking in this case.

ath_node_move_data is still desperately in need of a review; it is used in XR.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3620 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-07 18:33:15 +00:00
mentor
094374b5ee Add sys/queue.h include to if_athvar.h. Plus some formatting/fiddling
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3614 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 23:49:40 +00:00
mentor
380c55d9c9 Rename and move, into the right headers, the SKB and BF macros
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3596 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-04 17:48:59 +00:00
mentor
ef6d84125b Convert as many things as possible to use kzalloc
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3573 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 14:10:42 +00:00
nbd
26b2191b1f add the default values for cwmin and cwmax to the if_athvar.h header file and remove them from the rate control file - the minstrel variant of this is totally wrong and leads to inefficient rate control behavior
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3563 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-23 01:28:15 +00:00
benoit
96adde4c63 Remove ito64() macro. Use u_int64_t instead.
Convert all dma_addr_t to u_int64_t for printing.
Fixed ticket #1895


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3559 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-21 21:23:19 +00:00
mentor
22b84448cc Fix ito64(). sizeof(some_int) is in bytes not bits.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3558 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-21 20:49:57 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
br1
132e306707 safer bitfield declaration in struct ath_softc
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3082 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-26 01:58:12 +00:00
br1
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
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