firefly-linux-kernel-4.4.55.git
9 years agoath10k: enable Adaptive Noise Immunity (ANI) by default
Ashok Raj Nagarajan [Thu, 19 Mar 2015 11:07:59 +0000 (16:37 +0530)]
ath10k: enable Adaptive Noise Immunity (ANI) by default

ANI helps to improve connectvity and performance in a noisy environment.
Enabling this feature would help the user experience a better and stable
wireless connection in a noisy environmnet. This feature is currently not
enabled for ath10k. Enable this feature by default.

Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: enable channel 144 on 5GHz band
Peter Oh [Wed, 18 Mar 2015 18:39:18 +0000 (11:39 -0700)]
ath10k: enable channel 144 on 5GHz band

Enable channel 144 on 5GHz band since 802.11ac introduced it.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: move driver state check before setting throttle
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:25 +0000 (20:36 +0530)]
ath10k: move driver state check before setting throttle

Since thermal daemon is unaware of the device state, it might
try to adjust the throttle state when the device is powered down.
So the driver caches the value and will configure it while
powering up the target. The cached value will be programed later
once the device is brought up. In such case, returning error
status is confusing and misleading the user application. Hence
moving the driver state check before sending wmi command to target.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: cache throttle state when device is down
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:24 +0000 (20:36 +0530)]
ath10k: cache throttle state when device is down

Allow driver to cache the throttle state when the devie is not
yet started. Configure the cached throttle state while powering
up the device. Since thermal daemon is unaware of the up/down cycle,
it assumes that device is throttled.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: do not restrict thermal throttling to ap mode
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:23 +0000 (20:36 +0530)]
ath10k: do not restrict thermal throttling to ap mode

Recently thermal mitigation is validated in station mode as well.
Hence allowing thermal throttling for all interfaces. This enables
user to validate thermal mitigation with different modes.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: configure thermal throttle while powering up
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:22 +0000 (20:36 +0530)]
ath10k: configure thermal throttle while powering up

Thermal throttling is not handled in software restart and device
bootup. Also it needs to be configured whenever quiet period got
updated. Fix that.

Reported-by: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix interpretation of cooling device state
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:21 +0000 (20:36 +0530)]
ath10k: fix interpretation of cooling device state

Setting the sysfs attribute ends up configuring the duty cycle,
but the interface through which the attribute is exposed
(cooling_device) is for setting the throttle/cooling state. This
is confusing the user. Hence renaming the cooling device interfaces
for better readability.

Cc: Matthias Kaehlcke <mka@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add debugfs entry to configure quiet period
Rajkumar Manoharan [Sun, 15 Mar 2015 15:06:20 +0000 (20:36 +0530)]
ath10k: add debugfs entry to configure quiet period

Add support to configure quiet period (in milliseconds) via debugfs.
This is useful to experiment different quiet period values along with
different throttle ratio.

echo 100 > /sys/kernel/debug/ieee80211/phyX/ath10k/quiet_period

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: increase station kickout threshold
Rajkumar Manoharan [Thu, 19 Mar 2015 14:03:29 +0000 (16:03 +0200)]
ath10k: increase station kickout threshold

Since the station kickout threshold is also counting software
reries (Default sw count in firmware is 16), increasing the threshold
to try with atleast 20 data frames before kicking out the station.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix rts profile for second rate series
Rajkumar Manoharan [Thu, 19 Mar 2015 14:03:29 +0000 (16:03 +0200)]
ath10k: fix rts profile for second rate series

By default rts protection is enabled in firmware for the second
rateset. Currently ath10k selects RTS profile (only for software
retries), when legacy stations are associated or asked by mac80211.
On congested environment, when AP is running in HT/VHT mode and
there are no legacy clients associated, this will impact the
robustness. Also enabling RTS protection only for second rateset will
not impact performance on clear environment. Fix that.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: setup maximum number of supported stations
Janusz.Dziedzic@tieto.com [Thu, 12 Mar 2015 12:11:41 +0000 (13:11 +0100)]
ath10k: setup maximum number of supported stations

Setup maximum number of associated stations supported in
AP/P2P_GO mode.

This allow hostapd/wpa_supplicant to play with that limit
and set more information (eg. P2P group limit bit for P2P_GO).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: protect driver from unsolicited htc ep0 events
Michal Kazior [Wed, 11 Mar 2015 13:37:11 +0000 (14:37 +0100)]
ath10k: protect driver from unsolicited htc ep0 events

Some firmware revisions (tested with qca6174
rm2.0-00088) deliver unsolicited unknown (kind of
garbled) HTC ep0 event to host in some cases.

