- 10 Apr, 2012 2 commits
-
-
Joe Perches authored
Macros can be converted to functions to reduce overall object size. Convert the ATH5K_PRINTK macro to use _ath5k_printk. Allyesconfig size is reduced ~10% $ size drivers/net/wireless/ath/ath5k/built-in.o* text data bss dec hex filename 211557 2032 40672 254261 3e135 drivers/net/wireless/ath/ath5k/built-in.o.new 235412 2032 47296 284740 45844 drivers/net/wireless/ath/ath5k/built-in.o.old Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Joe Perches authored
Use a more current logging style. Make sure all output is prefixed appropriately. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 06 Mar, 2012 2 commits
-
-
Felix Fietkau authored
Some calibration types interfere with tx activity, but the queue stop does not prevent that. In fact, some calibration types need tx activity to properly function, so stopping the queues for them is counterproductive. In some tests this patch has been shown to improve stability, especially in AP or ad-hoc mode. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Chun-Yeow Yeoh authored
This patch allows the possibility of having the mesh point and AP to be operated simultaneously in one single radio. Previously, mesh point fails to generate the mesh beacon if virtual AP is created for the same radio. Signed-off-by:
Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 24 Jan, 2012 2 commits
-
-
John W. Linville authored
Avoids this: CC [M] drivers/net/wireless/ath/ath5k/base.o drivers/net/wireless/ath/ath5k/base.c: In function ‘__check_no_hw_rfkill_switch’: drivers/net/wireless/ath/ath5k/base.c:85:1: warning: return from incompatible pointer type Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Antonio Quartulli authored
Disable group keys programming when using IBSS RSN. Keys will be managed using software. In this way IBSS RSN can correctly work. Signed-off-by:
Antonio Quartulli <ordex@autistici.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 19 Dec, 2011 1 commit
-
-
Rusty Russell authored
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. (Thanks to Joe Perches for suggesting coccinelle for 0/1 -> true/false). Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 28 Nov, 2011 6 commits
-
-
Nick Kossifidis authored
MRR support and 2GHz radio override belong in ah_capabilities and we should use them (e.g. so far we used to set mrr descriptor without checking if MRR support is enabled + we checked for MRR support 2 times, one by trying to set up an MRR descriptor and another one based on MAC version). Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Nick Kossifidis authored
Add a module parameter to disable hw rf kill switch (GPIO interrupt) because in some cases when the card doesn't come with the laptop, EEPROM configuration doesn't match laptop's configuration and rf kill interrupt always fires up and disables hw. I thought of moving this to debugfs and make it per-card but this way it's easier for users and distros to handle. Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Tested-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Nick Kossifidis authored
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>
-
Nick Kossifidis authored
Noise floor calibration does not interfere with traffic and should run more often as part of our "short calibration". The full calibration is not the noise floor calibration but the AGC + Gain_F (on RF5111 and RF5112) calibration and should run less often because it does interfere with traffic. So Short calibration -> I/Q & NF Calibration Long calibration -> Short + AGC + Gain_F This patch was for some time on my pub/ dir on www.kernel.org and has been tested by a few people and me. I think it's O.K. to go in. I also changed ah_calibration to ah_iq_cal_needed to make more sense. v2 Use a workqueue instead of a tasklet for calibration Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Nick Kossifidis authored
No functional changes, just a few comments/documentation/cleanup Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Nick Kossifidis authored
Since card has 12 tx queues and we want to keep track of the interrupts per queue we can't fit all these interrupt bits on a single register. So we have 5 registers, the primary interrupt status register (PISR) and the 4 secondary interupt status registers (SISRs). In order to be able to read them all at once (atomic operation) Atheros introduced the Read-And-Clear registers to make things easier. So when reading RAC_PISR register, hw does a read on PISR and all SISRs, returns the value of PISR, copies all SISR values to their shadow copies (RAC_SISRx) and clears PISR and SISRs. This saves us from reading PISR/SISRs in a sequence. So far we 've used this approach and MadWiFi/Windows driver etc also used it for years. It turns out this operation is not atomic after all (at least not on all cards) That means it's possible to loose some interrupts because they came after the copy step and hw cleared them on the clean step ! That's probably the reason we got missed beacons, got stuck queues etc and couldn't figure out what was going on. With this patch we switch from RaC operation to an alternative method (that makes more sense IMHO anyway, I just chose to be on the safe side so far). Instead of reading RAC registers, we read the normal PISR/SISR registers and clear any bits we got by writing them back on the register. This will clear only the bits we got on our read step and leave any new bits unaffected (at least that's what docs say). So if any new interrupts come up we won't miss it. I've tested this with an AR5213 and an AR2425 and it seems O.K. Many thanks to Adrian Chadd for debuging this and reviewing the patch ! v2: Make sure we don't clear PISR bits that map to SISR generated interrupts (added a comment on the code for this) Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 11 Oct, 2011 1 commit
-
-
Dan Carpenter authored
th5k_hw_setup_tx_queue() returns a valid offset into the ah->ah_txq[] array. The ah->ah_txq[] and the ah->txqs[] array are the same size. Both have AR5K_NUM_TX_QUEUES elements. So this error handling code will never trigger. Also it's wrong. The call to ath5k_hw_release_tx_queue() with a qnum of AR5K_NUM_TX_QUEUES or more will just trigger a WARN_ON() and return. Or if it missed the WARN_ON(), it would just corrupt some memory and return. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by:
Bob Copeland <me@bobcopeland.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 09 Aug, 2011 1 commit
-
-
Bob Copeland authored
This cleans up error handling for the beacon in case of dma mapping failure. We need to free the skb when dma mapping fails instead of nulling and leaking the pointer, and we should bail out to avoid giving the hardware the bad descriptor. Finally, we need to perform the null check after trying to update the beacon, or else beacons will never be sent after a single mapping failure. Cc: stable@kernel.org Signed-off-by:
Bob Copeland <me@bobcopeland.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 08 Aug, 2011 4 commits
-
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Pavel Roskin authored
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>
-
Pavel Roskin authored
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>
-
Pavel Roskin authored
struct ath5k_avg_val is unused. In struct ath5k_hw, lladdr, ah_radar and ah_mac_revision are write-only, rxbufsize is unused, ah_phy is write-only and referenced by unused macros. In struct ath5k_vif, lladdr is write-only. Remove AR5K_TUNE_RADAR_ALERT, which has no effect. 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>
-
- 22 Jul, 2011 1 commit
-
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 20 Jul, 2011 1 commit
-
-
Pavel Roskin authored
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>
-
- 13 Jul, 2011 3 commits
-
-
Felix Fietkau authored
Instead of using ieee80211_stop_queue, check the configured tx queue limit before calling ieee80211_get_buffered_bc. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Felix Fietkau authored
During scans the full calibration usually does not make much sense, PAPD probing and IQ calibration should be deferred until there is enough time to complete them. Adding 100 ms to the initial full calibration delay should be enough to do this. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Felix Fietkau authored
Fixes a division by zero when setting distance before activating the device for the first time. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Acked-by:
Nick Kossifidis <mickflemm@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 11 Jul, 2011 1 commit
-
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 08 Jul, 2011 5 commits
-
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> sc->imask may change if ath5k_set_current_imask() races against itself. Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Pavel Roskin authored
Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 21 Jun, 2011 1 commit
-
-
Alexey Dobriyan authored
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" definition into separate header. This tiny piece is what gluing netdevice.h with mm.h via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". Removal of mm.h from scatterlist.h was tried and was found not feasible on most archs, so the link was cutoff earlier. Hope people are OK with tiny include file. Note, that mm_types.h is still dragged in, but it is a separate story. Signed-off-by:
Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Jun, 2011 1 commit
-
-
John W. Linville authored
Nothing else is freeing it, and this mirrors the error handling path already in ath5k_init_softc. https://bugzilla.kernel.org/show_bug.cgi?id=37592 Signed-off-by:
John W. Linville <linville@tuxdriver.com> Reported-by:
Tsyvarev Andrey <tsyvarev@ispras.ru>
-
- 17 Jun, 2011 1 commit
-
-
Pavel Roskin authored
Move an extern variable declaration to a header file. Prefix all functions with "ath5k_". Make ath5k_intr() static. Remove unneeded forward declarations. Remove pointless "extern" in a function declaration. Signed-off-by:
Pavel Roskin <proski@gnu.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 03 Jun, 2011 1 commit
-
-
Nick Kossifidis authored
Disable fast channel change by default on AR2413/AR5413 due to some bug reports (it still works for me but it's better to be safe). Add a module parameter "fastchanswitch" in case anyone wants to enable it and play with it. Signed-off-by:
Nick Kossifidis <mickflemm@gmail.com> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 11 May, 2011 1 commit
-
-
Ben Greear authored
This was introduced in 2.6.39-rc1 it seems. Signed-off-by:
Ben Greear <greearb@candelatech.com> Tested-by:
Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 14 Apr, 2011 1 commit
-
-
Felix Fietkau authored
On AHB, the calibration data usually does not contain a valid MAC address, the correct MAC address is stored in the board config. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Tested-by:
Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 12 Apr, 2011 4 commits
-
-
Felix Fietkau authored
While the rx/tx tasklet is pending, new unnecessary interrupts may arrive. Decrease the load by temporarily disabling the interrupts until the tasklet has completed. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Felix Fietkau authored
The pointers to the debugfs entries do not need to be saved, because they will be recursively removed when the wiphy is unregistered. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Felix Fietkau authored
Reusing the configured retry counts from the skb cb is more efficient than reloading the data from uncached memory. Replace ts_longretry (unused) with ts_final_retry which contains the retry count for the final rate only Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Felix Fietkau authored
During normal operation, minstrel was showing suspicious EWMA probabilities exceeding 100%. It looks like the tx status reporting in ath5k was not properly clearing the rate index for rates which were never attempted. This is caused by uninitialized stale data in the on-stack tx status information, which is reused when more frames are received. To fix this, rely on ts->ts_final_idx to select the last attempted rate, instead of checking whether ts->ts_rate is set. Additionally, the conversion from the driver rate index back to the mac80211 rate index can be dropped, as the mac80211 tx status will still have the original rate index which was used to set up the descriptor. Additionally, one more inaccuracy was fixed - the final rate attempt count only needs to be increased by one if the transmission attempt was successful. Signed-off-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-