summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ahb.c
AgeCommit message (Collapse)Author
2016-12-01ath9k: constify ath_bus_ops structureBhumika Goyal
Declare the structure ath_bus_ops as const as it is only passed as an argument to the function ath9k_init_device. This argument is of type const struct ath_bus_ops *, so ath_bus_ops structures with this property can be declared as const. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct ath_bus_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1,e2; @@ ath9k_init_device(e1,e2,&i@p) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct ath_bus_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct ath_bus_ops i; File size before: text data bss dec hex filename 1295 232 0 1527 5f7 ath/ath9k/ahb.o File size after: text data bss dec hex filename 1359 176 0 1535 5ff ath/ath9k/ahb.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-07-19ath9k: simplify the code-paths when not using the built-in EEPROMMartin Blumenstingl
There were two paths in the code for "external" eeprom sources. The code in eeprom.c only handled the cases where the eeprom data was loaded via request_firmware. ahb.c and pci.c on the other hand had some duplicate code which was only used when the eeprom data was passed via ath9k_platform_data. With this change all eeprom data handling is now unified in eeprom.c. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2015-01-15ath9k: Add HW IDs for QCA956xMiaoqing Pan
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-12-06Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file ↵Greg Kroah-Hartman
entries" This reverts commit d32394fae95741d733b174ec1446f27765f80233. It has been reported to cause problems, Jeremiah writes: On an Acer C720 laptop if a suspend is performed the screen freezes, the machine locks up, and according to the indicator lights it does not enter suspend. A hard reset is required to get it running again. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entriesArend van Spriel
Use the helper to get rid of the file operations per debugfs file. The struct ath9k_softc pointer is set as device driver data to be obtained in the seq_file read operation. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20net: wireless: ath: ath9k: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-07-29ath9k: Initialize channel context ops on ahb probeRajkumar Manoharan
Not doing so, could fail on device probing when use_chanctx module param is set to true. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-04-24ath9k: fix race in setting ATH_OP_INVALIDRajkumar Manoharan
The commit "ath9k: move sc_flags to ath_common" moved setting ATH_OP_INVALID flag below ieee80211_register_hw. This is causing the flag never being cleared randomly as the drv_start is called prior to setting flag. Fix this by setting the flag prior to register_hw. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17ath9k: Add QCA953x WMAC platform supportSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-03-17ath9k: move sc_flags to ath_commonOleksij Rempel
we will need it for ath9k_htc, may be other drivers too Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-09-26wireless: ath9k: use dev_get_platdata()Jingoo Han
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-05-27net: wireless: remove unnecessary platform_set_drvdata()Jingoo Han
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-07ath9k: use the devres API for allocations/mappingsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-09ath9k: add platform_device_id for AR9550Gabor Juhos
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06ath9k: Use atomic operationsSujith Manoharan
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>
2011-10-31drivers/net: Add module.h to drivers who were implicitly using itPaul Gortmaker
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-08-08ath9k: remove all references to subsysid, it's never usedPavel Roskin
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22ath9k: add platform device id for AR9330Gabor Juhos
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-19ath9k: Drag the driver to the year 2011Sujith Manoharan
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-04-25ath9k: Fix warning: symbol 'ath9k_platform_id_table' was not declared. ↵Vasanthakumar Thiagarajan
Should it be static? Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-25ath9k: Add AR9340 platform id to id tableVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-12ath9k: Register id table for platform deviceVasanthakumar Thiagarajan
Currently the device id in the platform driver is hardcoded to an id which is specific to AR9130/AR9132 SOCs as it supports only wmac (wireless mac) of these SOCs. But this needs to be dynamic when we want to support different wmac of SOCs. So add id_table to driver to make it extendable to more SOCs. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Acked-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-07wireless:ath: use resource_size() help functionShan Wei
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-28ath9k: fold struct ath_wiphy into struct ath_softcFelix Fietkau
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 Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath: Convert ath_print(.., ATH_DBG_FATAL to ath_errJoe Perches
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-07-27drivers/net/wireless: Use wiphy_<level>Joe Perches
Standardize the logging macros used. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-06ath: Add a bus type fieldSujith
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-01ath9k: fix access to freed data on unloadPavel Roskin
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-14ath9k: Fix panic on driver loadSujith
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 routinesSujith
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>
2009-10-30ath9k_hw: distinguish single-chip solutions on initial probe printLuis R. Rodriguez
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. Rodriguez
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-27ath9k: adjust ahb callbacks to new struct layout to avoid compile errorsMarek Lindner
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07atheros: move bus ops to ath_commonLuis R. Rodriguez
This is the last part to make ath9k hw code core driver agnostic. I believe ath9k_htc can now use use the hw code unmodified. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07atheros: add common debug printingLuis R. Rodriguez
ath9k uses this for now, ath9k_htc is expected to re-use this as well. We lave ath5k as is, but it certainly can also be converted later. The ath9k module parameter and debugfs entry is kept. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-07ath9k: use ath_hw for DPRINTF() and debug init/exitLuis R. Rodriguez
DPRINTF() is used in hw specific related code, as such ensure we don't rely on the private driver core ath_softc struct when calling it. Drivers can then implement their own DPRINTF() as they see fit. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-09ath9k: Store subsystem id in struct hw_versionVasanthakumar Thiagarajan
This subsystem id will be used later to turn on the btcoex support. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-09-08ath9k: propagate errors on ath_init_device() and request_irq()Luis R. Rodriguez
We've cleaned up ath_init_device() and its children enough to pass meaninful errors back from probe. When this fails it means our device could not be initialized and a meaninful error will have been passed. Do the same for request_irq() and also synchronize the error messages while at it. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04ath9k: distinguish between device initialization and ath_softc initLuis R. Rodriguez
We re-label the device driver initialization routines from the ath_softc, the "Software Carrier" fillers. This should make it clearer what each of these do. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-04-22atheros: put atheros wireless drivers into ath/Luis R. Rodriguez
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>