summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath.h
AgeCommit message (Collapse)Author
2018-03-29ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addrJoe Perches
Remove the static array and use the generic routine to set the Ethernet broadcast address. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-11-15ath9k: add a helper to get the string representation of ath_bus_typeMartin Blumenstingl
This can be used when the ath_bus_type has to be presented in a log message or firmware filename. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-05-09ath9k: Add a new debug flag for FFT spectral scanNick Kossifidis
FFT spectral scan is a functionality that makes sense to have its own debug flag. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-03-30ath9k_htc: add new WMI_REG_RMW_CMDID commandOleksij Rempel
Since usb bus add extra delay on each request, a command with read + write requests is too expensive. We can dramtically reduce usb load by moving this command to firmware. In my tests, this patch will reduce channel scan time for about 5-10 seconds. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-02-03ath9k: Check WOW triggers properlySujith Manoharan
This patch makes sure that valid WOW triggers are present before trying to suspend the device. Also, introduce and use ATH_OP_WOW_ENABLED to bypass PCI suspend and clear it in resume(). Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2014-11-19Merge commit '4e6ce4dc7ce71d0886908d55129d5d6482a27ff9' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-11-11ath: add struct ath_ps_opsOleksij Rempel
we will need it to make common code Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-27ath9k: Fix address managementSujith Manoharan
Since both the arguments need to satisfy the alignment requirements of ether_addr_copy(), use memcpy() in cases where there will be no big performance benefit and make sure that ether_addr_copy() calls use properly aligned arguments. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-23ath: use CTL region from cfg80211 if unset in EEPROMFelix Fietkau
Many AP devices do not have the proper regulatory domain programmed in EEPROM. Instead they expect the software to set the appropriate region. For these devices, the country code defaults to US, and the driver uses the US CTL tables as well. On devices bought in Europe this can lead to tx power being set too high on the band edges, even if the cfg80211 regdomain is set correctly. Fix this issue by taking into account the DFS region, but only when the EEPROM regdomain is set to default. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-10-02ath: Add support for tracingSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-16ath9k: add dynamic ACK timeout estimationLorenzo Bianconi
Add dynamic ACK timeout estimation algorithm based on ACK frame RX timestamp, TX frame timestamp and frame duration. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Tested-by: Philippe Duchein <wireless-dev@duchein.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-08-28ath9k: Add a debug level for channel contextSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-06-19ath9k: Add ATH_OP_MULTI_CHANNELFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.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>
2014-02-28ath9k: move ath9k_init_channels_rates to common-initOleksij Rempel
and rename it to ath9k_cmn_init_channels_rates. sbands are move to ath_common as well. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-02-24Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville
2014-02-14ath: remove camel case from struct reg_dmn_pair_mappingKalle Valo
Fixes a checkpatch warning in ath10k: drivers/net/wireless/ath/ath10k/mac.c:1636: WARNING: Avoid CamelCase: <regpair->regDmnEnum> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-02-12ath: add last_rssi to ath_commonOleksij Rempel
we need access to this variable from common functions. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-01-16ath: add common function ath_is_mybeaconOleksij Rempel
this function is used by most ath driver, so it can be moved here. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-05ath9k: Cleanup WLAN/BT RX diversitySujith Manoharan
For single-chain WLAN+BT cards, the BT antenna can be used for WLAN RX when the BT interface is disabled. Rename the modparam "antenna_diversity" to "bt_ant_diversity" to clarify this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-18ath9k: Merge HWTIMER debug level with BTCOEXSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-24ath9k: Add a module parameter to enable diversitySujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-12ath: Add Wake-on-Wireless debug maskMohammed Shafi Shajakhan
to help the developers and users to debug/know whats happening with WoW Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com> Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Cc: vadivel@qca.qualcomm.com Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-25ath9k: fix dynamic WEP related regressionFelix Fietkau
commit 7a532fe7131216a02c81a6c1b1f8632da1195a58 ath9k_hw: fix interpretation of the rx KeyMiss flag This commit used the rx key miss indication to detect packets that were passed from the hardware without being decrypted, however it seems that this bit is not only undefined in the static WEP case, but also for dynamically allocated WEP keys. This caused a regression when using WEP-LEAP. This patch fixes the regression by keeping track of which key indexes refer to CCMP keys and only using the key miss indication for those. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12ath9k: Add wiphy name to log messages.Ben Greear
On systems with multiple NICs, it's nice to know which one is producing warnings. Here is an example of the new ouput: ath: wiphy0: Failed to stop TX DMA, queues=0x005! Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-19ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOOJoe Perches
Add ATH_DBG_ to macros to shorten the uses and reduce the line count. Coalesce ath_dbg formats. Add missing spaces to coalesced formats. Add missing newline terminations to ath_dbg formats. Align ath_dbg arguments where appropriate. Standardize ath_dbg formats without periods. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-15ath: add a debug level for DFSZefir Kurtisi
This can later be used by other drivers that implement DFS support. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-15ath: document ATH_DBG_MCILuis R. Rodriguez
A debug level was added to the ath module for printing MCI messages but no documentation was provided. Clarify that MCI is the Message Coexistence Interface, a private protocol used exclusively for WLAN-BT coexistence starting from AR9462. Cc: wtsao@qca.qualcomm.com Cc: rmanohar@qca.qualcomm.com Cc: mohammed@qca.qualcomm.com Cc: senthilb@qca.qualcomm.com Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13ath: optimize processing of CTLs for country IEs for world roaming cardsLuis R. Rodriguez
When we receive a country IE hint and we have a world roaming card we can optimize output power further by ensuring that we use the calibrated data for the country by using that country's own CTL data. That is -- when world roaming and when we process a country IE we no longer need to use the lowest output power of all CTLs instead we use an optimized CTL output power for that specific country. We accomplish this by copying the regulatory data prior on init and restoring it when cfg80211 tells us it gets a core hint. Core hints are only sent on init and when it wants to restore reguulatory settings. We take advantage of this fact and apply the cached regulatory data when we get a core hint. When we get a country IE hint though we process the regulatory data as if programmed for a specific country. Tested-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-22Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Conflicts: drivers/net/wireless/iwlegacy/iwl-debugfs.c drivers/net/wireless/iwlegacy/iwl-rx.c drivers/net/wireless/iwlegacy/iwl-scan.c drivers/net/wireless/iwlegacy/iwl-tx.c include/net/bluetooth/bluetooth.h
2011-11-08ath9k: Add btcoex profile management support for AR9462Rajkumar Manoharan
AR9462 chips have the capabilities to provoide bluetooth profile information. For non-AR9462 btcoex chips, the BT priority traffic was identified by periodically polling the respective registers and updated dutycycle, stomptype, etc. As AR9462 chip offers the BT profile informations, let us make use of that to update aggregation limit, dutycycle, stomptype and wieghtages. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-31treewide: use __printf not __attribute__((format(printf,...)))Joe Perches
Standardize the style for compiler based printf format verification. Standardized the location of __printf too. Done via script and a little typing. $ grep -rPl --include=*.[ch] -w "__attribute__" * | \ grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \ xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }' [akpm@linux-foundation.org: revert arch bits] Signed-off-by: Joe Perches <joe@perches.com> Cc: "Kirill A. Shutemov" <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-11ath: remove ath_regulatory::current_rd_extFelix Fietkau
It is unused since the previous dead code that was using it had been removed earlier. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11ath9k_hw: clean up tx power handlingFelix Fietkau
The code for handling various restrictions concerning regulatory limits, antenna gain, etc. is very convoluted and duplicated across various EEPROM parsing implementations, making it hard to review. This patch partially cleans up the mess by unifying regulatory limit handling in one function and simplifying handling of antenna gain. It also removes unused transmit power scaling arrays from the EEPROM code, which belonged to an unimplemented API that isn't supposed to be in the driver anyway. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-14ath9k: eliminate common->{rx,tx}_chainmaskFelix Fietkau
we already have ah->{rx,tx}chainmask for the same purpose Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-30ath: Make ath_printk void not int and remove unused struct ath_common *Joe Perches
Changing the return type and removing the unused argument from ath_printk reduces code size. Add an __always_unused struct ath_common * to the macros that call ath_printk to avoid unused variable warnings. $ size drivers/net/wireless/ath/built-in.o* text data bss dec hex filename 1159859 16235 212000 1388094 152e3e drivers/net/wireless/ath/built-in.o.new 1164175 16235 212032 1392442 153f3a drivers/net/wireless/ath/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-30ath: Make ath_dbg void not intJoe Perches
The return value is never used so make it void. Reduces object size a tiny bit. $ size drivers/net/wireless/ath/built-in.o* text data bss dec hex filename 1164175 16235 212032 1392442 153f3a drivers/net/wireless/ath/built-in.o.new 1164819 16235 212032 1393086 1541be drivers/net/wireless/ath/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01ath9k: Add a debug entry to start/stop ANIMohammed Shafi Shajakhan
this helps the user to start/stop ANI dynamically. Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-14ath: unshare struct ath_bus_ops between ath5k and ath9kFelix Fietkau
This struct is not used in any common code, and moving it out of the ath header makes it easier to add more driver specific ops. 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>
2011-03-30ath9k_hw: add a new register op for read-mask-writeFelix Fietkau
Reduces the number of calls to register ops. On MIPS this reduces the ath9k_hw binary size from 321k down to 310k Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-19ath9k_htc: Add multiple register read APISujith Manoharan
This would decrease latency in reading bulk registers. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-09ath: fix build break with ATH_DBG_WARN_ON_ONCEJohn W. Linville
Description by Hauke: "If CONFIG_ATH_DEBUG=y is set ATH_DBG_WARN_ON_ONCE uses WARN_ON_ONCE and returns something, but if CONFIG_ATH_DEBUG is not set it does not return anything. Now ATH_DBG_WARN_ON_ONCE is used in the boolean expression in an if case and is not returning anything and causes a compile error. CC [M] /drivers/net/wireless/ath/ath9k/main.o /drivers/net/wireless/ath/ath9k/main.c: In function ‘ath_isr’: /drivers/net/wireless/ath/ath9k/main.c:769: error: expected expression before ‘do’ make[5]: *** [/drivers/net/wireless/ath/ath9k/main.o] Error 1 make[4]: *** [/drivers/net/wireless/ath/ath9k] Error 2" Reported-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath9k_htc: Cleanup device identificationSujith Manoharan
ath.ko is a common module shared between ath5k, ar9170usb, ath9k and ath9k_htc. Adding driver specific data to the shared structure would impact all the drivers. Handling USB device recognition for devices specific to ath9k_htc can be handled within the driver itself. Also, AR7010 refers to the processor used in both AR9280/AR9287 based devices. Rename the device enumerations accordingly. While at it, check properly for the bus type when choosing the EEPROM base address for UB95. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath9k: Make DMA warning in ath_stoprecv WARN_ON_ONCE.Ben Greear
This decreases spammage in the log. A single line message will still be printed, so users can be aware that problem exists. Signed-off-by: Ben Greear <greearb@candelatech.com> Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath9k: Enable extended synch for AR9485 to fix L0s recovery issueVasanthakumar Thiagarajan
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-07ath: Add and use ath_printk and ath_<level>Joe Perches
Add ath_printk and ath_<level> similar to dev_printk and dev_<level> from device.h This allows a more gradual rename of ath_print to to ath_dbg or perhaps ath_debug. This basically removes debug.h leaving only an #define ath_printk ath_dbg there and moving all the ATH_DBG_<foo> enums to ath.h I do not think there's much purpose for struct ath_common * being passed to the ath_printk functions, but perhaps there might be. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-29ath9k: Reintroduce modparam to enable btcoexVasanthakumar Thiagarajan
It is not ideal to enable btcoex based on subsys id as it is not unique, they are so random. It is also a pain keeping all of them in a table to enable btcoex for a particular hw. Going back to the old idea. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-24ath: Add a driver_info bitmask fieldRajkumar Manoharan
The driver_info stores the device category information which is used to load appropriate device firmware, select firmware offset and eeprom starting location. The driver_info is accessed across ath9k_htc and ath9k_hw. Hence placed under common structure. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-10-11ath9k_hw: move the cycle counter tracking to athFelix Fietkau
Instead of keeping track of wraparound, clear the counters on every access and keep separate deltas for ANI and later survey use. Also moves the function for calculating the 'listen time' for ANI Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>