9a3916910548e419f4da438406f84af9e05f72eb |
|
25-Nov-2011 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Optimize ath5k_cw_validate Optimize ath5k_cw_validate by using the classic (X & (X - 1)) == 0 check to see if a number is power of 2. v2: Use functions from log2.h instead Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
b4cfb5d574cd9e23e41462061941f6ac68a41c80 |
|
25-Nov-2011 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Renumber hw queue ids According to documentation higher DCUs have higher priority and should be used for beacons and CAB traffic. More specifically DCU 9 should be used for beacons and DCU 8 for CAB traffic, I assumed DCU 7 should be OK for UAPSD traffic. Note that DCU 8 and 9 are special because they can only be mapped to a single QCU each but since we use a 1:1 mapping between QCUs and DCUs anyway we don't have to change much. P.S. I also did a few related cleanups on qcu.c and ath5k.h Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
c47faa364cfb249d5d7670fb7293a6f9acd8aa9e |
|
25-Nov-2011 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Cleanups v2 + add kerneldoc on all hw functions No functional changes Add kernel doc for all ath5k_hw_* functions and strcucts. Also do some cleanup, rename ath5k_hw_init_beacon to ath5k_hw_init_beacon_timers, remove an unused variable from ath5k_hw_pcu_init and a few obsolete macros, mostly related to XR. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
931be260ed54843edac37cb3ff09a40b86114b31 |
|
27-Jul-2011 |
Pavel Roskin <proski@gnu.org> |
ath5k: clean up base.h and its use Remove unnecessary includes from base.h. Add includes to other files as necessary. Don't include base.h unless needed. Move declarations for functions in base.c from ath5k.h to base.h. Use a better named define to protect base.h against double inclusion. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
32c254645f90a5a5486788c0deb30531fdb609c2 |
|
23-Jul-2011 |
Pavel Roskin <proski@gnu.org> |
ath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value When checking for the band, use channel->band. Change ath5k_hw_nic_wakeup() and ath5k_channel_ok() to take ieee80211_channel. Change ath5k_hw_radio_revision() to take ieee80211_band. Signed-off-by: Pavel Roskin <proski@gnu.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
8d44a823c847c3d20e33c4c714ab48b700f41f14 |
|
23-Jul-2011 |
Pavel Roskin <proski@gnu.org> |
ath5k: remove most references to XR XR is a proprietary feature of the chipset. It's not supported and should not be supported. Signed-off-by: Pavel Roskin <proski@gnu.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
e0d687bd9df218ba3d97aac15919d30816d72dcb |
|
15-Jul-2011 |
Pavel Roskin <proski@gnu.org> |
ath5k: merge ath5k_hw and ath5k_softc Both ath5k_hw and ath5k_softc represent one instance of the hardware. This duplication is historical and is not needed anymore. Keep the name "ath5k_hw" for the merged structure and "ah" for the variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more descriptive and more widely used. Put the combined structure to ath5k.h where the old ath5k_softc used to be. Move some code from base.h to ath5k.h as needed. Remove memory allocation for struct ath5k_hw and the corresponding error handling. Merge iobase and ah_iobase fields. Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
488a50176c169eb36544b4f970c8bba68ede30a1 |
|
09-Apr-2011 |
Felix Fietkau <nbd@openwrt.org> |
ath5k: fix SIFS time handling ath5k uses 8 usec as a sifs time, extracted from the initvals, whereas the standard requires a sifs time of 10. The difference originates from the fact that the SIFS register has an offset of 2 usec. Fix the SIFS time definition to use the standard value of 10 usec and subtract 2 usecs when writing the SIFS register. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
a27049e2c926bcf68360532a5ae66e408296ae85 |
|
09-Apr-2011 |
Felix Fietkau <nbd@openwrt.org> |
ath5k: fix short preamble rate duration value Subtract the difference in preamble duration (in usec) from the value returned by ieee80211_generic_frame_duration. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6 |
|
28-Jan-2011 |
Bruno Randolf <br1@einfach.org> |
ath5k: Fix short and long retry configuration The register definition for retry configuration on AR5212 was wrong, and simply copied over from AR5210. Update the register definitions from the documentation. Let the short and long retries be configured from mac80211 and use the standard values of 7 and 4 by default. Also we need to make sure we don't export more retries than we are configured for to mac80211 (and the rate module) in hw->max_rate_tries. Also clean up the code by removing unused defines and variables and drop the different values for "station retries" - if these need to be different it can be handled tru ah_retry_long/short. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
22d8d9f81b8b054df2f7f82daffcb71608f411e4 |
|
07-Dec-2010 |
Bruno Randolf <br1@einfach.org> |
ath5k: Use capabilities information for the number of TX queues One thing I missed in my WME series: Older hardware does not have enough hardware queues to support WME. In this case we just set up one data queue. Use the capability information to decide how many queues to set up. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
71ba1c30851575b43ba76b0f9c26ff5567e8136c |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Always set IFS intervals on reset * Make sure we always set IFS timings even if no coverage class is set. If we don't we'll miss the needed changes for different bwmodes. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
473cae27620c27377e278a6f92aaa483060e3c19 |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Use turbo flag on DCU * Set AR5K_DCU_GBL_IFS_MISC_TURBO_MODE flag on DCU when operating on 40MHz Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
eeb8832b3181d6ca8593051b68c466e5d2653bb3 |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Set all IFS intervals, not just slot time * Replace set_slot_time with set_ifs_intervals that also sets the various inter-frame space intervals based on current bwmode. * Clean up AR5210 mess from reset_tx_queue, AR5210 only has one data queue and we set IFS intervals for that queue on set_ifs_intervals so there is nothing left to do for 5210 on reset_tx_queue. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
3017fcab416d8d1ee48ca16aa9a3062f600dab8e |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Extend get_default_sifs/slot_time * Extend get_default_sifs/slot_time to include timings for turbo half and quarter rate modes. * AR5210 code for now uses timings already on core clock units instead of usecs so rename them (we 'll clean it up later). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
25ddfa195735934256fda55bb4f2d749c19386ff |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Move tx retries setting outside reset_tx_queue * Move setting of tx retry limits on a separate function (we 'll clean up this AR5210 mess later) Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
b405086ba47678a5b8f6e7cd835a3d27ebb6f744 |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Increase PHY settling parameters for turo mode * On turbo mode increase PHY settling times, note that we only increase switch settling time on AR5212 as indicated by initvals. * A few cleanups: Move frame control settings for AR5210 from reset_tx_queue to tweak_initvals and remove phy_scal settings from tweak_initvals (we tweak them alread on set_sleep_clock). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
c297560206adf0cda8ce38ef9b20b0a025754c4d |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Put core clock initialization on a new function * Handle all usec parameters in one function. It's much cleaner this way. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
fa3d2feeff4723cce8d4722902492d60b7f75fcc |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Add new field on ath5k_hw to track bandwidth modes * Prepare for half/quarter/turbo support, introduce a new ah_bwmode parameter and get rid of ah_turbo. Bwmode stands for "bandwidth mode" and can have 4 values, default (20MHz), turbo (40MHz), half rate (10MHz), and quarter rate (5MHz). Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
f7317ba2d669c1b54fb31ed7834361a700a79217 |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Use DCU early termination correctly * DCU early termination should be used to quickly flush QCU according to docs so don't enable it for all queues, enable it only when stopping each queue and disable it when we are done. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
9320b5c4a7260d9593102f378201d17e3f030739 |
|
23-Nov-2010 |
Nick Kossifidis <mickflemm@gmail.com> |
ath5k: Reset cleanup and generic cleanup * No functional changes * Clean up reset: Introduce init functions for each unit and call them instead of having everything inside ath5k_hw_reset (it's just c/p for now so nothing changes except calling order -I tested it with various cards and it's ok-) * Further cleanups: ofdm_timings belongs to phy.c rate_duration belongs to pcu.c clock functions are general and belong to reset.c (more to follow) * Reorder functions for better organization: We start with helpers and other functions follow in categories, init functions are last Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
de8af45520f47d14397b603beefae3d2983ce787 |
|
17-Sep-2010 |
Bruno Randolf <br1@einfach.org> |
ath5k: Simplify cw_min/max and AIFS configuration Get rid of overly complicated cw_min/max and AIFS configuration: * Validate values in ath5k_hw_set_tx_queueprops(), so we can use them directly without further checks or computation in ath5k_hw_reset_tx_queue(). * Simplifiy by using AR5K_TUNE_AIFS|CWMIN|CWMAX variables directly since we don't support XR or B channels. That way we can also remove AR5K_TXQ_USEDEFAULT and the confusing logic around it. * Update data types: AIFS is u8, CW's are u16. * Remove now unneeded variables in ath5k_hw. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
230fc4f3b2fa72980787a5f86c850f02bb193187 |
|
19-May-2010 |
Bruno Randolf <br1@einfach.org> |
ath5k: remove ATH_TRACE macro Now that we have ftrace, it is not needed any more. Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
6fe10e760bcde8c29b84ad16f54015af5ef59ff5 |
|
10-Mar-2010 |
John W. Linville <linville@tuxdriver.com> |
ath5k: remove some dead functions "ath5k: remove stale function declarations, make some functions static" commented-out some unused functions. This removes them. Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Bob Copeland <me@bobcopeland.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
626ede6b1aafb3a8cadfdd04b512fd1d3dc2113e |
|
19-Feb-2010 |
Pavel Roskin <proski@gnu.org> |
ath5k: remove stale function declarations, make some functions static Remove all unnecessary function declarations from ath5k.h. Comment out unused functions. Remove ath5k_hw_get_tsf32(), which is too trivial to be commented out. Make functions static if suggested by sparse. Make ath5k_pm_ops static. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
a951ae2176b982574ffa197455db6c89359fd5eb |
|
21-Jan-2010 |
Bob Copeland <me@bobcopeland.com> |
ath5k: fix setup for CAB queue The beacon sent gating doesn't seem to work with any combination of flags. Thus, buffered frames tend to stay buffered forever, using up tx descriptors. Instead, use the DBA gating and hold transmission of the buffered frames until 80% of the beacon interval has elapsed using the ready time. This fixes the following error in AP mode: ath5k phy0: no further txbuf available, dropping packet Add a comment to acknowledge that this isn't the best solution. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
3578e6ebb305e6bf7519f6e86741772892f4d51a |
|
21-Dec-2009 |
Lukáš Turek <8an@praha12.net> |
ath5k: Reimplement clock rate to usec conversion The original code was correct in 802.11a mode only, 802.11b/g uses different clock rates. The new code uses values taken from FreeBSD HAL and should be correct for all modes including turbo modes. The former rate calculation was used by slope coefficient calculation function ath5k_hw_write_ofdm_timings. However, this function requires the 802.11a values even in 802.11g mode. Thus the use of ath5k_hw_htoclock was replaced by hardcoded values. Possibly the slope coefficient calculation is not related to clock rate at all. Signed-off-by: Lukas Turek <8an@praha12.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
e1aa369ec8fb981ef78bc5be3b3c58de7c5ff769 |
|
21-Dec-2009 |
Lukáš Turek <8an@praha12.net> |
ath5k: Fix functions for getting/setting slot time Functions ath5k_hw_get_slot_time and ath5k_hw_set_slot_time were converting microseconds to clocks only for AR5210, although it's needed for all supported devices. The conversion was moved outside the hardware-specific branches. The original code also limited minimum slot time to 9, while turbo modes use 6, this was fixed too. Signed-off-by: Lukas Turek <8an@praha12.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
4d30d309a3be84dfb01743ceb4652405204a80a0 |
|
08-Aug-2009 |
Julia Lawall <julia@diku.dk> |
drivers/net/wireless/ath/ath5k: Change constant name Elsewhere, the tqi_type field is compared to constants having a name beginning with AR5K_TX_QUEUE, rather than AR5K_TX_QUEUE_ID. I have thus converted AR5K_TX_QUEUE_ID_CAB to AR5K_TX_QUEUE_CAB. This does, however, change the value, so perhaps something else was wanted. Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
cec8db23011d2a0a5ec101a0263d79678adf21ba |
|
04-Jul-2009 |
Bob Copeland <me@bobcopeland.com> |
ath5k: send buffered frames after the beacon Enable the "Content" After Beacon queue and utilize it to send any buffered frames for power-saving clients. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
428cbd4ff4d0f2423f49e499f499f04a636cb152 |
|
30-Apr-2009 |
Nick Kossifidis <mick@madwifi-project.org> |
ath5k: Beaconing fixes * Write next beacon timer even on AP mode since without this we get no beacons + ath9k does it too. Docs say that we must write 0 on this register on AP mode to start TSF increment, we do both to be on the safe side. * Fix num_tx_pending function, we never read the register :P that's why we got all those "beacon queue 7 didn't stop messages". * Put full prioriy on beacon queue, lock all queues with lower priority using the arblock and also bypass any arblock by seting the arblock ignore flag. * For the CAB queue (do we need this thing ?, it seems crap) since it's supposed to fire up after each beacon (we don't use it on driver part, ath9k/MadWiFi does), don't make it DBA gated but instead make it fire after each beacon by using the beacon sent gated flag. * Increase bmiss threshold to 10, that's what we used on MadWiFi for a long time. Also when we have pending frames on the beacon queue (we got a beacon that didn't make it on the air) it's more likely that the beacon queue never started, probably due to faulty DBA setting, so change that "beacon queue didn't stop" message. Tested this with AP mode and IBSS mode and seems to work fine ;-) Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|
203c4805e91786f9a010bc7945a0fde70c9da28e |
|
31-Mar-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
atheros: put atheros wireless drivers into ath/ Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/qcu.c
|