]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoiwlwifi: mvm: rs: refactor rs_update_rate_tbl
Eyal Shapira [Sun, 29 Mar 2015 15:38:07 +0000 (18:38 +0300)]
iwlwifi: mvm: rs: refactor rs_update_rate_tbl

Minor cleanup and refactoring.

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: check the size of the trigger struct from the firmware file
Emmanuel Grumbach [Thu, 19 Mar 2015 21:14:06 +0000 (23:14 +0200)]
iwlwifi: check the size of the trigger struct from the firmware file

When we access the triggers we need to make sure that the
data we expect was actually provided by the firmware file.
Check this when we decode the triggers from the firmware
file.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: fix comment indentation
Liad Kaufman [Sun, 29 Mar 2015 08:39:34 +0000 (11:39 +0300)]
iwlwifi: mvm: rs: fix comment indentation

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Clean up UMAC scan UIDs in the reset and drv_stop flows
Alexander Bondar [Thu, 26 Mar 2015 09:07:35 +0000 (11:07 +0200)]
iwlwifi: mvm: Clean up UMAC scan UIDs in the reset and drv_stop flows

In the reset flow, the driver cancels ongoing scan and sends scan
complete notification to mac80211. However it does not clean its UID.
Add cleaning scan UID for the ongoing scan. Loop over all other UIDs
to make sure there's nothing left there and warn if any is found.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: 8000: change PNVM in case it doesn't match to the HW step
Eran Harary [Tue, 24 Mar 2015 08:59:46 +0000 (10:59 +0200)]
iwlwifi: 8000: change PNVM in case it doesn't match to the HW step

There is a strong relationship between the NVM version and
the hardware step. Enforce that in the driver in case the
default NVM on the platform is the wrong one.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix debug print in the RSA ownership workaround
Eran Harary [Thu, 19 Mar 2015 11:01:07 +0000 (13:01 +0200)]
iwlwifi: mvm: fix debug print in the RSA ownership workaround

The semaphore may not be accessible. Fix the debug prints
accordingly.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: allow to configure the timeout for the Tx queues
Emmanuel Grumbach [Thu, 19 Mar 2015 18:04:51 +0000 (20:04 +0200)]
iwlwifi: mvm: allow to configure the timeout for the Tx queues

Sometimes we will want to configure the timeouts for the
Tx queues based on the vif type. Allow to do that using the
trigger mechanism.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: drop support for early versions of 8000
Emmanuel Grumbach [Thu, 5 Mar 2015 11:06:13 +0000 (13:06 +0200)]
iwlwifi: drop support for early versions of 8000

These early versions are no longer supported.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: use debugfs_create_bool() for enable_scan_iteration_notif
Luciano Coelho [Fri, 27 Feb 2015 14:26:57 +0000 (16:26 +0200)]
iwlwifi: mvm: use debugfs_create_bool() for enable_scan_iteration_notif

There is no need to implement the enable_scan_iteration_notif handling
explicitly and there's no reason not to export the current value.  So
use debugfs_create_bool() instead.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add delay to scheduled scan
Luciano Coelho [Wed, 3 Dec 2014 08:52:26 +0000 (10:52 +0200)]
iwlwifi: mvm: add delay to scheduled scan

Add support for delaying the start of a scheduled scan (or a WoWLAN
net-detect scan).

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: initialize trans_pcie->ref_count on configure()
Eliad Peller [Wed, 4 Mar 2015 08:38:32 +0000 (10:38 +0200)]
iwlwifi: pcie: initialize trans_pcie->ref_count on configure()

ref_count is currently initialized on start_fw(). This causes
some issues in restart flow, as currently active references
(e.g. unclaimed command) will get cleared, resulting in
invalid reference accounting.

Move the ref_count initialization to the configure() trans op,
so it won't be re-initialized on restart.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: inform mac80211 about umac scans that was aborted by restart
David Spinadel [Tue, 10 Mar 2015 08:06:02 +0000 (10:06 +0200)]
iwlwifi: mvm: inform mac80211 about umac scans that was aborted by restart

In nic restart flow we inform mac80211 that scan was aborted, but it was
based only on scan_status which is not set by UMAC scan. Fix that.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove d0i3 ref correctly during AP start
Arik Nemtsov [Sun, 8 Mar 2015 10:19:42 +0000 (12:19 +0200)]
iwlwifi: mvm: remove d0i3 ref correctly during AP start

The AP_START d0i3 reference was never removed if the AP started correctly.
This has the unpleasant side-effect of preventing D0i3 on Android if the
WiFi hotspot was ever started on the device.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: take IWL_MVM_REF_UCODE_DOWN before restarting hw
Eliad Peller [Tue, 3 Mar 2015 10:03:20 +0000 (12:03 +0200)]
iwlwifi: mvm: take IWL_MVM_REF_UCODE_DOWN before restarting hw

