deliverable/linux.git
9 years agoath10k: fix wmm params per vdev
Marek Puzyniak [Tue, 10 Feb 2015 11:38:15 +0000 (12:38 +0100)] 
ath10k: fix wmm params per vdev

During wmm tests changing wmm parameters did not change anything.
This was because of mismatch in WMM params per vdev command.
WMM params per vdev uses different command structure than wmm params
per pdev command.

Patch concerns qca6174.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: workaround corrupted htt rx events
Michal Kazior [Mon, 9 Feb 2015 14:04:55 +0000 (15:04 +0100)] 
ath10k: workaround corrupted htt rx events

qca6174 WLAN.RM.2.0-00073 firmware uses full rx
reordering offload and delivers Rx via a new HTT
event. The event however is incorrectly generated
in firmware and becomes overly long (with trailing
garbage). This was hitting defined CE buffer limit
that was programmed to the device and caused
device to crash upon busier Rx traffic.

Increasing the CE buffer limit for HTT Rx pipe to
2KBytes seems to be enough to workaround this
problem.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: delete unnecessary checks before the function call "release_firmware"
Markus Elfring [Wed, 4 Feb 2015 18:30:23 +0000 (19:30 +0100)] 
ath10k: delete unnecessary checks before the function call "release_firmware"

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add TxBF support
Michal Kazior [Sun, 15 Feb 2015 14:50:42 +0000 (16:50 +0200)] 
ath10k: add TxBF support

If firmware advertises support for TxBF then the
driver has to instruct the firmware accordingly
during runtime. Without this patch connecting to
an AP with beamformer support would yield abysmal
Rx performance.

This has been tested with wmi-tlv and qca6174
while acting as a STA beamformee only.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement fw stats for wmi-tlv
Michal Kazior [Sun, 15 Feb 2015 14:50:41 +0000 (16:50 +0200)] 
ath10k: implement fw stats for wmi-tlv

This processes and pushes fw stats to the debug
module (if enabled).

Changing the generic ath10k_wmi_requests_stats()
call to use more stat bits has no effect on older
firmware binaries.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add more wmi fw stat defines
Michal Kazior [Sun, 15 Feb 2015 14:50:41 +0000 (16:50 +0200)] 
ath10k: add more wmi fw stat defines

New qca6174 wmi-tlv firmware revisions support
more stat event bits.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: change request stats command prototype
Michal Kazior [Sun, 15 Feb 2015 14:50:41 +0000 (16:50 +0200)] 
ath10k: change request stats command prototype

The expected parameter is not a single value but a
mask of values.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add vdev stats processing
Michal Kazior [Sun, 15 Feb 2015 14:50:40 +0000 (16:50 +0200)] 
ath10k: add vdev stats processing

New qca6174 wmi-tlv firmware supports vdev stats.
This patch adds support for it in the debug
frontend.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: defer AP self-peer removal wait
Michal Kazior [Sun, 15 Feb 2015 14:50:40 +0000 (16:50 +0200)] 
ath10k: defer AP self-peer removal wait

Some firmware revisions don't notify host about
self-bss-peer removal until after associated vdev
is deleted. This has been observed with qca6174
WLAN.RM.2.0-00073 firmware.

This patch fixes AP teardown slowdowns and
prevents delays and warnings:

 ath10k_pci 0000:00:05.0: failed to remove peer for AP vdev 0: -110
 ath10k_pci 0000:00:05.0: removing stale peer xx:xx:xx:xx:xx:xx from vdev_id 0
 ath10k_pci 0000:00:05.0: peer-unmap-event: unknown peer id 24
 ath10k_pci 0000:00:05.0: peer-unmap-event: unknown peer id 8

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix CE_DESC_FLAGS_META_DATA_LSB definition
Ben Greear [Sun, 15 Feb 2015 14:50:39 +0000 (16:50 +0200)] 
ath10k: fix CE_DESC_FLAGS_META_DATA_LSB definition

The value was off by one.  The error probably has no negative
affect on any upstream firmware, but should be fixed anyway
in case it comes into use in the future.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix spelling in htt code comment
Ben Greear [Sun, 15 Feb 2015 14:50:39 +0000 (16:50 +0200)] 
ath10k: fix spelling in htt code comment

Fix spelling error.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix spelling mistakes and add details to mac logging
Ben Greear [Sun, 15 Feb 2015 14:50:39 +0000 (16:50 +0200)] 
ath10k: fix spelling mistakes and add details to mac logging

A bit of general cleanup to make debug messages more useful.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: scan should handle scan-start-failed event properly
Ben Greear [Sun, 15 Feb 2015 14:50:38 +0000 (16:50 +0200)] 
ath10k: scan should handle scan-start-failed event properly

In case firmware fails to start the scan, then complete
the start condition and clean up so that driver does not
block on timeout.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoMerge ath-next from ath.git
Kalle Valo [Fri, 6 Feb 2015 14:14:11 +0000 (16:14 +0200)] 
Merge ath-next from ath.git