This issue was mainly observed with both qca988x
and qca6174 being installed on a single host
system. During driver probing if qca6174 booting
sequences were somehow deferred (e.g. by qca988x
implicitly making some resources busy presumably)
the unsolicited event would came around 1s after
ATH10K_HTC_MSG_READY_ID was delivered to host for
qca6174.

The unsolicited event would confuse driver and
cause HTT initialization (and subsequently
driver probing) to fail.

Make the ep0 event processing more robust. The
event will still be caught but instead will
only generate a warning now.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix wrong symlink name on error path
Rajkumar Manoharan [Thu, 12 Mar 2015 17:32:00 +0000 (19:32 +0200)]
ath10k: fix wrong symlink name on error path

Wrong symlink name is used on error path of thermal registration
and also correcting the error message.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: strip qos data bit always
Michal Kazior [Wed, 11 Mar 2015 13:25:26 +0000 (14:25 +0100)]
ath10k: strip qos data bit always

NativeWifi tx mode expects QoS Data frames to be
delivered as Data frames with QoS part (e.g. tid)
being delievered out-of-band in fw tx command.

The QoS bit wasn't stripped before submitting to
firmware.

Stripping fixes two known problems:

 * qca6174 IOT with some APs, e.g.
   Cisco AIR-AP 1252 (which would crash after
   ath10k association). Some ath9k APs would
   crash as well.

 * sniffing own tx frames via radiotap because,
   e.g. wireshark was seeing QoS bit set but
   since QoS Control was stripped in ath10k it
   would parse beginning of LLC/SNAP

>From debugability point of view this removes the
ability to distinguish QoS from non-QoS frames
when sniffing own tx via radiotap. On the other
hand frames can be now parsed correctly without
special software modification.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix PMF by using AES-CMAC/IGTK software crypto
Bartosz Markowski [Tue, 10 Mar 2015 13:32:19 +0000 (14:32 +0100)]
ath10k: fix PMF by using AES-CMAC/IGTK software crypto

While testing with older supplicant, .drv_set_key() was failing due to
higher than ath10k firmware could handle key_index (WMI_MAX_KEY_INDEX == 3).

--
wpa_driver_nl80211_set_key: ifindex=15 alg=4 addr=0x7f02b129fbe3 key_idx=4 set_tx=0 seq_len=6 key_len=16
    broadcast key
nl80211: set_key failed; err=-22 Invalid argument)
wlan0: WPA: Failed to configure IGTK to the driver
wlan0: RSN: Failed to configure IGTK
--

In order to fix this case (PMF: AES-CMAC/IGTK) force the AES_CMAC cipher to
be handled by software.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: add hw connection monitor support
Michal Kazior [Tue, 10 Mar 2015 14:22:01 +0000 (16:22 +0200)]
ath10k: add hw connection monitor support

Some firmware revisions (e.g. qca6174 with fw73)
don't deliver beacons to host reliably. This
causes random disconnects even in perfect
conditions. This is most visible with
multi-channel operation.

All available firmware revisions seem to support
beacon miss offloading so there shouldn't be any
problems.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement wmi roam event
Michal Kazior [Tue, 10 Mar 2015 14:21:54 +0000 (16:21 +0200)]
ath10k: implement wmi roam event

This can be used to implement offloaded rssi
threshold, beacon miss or even automatic
in-firmware BSS roaming in the future.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix WPA crypto
Michal Kazior [Mon, 9 Mar 2015 13:24:17 +0000 (14:24 +0100)]
ath10k: fix WPA crypto

Commit 370e567363e6 ("ath10k: fix broken traffic for 802.1x in client mode")
introduced a regression on WPA crypto. All keys were treated as if they were
WEP which resulted in WPA being incorrectly installed to fw/hw and subsequently
no traffic.

Reported-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix CAC regression
Michal Kazior [Mon, 9 Mar 2015 13:20:55 +0000 (14:20 +0100)]
ath10k: fix CAC regression

Commit 548462133d98 ("ath10k: fix interrupt storm") introduced a
regression. The condition responsible for bringing up monitor vdev was broken
and it was never started for CAC so effectivelly CAC would not detect radar
pulses.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix patching mistake for AP/IBSS CSA
Michal Kazior [Mon, 9 Mar 2015 13:19:24 +0000 (14:19 +0100)]
ath10k: fix patching mistake for AP/IBSS CSA

Mistakenly v1 of `ath10k: fix AP/IBSS CSA with
template based fw`
(81a9a17db5d766d2872c4ab8a77b8666d22031ec) was
applied.

This patch applies the missing bits from v2:
 * remove unnecessary locking
 * add some (sanity) checks

There are no practical functionality differences
between v1 and v2.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: save/restore pci config space properly
Michal Kazior [Mon, 2 Mar 2015 12:22:14 +0000 (13:22 +0100)]
ath10k: save/restore pci config space properly

