aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/pci.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-06ath9k: Use atomic operationsSujith Manoharan1-1/+1
The 'sc_flags' variable is being used in a number of places with no locking whatsoever. This patch converts the usage of sc_flags to atomic ops. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Handle ASPM properlySujith Manoharan1-0/+5
ASPM has to be disabled when BTCOEX is in use, do this properly by calling the bus-specific ASPM init routine after the BTCOEX scheme has been determined. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10ath: Add and use pr_fmt, convert printks to pr_<level>Joe Perches1-4/+5
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>
2011-12-19ath9k_hw: make bluetooth coexistence support optional at compile timeFelix Fietkau1-1/+1
Many systems (e.g. embedded systems) do not have wifi modules connected to bluetooth modules, so bluetooth coexistence is irrelevant there. With the addition of MCI support, ath9k picked up quite a bit of extra code that can be compiled out this way. This patch redefines ATH9K_HW_CAP_MCI and adds an inline wrapper for querying the bluetooth coexistence scheme, allowing the compiler to eliminate code that uses it, with only very little use of #ifdef. On MIPS this reduces the total size for the modules by about 20k. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-07ath9k: rework power state handlingFelix Fietkau1-20/+1
Turning off the radio when mac80211 tells the driver that it's idle is not a good idea, as idle interfaces might still occasionally scan or send packets. The only time the radio can be safely turned off is when drv_stop has been called. In the mean time, use sc->ps_idle only to indicate network sleep vs full sleep. Move the LED GPIO changes out of the PCI suspend/resume path, the start/stop functions already take care of that. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-31drivers/net: Add module.h to drivers who were implicitly using itPaul Gortmaker1-0/+1
The device.h header was including module.h, making it present for most of these drivers. But we want to clean that up. Call out the include of module.h in the modular network drivers. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-14ath9k: Rename AR9480 into AR9462Rajkumar Manoharan1-1/+1
Renamed to be in sync with Marketing term and to avoid confusion with other chip names. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16ath9k: Fix PS wrappers and enabling LEDMohammed Shafi Shajakhan1-2/+2
in ath_pci_resume it seems we are not enabling LED properly, in addition we have a PS wrapper fix for this Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16ath9k_hw: Add support for AR946/8x chipsets.Senthil Balasubramanian1-0/+1
This patch adds support for AR946/8x chipets. Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k: add AR9580 supportLuis R. Rodriguez1-0/+1
This has been tested in STA and AP mode by Florian. Cc: David Quan <dquan@qca.qualcomm.com> Cc: Kathy Giori <kgiori@qca.qualcomm.com> Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Tested-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-26ath9k: remove replicated null check in ath_pci_aspm_initJohn W. Linville1-6/+2
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k: remove a bogus WARN_ONFelix Fietkau1-2/+2
On embedded hardware it's normal to not have a PCI device for the PCI bridge that the wifi card is attached to. pdev->bus->self will be NULL in that case. In that case, simply return without emitting an useless kernel stack trace. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-24ath9k: Move ath9k_init_crypto to commonRajkumar Manoharan1-1/+1
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22ath9k: do btcoex ASPM disabling at initialization timeStanislaw Gruszka1-19/+25
Disable ASPM in pci ->probe on upstream (device) and downstream (PCIe port) component. According to e1000e driver authors this is required. I did not find that requirement in PCIe spec, but it seems to be logical for me. This need to be fixed for CONFIG_PCIEASPM, that will be done later ... Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22ath9k: remove ->config_pci_powersave() redundant argumentStanislaw Gruszka1-1/+2
We always call ->config_pci_powersave() with both restore and power_off arguments equal to 0 or both equal to 1, so merge them into one argument. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08ath9k: remove all references to subsysid, it's never usedPavel Roskin1-2/+1
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-08ath9k: use pci_dev->subsystem_deviceSergei Shtylyov1-3/+2
The driver reads PCI subsystem ID from the PCI configuration register while it's already stored by the PCI subsystem in the 'subsystem_device' field of 'struct pci_dev'... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-01ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabledStanislaw Gruszka1-0/+27
We receive many bug reports about system hang during suspend/resume when ath9k driver is in use. Adrian Chadd remarked that this problem happens on systems that have ASPM disabled. To do not hit the bug, skip doing ->config_pci_powersave magic if PCIe downstream port device, which ath9k device is connected to, has ASPM disabled. Bug was introduced by: commit 53bc7aa08b48e5cd745f986731cc7dc24eef2a9f Author: Vivek Natarajan <vnatarajan@atheros.com> Date: Mon Apr 5 14:48:04 2010 +0530 ath9k: Add support for newer AR9285 chipsets. Patch should address: https://bugzilla.kernel.org/show_bug.cgi?id=37462 https://bugzilla.kernel.org/show_bug.cgi?id=37082 https://bugzilla.redhat.com/show_bug.cgi?id=697157 however I did not receive confirmation about that, except from Camilo Mesias, whose system stops hang regularly with this patch (but still hangs from time to time, but this is probably some other bug). Tested-by: Camilo Mesias <camilo@mesias.co.uk> Cc: stable@kernel.org # 2.6.35+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29ath9k: Fix suspend/resume when no interface is UPRajkumar Manoharan1-0/+6
When no interface has been brought up, the chip's power state continued as AWAKE. So during resume, the chip never been powered up. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-24Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville1-1/+1
2011-05-19ath9k: Drag the driver to the year 2011Sujith Manoharan1-1/+1
The Times They Are a-Changin'. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-01-28ath9k: fold struct ath_wiphy into struct ath_softcFelix Fietkau1-13/+5
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-28ath9k: remove support for virtual wiphysFelix Fietkau1-2/+0
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath9k: Reset keycache on resumeMohammed Shafi Shajakhan1-0/+8
It looks like some hardware registers are left into undefined state after suspend/resume. At minimum, this can cause odd issues related to key cache and hardware trying to encrypt/decrypt frames unexpectedly. This seems to happen even when there is no keys configured, i.e., hardware can end up touching TX frames just based of invalid key cache context even if the driver is not asking a specific entry to be used. In addition, RX can likely be affected. This patch fixes this issue. Signed-off-by: Jouni Malinen <Jouni.Malinen@Atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath9k: Use pci_is_pcie()Hauke Mehrtens1-1/+1
Use function pci_is_pcie() instead of accessing struct member directly. CC: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath9k: fix aphy / wiphy idle mismatchLuis R. Rodriguez1-0/+1
ath9k supports its own set of virtual wiphys, and it uses the mac80211 idle notifications to know when a device needs to be idle or not. We recently changed ath9k to force idle on driver stop() and on resume but forgot to take into account ath9k's own virtual wiphy idle states. These are used internally by ath9k to check if the device's radio should be powered down on each idle call. Without this change its possible that the device could have been forced off but the virtual wiphy idle was left on. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-22ath9k: Fix warnings on card removalRajkumar Manoharan1-0/+2
The recently added warning message on power change failure is not needed on device removal. ath: Failed to wakeup in 500us ------------[ cut here ]------------ WARNING: at drivers/net/wireless/ath/ath9k/hw.c:1618 ath9k_hw_setpower+0x61f/0x630 [ath9k_hw]() Hardware name: 64756D6 Pid: 540, comm: kworker/u:3 Not tainted 2.6.37-rc6-wl #37 Call Trace: [<ffffffff810501aa>] warn_slowpath_common+0x7a/0xb0 [<ffffffffa056e280>] ? ath9k_iowrite32+0x0/0x90 [ath9k] [<ffffffff810501f5>] warn_slowpath_null+0x15/0x20 [<ffffffffa05226ef>] ath9k_hw_setpower+0x61f/0x630 [ath9k_hw] [<ffffffffa05700e5>] ath9k_ps_wakeup+0x85/0xd0 [ath9k] [<ffffffffa0570685>] ath9k_configure_filter+0x25/0x80 [ath9k] [<ffffffffa04dde43>] ieee80211_configure_filter+0x133/0x190 [mac80211] [<ffffffffa04ee502>] ieee80211_do_stop+0x132/0x540 [mac80211] [<ffffffff813466ff>] ? _raw_spin_unlock_bh+0x1f/0x30 [<ffffffff812b6923>] ? dev_deactivate+0x1c3/0x1e0 [<ffffffffa04ee925>] ieee80211_stop+0x15/0x20 [mac80211] [<ffffffff8129d1b6>] __dev_close+0x56/0x90 Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-13ath9k: fix assumptions for idle calls on suspend/resumeLuis R. Rodriguez1-0/+3
mac80211 will notify drivers when to go idle and ath9k assumed that it would get further notifications for idle states after a device stop() config call but as per agreed semantics the idle state of the radio is left up to driver after mac80211 issues the stop() callback. The driver is resposnbile for ensuring the device remains idle after that even between suspend / resume calls. This fixes suspend/resume when you issue suspend and resume twice on ath9k when ath9k_stop() was already called. We need to put the radio to full sleep in order for resume to work correctly. What might seem fishy is we are turning the radio off after resume. The reason why we do this is because we know we should not have anything enabled after a mac80211 tells us to stop(), if we resume and never get a start() we won't get another stop() by mac80211 so to be safe always bring the 802.11 device with the radio disabled after resume, this ensures that if we suspend we already have the radio disabled and only a start() will ever trigger it on. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath9k: Add device id of AR9485 to pci tableVasanthakumar Thiagarajan1-0/+1
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath9k: Enable extended synch for AR9485 to fix L0s recovery issueVasanthakumar Thiagarajan1-0/+12
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath: Convert ath_print(.., ATH_DBG_FATAL to ath_errJoe Perches1-4/+3
So these errors are always emitted at KERN_ERR level. Remove ARRAY_SIZE casts, use printf type %zu Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-18ath9k: add support for reading eeprom from platform data on PCI devicesFelix Fietkau1-13/+29
Some embedded boards store platform data for connected PCIe AR92xx chips in the system flash instead of a separate EEPROM chip. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-09ath9k: Convert to new PCI PM frameworkRafael J. Wysocki1-18/+22
The ath9k driver uses the legacy PCI power management (suspend and resume) callbacks that apparently cause intermittent problems to happen (the adapter sometimes doesn't resume correctly on my Acer Ferrari One). Make it use the new PCI PM and let the PCI core code handle the PCI-specific details of power transitions. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27drivers/net/wireless: Use wiphy_<level>Joe Perches1-5/+2
Standardize the logging macros used. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-14ath9k: enable AR9003 PCI IDsLuis R. Rodriguez1-0/+1
All AR9003 features are now complete so enable AR9003 support. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-21ath9k: remove AR9003 from PCI IDs for nowLuis R. Rodriguez1-1/+0
We tried to squeeze as much AR9003 support into this kernel release cycle but there are a few features which are still being tested and developed. Some of these features are critical to the stable operation of AR9003 so for now disable AR9003 support all together. This will get re-enabled once all necessary features are in place but very likely will not happen for 2.6.35. Reviewed-by: Don Breslin <don.breslin@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-16ath9k_hw: add the PCI ID for the first AR9300 deviceLuis R. Rodriguez1-0/+1
The first AR9003 hardware family device supported is the AR9300, which has the vendor:device id 168c:0030 Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-06ath: Add a bus type fieldSujith1-0/+1
This can be used to store the bus types ( AHB/PCI/USB ). Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-04Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller1-13/+6
2010-02-02ath9k: add support for 802.11n bonded out AR2427Luis R. Rodriguez1-0/+1
Some single chip family devices are sold in the market with 802.11n bonded out, these have no hardware capability for 802.11n but ath9k can still support them. These are called AR2427. Cc: stable@kernel.org Reported-by: Rolf Leggewie <bugzilla.kernel.org@rolf.leggewie.biz> Tested-by: Bernhard Reiter <ockham@raz.or.at> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-02-01ath9k: fix access to freed data on unloadPavel Roskin1-13/+5
Calling ath_bus_cleanup() after ieee80211_free_hw() resulted in access to common->bus_ops, which is already freed as part of the device data. Remove the cleanup field in struct ath_bus_ops, as it was never used properly. Remove ath_bus_cleanup(). Merge cleanup functions in place of the ath_bus_cleanup() calls. Take care not to use any device data after ieee80211_free_hw(). Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-19Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller1-27/+31
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h
2010-01-14ath9k: Fix panic on driver loadSujith1-0/+3
The device has to be marked as invalid before registering the ISR. HW initialization takes place after the ISR has been registered, and the invalid flag is eventually cleared in the ->stop() callback. Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-12ath9k: Cleanup init/deinit routinesSujith1-28/+29
The device initialization and termination functions were messy and convoluted. Introduce helper functions to clarify init_softc() and simplify things in general. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-07drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan1-1/+1
Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-28ath9k: Storage class should be before const qualifierTobias Klauser1-1/+1
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-30ath9k_hw: distinguish single-chip solutions on initial probe printLuis R. Rodriguez1-7/+4
Devices with external radios have revisions which we can count on. On single chip solutions these EEPROM values for these radio revision also exist but are not meaningful as the radios are embedded onto the same chip. Each single-chip device evolves together as one device. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-30ath9k_hw: move mac name and rf name helpers to hw codeLuis R. Rodriguez1-2/+3
These are shared between ath9k and the future ath9k_htc driver. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07atheros: define a common priv structLuis R. Rodriguez1-6/+3
hw code should never use private driver data, but sometimes we need a backpointer so just stuff it on the common ath struct. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>