summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
Commit message (Collapse)AuthorAgeFilesLines
* ath9k_htc: Stop ANI before doing hw_resetRajkumar Manoharan2014-05-141-1/+4
| | | | | | | | | | | | | During remain on channel request, ANI worker thread is not stopped before doing hw reset. This is causing kernel crash in hw_per_calibration. This change ensures that ANI is stopped before doing chip reset and it will be rescheduled later when the chip is configured back to home channel and having valid bss. Reported-by: David Herrmann <dh.herrmann@gmail.com> Tested-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: remove tid->paused flagFelix Fietkau2014-04-303-17/+3
| | | | | | | | | | | | | | | There are some corner cases where the driver could get stuck with a full tid queue that is paused, leading to a software tx queue hang. Since the tx queueing rework, pausing per-tid queues on aggregation session setup is no longer necessary. The driver will assign sequence numbers to buffered frames when a new session is established, in order to get the correct starting sequence number. mac80211 prevents new frames from entering the queue during setup. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: do not lower ANI setting below default on AR913xFelix Fietkau2014-04-301-0/+6
| | | | | | | | | | | | | | When the amount of noise fluctuates strongly, low immunity settings can sometimes disrupt signal detection on AR913x chips. When that happens, no OFDM/CCK errors are reported anymore, and ANI tunes the radio to the lowest immunity settings. Usually rx/tx fails as well in that case. To fix this, keep noise immunity settings at or above ANI default level, which will keep radio parameters at or above INI values. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix race in setting ATH_OP_INVALIDRajkumar Manoharan2014-04-243-9/+3
| | | | | | | | | | | 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>
* ath9k: add a recv budgetTim Harvey2014-04-221-0/+4
| | | | | | | | | | | | | | | | | | | | Implement a recv budget so that in cases of high traffic we still allow other taskets to get processed. Without this, we can encounter a host of issues during high wireless traffic reception depending on system load including rcu stall's detected (ARM), soft lockups, failure to service critical tasks such as watchdog resets, and triggering of the tx stuck tasklet. The same thing was proposed previously by Ben: http://www.spinics.net/lists/linux-wireless/msg112891.html The only difference here is that I make sure only processed packets are counted in the budget by checking at the end of the rx loop. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix possible hang on flushTim Harvey2014-04-221-3/+2
| | | | | | | | | | | | If a flush is requested, make sure to clear the descriptor once we've processed it. This resolves a hang that will occur if all RX descriptors are full when a flush is requested. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix a scheduling while atomic bug in CSA handlingFelix Fietkau2014-04-091-4/+3
| | | | | | | | | | Commit "ath9k: prepare for multi-interface CSA support" added a call to ieee80211_iterate_active_interfaces in atomic context (beacon tasklet), which is crashing. Use ieee80211_iterate_active_interfaces_atomic instead. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: reduce ANI firstep range for older chipsFelix Fietkau2014-04-091-3/+1
| | | | | | | | | Use 0-8 instead of 0-16, which is closer to the old implementation. Also drop the overwrite of the firstep_low parameter to improve stability. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Enable DFS only when ATH9K_DFS_CERTIFIEDJanusz Dziedzic2014-04-091-0/+2
| | | | | | | | | | | Add DFS interface combination only when CONFIG_ATH9K_DFS_CERTIFIED is set. In other case user can run CAC/beaconing without proper handling of pulse events (without radar detection activated). Reported-by: Cedric Voncken <cedric.voncken@acksys.fr> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: set IEEE80211_TX_STAT_AMPDU for acked aggregated framesChun-Yeow Yeoh2014-04-091-1/+4
| | | | | | | | Frame aggregation requires the IEEE80211_TX_STAT_AMPDU to be set so that mac80211 can report the last_tx_rate correctly. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2014-03-311-1/+1
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * carl9170: Remove casts of pointer to same typeJoe Perches2014-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casting a pointer to a pointer of the same type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast_2.cocci @@ type T; T *foo; @@ - (T *)foo + foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2014-03-252-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Documentation/devicetree/bindings/net/micrel-ks8851.txt net/core/netpoll.c The net/core/netpoll.c conflict is a bug fix in 'net' happening to code which is completely removed in 'net-next'. In micrel-ks8851.txt we simply have overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | ath9k: Fix sequence number assignment for non-data framesHelmut Schaa2014-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 558ff225de80ac95b132d3a115ddadcd64498b4f (ath9k: fix ps-poll responses under a-mpdu sessions) non-data frames would have gotten a sequence number from a TIDs sequence counter instead of using the global sequence counter. This can lead to instable connections. To fix this only select the correct TID if we are processing a data frame. Furthermore, prevent non-data frames to get a sequence number from a TID sequence counter by adding a check to ath_tx_setup_buffer. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_hw: fix unreachable code in baseband hang detection codeFelix Fietkau2014-03-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit "ath9k: reduce baseband hang detection false positive rate" added a delay in the loop checking the baseband state, however it was unreachable due to previous 'continue' statements. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | Merge branch 'master' of ↵John W. Linville2014-03-2149-1383/+1595
|\ \ \ | | |/ | |/| | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * | wil6210: fix race between disconnect and Tx NAPIVladimir Kondratiev2014-03-176-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When disconnecting some CID, corresponded Tx vring get released. During vring release, all descriptors get freed. It is possible that Tx NAPI working on the same vring simultaneously. If it happens, descriptor may be double freed. To protect from the race above, make sure NAPI won't process the same vring. Introduce 'enabled' flag in the struct vring_tx_data. Proceed with Tx NAPI only if 'enabled' flag set. Prior to Tx vring release, clear this flag and make sure NAPI get synchronized. NAPI enablement status protected by wil->mutex, add protection where it was missing and check for it. During reset, disconnect all peers first, then proceed with the Rx vring. It allows for the disconnect flow to observe proper 'wil->status' and correctly notify cfg80211 about connection status change Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: add memory barriers for the reset flowVladimir Kondratiev2014-03-171-0/+6
| | | | | | | | | | | | | | | | | | | | | make sure reset flow executed in order Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: target reset flow updateVladimir Kondratiev2014-03-172-6/+8
| | | | | | | | | | | | | | | | | | | | | Use 'real' indication for hardware state. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: use GROVladimir Kondratiev2014-03-172-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | GRO is easy to enable when already using NAPI framework, and it improves CPU utilisation. Enable it by default. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: serialize fw_recovery and start_apVladimir Kondratiev2014-03-172-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | These methods can change device state, serialize with others similar ones like up/down Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: fix secondary connectVladimir Kondratiev2014-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | when STA receiving connect() when already connected, it should return error Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: fw error recoveryVladimir Kondratiev2014-03-174-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | upon fw error interrupt - in STA mode, disconnect/cancel scan and then reset FW/HW added module param - no_fw_recovery which is false by default Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: Fix kernel oops in reset flowVladimir Kondratiev2014-03-173-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wil_reset() removes vring's At the same time NAPI may be active performing Rx/Tx completion. If this happens, Rx/Tx polling functions going to access already removed vrings Make sure NAPI is idle and won't be started prior to vring removal. For this, track NAPI enabled state Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: fix memory leak in the AP flowVladimir Kondratiev2014-03-172-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When switching between STA and AP modes, memory allocated for Rx vring leaks This is because start_ap() allocates Rx vring but stop_ap() do not free it. Logically, Rx vring is not valid (HW can't use it anymore), so free it in reset() Also, check double init for Rx vring and bail out with -EINVAL Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: reduce printingVladimir Kondratiev2014-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | Convert 2 often printed messages to dynamic ones Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: reset on power goodVladimir Kondratiev2014-03-172-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Configure hardware to perform full reset on "power good". This mean, reset HW on system boot. This improves card stability. By default this is off. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: sort HW registers definitionsVladimir Kondratiev2014-03-172-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Put all registers in order for easier navigation; fix naming to reflect hardware cluster Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: fix for HW bug in interrupt setup logicVladimir Kondratiev2014-03-173-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Hardware bug triggered by the MSI init while INTx asserted for some reason. De-assert INTx prior to MSI set-up Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: report reset timeVladimir Kondratiev2014-03-171-3/+3
| | | | | | | | | | | | | | | | | | | | | Useful to detect hardware problems Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: reduce dmesg pollution after FW crashVladimir Kondratiev2014-03-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | When FW crashes, dmesg get polluted with the "FW not ready" error message. Print it only once per FW lifecycle Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: update target reset to support new HWVladimir Kondratiev2014-03-173-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | Support for new chip revision. Revision read from the internal register, PCIE config's "revision id" register do not indicate HW version properly Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: generalize tx desc mappingVladimir Kondratiev2014-03-172-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | Introduce enum to describe mapping type; allow 'none' in addition to 'single' and 'page'; this is preparation for GSO Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: add scatter-gather supportVladimir Kondratiev2014-03-174-67/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting fragmented skb for Tx, assign skb to the last descriptor and set number of fragments in the 1-st one On Tx complete, HW sets "DU" bit in Tx descriptor only for the last descriptor; so search for it using number of fragments field. Middle descriptors may have "DU" bit not set by the hardware. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: enable scan while connectedVladimir Kondratiev2014-03-172-8/+2
| | | | | | | | | | | | | | | | | | | | | New firmware do support scan while connected. Enable it. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: Block data till "data port open" reportedVladimir Kondratiev2014-03-175-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connection established, as reported by WMI_CONNECT_EVENTID, 4-way handshaking required for the secure connection is not done yet. It is indicated by another WMI event. Wait for it and only then allow data traffic. In case of non-secure connection, FW reports "data port open" immediately after connection. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | wil6210: Helpers to deal with 'cidxtid' fieldsVladimir Kondratiev2014-03-172-1/+26
| | | | | | | | | | | | | | | | | | | | | Encode/decode helpers Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: Fix temperature compensationSujith Manoharan2014-03-171-24/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | The registers for temperature compensation need to be programmed only for active chains. Use the TX chainmask to make sure that this is done properly for QCA953x. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: Disable AR_INTR_SYNC_HOST1_FATAL for QCA953xSujith Manoharan2014-03-172-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Along with AR9340 and AR955x, this is also needed for the QCA953x SoC. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: Add QCA953x WMAC platform supportSujith Manoharan2014-03-172-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: move DEFAULT_SWBA_RESPONSE check to ath9k_htc_beacon_initOleksij Rempel2014-03-171-17/+5
| | | | | | | | | | | | | | | | | | | | | ... to remove some more dups. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: use ath9k_cmn_beacon_config_apOleksij Rempel2014-03-171-35/+8
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: remove unused ath9k_get_next_tbttOleksij Rempel2014-03-171-27/+0
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: move ath9k_beacon_config_ap commonOleksij Rempel2014-03-173-19/+34
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: use ath9k_cmn_beacon_config_adhocOleksij Rempel2014-03-171-28/+7
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_adhocOleksij Rempel2014-03-171-19/+12
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: use ath9k_htc_beacon_init in ath9k_htc_beacon_config_apOleksij Rempel2014-03-171-20/+11
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: add ath9k_htc_beacon_init (but not use it)Oleksij Rempel2014-03-171-0/+22
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k: move ath9k_beacon_config_adhoc to commonOleksij Rempel2014-03-173-19/+29
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | ath9k_htc: use ath9k_cmn_beacon_config_staOleksij Rempel2014-03-171-82/+2
| | | | | | | | | | | | | | | Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>