The check was't really necessary and couldn't even
work to begin with because pci_restore_state()
restores only first 64 bytes of PCI configuration
space.

Actually the PCI subsystem takes care of this so
there's no need for explicit calls to save PCI
state in ath10k.

This is necessary for future WoWLAN support.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix some pci wake/sleep issues
Michal Kazior [Mon, 2 Mar 2015 12:22:13 +0000 (13:22 +0100)]
ath10k: fix some pci wake/sleep issues

In some cases the device ends up sleeping while
ath10k didn't expect it to leading to reading
garbage from registers, e.g. when shared irqs are
used and the driver is in powered down state.

This effectively makes the device remain awake all
the time even when all interfaces are down.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix interrupt storm
Vasanthakumar Thiagarajan [Mon, 2 Mar 2015 12:15:28 +0000 (17:45 +0530)]
ath10k: fix interrupt storm

Promiscuous mode is enabled when wlan interface is added to
bridge. ath10k creates a monitor mode when promiscuous mode
is enabled. When monitor vdev is running along with other
vdev(s) there is a huge number of interrupts generated
especially in noisy condition. Fix this by not enabling
promiscuous(monitor) mode when already a vdev is running.
As disabling promiscuous mode may have issues with 4-address
bridging in STA mode, the change is done specific to non-sta/ibss
mode types. This does not change the support of virtual interface of
type monitor along with other vdevs of any type.

This could fix management frame drop in fw due to unavailable
buffers because in monitor mode device receives everything seen
on the air. In noisy condition, disabling monitor mode helps assoc
go through without any issue.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: move ath10k_vdev_stop() up before ath10k_vdev_start_restart()
Vasanthakumar Thiagarajan [Mon, 2 Mar 2015 12:15:27 +0000 (17:45 +0530)]
ath10k: move ath10k_vdev_stop() up before ath10k_vdev_start_restart()

This patches does not modify any functionality. Just a code move
so that ath10k_vdev_stop() can be used in ath10k_vdev_start_restart()
for any failure cases which involves vdev_stop().

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: improve 11b coex
Michal Kazior [Mon, 2 Mar 2015 10:21:17 +0000 (11:21 +0100)]
ath10k: improve 11b coex

This improves coexistance with 11b legacy devices
on wmi-tlv and qca6174.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: implement handling of p2p noa event
Michal Kazior [Thu, 26 Feb 2015 12:23:18 +0000 (13:23 +0100)]
ath10k: implement handling of p2p noa event

Since new wmi-tlv firmware doesn't have SWBA event
the only way to deliver P2P NoA information is
through a new dedicated event.

This fixes P2P GO Probe Responses to include P2P
NoA when appropriate on the new firmware.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: refactor p2p noa code
Michal Kazior [Thu, 26 Feb 2015 12:23:17 +0000 (13:23 +0100)]
ath10k: refactor p2p noa code

Some files are getting bloated and it makes sense
to split some of the code into separate files. Do
so with the P2P NoA code and prepare it for reuse.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix TxBF VHT capabilities for 2+ RF-chain devices
Michal Kazior [Thu, 26 Feb 2015 10:11:22 +0000 (11:11 +0100)]
ath10k: fix TxBF VHT capabilities for 2+ RF-chain devices

Firmware doesn't report a complete and
ready-to-use vht cap. Instead the driver is
supposed to fill in the missing bits related to
number of chains.

This effectively increases Compressed Steering
Number and Number of Sounding Dimensions in
AssocReq frames for devices with more than one RF
chain and should improve TxBF performance.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix ap u-apsd cmd on qca6174 w/ wmi-tlv
Michal Kazior [Wed, 25 Feb 2015 10:39:36 +0000 (11:39 +0100)]
ath10k: fix ap u-apsd cmd on qca6174 w/ wmi-tlv

The command was truncated so the parameter value
was seen in fw as 0. This caused U-APSD enabled
stations to be misconfigured and mistreated by AP.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: increase duty cycle maximum limit
Rajkumar Manoharan [Thu, 19 Feb 2015 17:55:05 +0000 (23:25 +0530)]
ath10k: increase duty cycle maximum limit

Allow user to configure the duty cycle upto 100%. Since thermal
mitigation algorithm is running in user space, remove the driver
level limitation and let the user to control the temperature.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix broken traffic for static WEP in IBSS
Michal Kazior [Wed, 18 Feb 2015 13:02:27 +0000 (14:02 +0100)]
ath10k: fix broken traffic for static WEP in IBSS

When WEP keys are uploaded it's possible that
there are stations associated already (e.g. when
merging) without any keys. Static WEP needs an
explicit per-peer key upload.