Major changes in ath10k:

* add support for qca6174 hardware
* enable RX batching to reduce CPU load

9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-02-03' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Fri, 6 Feb 2015 06:57:37 +0000 (08:57 +0200)] 
Merge tag 'iwlwifi-next-for-kalle-2015-02-03' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next

* Add support for beamforming
* Enable stuck queue detection for iwlmvm
* A few fixes for EBS scan
* Fixes for various failure paths
* Improvements for TDLS Offchannel

9 years agobrcm80211: Delete unnecessary checks before two function calls
Markus Elfring [Wed, 4 Feb 2015 19:28:49 +0000 (20:28 +0100)] 
brcm80211: Delete unnecessary checks before two function calls

The functions brcmu_pkt_buf_free_skb() and usb_free_urb() test whether
their argument is NULL and then return immediately. Thus the test around
the call is not needed.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agohostap: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Wed, 4 Feb 2015 19:06:39 +0000 (20:06 +0100)] 
hostap: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: Delete an unnecessary check before the function call "kfree"
Markus Elfring [Wed, 4 Feb 2015 18:53:11 +0000 (19:53 +0100)] 
orinoco: Delete an unnecessary check before the function call "kfree"

The kfree() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Delete an unnecessary check before the function call "relay_close"
Markus Elfring [Wed, 4 Feb 2015 17:48:28 +0000 (18:48 +0100)] 
ath9k: Delete an unnecessary check before the function call "relay_close"

The relay_close() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: Less function calls in cw1200_load_firmware_cw1200() after error detection
Markus Elfring [Wed, 4 Feb 2015 16:28:41 +0000 (17:28 +0100)] 
cw1200: Less function calls in cw1200_load_firmware_cw1200() after error detection

The functions kfree() and release_firmware() were called in a few cases
by the cw1200_load_firmware_cw1200() function during error handling even if
the passed variables contained still a null pointer.

Corresponding implementation details could be improved by adjustments for
jump targets.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: Delete an unnecessary check before the function call "release_firmware"
Markus Elfring [Wed, 4 Feb 2015 15:32:15 +0000 (16:32 +0100)] 
cw1200: Delete an unnecessary check before the function call "release_firmware"

The release_firmware() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_tmd use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:41 +0000 (03:07 -0500)] 
orinoco: orinoco_tmd use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_pci use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:40 +0000 (03:07 -0500)] 
orinoco: orinoco_pci use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoorinoco: orinoco_plx use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 08:07:39 +0000 (03:07 -0500)] 
orinoco: orinoco_plx use msecs_to_jiffies for conversion

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agocw1200: use msecs_to_jiffies for conversion
Nicholas Mc Guire [Wed, 4 Feb 2015 07:39:49 +0000 (02:39 -0500)] 
cw1200: use msecs_to_jiffies for conversion

This is only an API consolidation to make things more readable.
Instances of  HZ / CONST  are replaced by appropriate msecs_to_jiffies().

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath5k: fix spontaneus AR5312 freezes
Sergey Ryazanov [Tue, 3 Feb 2015 21:21:13 +0000 (00:21 +0300)] 
ath5k: fix spontaneus AR5312 freezes

Sometimes while CPU have some load and ath5k doing the wireless
interface reset the whole WiSoC completely freezes. Set of tests shows
that using atomic delay function while we wait interface reset helps to
avoid such freezes.

The easiest way to reproduce this issue: create a station interface,
start continous scan with wpa_supplicant and load CPU by something. Or
just create multiple station interfaces and put them all in continous
scan.

This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use
usleep_range where possible"), which replaces initial udelay()
by usleep_range().

I do not know actual source of this issue, but all looks like that HW
freeze is caused by transaction on internal SoC bus, while wireless
block is in reset state.

Also I should note that I do not know how many chips are affected, but I
did not see this issue with chips, other than AR5312.

CC: Jiri Slaby <jirislaby@gmail.com>
CC: Nick Kossifidis <mickflemm@gmail.com>
CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible")
Reported-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
Tested-by: Eric Bree <ebree@nltinc.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Choose correct rate for 2GHz channel
Sujith Manoharan [Mon, 2 Feb 2015 12:51:13 +0000 (18:21 +0530)] 
ath9k: Choose correct rate for 2GHz channel

Set the transmit rate for the keep-alive frames
as 1M/CCK when the current channel is in the
2GHz band.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Clear TSF2 properly
Sujith Manoharan [Mon, 2 Feb 2015 12:51:12 +0000 (18:21 +0530)] 
ath9k: Clear TSF2 properly

Chips in the AR9003 family have a second TSF, which
needs to be cleared when putting the card to
sleep.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Program AR_WA correctly
Sujith Manoharan [Mon, 2 Feb 2015 12:51:11 +0000 (18:21 +0530)] 
ath9k: Program AR_WA correctly

Setting the required configuration in the PCIE
WorkAround register needs to be done after all the
WoW parameters have been set.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix issues with WoW enable
Sujith Manoharan [Mon, 2 Feb 2015 12:51:10 +0000 (18:21 +0530)] 
ath9k: Fix issues with WoW enable

