#
27ce06d0 |
|
17-Dec-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
wifi: ath9k: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://msgid.link/20231117093056.873834-11-u.kleine-koenig@pengutronix.de
|
#
061115fb |
|
22-Jul-2023 |
Dongliang Mu <dzm91@hust.edu.cn> |
wifi: ath9k: fix printk specifier Smatch reports: ath_pci_probe() warn: argument 4 to %lx specifier is cast from pointer ath_ahb_probe() warn: argument 4 to %lx specifier is cast from pointer Fix it by modifying %lx to %p in the printk format string. Note that with this change, the pointer address will be printed as a hashed value by default. This is appropriate because the kernel should not leak kernel pointers to user space in an informational message. If someone wants to see the real address for debugging purposes, this can be achieved with the no_hash_pointers kernel option. Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230723040403.296723-1-dzm91@hust.edu.cn
|
#
d7ceee80 |
|
07-Apr-2022 |
Yang Li <yang.lee@linux.alibaba.com> |
ath9k: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq_byname() already prints an error. Eliminate the follow coccicheck warning: ./drivers/net/wireless/ath/ath9k/ahb.c:103:2-9: line 103 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220408000113.129906-2-yang.lee@linux.alibaba.com
|
#
9503a1fc |
|
14-Mar-2022 |
Minghao Chi <chi.minghao@zte.com.cn> |
ath9k: Use platform_get_irq() to get the interrupt It is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ) for requesting IRQ's resources any more, as they can be not ready yet in case of DT-booting. platform_get_irq() instead is a recommended way for getting IRQ even if it was not retrieved earlier. It also makes code simpler because we're getting "int" value right away and no conversion from resource to int is required. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20220314064501.2114002-1-chi.minghao@zte.com.cn
|
#
4bdc0d67 |
|
06-Jan-2020 |
Christoph Hellwig <hch@lst.de> |
remove ioremap_nocache and devm_ioremap_nocache ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
|
#
ac316725 |
|
19-Jun-2018 |
Randy Dunlap <rdunlap@infradead.org> |
headers: separate linux/mod_devicetable.h from linux/platform_device.h At over 4000 #includes, <linux/platform_device.h> is the 9th most #included header file in the Linux kernel. It does not need <linux/mod_devicetable.h>, so drop that header and explicitly add <linux/mod_devicetable.h> to source files that need it. 4146 #include <linux/platform_device.h> After this patch, there are 225 files that use <linux/mod_devicetable.h>, for a reduction of around 3900 times that <linux/mod_devicetable.h> does not have to be read & parsed. 225 #include <linux/mod_devicetable.h> This patch was build-tested on 20 different arch-es. It also makes these drivers SubmitChecklist#1 compliant. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kbuild test robot <lkp@intel.com> # drivers/media/platform/vimc/ Reported-by: kbuild test robot <lkp@intel.com> # drivers/pinctrl/pinctrl-u300.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
8ca5a607 |
|
27-Nov-2016 |
Bhumika Goyal <bhumirks@gmail.com> |
ath9k: constify ath_bus_ops structure 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>
|
#
56398519 |
|
09-Jul-2016 |
Martin Blumenstingl <martin.blumenstingl@googlemail.com> |
ath9k: simplify the code-paths when not using the built-in EEPROM 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>
|
#
2131fabb |
|
18-Dec-2014 |
Miaoqing Pan <miaoqing@qca.qualcomm.com> |
ath9k: Add HW IDs for QCA956x 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>
|
#
f1c488a7 |
|
06-Dec-2014 |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file 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>
|
#
d32394fa |
|
09-Nov-2014 |
Arend van Spriel <arend@broadcom.com> |
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries 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>
|
#
d250fe66 |
|
20-Oct-2014 |
Wolfram Sang <wsa@kernel.org> |
net: wireless: ath: ath9k: drop owner assignment from platform_drivers 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>
|
#
cf9ae8fa |
|
25-Jul-2014 |
Rajkumar Manoharan <rmanohar@qti.qualcomm.com> |
ath9k: Initialize channel context ops on ahb probe 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>
|
#
8c7ae357 |
|
23-Apr-2014 |
Rajkumar Manoharan <rmanohar@qti.qualcomm.com> |
ath9k: fix race in setting ATH_OP_INVALID 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>
|
#
c08148bb |
|
17-Mar-2014 |
Sujith Manoharan <c_manoha@qca.qualcomm.com> |
ath9k: Add QCA953x WMAC platform support Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
eefa01dd |
|
27-Feb-2014 |
Oleksij Rempel <linux@rempel-privat.de> |
ath9k: move sc_flags to ath_common 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>
|
#
8f616c6d |
|
10-Sep-2013 |
Jingoo Han <jg1.han@samsung.com> |
wireless: ath9k: use dev_get_platdata() 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>
|
#
785ec305 |
|
27-May-2013 |
Jingoo Han <jg1.han@samsung.com> |
net: wireless: remove unnecessary platform_set_drvdata() 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>
|
#
b81950b1 |
|
12-Dec-2012 |
Felix Fietkau <nbd@openwrt.org> |
ath9k: use the devres API for allocations/mappings 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>
|
#
9476f4d6 |
|
03-Jul-2012 |
Gabor Juhos <juhosg@openwrt.org> |
ath9k: add platform_device_id for AR9550 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>
|
#
781b14a3 |
|
04-Jun-2012 |
Sujith Manoharan <c_manoha@qca.qualcomm.com> |
ath9k: Use atomic operations 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>
|
#
9d9779e7 |
|
03-Jul-2011 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
drivers/net: Add module.h to drivers who were implicitly using it 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>
|
#
eb93e891 |
|
23-Jul-2011 |
Pavel Roskin <proski@gnu.org> |
ath9k: remove all references to subsysid, it's never used Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
e9b7c591 |
|
21-Jun-2011 |
Gabor Juhos <juhosg@openwrt.org> |
ath9k: add platform device id for AR9330 Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
5b68138e |
|
17-May-2011 |
Sujith Manoharan <Sujith.Manoharan@atheros.com> |
ath9k: Drag the driver to the year 2011 The Times They Are a-Changin'. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
0a6c9b1b |
|
21-Apr-2011 |
Vasanthakumar Thiagarajan <vasanth@atheros.com> |
ath9k: Fix warning: symbol 'ath9k_platform_id_table' was not declared. Should it be static? Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
247eee0e |
|
19-Apr-2011 |
Vasanthakumar Thiagarajan <vasanth@atheros.com> |
ath9k: Add AR9340 platform id to id table Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
6f11c819 |
|
11-Apr-2011 |
Vasanthakumar Thiagarajan <vasanth@atheros.com> |
ath9k: Register id table for platform device 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>
|
#
9ac47933 |
|
07-Mar-2011 |
Shan Wei <shanwei@cn.fujitsu.com> |
wireless:ath: use resource_size() help function Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
9ac58615 |
|
24-Jan-2011 |
Felix Fietkau <nbd@openwrt.org> |
ath9k: fold struct ath_wiphy into struct ath_softc Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
7545daf4 |
|
24-Jan-2011 |
Felix Fietkau <nbd@openwrt.org> |
ath9k: remove support for virtual wiphys Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
3800276a |
|
02-Dec-2010 |
Joe Perches <joe@perches.com> |
ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err 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>
|
#
c96c31e4 |
|
26-Jul-2010 |
Joe Perches <joe@perches.com> |
drivers/net/wireless: Use wiphy_<level> Standardize the logging macros used. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
497ad9ad |
|
31-Mar-2010 |
Sujith <Sujith.Manoharan@atheros.com> |
ath: Add a bus type field 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>
|
#
ab5132a2 |
|
30-Jan-2010 |
Pavel Roskin <proski@gnu.org> |
ath9k: fix access to freed data on unload 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>
|
#
5e4ea1f0 |
|
13-Jan-2010 |
Sujith <Sujith.Manoharan@atheros.com> |
ath9k: Fix panic on driver load 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>
|
#
285f2dda |
|
07-Jan-2010 |
Sujith <Sujith.Manoharan@atheros.com> |
ath9k: Cleanup init/deinit routines 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>
|
#
f934c4d9 |
|
26-Oct-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
ath9k_hw: distinguish single-chip solutions on initial probe print 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>
|
#
2da4f01a |
|
26-Oct-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
ath9k_hw: move mac name and rf name helpers to hw code 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>
|
#
e307fcf0 |
|
14-Oct-2009 |
Marek Lindner <lindner_marek@yahoo.de> |
ath9k: adjust ahb callbacks to new struct layout to avoid compile errors Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
#
5bb12791 |
|
14-Sep-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
atheros: move bus ops to ath_common 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>
|
#
c46917bb |
|
13-Sep-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
atheros: add common debug printing 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>
|
#
4d6b228d |
|
07-Sep-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
ath9k: use ath_hw for DPRINTF() and debug init/exit 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>
|
#
aeac355d |
|
09-Sep-2009 |
Vasanthakumar Thiagarajan <vasanth@atheros.com> |
ath9k: Store subsystem id in struct hw_version 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>
|
#
580171f7 |
|
02-Sep-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
ath9k: propagate errors on ath_init_device() and request_irq() 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>
|
#
1e40bcfa |
|
03-Aug-2009 |
Luis R. Rodriguez <lrodriguez@atheros.com> |
ath9k: distinguish between device initialization and ath_softc init 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>
|
#
203c4805 |
|
30-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>
|