Make sure to re-upload wep keys if necessary.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix broken traffic for 802.1x in client mode
Michal Kazior [Wed, 18 Feb 2015 13:02:26 +0000 (14:02 +0100)]
ath10k: fix broken traffic for 802.1x in client mode

When running 802.1x WEP keys must be installed
without pairwise-groupwise swap (which is
necessary for static WEP).

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: update MODULE_FIRMWARE definitions for QCA6174
Bartosz Markowski [Wed, 18 Feb 2015 12:16:37 +0000 (13:16 +0100)]
ath10k: update MODULE_FIRMWARE definitions for QCA6174

This has been missed while adding the QCA6174 support.
As in the last time, without advertising the firmware files
as needed (or optional) for ath10k, these won't be built into
ram disk for instance.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: fix AP/IBSS CSA with template based fw
Michal Kazior [Thu, 5 Mar 2015 14:02:17 +0000 (16:02 +0200)]
ath10k: fix AP/IBSS CSA with template based fw

qca6174 with wmi-tlv firmware uses offloaded
beaconing scheme (i.e. templates). This requires a
little different approach when implementing CSA.

Add missing code to update CS count and report CSA
completion to mac80211. Without it channel switch
was never finished.

To avoid races during interface teardown data_lock
has been used to protect is_up and is_started so
they can be compared against before scheduling
count down work.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: increase AST table SKID length limit
SenthilKumar Jegadeesan [Wed, 4 Mar 2015 13:43:45 +0000 (15:43 +0200)]
ath10k: increase AST table SKID length limit

The current SKID length configuration causes firmware
to reject peer creation for not able to allocate
AST entries for peers. This issue is observed when
least significant 3 bytes are used ramdomly to create
client MAC addresses.

AST table SKID length configuration is increased to
maximum value to fix this issue.

Signed-off-by: SenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath: enhance radar detection by looking up chirp
Peter Oh [Wed, 4 Mar 2015 13:43:46 +0000 (15:43 +0200)]
ath: enhance radar detection by looking up chirp

Certain radar types such as FCC radar type 5 are using chirp
in their pulses, hence looking up the chirp status will enhance
to avoid false radar detection.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: update chirp value in pulse event
Peter Oh [Wed, 4 Mar 2015 13:43:46 +0000 (15:43 +0200)]
ath10k: update chirp value in pulse event

Firmware reports chirp status in phy error event if it's detected
and the chirp status is valuable to distinguish radar types.
So save it to use for DFS parttern detector.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath: introduce chirp parameter used by DFS
Peter Oh [Wed, 4 Mar 2015 13:43:45 +0000 (15:43 +0200)]
ath: introduce chirp parameter used by DFS

Some of radar types such as FCC radar type 5 require
to look up chirp in pulse to detect genuine radar and
it will prevent DFS channels from false radar detection.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: increase copy engine entries for rx wmi
Rajkumar Manoharan [Wed, 4 Mar 2015 13:43:44 +0000 (15:43 +0200)]
ath10k: increase copy engine entries for rx wmi

Having lower number of copy engine entries for target to host
WMI ring is causing drops in receiving management frames. This
issue is observed during max clients (128 clients) stress testing.
While bursting deauthentication frames from simulated clients,
approx. 70% of frames are getting dropped due to lower ring entries.

Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agobcma: prepare Kconfig symbol for PCI driver
Rafał Miłecki [Wed, 4 Mar 2015 22:07:05 +0000 (23:07 +0100)]
bcma: prepare Kconfig symbol for PCI driver

Driver for PCIe core requires PCI to be enabled, however we shouldn't
require it for the whole bus. Someone may be not interested in extra
PCI devices and what's more there are SoCs without any PCI at all (like
BCM5356C0, BCM5357*, BCM47186B0). For more details see Kconfig "help".
Please note this patch doesn't allow disabling PCI drivers yet, as it
requires more work on calls to bcma_core_pci_* functions.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: move internal function declarations to private header
Rafał Miłecki [Wed, 4 Mar 2015 13:24:52 +0000 (14:24 +0100)]
bcma: move internal function declarations to private header

These functions are not exported nor used anywhere, so there is no
reason to put them in public headers.
Also drop unused bcma_chipco_(suspend|resume).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: make bcma_host_pci_(up|down) calls safe for every config
Rafał Miłecki [Wed, 4 Mar 2015 11:14:41 +0000 (12:14 +0100)]
bcma: make bcma_host_pci_(up|down) calls safe for every config