This patch addresses several issues with the
ath9k_hw_wow_enable() routine:

* The usage of set/clr variables is removed. Writing
  the required values to registers is cleaner.

* The shift value of 28 for the contention window field
  in AR_WOW_PATTERN is incorrect, change it to 27.

* Disabling Keep Alive needs to be done based on the
  LINK_CHANGE option. This is done unconditionally now,
  fix this.

* The workaround for the D1/D3 issue is required only
  for AR9462.

* The bitfield for enabling pattern matching for packets
  less than 256 bytes has expanded for new chips, handle
  this accordingly.

* General cleanup.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Register correct WOW details with mac80211
Sujith Manoharan [Mon, 2 Feb 2015 12:51:09 +0000 (18:21 +0530)] 
ath9k: Register correct WOW details with mac80211

Since the number of user patterns is higher for
newer chips, make sure that this is registered
during initialization.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add support for more WOW patterns
Sujith Manoharan [Mon, 2 Feb 2015 12:51:08 +0000 (18:21 +0530)] 
ath9k: Add support for more WOW patterns

Newer chips like WB222, WB335 support more than
8 user-configurable patterns. This patch adds
support for it by setting up the correct HW
registers.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix problems with calculating free space in FIFO
Larry Finger [Tue, 3 Feb 2015 17:15:18 +0000 (11:15 -0600)] 
rtlwifi: rtl8192ee: Fix problems with calculating free space in FIFO

This driver utilizes a FIFO buffer for RX descriptors. There are four places
in the code where it calculates the number of free slots. Several of those
locations do the calculation incorrectly. To fix these and to prevent future
mistakes, a common inline routine is created.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix handling of new style descriptors
Troy Tan [Tue, 3 Feb 2015 17:15:17 +0000 (11:15 -0600)] 
rtlwifi: rtl8192ee: Fix handling of new style descriptors

The hardware and firmware for the RTL8192EE utilize a FIFO list of
descriptors. There were some problems with the initial implementation.
The worst of these failed to detect that the FIFO was becoming full,
which led to the device needing to be power cycled. As this condition
is not relevant to most of the devices supported by rtlwifi, a callback
routine was added to detect this situation. This patch implements the
necessary changes in the pci handler, and the linkage into the appropriate
rtl8192ee routine.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath10k: enable qca6174 hw3.2
Michal Kazior [Thu, 29 Jan 2015 12:24:33 +0000 (13:24 +0100)] 
ath10k: enable qca6174 hw3.2

The 3.2 revision has a different target BMI
version so it wasn't recognized by ath10k (despite
the chip_id rev being on the supported list
already).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add log level configuration for fw_dbglog
SenthilKumar Jegadeesan [Thu, 29 Jan 2015 09:06:52 +0000 (14:36 +0530)] 
ath10k: add log level configuration for fw_dbglog

Introduce an optional log level configuration for the existing debugfs fw_dbglog file. It
allows users to configure the desired log level for firmware dbglog messages.

To configure log level as WARN:

echo 0xffffffff  2 > /sys/kernel/debug/ieee80211/phy0/ath10k/fw_dbglog

The values are:

VERBOSE 0
INFO 1
WARN 2
ERR 3

Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: Use TX cksum offload only for CHECKSUM_PARTIAL
Helmut Schaa [Wed, 28 Jan 2015 10:31:32 +0000 (11:31 +0100)] 
ath10k: Use TX cksum offload only for CHECKSUM_PARTIAL

Otherwise ath10k will just checksum everything even if it did not
go through the TCP/IP stack (for example bridged frames). In the worst
case this could mean recreating the checksum for incorrect data.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix beacon deadlock
Michal Kazior [Thu, 29 Jan 2015 12:29:52 +0000 (14:29 +0200)] 
ath10k: fix beacon deadlock