we unref IWL_MVM_REF_UCODE_DOWN on iwl_mvm_restart_complete().

Usually, the restart is initiated by iwl_mvm_nic_restart(),
which takes the reference before restarting the hw.

However, in D3 flow we might call ieee80211_restart_hw()
directly (in case of suspend error and on d3_test-resume),
which without taking the ref first. fix it.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't wait for firmware verification
Eran Harary [Tue, 3 Mar 2015 14:19:36 +0000 (16:19 +0200)]
iwlwifi: mvm: don't wait for firmware verification

The firmware has a race in the flow that indicates the
completion of the authentication. Checking the completion
of the authentication is not really needed anyway since
we can wait for the ALIVE notification instead.
Remove the unneeded and buggy code.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove time-event start/end failure warning
Johannes Berg [Thu, 12 Mar 2015 08:10:13 +0000 (09:10 +0100)]
iwlwifi: mvm: remove time-event start/end failure warning

This warning is misleading. In many cases, for example P2P ROC time
events, this will happen if the time event is aborted, for example
due to a higher priority time event. This is entirely normal and not
worth warning about.

In other cases, where we actually do act upon this, for example when
trying to connect and this fails, we should instead warn as part of
the disconnect operation.

Change the code to do that, i.e. make the warning a debug message,
and make it more prominent (an error) when we actually disconnect
because of it.

This also fixes confusion in the logs - the warning was mistaken for
something that needed investigation, while in most cases it's just
expected behaviour that occasionally some lower-priority time events
would not complete fully.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add iccm data to 8000 b-step data dump
Liad Kaufman [Mon, 2 Mar 2015 09:46:46 +0000 (11:46 +0200)]
iwlwifi: mvm: add iccm data to 8000 b-step data dump

In 8000 HW family B-step only, the ICCM is separate
from the SRAM. This adds the ICCM to the dump data
collected for FW debug.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: properly flush the queues for buffering transport
Emmanuel Grumbach [Wed, 11 Mar 2015 07:34:31 +0000 (09:34 +0200)]
iwlwifi: mvm: properly flush the queues for buffering transport

There are transport that must buffer frames in the driver.
This means that we have frames that are not in the op_mode
and not visible to the firwmare. This causes issues when we
flush the queues: the op_mode flushes a queue, and the
firmware flushes all the frames that are *currently* on the
rings, but if the transport buffers frames, it can submit
these while we are flushing. This leads to a situation
where we still have frames on the queues after we flushed
them.
Preventing those buffered frame from getting into the
firmware is possible, but then, we have to run the Tx
response path on frames that didn't reach the firmware
which is not desirable.
The way I solve this here is to let these frames go to the
firmware, but make sure the firmware will not transmit them
(by setting the station as draining). The op_mode then needs
to wait until the transport itself is empty to be sure that
the queue is really empty.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: add rx packet sequence number to dbg print
Liad Kaufman [Sun, 15 Mar 2015 15:38:22 +0000 (17:38 +0200)]
iwlwifi: pcie: add rx packet sequence number to dbg print

For each RX packet until this patch there only was a debug
print of the HCMD and the offset. This adds also the
sequence number of the packet for easier matching between
what was sent, what came back / was received, and what
got stuck somewhere and was never responded by the FW.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: assign new TLV bit for multi-source LAR
Arik Nemtsov [Wed, 25 Feb 2015 09:06:37 +0000 (11:06 +0200)]
iwlwifi: mvm: assign new TLV bit for multi-source LAR

According to FW methodology, the capability bits should be the only ones
that change per-HW. The API bits should remain constant across different
HWs.
Currently this is not the case with multi-source LAR (API bit 9). Assign
a new capability bit to eventually replace the API bit. Until the API bit
can be deprecated, the driver will check either to enable multi-source
LAR.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: continue (with error) CSA on GO time event failure
Johannes Berg [Tue, 10 Mar 2015 13:44:00 +0000 (14:44 +0100)]
iwlwifi: mvm: continue (with error) CSA on GO time event failure

If, on a GO, the CSA time event fails to be scheduled, continue the
flow towards mac80211's state machine so it doesn't get stuck, but
report an error later on the post switch which will cause mac80211
to tear down the operation. This ensures nothing gets stuck due to
the scheduling failure.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge branch 'iwlwifi-fixes' into iwlwifi-next
Emmanuel Grumbach [Thu, 12 Mar 2015 12:38:26 +0000 (14:38 +0200)]
Merge branch 'iwlwifi-fixes' into iwlwifi-next