We were providing declarations but actual code was compiled only with
CONFIG_BCMA_HOST_PCI set. This could result in:
ERROR: "bcma_host_pci_down" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko] undefined!
ERROR: "bcma_host_pci_down" [drivers/net/wireless/b43/b43.ko] undefined!
ERROR: "bcma_host_pci_up" [drivers/net/wireless/b43/b43.ko] undefined!

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: Kconfig: Let it depend on PCI
Chen Gang [Tue, 3 Mar 2015 21:16:18 +0000 (05:16 +0800)]
bcma: Kconfig: Let it depend on PCI

bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
or will cause building break for allmodconfig under c6x:

    CC [M]  drivers/bcma/driver_pcie2.o
  drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
  drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 'pcie_set_readrq' [-Werror=implicit-function-declaration]
    err = pcie_set_readrq(dev, pcie2->reqsize);
          ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoMerge ath-next from ath.git
Kalle Valo [Thu, 5 Mar 2015 09:01:38 +0000 (11:01 +0200)]
Merge ath-next from ath.git

Major changes in ath10k:

* qca6174: enable STA transmit beamforming (TxBF) support
* disable multi-vif power save by default

9 years agoath10k: disable multi-vif ps by default
Michal Kazior [Fri, 13 Feb 2015 12:30:16 +0000 (13:30 +0100)]
ath10k: disable multi-vif ps by default

Not all firmware revisions have a proper
multi-interface client powersaving implementation,
e.g. qca6174 WLAN.RM.2.0-00073.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
9 years agoath10k: workaround qca6174 sta powersave issue
Michal Kazior [Fri, 13 Feb 2015 12:30:15 +0000 (13:30 +0100)]
ath10k: workaround qca6174 sta powersave issue

qca6184 WLAN.RM.2.0-00073 has a bug in sta
powersave state machine and requires peer param to
be poked to enable the powersave.

Calling this unconditionally should be safe for
other chips/firmwares.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
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 agobcma: gpio: enable GPIO IRQ domain on BCM5301X
Rafał Miłecki [Fri, 20 Feb 2015 10:49:05 +0000 (11:49 +0100)]
bcma: gpio: enable GPIO IRQ domain on BCM5301X

Just like on BCM47XX arch, BCM5301X also has ChipCommon with IRQ for
GPIOs. Now we have interrupts working on BCM5301X we can finally make
use of it. This has been successfully tested on 5 different devices
(Buffalo, Luxul, Netgear).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agossb: Silence warning for unknown backplane revision
Larry Finger [Wed, 18 Feb 2015 20:09:38 +0000 (14:09 -0600)]
ssb: Silence warning for unknown backplane revision

When using a BCM4318 in a PCMCIA format, I get a startup message that the
device uses backplane revision 0xF000000. Next a WARNING is logged. Despite
the message, the device works fine, This patch silences the warning.

Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agowil6210: increase cmd buffer size to avoid sscanf buffer overflow
Colin Ian King [Sun, 1 Mar 2015 17:48:33 +0000 (17:48 +0000)]
wil6210: increase cmd buffer size to avoid sscanf buffer overflow

cppcheck detected a buffer overflow:

[drivers/net/wireless/ath/wil6210/debugfs.c:634]: (error) Width 8
  given in format string (no. 1) is larger than destination buffer
  'cmd[8]', use %7s to prevent overflowing it.

For the current %8s sscanf we require cmd to be 9 chars long
so increase it by 1 byte to prevent the sscan overflow (rather
than reduce the %8s specifier to %7s as cppcheck recommends).

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix issues in the main btcoex timer
Sujith Manoharan [Sun, 1 Mar 2015 06:23:49 +0000 (11:53 +0530)]
ath9k: Fix issues in the main btcoex timer

* ath9k_mci_update_rssi() is required only for
  cards that use MCI scheme. Make sure that it
  is not called for 3-wire cards.

* Call ath9k_ps_wakeup() early since register
  accesses are made in ath9k_mci_update_rssi().

* Fix usage of btcoex_lock to handle no_stomp_timer.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Handle timers for MCI
Sujith Manoharan [Sun, 1 Mar 2015 06:23:48 +0000 (11:53 +0530)]
ath9k: Handle timers for MCI

Make sure that the btcoex timers are started/stopped
properly for both 3-wire and MCI schemes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix wlan-active gpio for the AR9003 family
Sujith Manoharan [Sun, 1 Mar 2015 06:23:47 +0000 (11:53 +0530)]
ath9k: Fix wlan-active gpio for the AR9003 family

When disabling BTCOEX, clearing the wlanactive gpio line
is required only for pre-AR9003 cards.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix MCI scheme initialization
Sujith Manoharan [Sun, 1 Mar 2015 06:23:46 +0000 (11:53 +0530)]
ath9k: Fix MCI scheme initialization