This should fix a very rare occurrence of the following deadlock:

  [<ffffffffa018265e>] ath10k_wmi_tx_beacons_nowait+0x1e/0x50 [ath10k_core]
  [<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
  [<ffffffffa017d685>] ath10k_htc_send+0x285/0x3d0 [ath10k_core]
  [<ffffffffa0184b81>] ath10k_wmi_cmd_send_nowait+0x81/0x110 [ath10k_core]
  [<ffffffffa0184c61>] ath10k_wmi_tx_beacon_nowait.part.33+0x51/0x90 [ath10k_core]
  [<ffffffffa0184cd0>] ath10k_wmi_tx_beacons_iter+0x30/0x40 [ath10k_core]
  [<ffffffff81882246>] __iterate_active_interfaces+0xa6/0x100
  [<ffffffffa0184ca0>] ? ath10k_wmi_tx_beacon_nowait.part.33+0x90/0x90 [ath10k_core]
  [<ffffffff818822ae>] ieee80211_iterate_active_interfaces_atomic+0xe/0x10
  [<ffffffffa0182676>] ath10k_wmi_tx_beacons_nowait+0x36/0x50 [ath10k_core]
  [<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
  [<ffffffffa017d140>] ath10k_htc_rx+0x280/0x410 [ath10k_core]
  [<ffffffffa01bcbf0>] ? ath10k_ce_completed_recv_next+0x60/0x80 [ath10k_pci]
  [<ffffffffa01bc6ab>] ath10k_pci_ce_recv_data+0x11b/0x1d0 [ath10k_pci]
  [<ffffffffa01bcf44>] ath10k_ce_per_engine_service+0x64/0xc0 [ath10k_pci]
  [<ffffffffa01bcfc2>] ath10k_ce_per_engine_service_any+0x22/0x50 [ath10k_pci]
  [<ffffffffa01bc4d0>] ath10k_pci_tasklet+0x30/0x90 [ath10k_pci]
  [<ffffffff81055a55>] tasklet_action+0xc5/0x100

To prevent this make sure to release ar->data_lock
while calling to ath10k_wmi_beacon_send_ref_nowait().

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: change dma beacon cmd prototype
Michal Kazior [Thu, 29 Jan 2015 12:29:47 +0000 (14:29 +0200)] 
ath10k: change dma beacon cmd prototype

The command logic shouldn't really care about
arvif structure.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: prevent setting wrong key idx for station
SenthilKumar Jegadeesan [Thu, 29 Jan 2015 11:50:38 +0000 (13:50 +0200)] 
ath10k: prevent setting wrong key idx for station

Ath10k driver sets wrong default key idx that results in
sending unicast frames with multicast key.

The reason for this behavior is that cached broadcast key
is installed for station MAC address on association. After
dot1x completes, unicast key is installed for station
MAC address. Default key idx is set to broadcast key id when
driver tries to send broadcast frame. This causes firmware
to use broadcast key id to transmit unicast frames to stations.

Used TX_USAGE flag to set default key for stations.

Added callback for setting unicast default idx which will be
invoked on every default key idx configuration.

Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agowil6210: Remove msm platform related code
Hamad Kadmany [Sun, 1 Feb 2015 08:55:16 +0000 (10:55 +0200)] 
wil6210: Remove msm platform related code

Current implementation depends on msm-bus driver which
is not merged into mainline kernel therefore
this code is removed

Signed-off-by: Hamad Kadmany <qca_hkadmany@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: print ciphers in debug info
Vladimir Kondratiev [Sun, 1 Feb 2015 08:55:15 +0000 (10:55 +0200)] 
wil6210: print ciphers in debug info

Print (at debug level) all cipher and AKM suites

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: more Tx debug
Vladimir Kondratiev [Sun, 1 Feb 2015 08:55:14 +0000 (10:55 +0200)] 
wil6210: more Tx debug

Print Tx descriptors
Print ring index for all Tx related messages
Sort prefixes: Tx for transmit, TxC for completion, added "D"
for descriptor related prints

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: fix race between xmit and Tx vring de-allocation
Vladimir Kondratiev [Sun, 1 Feb 2015 08:55:13 +0000 (10:55 +0200)] 
wil6210: fix race between xmit and Tx vring de-allocation

Use spinlock, this should not impact Tx as lock is always free
except for de-allocation.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: avoid Tx descriptor double write
Vladimir Kondratiev [Sun, 1 Feb 2015 08:55:12 +0000 (10:55 +0200)] 
wil6210: avoid Tx descriptor double write

Non-cacheable Tx descriptor for the last fragment of
multi-fragment frame used to be written back twice.

Refactor code to always write non-cacheable descriptor
only once

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: remove old Tx work-around
Vladimir Kondratiev [Sun, 1 Feb 2015 08:55:11 +0000 (10:55 +0200)] 
wil6210: remove old Tx work-around

In the Tx, work around used to force destination index 0
to be used. This is no more necessary, as firmware supports
multiple destinations

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix max pattern check
Sujith Manoharan [Fri, 30 Jan 2015 13:35:37 +0000 (19:05 +0530)] 
ath9k: Fix max pattern check

Since the maximum number of configurable patterns
is chip-specific, use the HW capability instead
of a fixed value for checking if a free pattern
slot is available.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Cleanup reg_wow.h
Sujith Manoharan [Fri, 30 Jan 2015 13:35:36 +0000 (19:05 +0530)] 
ath9k: Cleanup reg_wow.h

* Remove unnecessary comments.
* Remove unused macros.
* Indent the macros.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove incorrect register macros
Sujith Manoharan [Fri, 30 Jan 2015 13:35:35 +0000 (19:05 +0530)] 
ath9k: Remove incorrect register macros

These macros are applicable to pre-AR9003 chips
and the addresses are different for the AR9003
family. Since they are unused anyway, remove them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Move WOW registers to reg_wow.h
Sujith Manoharan [Fri, 30 Jan 2015 13:35:34 +0000 (19:05 +0530)] 
ath9k: Move WOW registers to reg_wow.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Register max WOW patterns
Sujith Manoharan [Fri, 30 Jan 2015 13:35:33 +0000 (19:05 +0530)] 
ath9k: Register max WOW patterns

Since the number of patterns that can be configured in
the HW is higher for newer chips, store the chip-specific
value in ath9k_hw_wow.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add a HW structure for WOW
Sujith Manoharan [Fri, 30 Jan 2015 13:35:32 +0000 (19:05 +0530)] 
ath9k: Add a HW structure for WOW

This can be used to hold the WOW state in
ath9k_hw.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Simplify user pattern configuration
Sujith Manoharan [Fri, 30 Jan 2015 13:35:31 +0000 (19:05 +0530)] 
ath9k: Simplify user pattern configuration

There is no need to allocate a new structure and
free it for every user pattern, instead use local
variables.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add a debugfs file for WOW
Sujith Manoharan [Fri, 30 Jan 2015 13:35:30 +0000 (19:05 +0530)] 
ath9k: Add a debugfs file for WOW

This can be used to force WOW for cards that
are not present in the supported PCI ID list.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove ath9k_hw_wow_event_to_string
Sujith Manoharan [Fri, 30 Jan 2015 13:35:29 +0000 (19:05 +0530)] 
ath9k: Remove ath9k_hw_wow_event_to_string

Printing the value of the wakeup status is sufficient.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove unused BMISS processing
Sujith Manoharan [Fri, 30 Jan 2015 13:35:28 +0000 (19:05 +0530)] 
ath9k: Remove unused BMISS processing

The various variables tracking bmiss interrupts
are not really used anywhere except in a debug
message. Remove them since they have no functional
purpose.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Check WOW triggers properly
Sujith Manoharan [Fri, 30 Jan 2015 13:35:27 +0000 (19:05 +0530)] 
ath9k: Check WOW triggers properly

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>
9 years agoath9k: Fix wow init/deinit
Sujith Manoharan [Fri, 30 Jan 2015 13:35:26 +0000 (19:05 +0530)] 
ath9k: Fix wow init/deinit

Registering the card as a wakeup source needs to
be done once, during initialization. When the WOW
configuration changes, the card's status as wakeup
source needs to be changed too and this is done
via the set_wakeup() callback. Also, make sure
the device is removed properly using ath9k_deinit_wow().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Check multi-channel context for WOW
Sujith Manoharan [Fri, 30 Jan 2015 13:35:25 +0000 (19:05 +0530)] 
ath9k: Check multi-channel context for WOW

If CONFIG_ATH9K_CHANNEL_CONTEXT is enabled, check whether
multiple contexts are active and if so, return 1 without
enabling WOW since we don't support it in this case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Check early for multi-vif/STA conditions
Sujith Manoharan [Fri, 30 Jan 2015 13:35:24 +0000 (19:05 +0530)] 
ath9k: Check early for multi-vif/STA conditions

If multiple interfaces are active or there is no
associated station interface, bail out early and
return 1 so that mac80211 can proceed with the normal
suspend routine.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove redundant device_can_wakeup() check
Sujith Manoharan [Fri, 30 Jan 2015 13:35:23 +0000 (19:05 +0530)] 
ath9k: Remove redundant device_can_wakeup() check

WOW capability is registered with mac80211 only when
the device has the ability to wakeup, so there is no
need to check in the suspend() routine.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Return early for error conditions
Sujith Manoharan [Fri, 30 Jan 2015 13:35:22 +0000 (19:05 +0530)] 
ath9k: Return early for error conditions

Do not try to cancel work instances and ANI when
the device is not present or WOW triggers are
not configured. Bail out early and use ath_err()
for such error conditions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove ATH9K_HW_WOW_DEVICE_CAPABLE
Sujith Manoharan [Fri, 30 Jan 2015 13:35:21 +0000 (19:05 +0530)] 
ath9k: Remove ATH9K_HW_WOW_DEVICE_CAPABLE

Enabling WOW based on the chip is incorrect since
it needs to be done for specific sub-devices which
have proper platform support.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: disable UAPSD mode when AP starts
Amitkumar Karwar [Fri, 30 Jan 2015 08:40:07 +0000 (00:40 -0800)] 
mwifiex: disable UAPSD mode when AP starts

When AP is started, firmware exits power save mode. This
means power save manager of AP takes priority over station.
Firmware stop sending periodic AWAKE events to host.

We may have UAPSD enabled on station which buffers data
packets until AWAKE event from firmware. Data path is
unnecessarily blocked in this case. This patch disables
UAPSD mode to reenable transmit data path.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix NULL packet downloading issues
Amitkumar Karwar [Fri, 30 Jan 2015 08:40:06 +0000 (00:40 -0800)] 
mwifiex: fix NULL packet downloading issues

This patch makes sure that skb is freed after downloading
NULL packet in error cases. Also, USB chipsets return
-EINPROGRESS after downloading packets, they are freed in
USB completion handler later. We will add missing change
to set tx_lock_flag for USB which blocks further packets.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: fix memory leak in mwifiex_send_processed_packet()
Amitkumar Karwar [Fri, 30 Jan 2015 08:40:05 +0000 (00:40 -0800)] 
mwifiex: fix memory leak in mwifiex_send_processed_packet()

Memory is leaked after downloading already processed packet. This
patch fixes the problem by freeing returned skb. Other transmit
paths don't have this problem.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: correction in wakeup timer handling
Amitkumar Karwar [Fri, 30 Jan 2015 08:40:04 +0000 (00:40 -0800)] 
mwifiex: correction in wakeup timer handling

Wakeup timer is in sync with 'pm_wakeup_fw_try' flag. It
has been started instead of cancelling at one place. This
patch corrects it.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix DMA stalls
Troy Tan [Tue, 20 Jan 2015 17:01:26 +0000 (11:01 -0600)] 
rtlwifi: rtl8192ee: Fix DMA stalls

There are instances where the DMA engine stalls. The new code detects
such stalls and restarts DMA without needing a power reset.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix parsing of received packet
Troy Tan [Tue, 20 Jan 2015 17:01:24 +0000 (11:01 -0600)] 
rtlwifi: rtl8192ee: Fix parsing of received packet

The firmware supplies two kinds of packets via the RX mechanism. Besides the
normal data received over the air, these packets may contain bluetooth status
and other information. The present code fails to detect which kind of
information was received.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix TX hang due to failure to update TX write point
Troy Tan [Tue, 20 Jan 2015 17:01:23 +0000 (11:01 -0600)] 
rtlwifi: rtl8192ee: Fix TX hang due to failure to update TX write point

Initially, the routine to update the write point in the FIFO buffer was
coded to save CPU time by not doing the calculation every interrupt. This
was an error and results in TX hangs.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192ee: Fix adhoc fail
Troy Tan [Tue, 20 Jan 2015 17:01:22 +0000 (11:01 -0600)] 
rtlwifi: rtl8192ee: Fix adhoc fail

When the buffer descriptor index exceeds 2, then a TX HANG condition
will result.

Signed-off-by: Troy Tan <troy_tan@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlwifi: mvm: reduce quota threshold
Johannes Berg [Mon, 2 Feb 2015 12:22:27 +0000 (13:22 +0100)] 
iwlwifi: mvm: reduce quota threshold

The quota threshold should be reduced to 4 to update the
firmware more frequently.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't send a command the firmware doesn't know
Emmanuel Grumbach [Mon, 2 Feb 2015 17:49:43 +0000 (19:49 +0200)] 
iwlwifi: mvm: don't send a command the firmware doesn't know

-9.ucode doesn't know the command SHARED_MEM_CFG yet.

Fixes: 04fd2c28226f ("iwlwifi: mvm: add rxf and txf to dump data")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Fix building channels in scan_config_cmd
Ilan Peer [Fri, 23 Jan 2015 19:13:01 +0000 (21:13 +0200)] 
iwlwifi: mvm: Fix building channels in scan_config_cmd

Use the chanel hw_value and not the center frequency when
building channel array for scan_config_cmd.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Enable EBS also in single scan on umac interface
Haim Dreyfuss [Mon, 5 Jan 2015 13:00:35 +0000 (15:00 +0200)] 
iwlwifi: mvm: Enable EBS also in single scan on umac interface

Enable EBS on one shot scans if supported by FW.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix failure path when power_update fails in add_interface
Luciano Coelho [Tue, 27 Jan 2015 13:06:57 +0000 (15:06 +0200)] 
iwlwifi: mvm: fix failure path when power_update fails in add_interface

When iwl_mvm_power_update_mac() is called, we have already added the
mac context, so if this call fails we should remove the mac.

CC: <stable@vger.kernel.org> [3.15+]
Fixes: commit e5e7aa8e2561 ('iwlwifi: mvm: refactor power code')
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Fix a few EBS error handling bugs
Haim Dreyfuss [Tue, 13 Jan 2015 09:54:51 +0000 (11:54 +0200)] 
iwlwifi: mvm: Fix a few EBS error handling bugs

Last EBS status wasn't set to success in the initialization, which
caused the first scan to be without EBS. Fix that.

When EBS is not enabled by the driver, the FW still sends ebs_status success,
which can override EBS failure state. Consider only EBS failures, to avoid
such override. Last_ebs_success is set back to true upon disconnection.

Last_ebs_success wasn't set in umac scan abort flow, fix that too.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: allow to define the stuck queue timer per queue
Emmanuel Grumbach [Mon, 12 Jan 2015 12:38:29 +0000 (14:38 +0200)] 
iwlwifi: allow to define the stuck queue timer per queue

Different queue can have different behavior. While it can be
unacceptable for a certain queue to be stuck for 2 seconds
(e.g. the command queue), it can happen that another queue
will stay stuck for even longer (a queue servicing a power
saving client in GO).
The op_mode can even make the timeout be a function of the
listen interval.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: enable watchdog on Tx queues for mvm
Emmanuel Grumbach [Sun, 11 Jan 2015 15:19:39 +0000 (17:19 +0200)] 
iwlwifi: mvm: enable watchdog on Tx queues for mvm

This watchdog allows to monitor the transmit queues. When a
queue doesn't progress for a too long time, a timer fires
and then, debug data can be collected.
This watchdog has never been enabled on dvm controlled
devices, so don't enable it there.
In order to have it running on mvm controlled devices, we
need to fix a small issue in the transport layer: mvm
controlled devices use the shadow registers optimization.
In this case, the watchdog wasn't running at all, even if
enabled by the module parameter. Fix that on the way.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: ignore stale TDLS ch-switch responses
Arik Nemtsov [Thu, 22 Jan 2015 12:24:44 +0000 (14:24 +0200)] 
iwlwifi: mvm: ignore stale TDLS ch-switch responses

During out-of-channel activities (e.g. scan) TDLS ch-switch responses from
a peer are kept in FW. These packets arrive only after the out-of-channel
activity is complete, which can be in the order of several seconds.

Since TDLS ch-sw has no dialog-token-like mechanism for distinguishing
sessions, use the GP2 time of the incoming ch-switch response to discern
validity. For this purpose record the GP2 time of an outgoing TDLS ch-sw
request and compare to the Rx time of the ch-sw response.
The methods works in practice since the GP2 time of FW-deferred Rx is
accurate and contains the real Rx timestamp.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: improve TDLS ch-sw state machine
Arik Nemtsov [Thu, 22 Jan 2015 10:19:26 +0000 (12:19 +0200)] 
iwlwifi: mvm: improve TDLS ch-sw state machine

Add a response-received state and add more limits on allowed requests
in each state of the connection. Previously ch-switch requests from
other peers could interrupt an outgoing active ch-switch. Also stale
packets from the current peer could disrupt the channel switch state.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: disable the SCD_BASE_ADDR when we resume from WoWLAN
Emmanuel Grumbach [Thu, 29 Jan 2015 19:34:00 +0000 (21:34 +0200)] 
iwlwifi: pcie: disable the SCD_BASE_ADDR when we resume from WoWLAN

The base address of the scheduler in the device's memory
(SRAM) comes from two different sources. The periphery
register and the alive notification from the firmware.
We have a check in iwl_pcie_tx_start that ensures that
they are the same.
When we resume from WoWLAN, the firmware may have crashed
for whatever reason. In that case, the whole device may be
reset which means that the periphery register will hold a
meaningless value. When we come to compare
trans_pcie->scd_base_addr (which really holds the value we
had when we loaded the WoWLAN firmware upon suspend) and
the current value of the register, we don't see a match
unsurprisingly.
Trick the check to avoid a loud yet harmless WARN.
Note that when the WoWLAN has crashed, we will see that
in iwl_trans_pcie_d3_resume which will let the op_mode
know. Once the op_mode is informed that the WowLAN firmware
has crashed, it can't do much besides resetting the whole
device.

CC: <stable@vger.kernel.org>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: prepare the enablement of 31 TFD queues
Emmanuel Grumbach [Sun, 25 Jan 2015 08:36:31 +0000 (10:36 +0200)] 
iwlwifi: pcie: prepare the enablement of 31 TFD queues

Some devices have 31 TFD queues. Don't enable it yet since
there are still issues with it, but at least prepare the
code for it. There was a bug in the read pointer assignment,
fix that. Also, move the inline functions to iwl-scd.h which
is the right place.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: enable forcing single stream Tx decision
Eyal Shapira [Wed, 28 Jan 2015 12:44:06 +0000 (14:44 +0200)] 
iwlwifi: mvm: rs: enable forcing single stream Tx decision

In certain testing scenarios we'd like to force a decision
between STBC/BFER/SISO. In the normal scenario this decision
is done by the FW. Enable this option vis debugfs.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add beamformer support
Eyal Shapira [Fri, 16 Jan 2015 20:37:04 +0000 (22:37 +0200)] 
iwlwifi: mvm: add beamformer support

VHT Beamformer (BFER) will be used if the peer supports it
and there's a benefit to use it vs. STBC or SISO.
The driver now tells the FW whether BFER and/or STBC are
allowed but the FW will make the decision to use either
or stick to SISO on its own.
BFER is limited to a single remote peer. The driver takes
care of ensuring this to the FW and prioritizes with which
peer BFER will be used.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: don't dump useless data when a TFD queue hangs
Emmanuel Grumbach [Sun, 25 Jan 2015 13:54:40 +0000 (15:54 +0200)] 
iwlwifi: pcie: don't dump useless data when a TFD queue hangs

Printing all the scratch data of the TFDs of that queue is
useless and stuffed the kernel log with data. Remove that.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: always use mac color zero
Luciano Coelho [Thu, 29 Jan 2015 10:48:20 +0000 (12:48 +0200)] 
iwlwifi: mvm: always use mac color zero

We don't really need to use different mac colors when adding mac
contexts, because they're not used anywhere.  In fact, the firmware
doesn't accept 255 as a valid color, so we get into a SYSASSERT 0x3401
when we reach that.

Remove the color increment to use always zero and avoid reaching 255.

CC: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove space padding after sysassert description
Johannes Berg [Wed, 28 Jan 2015 22:43:24 +0000 (23:43 +0100)] 
iwlwifi: mvm: remove space padding after sysassert description

There's really no reason to pad out the field with spaces at the
end of the line - they're practically invisible there anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't reprobe if we fail during reconfig and fw_restart is false
Luciano Coelho [Wed, 28 Jan 2015 07:00:27 +0000 (09:00 +0200)] 
iwlwifi: mvm: don't reprobe if we fail during reconfig and fw_restart is false

If we don't want to restart the firmware, don't reprobe either in case
of a failure during reconfiguration.  This allows us to debug failures
in the reconfig flow as well.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoath10k: fix target wakeup timeout
Rajkumar Manoharan [Mon, 26 Jan 2015 16:43:06 +0000 (22:13 +0530)] 
ath10k: fix target wakeup timeout

During drv_start/drv_stop stress testing in ARM platform,
sometimes target is taking more that 5ms to wake up. Similar
behaviour also noted during driver load and unload iterations.
On such cases, the wakup duration lies between 5-6ms. Hence
increasing pci wakup timeout 10ms to be more safer. With this
changes, able to complete power down/up >100 iterations without
any issues.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: Enable the MCS8 and MCS9 at 2.4G band
Yanbo Li [Fri, 23 Jan 2015 00:18:20 +0000 (08:18 +0800)] 
ath10k: Enable the MCS8 and MCS9 at 2.4G band

Enable the MCS8 and MCS9 support for 2.4G band, it will
use these data rate with other devices having the same
capability.

Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: disable sta keepalive
Michal Kazior [Wed, 28 Jan 2015 07:57:49 +0000 (09:57 +0200)] 
ath10k: disable sta keepalive

Firmware revisions providing sta keepalive service
have it enabled by default.

mac80211 already does idle connection polling so
it makes no sense to duplicate this in ath10k.
mac80211 wouldn't even know of the offloaded
keepalive NullFunc frames.

This prevents sending out some extraneous frames
on the air.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement sta keepalive command
Janusz Dziedzic [Wed, 28 Jan 2015 07:57:39 +0000 (09:57 +0200)] 
ath10k: implement sta keepalive command

New wmi-tlv firmware for qca6174 has STA keepalive
service available. The service can provide
automatic idle connection polling via NullFunc
frames to AP when acting as a client.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: use per-vif wmm param setup if possible
Michal Kazior [Wed, 28 Jan 2015 07:57:28 +0000 (09:57 +0200)] 
ath10k: use per-vif wmm param setup if possible

New wmi-tlv firmware for qca6174 supports this.

This should fix issues related to multi-vif WMM.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement per-vdev wmm param setup command
Michal Kazior [Wed, 28 Jan 2015 07:57:22 +0000 (09:57 +0200)] 
ath10k: implement per-vdev wmm param setup command

New wmi-tlv firmware for qca6174 supports this.
This will be used soon.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: move wmm param storage to vif
Michal Kazior [Mon, 19 Jan 2015 08:53:41 +0000 (09:53 +0100)] 
ath10k: move wmm param storage to vif

mac80211 already requests WMM per vif but firmware
wasn't able to handle this until now. However new
wmi-tlv firmware for qca6174 is capable of this.

This prepares per-vif WMM param setup.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agob43: AC-PHY: prepare place for developing new PHY support
Rafał Miłecki [Sun, 25 Jan 2015 17:01:37 +0000 (18:01 +0100)] 
b43: AC-PHY: prepare place for developing new PHY support

There are new (not anymore?) Broadcom 802.11ac wireless cards based on
chipsets like BCM4352 and BCM4360. They use a new PHY type (called
simply AC) that will require new specific code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agob43: support bcma core reset on AC-PHY hardware
Rafał Miłecki [Sun, 25 Jan 2015 13:39:34 +0000 (14:39 +0100)] 
b43: support bcma core reset on AC-PHY hardware

AC-PHY hardware includes new control 0x3 bits that need to be set to the
0x1 by default.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: implement host code support for PCIe Gen 2 devices
Rafał Miłecki [Sun, 25 Jan 2015 12:41:19 +0000 (13:41 +0100)] 
bcma: implement host code support for PCIe Gen 2 devices

This is stil incomplete, so we don't add PCI IDs of new devices yet.
Purpose of this patch is to allow testing & adjusting rest of the code.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add early_init function for PCIe core and move some fix into it
Rafał Miłecki [Sun, 25 Jan 2015 10:11:14 +0000 (11:11 +0100)] 
bcma: add early_init function for PCIe core and move some fix into it

There are some PCIe core fixes that need to be applied before accessing
SPROM, otherwise reading it may fail.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This page took 0.046189 seconds and 5 git commands to generate.