9 years agoiwlwifi: mvm: simplify iwl_mvm_get_wakeup_status() return
Johannes Berg [Tue, 3 Mar 2015 19:23:47 +0000 (20:23 +0100)]
iwlwifi: mvm: simplify iwl_mvm_get_wakeup_status() return

The return value in iwl_mvm_get_wakeup_status() is a bit unclear in
that it's not obvious that we don't leak fw_status in some cases.
Use fw_status directly with ERR_PTR() and return only it, that way
the compiler has a chance of proving that it's uninitialized (if it
ever is due to new changes.)

Additionally, this removes a smatch warning since smatch couldn't
figure out that fw_status can't, in fact, leak here.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't double unlock the mutex in __iwl_mvm_resume()
Luciano Coelho [Thu, 12 Mar 2015 07:25:15 +0000 (09:25 +0200)]
iwlwifi: mvm: don't double unlock the mutex in __iwl_mvm_resume()

When IWLWIFI_DEBUGFS is not set, we should not unlock the mutex after
calling iwl_mvm_query_wakeup_reasons(), because this function unlocks
it already.  Move the goto out_iterate outside the #ifdef.

Change-Id: I13d86402aecf0eeec44b1abbe2b244fbc706a5eb
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
9 years agoiwlwifi: mvm: clarify time event end handling
Johannes Berg [Wed, 11 Mar 2015 19:27:06 +0000 (20:27 +0100)]
iwlwifi: mvm: clarify time event end handling

The code here is a little confusing, the iwl_mvm_te_check_disconnect()
will check that the interface is a station, but going into it after
already having processed the time even end for P2P seems strange at
first look.

Put a switch statement there to distinguish the interface types and
make this more readable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Always enable the smart FIFO
Eran Harary [Sun, 8 Feb 2015 11:58:50 +0000 (13:58 +0200)]
iwlwifi: mvm: Always enable the smart FIFO

We previously enabled the smart FIFO (SF) in BSS only after
association.
This cause interrupt latency on P2P on certain devices.
Change the working model to enable the SF all the time and
play with the timeout values based on the association state.
This change was not tested on older firwmares, so make it
happen only on -13.ucode and up.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: update copyright to include 2015
Emmanuel Grumbach [Sun, 8 Mar 2015 12:18:17 +0000 (14:18 +0200)]
iwlwifi: update copyright to include 2015

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add more new 8260 series PCI IDs
Oren Givon [Mon, 9 Mar 2015 09:25:59 +0000 (11:25 +0200)]
iwlwifi: add more new 8260 series PCI IDs

More sub system IDs were introduced for the 8260 series.
Add the new sub system IDs so the cards can be recognized.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - update the new API
Emmanuel Grumbach [Thu, 19 Feb 2015 13:00:18 +0000 (15:00 +0200)]
iwlwifi: mvm: BT Coex - update the new API

The firmware was not using the new API, so we don't need to
differentiate between the different stages of this new API.
The main difference here is that most of the hard coded
values are not sent through the command anymore.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix force NMI for 8000
Emmanuel Grumbach [Mon, 9 Mar 2015 10:37:59 +0000 (12:37 +0200)]
iwlwifi: mvm: fix force NMI for 8000

The newer devices will enable a new register for this
(DEVICE_SET_NMI_8000B_REG), but the interrupt handler
isn't wired yet.
Keep the old register for now.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: freeze the non-shared queues when a station goes to sleep
Emmanuel Grumbach [Thu, 22 Jan 2015 11:15:15 +0000 (13:15 +0200)]
iwlwifi: mvm: freeze the non-shared queues when a station goes to sleep

When a station goes to sleep, we can't transmit any frame
to it. This means that until that station will wake up, a
queue that is dedicated to this station won't progress at
all. Take this into account when monitoring stuck queues
and don't account for the time the station was asleep.
This allows to mask false positives where the queues are
stuck not because of a bug, but because of the station
being asleep.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: allow the op_mode to freeze the stuck queue timer
Emmanuel Grumbach [Tue, 20 Jan 2015 15:02:40 +0000 (17:02 +0200)]
iwlwifi: pcie: allow the op_mode to freeze the stuck queue timer

This allows the op_mode to let the transport know that a
queue is currently frozen and that its timer should be
stopped.
When the queue is unfrozen, its timer should be set to
expire after the remainder of the timeout has elapsed.
This can be used when stations go to sleep. When a station
goes to sleep, the op_mode can freeze the timer so that the
queue will never be considered as stuck. When the station
wakes up, the queue will be unfrozen.
This is meant to avoid false positives that would happen if
a buggy station goes to sleep for a very long time. In case
we have a dedicated queue for this station (BA agreement)
and it goes to sleep for a very long time, the queue would
rightfully be stopped during all that time. In this case,
the stuck queue timer could fire and that would be a false
positive.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: update Tx statistics when using fixed rate
Eyal Shapira [Sun, 8 Mar 2015 17:43:41 +0000 (19:43 +0200)]
iwlwifi: mvm: rs: update Tx statistics when using fixed rate