Commit "ath9k_hw: remove ATH_BTCOEX_CFG_MCI" removed
MCI as a separate coex scheme, but we need it to
avoid fiddling with GPIO registers during
ath9k_init_btcoex() that are meant only for 3-wire
cards.

Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Initialize MCI state correctly
Sujith Manoharan [Sun, 1 Mar 2015 06:23:45 +0000 (11:53 +0530)]
ath9k: Initialize MCI state correctly

The MCI configuration values are assigned
in ath9k_hw_btcoex_init_mci() which are used
by the MCI reset routine. When initializing
BTCOEX/MCI, ath_mci_setup() ends up using
uninitialized data. Fix this by setting up
the configuration parameters before issuing
a MCI reset.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove useless return value check
Sujith Manoharan [Sun, 1 Mar 2015 06:23:44 +0000 (11:53 +0530)]
ath9k: Remove useless return value check

ath_init_btcoex_timer() always returns 0, so
checking for error conditions is not required.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8192cu: Add case in rtl92cu_get_hw_reg
Taehee Yoo [Wed, 25 Feb 2015 19:34:01 +0000 (04:34 +0900)]
rtlwifi: rtl8192cu: Add case in rtl92cu_get_hw_reg

Add HAL_DEF_WOWLAN case in rtl92cu_get_hw_reg

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agomwifiex: do not initialize ext_scan in mwifiex_init_adapter
Avinash Patil [Wed, 25 Feb 2015 16:45:41 +0000 (22:15 +0530)]
mwifiex: do not initialize ext_scan in mwifiex_init_adapter

Features which are device specific are already updated in
interface specific initialization e.g. register_dev.
We should not initialize them in mwifiex_init_adapter();
else this would overwrite earlier settings.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8188ee: missing curly braces in handle_branch1()
Dan Carpenter [Wed, 25 Feb 2015 13:24:51 +0000 (16:24 +0300)]
rtlwifi: rtl8188ee: missing curly braces in handle_branch1()

From the indenting, it seems like the READ_NEXT_PAIR() was supposed to
be inside the while loop.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: rtl8821ae: Remove duplicate hex prefixes
Rasmus Villemoes [Mon, 23 Feb 2015 12:05:59 +0000 (13:05 +0100)]
rtlwifi: rtl8821ae: Remove duplicate hex prefixes

The # flag in %X means print a 0X prefix. Remove the extra 0x prefix.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add per-vif TX power capability to TX path
Lorenzo Bianconi [Tue, 17 Feb 2015 09:12:18 +0000 (10:12 +0100)]
ath9k: add per-vif TX power capability to TX path

In order to add per-vif TX power capability cap per-packet TX power to vif
configured power if the latter is lower than per-rate TX power and mac80211
per-frame power. Use vif TX power if TPC has been disabled for current the
interface

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: add per-vif TX power capability
Lorenzo Bianconi [Tue, 17 Feb 2015 09:12:17 +0000 (10:12 +0100)]
ath9k: add per-vif TX power capability

