summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/carl9170.h
Commit message (Collapse)AuthorAgeFilesLines
* carl9170: devres-ing hwrng_register usageChristian Lamparter2022-03-101-1/+0
| | | | | | | | devres will take care of freeing the hwrng once it is no longer needed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/d1c16490462a9371ab3cc16a018ef5e08382a35e.1646250537.git.chunkeey@gmail.com
* carl9170: remove get_tid_hChristophe JAILLET2021-04-181-6/+1
| | | | | | | | | | 'get_tid_h()' is the same as 'ieee80211_get_tid()'. So this function can be removed to save a few lines of code. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/68efad7a597159e22771d37fc8b4a8a613866d60.1617399010.git.christophe.jaillet@wanadoo.fr
* carl9170: Convert 'ar9170_qmap' to inline functionLee Jones2020-08-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'ar9170_qmap' is used in some source files which include carl9170.h, but not all of them. A 'defined but not used' warning is thrown when compiling the ones which do not use it. Fixes the following W=1 kernel build warning(s) from drivers/net/wireless/ath/carl9170/carl9170.h:57, In file included from drivers/net/wireless/ath/carl9170/carl9170.h:57, drivers/net/wireless/ath/carl9170/carl9170.h:71:17: warning: ‘ar9170_qmap’ defined but not used [-Wunused-const-variable=] NB: Snipped - lots of these repeat Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200827093351.GA1627017@dell
* carl9170: fix sending URBs with wrong type when using full-speedRonald Wahl2014-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The driver assumes that endpoint 4 is always an interrupt endpoint. Unfortunately the type differs between high-speed and full-speed configurations while in the former case it is indeed an interrupt endpoint this is not true for the latter case - here it is a bulk endpoint. When sending URBs with the wrong type the kernel will generate a warning message including backtrace. In this specific case there will be a huge amount of warnings which can bring the system to freeze. To fix this we are now sending URBs to endpoint 4 using the type found in the endpoint descriptor. A side note: The carl9170 firmware currently specifies endpoint 4 as interrupt endpoint even in the full-speed configuration but this has no relevance because before this firmware is loaded the endpoint type is as described above and after the firmware is running the stick is not reenumerated and so the old descriptor is used. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com> Cc: <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: add support for the new rate control APIChristian Lamparter2013-06-131-0/+3
| | | | | | | | | | | | | | | | | With the new rate control API, the driver can now apply the tx rate to outgoing frames just before they are uploaded to the device. This is important because the rate control can now react to fading or improving links a bit sooner. Also, the driver no longer needs to sort the outgoing frames for sample attempts (which affected the size of A-MPDUs and the throughput of the link). For aggregated data frames, the driver (and rate control) needs only to calculate and apply a single set of tx rates to every subframe of the whole aggregate. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove fast channel change featureChristian Lamparter2013-03-271-7/+1
| | | | | | | | | | | | | | | | | | | | | | Marco Fonseca reported a issue with his carl9170 device: "I'm seeing a problem with the carl driver. If I change channels repeatedly on the 2.4ghz band, monitoring (e.g. tcpdump) will eventually halt. I've seen this on various versions of the carl driver/firmware (both from 1.9.4 to 1.9.7)" <http://marc.info/?l=linux-wireless&m=136381302428113> The culprit was identified as "fast channel change feature" which according to Adrian Chadd is: "... notoriously unreliable and really only fully debugged on some very later chips." <http://marc.info/?l=linux-wireless&m=136416984531380> Therefore, this patch removes the fast channel change feature. The phy will now always have to go through a cold reset when changing channels, but it should no longer become deaf. Cc: Marco Fonseca <marco@tampabay.rr.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove custom NUM_TID and friendsChristian Lamparter2013-01-071-12/+6
| | | | | | | | The commit: "mac80211: introduce IEEE80211_NUM_TIDS and use it" introduced a generic NUM_TID definitions for all everyone. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: don't enable hw crypto offload, if the fw doesn't support itChristian Lamparter2013-01-071-0/+1
| | | | | | | | Previously, op_start would set disable_offload always to false, even if it was set to true by the fw parser. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix sleep in softirq contextRonald Wahl2012-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following bug: usb 1-1.1: restart device (8) BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:654 in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper (usb_poison_urb+0x1c/0xf8) (usb_poison_anchored_urbs+0x48/0x78) (carl9170_usb_handle_tx_err+0x128/0x150) (carl9170_usb_reset+0xc/0x20) (carl9170_handle_command_response+0x298/0xea8) (carl9170_usb_tasklet+0x68/0x184) (tasklet_hi_action+0x84/0xdc) this only happens if the device is plugged in an USB port, the driver is loaded but inactive (e.g. the wlan interface is down). If the device is active everything is fine. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: report A-MPDU statusChristian Lamparter2012-08-211-0/+1
| | | | | | | | | | Because the hardware reports whenever an frame was either at the start, in the middle or at the end of a A-MPDU, we can easily report the information for radiotap. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: move TX station pointer and restructure TXThomas Huehn2012-07-311-1/+3
| | | | | | | | | | | | | | Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* carl9170: fix HT peer BA session corruptionChristian Lamparter2012-07-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds an alternative tx status path for BlockAck Requests as the hardware doesn't recognize that a BlockAck Requests is usually acked with a BlockAck and not a legacy ACK. Without this patch, the stack would constantly resent old and stale BARs. So, depending on the receiver stack, this could lead to: - "stuck" ba sessions and package loss, as the stale BAR would reset the sequence each time. - lots of reorder releases. - ... Reported-by: Sean Patrick Santos <quantheory@gmail.com> Reported-by: Mikołaj Kuligowski <mikolaj.q@wp.pl> Reported-by: Per-Erik Westerberg <per-erik.westerberg@bredband.net> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: allow users to lower output power levelChristian Lamparter2012-01-271-0/+1
| | | | | | | | | | This patch implements a simple way of reducing the output power of the device by a configurable upper limit. Requested-by: Harshal Chhaya <harshal@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove eeprom data injection optionChristian Lamparter2012-01-241-1/+0
| | | | | | | | | | | | In the early days, this was a quite useful software feature for testing different regdomains and chain configurations without adding debugfs cruft into the driver. Nowadays, the driver's phy code seems to be stable and there's no need for it anymore. Therefore I decided to removed altogether. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: export HW random number generatorChristian Lamparter2011-08-241-0/+12
| | | | | | | | | | | | | All AR9170 hardware have a 16-Bit random number generator. The documentation claims the values are suitable for "security keys". The "throughput" is around 320Kibit/s. It's slow, but it does work without introducing any special offload firmware commands. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: improve site surveyChristian Lamparter2011-08-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | The firmware keeps track of channel usage. This data can be used by the automatic channel selection to find the *best* channel. Survey data from wlan22 frequency: 2412 MHz [in use] noise: -86 dBm channel active time: 3339608 ms channel busy time: 270982 ms channel transmit time: 121515 ms Survey data from wlan22 frequency: 2417 MHz noise: -86 dBm channel active time: 70 ms channel busy time: 2 ms channel transmit time: 1 ms Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix timekeeping for HW_COUNTER firmwaresChristian Lamparter2011-08-241-0/+1
| | | | | | | | | | AR9170_PWR_REG_PLL_ADDAC is used to set the main clock divisor which affects the AHB/CPU speed. Because this would interfere with the firmware internal timekeeping, the function has to be moved into the firmware. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix sparse warnings enabled by CONFIG_SPARSE_RCU_POINTERPavel Roskin2011-07-201-4/+4
| | | | | | Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: move beacon_update into tx.cChristian Lamparter2011-07-181-1/+1
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: allow PSM if the 5 GHz band is selectedChristian Lamparter2011-07-051-1/+0
| | | | | Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: import 1.9.4 firmware headersChristian Lamparter2011-07-051-0/+2
| | | | | | | | | | | | | | This patch imports all shared header changes from carl9170fw.git. * update copyright boilerplate * add some more strategic __aligned(4). * WoWLAN Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge ↵John W. Linville2011-05-241-0/+4
|\ | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
| * carl9170: advertise interface combinationsChristian Lamparter2011-05-161-0/+4
| | | | | | | | | | | | | | | | | | In order to provide multiple interfaces for a single device, the driver will be required to advertise all possible interface configurations to the stack. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2011-05-051-0/+2
|\| | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/libertas/if_cs.c drivers/net/wireless/rtlwifi/pci.c net/bluetooth/l2cap_sock.c
| * carl9170: improve unicast PS bufferingChristian Lamparter2011-04-261-0/+2
| | | | | | | | | | | | | | | | | | Using the ieee80211_sta_block allows the PS code to handle awake->doze->awake transitions of our clients in a race-free manner. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6Linus Torvalds2011-04-071-1/+1
|\ \ | |/ |/| | | | | * 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6: Fix common misspellings
| * Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | | | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* | carl9170: Fix tx aggregation problems with some clientsChristian Lamparter2011-03-291-0/+1
|/ | | | | | | | | | | | | Some clients seem to rely upon the reception of BlockAckReqs to flush their rx reorder buffer. In order to fix aggregation for these clients carl9170 should set IEEE80211_TX_STAT_AMPDU_NO_BACK to generate a BlockAckReq if the transmission of an AMPDU subframe fails. This fixes aggregation problems with Intel 5100 Windows STAs (and maybe others as well). Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make tx() operation return voidJohannes Berg2011-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: utilize fw seq counter for mgmt/non-QoS data framesChristian Lamparter2011-01-271-0/+1
| | | | | | | | | | "mac80211 will properly assign sequence numbers to QoS-data frames but cannot do so correctly for non-QoS-data and management frames because beacons need them from that counter as well and mac80211 cannot guarantee proper sequencing." Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix spurious restart due to high latencyChristian Lamparter2010-11-151-1/+2
| | | | | | | | | | | | | | RX Stress tests of unidirectional bulk traffic with bitrates of up to 220Mbit/s have revealed that the fatal-event recovery logic [which was solely triggered by an out-of-rx-buffer situation] is too aggressive. The new method now "pings" the device and then decides - based on the response - whenever a restart is needed or not. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix typosHauke Mehrtens2010-11-151-1/+1
| | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: support firmware-based rx filterChristian Lamparter2010-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | The hardware rx-filter was essentially disabled, because of a serve, yet unidentifiable problem with iwlagn. Due to these circumstances the driver and mac80211 were left with the job of filtering. This is very unfortunate and has proven to be expensive in terms of latency, memory and load. Therefore the new 1.8.8.3 firmware introduces a flexible filtering infrastructure which allows the driver to offload some of the checks (FCS & PLCP crc check, RA match, control frame filter, etc...) whenever possible. Note: This patch also includes all changes to the shared headers files since the inclusion. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: remove lost-frame workaroundChristian Lamparter2010-09-281-1/+0
| | | | | | | | | | | | | | | | This patch removes some cruft, which survived the RFC review phase. Originally, carl9170_tx_ampdu_queue erroneously dropped a lot of frames. As a result the ampdu scheduler bogged down quite frequently and the affected BA session timed out. However this bug has been fixed and the WA and its debugfs counter is no longer useful. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: reinit phy after HT settings have changedChristian Lamparter2010-09-211-0/+1
| | | | | | | | | | The driver has a set of different initvals for 20 MHz vs dynamic HT2040 operation. Because we can't change some of the registers "in-flight", the driver needs to perform a warm reset. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: don't load bogus nf of chain 1Christian Lamparter2010-09-211-1/+1
| | | | | | | According to Atheros, chain 1 is not connected. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: mac80211 glue and command interfaceChristian Lamparter2010-09-141-0/+626
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>