The Tx statistics weren't updated when using fixed rate for
debugging. Fix this as Tx statistics are useful in this use case.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't init MCC during CT-kill
Arik Nemtsov [Wed, 4 Mar 2015 13:08:00 +0000 (15:08 +0200)]
iwlwifi: mvm: don't init MCC during CT-kill

RTNL is not taken during CT-kill so regulatory APIs cannot be invoked.
That's fine, since the HW is only brought up to check the temperature
during CT-kill. We don't expect Tx or scanning.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove warning on station exhaustion
Johannes Berg [Tue, 10 Mar 2015 19:32:08 +0000 (20:32 +0100)]
iwlwifi: mvm: remove warning on station exhaustion

When using IBSS, it's easily possible to exhaust the number
of available stations in the driver, so don't warn on it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: trans: Take ownership on secure machine before FW load
Eran Harary [Tue, 3 Mar 2015 11:53:28 +0000 (13:53 +0200)]
iwlwifi: trans: Take ownership on secure machine before FW load

When we load the firmware for the 8000 B step device, it'll
verify its signature. In the current version of the
hardware, there can be a race between the WiFi firmware
being loaded and the Bluetooth firmware being loaded.

Check that WiFi is authenticated, if not, take ownership
on the authentication machine to make sure that the WiFi
firmware will be authenticated.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: add new 8260 series PCI IDs
Oren Givon [Wed, 4 Mar 2015 14:26:45 +0000 (16:26 +0200)]
iwlwifi: add new 8260 series PCI IDs

New sub system IDs were introduced for the 8260 series.
This patch adds them so new 8260 cards can be recognized.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: rs: improve ss_params debug print
Eyal Shapira [Mon, 2 Mar 2015 08:35:19 +0000 (10:35 +0200)]
iwlwifi: mvm: rs: improve ss_params debug print

Make the print a bit more readable.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: don't allow the FW to return invalid ch indices
Arik Nemtsov [Sun, 1 Mar 2015 16:24:57 +0000 (18:24 +0200)]
iwlwifi: don't allow the FW to return invalid ch indices

If the FW returns an invalid channels count in response to an MCC request,
make sure we don't reference invalid indices in the channels array.

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: reflect TDLS pm state in mvmvif->pm_enabled
Arik Nemtsov [Sun, 22 Feb 2015 17:15:04 +0000 (19:15 +0200)]
iwlwifi: mvm: reflect TDLS pm state in mvmvif->pm_enabled

When entering D0i3, the MVM mutex cannot be grabbed. This interferes
with the calculation of the number of connected TDLS stations during
the setup of the power cmd.
The goal is to disable power saving for all vifs while any TDLS station
is connected. For this purpose it is enough to keep the pm_enabled
member of all mvmvifs as false. An update of the power state already
occurs when a TDLS station is added/removed, so the values are correctly
updated.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix identation
Emmanuel Grumbach [Mon, 2 Mar 2015 12:39:03 +0000 (14:39 +0200)]
iwlwifi: mvm: fix identation

mvm->fw->dbg_dest_tlv really needs to be under the right
parenthesis.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove unneeded include iwl-fw-error-dump.h
Emmanuel Grumbach [Mon, 2 Mar 2015 12:35:41 +0000 (14:35 +0200)]
iwlwifi: mvm: remove unneeded include iwl-fw-error-dump.h

The functions related to firmware error dump moved. No need
for this unclude anymore.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: use correct NVM offset for LAR enable for new NVMs
Arik Nemtsov [Wed, 4 Feb 2015 13:38:56 +0000 (15:38 +0200)]
iwlwifi: use correct NVM offset for LAR enable for new NVMs

New NVM versions in LnP platforms have the lar_enable bits in a different
offset.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix smatch warning: warn: inconsistent indenting
Emmanuel Grumbach [Sun, 1 Mar 2015 15:18:00 +0000 (17:18 +0200)]
iwlwifi: fix smatch warning:  warn: inconsistent indenting

While at it, fix a few checkpatch issues.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: include more registers in the prph dump
Emmanuel Grumbach [Wed, 25 Feb 2015 14:06:46 +0000 (16:06 +0200)]
iwlwifi: pcie: include more registers in the prph dump

This adds BT Coex data to the prph register list.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: speed up the Tx DMA stop flow
Emmanuel Grumbach [Wed, 25 Feb 2015 13:49:39 +0000 (15:49 +0200)]
iwlwifi: pcie: speed up the Tx DMA stop flow