Configure the HW with highest TX power among all vif when HW TPC has been
enabled in order to add support to per-vif TX power capability. Use lowest
configured power among all interfaces when TPC is disabled

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused RTL_SUPPORTED_CTRL_FILTER define
Priit Laes [Mon, 16 Feb 2015 13:01:57 +0000 (15:01 +0200)]
rtlwifi: Remove unused RTL_SUPPORTED_CTRL_FILTER define

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from efuse.h
Priit Laes [Mon, 16 Feb 2015 13:01:56 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from efuse.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from base.h
Priit Laes [Mon, 16 Feb 2015 13:01:55 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from base.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from cam.h
Priit Laes [Mon, 16 Feb 2015 13:01:54 +0000 (15:01 +0200)]
rtlwifi: Remove unused defines from cam.h

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused RF6052_MAX_REG define
Priit Laes [Mon, 16 Feb 2015 13:01:53 +0000 (15:01 +0200)]
rtlwifi: Remove unused RF6052_MAX_REG define

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from driver-specific def.h
Priit Laes [Mon, 16 Feb 2015 12:59:55 +0000 (14:59 +0200)]
rtlwifi: Remove unused defines from driver-specific def.h

HAL_RETRY_LIMIT_*
RESET_DELAY_8185
RT_IBSS_INT_MASKS
RT_AC_INT_MASKS
NUM_OF_*
BT_*,
MAX_{LINES,BYTES}_*,
*_THREE_WIRE
*_QUEUE related

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agortlwifi: Remove unused defines from rtl8192cu driver
Priit Laes [Mon, 16 Feb 2015 12:59:54 +0000 (14:59 +0200)]
rtlwifi: Remove unused defines from rtl8192cu driver

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add missing includes
Rafał Miłecki [Tue, 3 Mar 2015 06:32:57 +0000 (07:32 +0100)]
bcma: add missing includes

kbuild found out that commit 804e27dee49e ("bcma: support bringing up
bus hosted on PCIe Gen 2") broke the build on m68k:

   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>> drivers/bcma/driver_pcie2.c:196:2: error: implicit declaration of function 'pcie_set_readrq' [-Werror\
=implicit-function-declaration]
     err = pcie_set_readrq(dev, pcie2->reqsize);
     ^
   cc1: some warnings being treated as errors

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Mute BT properly
Sujith Manoharan [Mon, 16 Feb 2015 05:20:01 +0000 (10:50 +0530)]
ath9k: Mute BT properly

Set The BT/WLAN priority weights correctly and make sure
that MCI_LNA_TAKE is sent only for cards that share
PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix GPM initialization
Sujith Manoharan [Mon, 16 Feb 2015 05:20:00 +0000 (10:50 +0530)]
ath9k: Fix GPM initialization

Handle MCI_STATE_INIT_GPM_OFFSET separately and do not
overload ar9003_mci_get_next_gpm_offset() with a special
case.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Prepare MCI interface correctly
Sujith Manoharan [Mon, 16 Feb 2015 05:19:59 +0000 (10:49 +0530)]
ath9k: Prepare MCI interface correctly

The LNA_TRANS message needs to be sent only for
chips which have shared PA/LNA.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Setup MCI statistics properly
Sujith Manoharan [Mon, 16 Feb 2015 05:19:58 +0000 (10:49 +0530)]
ath9k: Setup MCI statistics properly

Use a subroutine to enable MCI debug statistics
if it is present in the global configuration.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Fix MCI TX control
Sujith Manoharan [Mon, 16 Feb 2015 05:19:57 +0000 (10:49 +0530)]
ath9k: Fix MCI TX control

This patch makes sure that the antenna configuration
is used properly when setting AR_MCI_TX_CTRL.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Handle 2-ANT AR9565 in MCI reset
Sujith Manoharan [Mon, 16 Feb 2015 05:19:56 +0000 (10:49 +0530)]
ath9k: Handle 2-ANT AR9565 in MCI reset

The value programmed in the BTCOEX control register
is different for each chip. This patch adds support
for 2-ANT, 1-ANT solutions based on AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Add new MCI configuration parameters
Sujith Manoharan [Mon, 16 Feb 2015 05:19:55 +0000 (10:49 +0530)]
ath9k: Add new MCI configuration parameters

Several new MCI parameters need to be handled for
new chips, add them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Remove useless check in MCI reset
Sujith Manoharan [Mon, 16 Feb 2015 05:19:54 +0000 (10:49 +0530)]
ath9k: Remove useless check in MCI reset

If we fail to allocate the sched/gpm buffers when
initializing MCI, we bail out properly. Checking
them in ar9003_mci_reset() is unnecessary, so remove it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoath9k: Move MCI registers to reg_mci.h
Sujith Manoharan [Mon, 16 Feb 2015 05:19:53 +0000 (10:49 +0530)]
ath9k: Move MCI registers to reg_mci.h

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlegacy: 4965-rs: Remove bogus colon after newline from debug message
Geert Uytterhoeven [Tue, 3 Mar 2015 10:58:13 +0000 (11:58 +0100)]
iwlegacy: 4965-rs: Remove bogus colon after newline from debug message

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoMerge tag 'iwlwifi-next-for-kalle-2015-03-01' of https://git.kernel.org/pub/scm/linux...
Kalle Valo [Tue, 3 Mar 2015 11:49:36 +0000 (13:49 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-03-01' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next

* add triggers for firmware dump collection
* remove support for -9.ucode
* new statitics API
* rate control improvements

9 years agobcma: enable support for PCIe Gen 2 host devices
Rafał Miłecki [Sun, 8 Feb 2015 16:11:50 +0000 (17:11 +0100)]
bcma: enable support for PCIe Gen 2 host devices

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: support bringing up bus hosted on PCIe Gen 2
Rafał Miłecki [Sun, 8 Feb 2015 16:11:49 +0000 (17:11 +0100)]
bcma: support bringing up bus hosted on PCIe Gen 2

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: change IRQ control function to accept bus as an argument
Rafał Miłecki [Sun, 8 Feb 2015 16:11:48 +0000 (17:11 +0100)]
bcma: change IRQ control function to accept bus as an argument

It doesn't operate on PCI core, but PCI host device, so there is no
point of passing core related struct.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobcma: add helpers bringing PCIe hosted bus up / down
Rafał Miłecki [Sun, 8 Feb 2015 16:11:47 +0000 (17:11 +0100)]
bcma: add helpers bringing PCIe hosted bus up / down

Bringing PCIe hosted bus up requires operating on host-related core.
Since we plan to support PCIe Gen 2 devices we should provide a helper
picking the correct one (PCIE or PCIE2).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agobrcmfmac: respect reason when deleting (deauthenticating) STA
Rafał Miłecki [Sun, 8 Feb 2015 10:51:47 +0000 (11:51 +0100)]
brcmfmac: respect reason when deleting (deauthenticating) STA

Starting with kernel 3.19 reason is provided by cfg80211.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
9 years agoiwlwifi: mvm: don't override passive dwell in case of fragmented scan
David Spinadel [Tue, 17 Feb 2015 10:45:21 +0000 (12:45 +0200)]
iwlwifi: mvm: don't override passive dwell in case of fragmented scan

Currently scan params structure has only active or passive dwell time
fields, passive one is used for fragmented scans too. FW needs the
passive dwell time even when performing fragmented scan for calculating
time between channels. Add a separate parameter for fragmented dwell time
and pass both fragmented and passive to FW.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon low RSSI
Emmanuel Grumbach [Tue, 3 Feb 2015 12:29:36 +0000 (14:29 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon low RSSI

Lots of issues can be caught when the RSSI drops. Add the
ability to collect the firmware data at that point.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon statistics
Emmanuel Grumbach [Tue, 10 Feb 2015 13:26:57 +0000 (15:26 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon statistics

It can be very useful to monitor the statistics and trigger
a firmware dump when a certain value hits a certain offset.
Since the statistics are huge, add a generic trigger. When
the DWORD at offset X reaches value Y.

Since there is another trigger before this one I can't add
right now because of a dependency on mac80211, add a
reserved entry to keep the enum in place.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: restart firmware recording when no configuration is set
Emmanuel Grumbach [Sun, 15 Feb 2015 15:16:16 +0000 (17:16 +0200)]
iwlwifi: mvm: restart firmware recording when no configuration is set

Sometimes the firmware will have a hard coded configuration.
In this case, the driver won't find any configuration
in the firmware file, and it will have to re-start
recording in case it has been stopped. This can't be done
by the configuration host command since there is no such
host command configured. Do that with the registers instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon command response
Emmanuel Grumbach [Tue, 10 Feb 2015 08:49:20 +0000 (10:49 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon command response

This will allow to collect the data as soon the firmware
sends a specific notification of command response.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon channel switch
Emmanuel Grumbach [Tue, 10 Feb 2015 08:49:51 +0000 (10:49 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon channel switch

We fire the trigger when the channel switch starts, but
the delay is configurable. That makes is easier to catch
channel switches that fail.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon missed beacons
Emmanuel Grumbach [Mon, 2 Feb 2015 10:44:23 +0000 (12:44 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon missed beacons

Missing beacons is a good indication that something is going
wrong in the firmware. Add a trigger to be able to collect
data when we start missing beacons with a configurable
threshold.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add the cause of the firmware dump in the dump
Emmanuel Grumbach [Thu, 29 Jan 2015 12:58:20 +0000 (14:58 +0200)]
iwlwifi: mvm: add the cause of the firmware dump in the dump

Now that the firmware dump can be triggered by events in
the code and not only the user or an firmware ASSERT, we
need a way to know why the firmware dump was triggered.
Add a section in the dump file for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add framework for triggers for fw dump
Emmanuel Grumbach [Thu, 29 Jan 2015 12:58:06 +0000 (14:58 +0200)]
iwlwifi: mvm: add framework for triggers for fw dump

Most of the time, the issues we want to debug with the
firmware dump mechanism are transient. It is then very
hard to stop the recording on time and get meaningful
data.
In order to solve this, I add here an infrastucture
of triggers. The user will supply a list of triggers
that will start / stop the recording. We have two types
of triggers: start and stop. Start triggers can start a
specific configuration. The stop triggers will be able to
kick the collection of the data with the currently running
configuration. These triggers are given to the driver by
the .ucode file - just like the configuration.

In the next patches, I'll add triggers in the code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use only 40 ms for fragmented scan
David Spinadel [Sun, 15 Feb 2015 12:45:33 +0000 (14:45 +0200)]
iwlwifi: mvm: use only 40 ms for fragmented scan

20 ms fragments are no longer required by system.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to force the Rx chains from debugfs
Emmanuel Grumbach [Sun, 8 Feb 2015 08:56:43 +0000 (10:56 +0200)]
iwlwifi: mvm: allow to force the Rx chains from debugfs

This is useful to debug weird antenna problems.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add new TLV capability flag for BT PLCR
Emmanuel Grumbach [Thu, 12 Feb 2015 10:33:09 +0000 (12:33 +0200)]
iwlwifi: add new TLV capability flag for BT PLCR

Packet Level Co-Running is a BT Coex feature which is
supported on certain devices only, hence the need for
a TLV flag for it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>