We don't need to acquire MAC access for each access, it
makes much more sense to keep the MAC access. This speeds
up the Tx DMA stop flow significantly.
Moreover, if one channel can't be stopped, stop the others
but don't poll for them to avoid being stuck there for a
long time.

This solves a situation in which we were stuck in that flow
for way too long with a spinlock held which led to a kernel
panic.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support family 8000 B2/C steps
Eran Harary [Wed, 25 Feb 2015 12:24:51 +0000 (14:24 +0200)]
iwlwifi: mvm: support family 8000 B2/C steps

In-order to recognize newer step of the device, the driver
must read the chip_version_id from the AUX bus MISC address
space. This will determine what firmware file will be
loaded.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: always update the quota after association
Emmanuel Grumbach [Thu, 26 Feb 2015 13:14:35 +0000 (15:14 +0200)]
iwlwifi: mvm: always update the quota after association

When we associate we always need to update the quotas. This
fixes a bug for cases in which quotas weren't udapted after
association.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - disable RRC by default
Emmanuel Grumbach [Thu, 26 Feb 2015 14:54:24 +0000 (16:54 +0200)]
iwlwifi: mvm: BT Coex - disable RRC by default

Enable this feature only if the firmware advertises support
for it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF
Emmanuel Grumbach [Thu, 26 Feb 2015 14:40:56 +0000 (16:40 +0200)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_SF_NO_DUMMY_NOTIF

All the supported firmwares support this API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove IWL_UCODE_TLV_API_DISABLE_STA_TX
Emmanuel Grumbach [Thu, 26 Feb 2015 14:39:36 +0000 (16:39 +0200)]
iwlwifi: mvm: remove IWL_UCODE_TLV_API_DISABLE_STA_TX

All the supported firwmares have this new API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: bump API to 13 for devices that use iwlmvm
Emmanuel Grumbach [Sun, 1 Mar 2015 08:46:58 +0000 (10:46 +0200)]
iwlwifi: bump API to 13 for devices that use iwlmvm

This new firmware will come out soon.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: set LAR MCC on D3/D0 transitions
Jonathan Doron [Thu, 27 Nov 2014 14:55:25 +0000 (16:55 +0200)]
iwlwifi: mvm: set LAR MCC on D3/D0 transitions

When moving to the D3 FW give it the valid MCC from the D0 FW. When
returning from D3 to D0, query the D3 FW for the latest MCC, as
it might have changed internally. This MCC will be replayed to the D0 FW
when it boots.

Signed-off-by: Jonathan Doron <jonathanx.doron@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support LAR updates from BIOS
Jonathan Doron [Thu, 27 Nov 2014 14:57:55 +0000 (16:57 +0200)]
iwlwifi: mvm: support LAR updates from BIOS

When booting the card, check for a dedicated regulatory ACPI entry. If
such exists, read it and give the information to FW with the appropriate
source.

Signed-off-by: Jonathan Doron <jonathanx.doron@intel.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: take the MAC address from HW registers
Eran Harary [Sun, 8 Feb 2015 09:41:43 +0000 (11:41 +0200)]
iwlwifi: mvm: take the MAC address from HW registers

For some configurations, the driver should get the MAC
address from the hardware registers and not from the
regular locations. Since the parsing of the MAC address
is the same regardless of its source, continue the regular
code path (parsing) after we read the registers.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: allow disabling LAR via module param
Arik Nemtsov [Sun, 28 Dec 2014 07:23:16 +0000 (09:23 +0200)]
iwlwifi: allow disabling LAR via module param

This module parameter is useful for debugging NVM and LAR related issues.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support new PHY_SKU nvm section for family 8000 B0
Eran Harary [Mon, 1 Dec 2014 15:53:53 +0000 (17:53 +0200)]
iwlwifi: mvm: support new PHY_SKU nvm section for family 8000 B0

Starting from family 8000 B0 step the radio_cfg parameters
and the get_sku parameters moved from SW section to PHY_SKU section.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: disable 11ac if 11n is disabled
Eliad Peller [Thu, 23 Oct 2014 13:29:10 +0000 (16:29 +0300)]
iwlwifi: disable 11ac if 11n is disabled

11ac depends on 11n, so disable it if 11n is disabled.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: iwlmvm: LAR: disable LAR support due to NVM vs TLV conflict
Matti Gottlieb [Thu, 31 Jul 2014 06:16:25 +0000 (09:16 +0300)]
iwlwifi: iwlmvm: LAR: disable LAR support due to NVM vs TLV conflict

If LAR is supported in TLV, but the NVM does not enable it, then disable
LAR support and ignore the TLV's bit that enabled LAR.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: use IWL_DEFAULT_MAX_TX_POWER for max_eirp
Eliad Peller [Sun, 7 Sep 2014 14:45:11 +0000 (17:45 +0300)]
iwlwifi: use IWL_DEFAULT_MAX_TX_POWER for max_eirp

max_eirp affects the txpower configured to the power,
so use the max tx power (22) instead of some other
value.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: change last 5ghz channel to 165 & add support for 8000 family
Matti Gottlieb [Thu, 26 Jun 2014 08:10:57 +0000 (11:10 +0300)]
iwlwifi: change last 5ghz channel to 165 & add support for 8000 family

Fix the last 5ghz channel to 165 instead of 161
Add support for 8000 family, until channel 181.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: nvm: init correct nvm channel list for 8000 devices
Arik Nemtsov [Tue, 10 Jun 2014 08:25:35 +0000 (11:25 +0300)]
iwlwifi: nvm: init correct nvm channel list for 8000 devices

Otherwise the regulatory data will mistakenly contain only 7000 series
channels.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: LAR: Add chub mcc change notify command
Arik Nemtsov [Wed, 5 Mar 2014 10:26:15 +0000 (12:26 +0200)]
iwlwifi: mvm: LAR: Add chub mcc change notify command

Chub (Communication Hub, CommsHUB) is a HW component that connects to the cellular
and connectivity cores that gets updates of mcc changes, and then notifies the FW
directly of any mcc change.

The ucode notifies the driver (via this command) that it should ask for an mcc update,
and the driver sends the ucode the update mcc command to set the updated regulatory info.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: don't declare support for 5ghz if not supported
Eliad Peller [Mon, 26 May 2014 15:11:37 +0000 (18:11 +0300)]
iwlwifi: don't declare support for 5ghz if not supported

Remove a useless debug print about unsupported channels.
Also add a comment about the LAR special case where channels
might become valid later.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: ignore IBSS flag as regulatory NO-IR indication
Arik Nemtsov [Thu, 30 Oct 2014 13:12:39 +0000 (15:12 +0200)]
iwlwifi: ignore IBSS flag as regulatory NO-IR indication

According to updated regulatory guidelines, the ACTIVE bit in the NVM
also allows ibss activity on the channel. The IBSS NVM bit is not updated
when LAR is active and is deprecated. Using this bit for NO-IR incorrectly
causes all 5Ghz channels to be marked as passive.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: consider LAR support during NVM parse
Arik Nemtsov [Sun, 23 Mar 2014 14:18:40 +0000 (16:18 +0200)]
iwlwifi: mvm: consider LAR support during NVM parse

Register to cfg80211 with all channels enabled when LAR is supported.
Appropriate channels will later be disabled when a specific regulatory
domain is defined.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: create regdomain from mcc_update_cmd response
Arik Nemtsov [Wed, 5 Mar 2014 10:19:10 +0000 (12:19 +0200)]
iwlwifi: create regdomain from mcc_update_cmd response

Parse the NVM channel data and create a regulatory domain with a rule
for every 20Mhz channel. Use the AUTO_BW flag so the regulatory core
can unify single-channel rules into ranges.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: init country code on init/recovery
Arik Nemtsov [Tue, 4 Mar 2014 17:58:46 +0000 (19:58 +0200)]
iwlwifi: mvm: init country code on init/recovery

During init queue a regulatory update to retrieve the default
regulatory settings from FW. If we're during recovery, only replay the
current country code to FW, if it exists.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add MCC update FW API
Arik Nemtsov [Tue, 4 Mar 2014 17:54:12 +0000 (19:54 +0200)]
iwlwifi: mvm: add MCC update FW API

The new API sets an MCC (mobile country code) to FW and receives a
channel structure to be used as a basis for an updated regulatory domain.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix max_ht_ampdu_exponent for older devices
Emmanuel Grumbach [Mon, 23 Feb 2015 00:40:07 +0000 (02:40 +0200)]
iwlwifi: fix max_ht_ampdu_exponent for older devices

The commit below didn't update the max_ht_ampdu_exponent
for the devices listed in iwl-[1-6]000.c which, in result,
became 0 instead of 8K. This reduced the size of the Rx
AMPDU from 64K to 8K which had an impact in the Rx
throughput. One user reported that because of this, his
downstream throughput droppped by a half.

CC: <stable@vger.kernel.org> [3.19]
Fixes: c064ddf318aa ("iwlwifi: change max HT and VHT A-MPDU exponent")
Reported-and-tested-by: Valentin Manea <linux-wireless@mrs.ro>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: disconnect if CSA time event fails scheduling
Johannes Berg [Tue, 10 Mar 2015 09:47:57 +0000 (10:47 +0100)]
iwlwifi: mvm: disconnect if CSA time event fails scheduling

If this situation ever happens, the mac80211 state machine gets
confused because it never clears csa_active. There was a separate
bug that lead to this happening with a working connection, but it
isn't very robust to try to keep the connection up in this case.

When removing the time event the CSA essentially procedure stops,
so the safest thing to do is to disconnect in this case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: dvm: drop VO packets when mac80211 tells us to
Emmanuel Grumbach [Tue, 10 Mar 2015 20:42:50 +0000 (22:42 +0200)]
iwlwifi: dvm: drop VO packets when mac80211 tells us to

mac80211 now informs the driver when to drop the packets
upon flush(). This will happen before disconnecting, or
before we shut down the interface. We can now rely on this
to drop all the packets including the VO queues.
When mac80211 sets drop to false, wait for all the queues
to be empty.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set
Emmanuel Grumbach [Sat, 7 Mar 2015 17:35:37 +0000 (19:35 +0200)]
iwlwifi: mvm: fix compilation with IWLWIFI_DEBUGFS not set

The commits below broke compilation when
CONFIG_IWLWIFI_DEBUGFS is not set.
FIx that.

Fixes: ddf89ab10a93 ("iwlwifi: mvm: allow to force the Rx chains from debugfs")
Fixes: 9d761fd8a583 ("iwlwifi: mvm: add trigger for firmware dump upon missed beacons")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: BT Coex - fix a NULL pointer exception
Emmanuel Grumbach [Thu, 5 Mar 2015 11:43:15 +0000 (13:43 +0200)]
iwlwifi: mvm: BT Coex - fix a NULL pointer exception

The commit below introduced an unsafe dereference of
mvmvif->phy_ctxt. It can be NULL even if we hold the mutex.
We can be handling a BT Coex notification while the vif has
already been unassigned. This can happen since the BT Coex
notification is hanled asynchronuously: we can have started
to handle the BT Coex notification trying to acquire the
mutex while the unassign flow already got it. The BT Coex
notification handling will wait for the mutext. I'll get it
later, but then mvmvif->phy_ctxt will be NULL.

Panic log:

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<f985180d>] iwl_mvm_bt_notif_iterator+0x9d/0x340 [iwlmvm]
*pdpt = 0000000000000000 *pde = f000eef300000007
Oops: 0000 [#1] SMP
Workqueue: events iwl_mvm_async_handlers_wk [iwlmvm]
task: ed719b20 ti: ec03e000 task.ti: ec03e000
EIP: 0060:[<f985180d>] EFLAGS: 00010202 CPU: 2
EIP is at iwl_mvm_bt_notif_iterator+0x9d/0x340 [iwlmvm]
EAX: 00000000 EBX: f6d3cb70 ECX: f6d3cb70 EDX: 00000000
ESI: ec03fe40 EDI: efeb8810 EBP: ec03fdf0 ESP: ec03fdac
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
CR0: 80050033 CR2: 00000000 CR3: 01a1a000 CR4: 001407f0
Stack:
 f743ca80 f744a404 ec03fdcc c10e3952 00003aba f743ca80 00000246 f743ca80
 00000246 00000000 00000001 00000000 ebd45ff6 ebd458a4 f6d3c500 ebd45578
 ebd44b01 ec03fe18 f99e1bc2 00000002 ebd44bc0 f9851770 00000000 f6d3c500
Call Trace:
 [<c10e3952>] ? ring_buffer_unlock_commit+0xa2/0xd0
 [<f99e1bc2>] __iterate_interfaces+0x82/0x110 [mac80211]
 [<f9851770>] ? iwl_mvm_bt_coex_reduced_txp+0x140/0x140 [iwlmvm]
 [<f99e1c6a>] ieee80211_iterate_active_interfaces_atomic+0x1a/0x20 [mac80211]
 [<f9851427>] iwl_mvm_bt_coex_notif_handle+0x77/0x280 [iwlmvm]
 [<f9852161>] iwl_mvm_rx_bt_coex_notif_old+0x211/0x220 [iwlmvm]
 [<f9850b8b>] iwl_mvm_rx_bt_coex_notif+0x19b/0x1b0 [iwlmvm]
 [<f983944f>] iwl_mvm_async_handlers_wk+0x7f/0xe0 [iwlmvm]

CC: <stable@vger.kernel.org> [3.19+]
Fixes: 123f515635b1 ("iwlwifi: mvm: BT Coex - add support for TTC / RRC")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
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>
9 years agoiwlwifi: mvm: don't iterate interfaces to disconnect in net-detect
Luciano Coelho [Fri, 13 Feb 2015 19:37:09 +0000 (21:37 +0200)]
iwlwifi: mvm: don't iterate interfaces to disconnect in net-detect

We shouldn't call iwl_mvm_d3_disconnect_iter() on the running
interfaces when we are woken up due to net-detect, because it doesn't
make sense.  Additionally, this seems to set the
IEEE80211_SDATA_DISCONNECT_RESUME flag that will cause a disconnection
on the next resume (if a normal WoWLAN is used).

To solve this, skip the iteration loop when net-detect is set.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reported-by: Samuel Tan <samueltan@chromium.org>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: new Alive / error table API
Emmanuel Grumbach [Tue, 3 Feb 2015 18:11:48 +0000 (20:11 +0200)]
iwlwifi: mvm: new Alive / error table API

The new API slightly changes the layout of the version of
the firmware - prepare for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support beacon statistics for BSS client
Johannes Berg [Wed, 21 Jan 2015 20:41:29 +0000 (21:41 +0100)]
iwlwifi: mvm: support beacon statistics for BSS client

Report the average beacon signal and the number of received beacons as
measured by the firmware.

Since the firmware just counts, and doesn't reset the counter at all,
clear it in the firmware whenever we associate. However, accumulate it
over firmware restart.

Since clearing the statistics in the firmware will also clear the ones
for the radio statistics, add those to the accumulator when cleared.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't write to DBGC_OUT_CTRL when stopping the recording
Eran Harary [Tue, 10 Feb 2015 07:25:50 +0000 (09:25 +0200)]
iwlwifi: mvm: don't write to DBGC_OUT_CTRL when stopping the recording

Due to HW bug in the DBGC when driver want to stop the dbg recording it
should wait 100us before collecting the data instead of write 0 to
DBGC_OUT_CTRL.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove deprecated scan API code
Luciano Coelho [Tue, 10 Feb 2015 11:03:38 +0000 (13:03 +0200)]
iwlwifi: mvm: remove deprecated scan API code

The legacy scan API is deprecated and not used anymore with 10 and
higher firmware versions.  Since we deprecated firmware version 9, we
can remove a whole lot of unused code.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: deprecate -9.ucode for 3160 / 7260 / 7265
Luciano Coelho [Tue, 10 Feb 2015 11:54:08 +0000 (13:54 +0200)]
iwlwifi: deprecate -9.ucode for 3160 / 7260 / 7265

This firmware is not supported anymore.  Stop loading this firmware.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: support radio statistics as global survey
Johannes Berg [Wed, 14 Jan 2015 17:12:41 +0000 (18:12 +0100)]
iwlwifi: mvm: support radio statistics as global survey

Export the radio statistics from the statistics v10 API (if the
firmware also has the capability to fill these statistics) using
the global survey data facility.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add statistics API version 10
Johannes Berg [Wed, 14 Jan 2015 16:58:57 +0000 (17:58 +0100)]
iwlwifi: mvm: add statistics API version 10

New firmware versions will report statistics using a new version 10
of the API, instead of the current version 8. Add support for this.
This enables getting beacon and radio statistics.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: pcie: apply destination before releasing reset
Emmanuel Grumbach [Wed, 4 Feb 2015 14:35:03 +0000 (16:35 +0200)]
iwlwifi: pcie: apply destination before releasing reset

This allows to use the firmware debugging system even when
the configuration values are set hard coded in the firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: remove unused function in BT coex
Eyal Shapira [Mon, 9 Feb 2015 13:18:49 +0000 (15:18 +0200)]
iwlwifi: mvm: remove unused function in BT coex

Cleanup unused code.

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: fix BT coex shared antenna activity check
Eyal Shapira [Mon, 9 Feb 2015 13:18:17 +0000 (15:18 +0200)]
iwlwifi: mvm: fix BT coex shared antenna activity check

The shared antenna should be forbidden to use only if there's
high BT activity. Comparing to BT_OFF was effectively causing
us to always forbid using the shared antenna for SISO. This
leads to degraded performance in scenarios where the shared
antenna would have better performance.

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: rs: print single stream params via debugfs
Eyal Shapira [Mon, 2 Feb 2015 10:46:22 +0000 (12:46 +0200)]
iwlwifi: mvm: rs: print single stream params via debugfs

Add this to the info printed when reading rate_scale_table.
Useful for debugging.

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: rs: avoid ss_force from being reset after tx idle
Eyal Shapira [Mon, 2 Feb 2015 10:14:54 +0000 (12:14 +0200)]
iwlwifi: mvm: rs: avoid ss_force from being reset after tx idle

ss_force is a debugging option to force a certain single stream
tx mode. It's not useful if it gets reset after tx idle. Fix that.
While at it also make sure any code touching ss_force will only
get compiled if debugfs support is configured.

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: increase the number of PAPD channel groups to 9
Eran Harary [Tue, 3 Feb 2015 13:53:29 +0000 (15:53 +0200)]
iwlwifi: mvm: increase the number of PAPD channel groups to 9

Newer devices have more PAPD channel groups.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>