History log of /drivers/net/wireless/iwlwifi/mvm/fw.c
Revision Date Author Comments
31b8b343e019e0a0c57ca9c13520a87f9cab884b 02-Nov-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: fix RFkill while calibrating

If the RFkill interrupt fires while we calibrate, it would
make the firmware fail and the driver wasn't able to recover.
Change the flow so that the driver will kill the firmware
in that case.

Since we have now two flows that are calling
trans_stop_device (the RFkill interrupt and the
op_mode_mvm_start function) - we need to better sync this.
Use the STATUS_DEVICE_ENABLED in the pcie transport in an
atomic way to achieve this.

This fixes: https://bugzilla.kernel.org/show_bug.cgi?id=86231

CC: <stable@vger.kernel.org> [3.10+]
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>
9180ac50716a097a407c6d7e7e4589754a922260 23-Sep-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: configure the LTR

The LTR is the handshake between the device and the root
complex about the latency allowed when the bus exits power
save. This configuration was missing and this led to high
latency in the link power up. The end user could experience
high latency in the network because of this.

Cc: <stable@vger.kernel.org> [3.10+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
b2b7875bfb6c69bb708b61c5f745491d240161a1 08-Sep-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: don't update quota in firmware too often

When updating quota in the firmware, it has to reset quite a bit
of internal state, which apparently can have an adverse impact on
its operation.

Avoid that by only updating the quota command when there are any
signification changes, i.e. added/removed bindings or changes in
quota that are bigger than 8 TU within a binding.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
df197c00bf1dbdee888aa886e5e93b49b42a268b 01-Aug-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: clarify stop_count, remove transport_stopped

The queue handling is a bit unclear - we have an array for
stop_count[IWL_MAX_HW_QUEUES] but indices really are the
mac80211 queue numbers. Change the array to be only of the
right size for mac80211 queues (IEEE80211_MAX_QUEUES) and
rename it to be clearer.

While at it, also remove the unused transport queue stop
bitmap in mvm.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
8b4139dc9f2171f313fc703c08269f6f8a6f6fc4 24-Jul-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: add Intel Mobile Communications copyright

Our legal structure changed at some point (see wikipedia), but
we forgot to immediately switch over to the new copyright
notice.

For files that we have modified in the time since the change,
add the proper copyright notice now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
91479b64c9f1b35cf3c2a3a284380117db1598ee 11-May-2014 Eran Harary <eran.harary@intel.com> iwlwifi: allow dynamic configuration of internal memory

New transport need to configure internal memory based on
the data in the (enlarged) alive notification from the
firmware. Add a transport API for this.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
a10229271946731959b2269370d0492d88cfab23 12-May-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: remove CMD_SYNC

CMD_SYNC is really 0 which is confusing:

if (cmd.flags & CMD_SYNC) is always false.
Fix this by simply removing its definition.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
e02a9d606d4f034038c49d8037ee057c26bc39d1 06-May-2014 Eran Harary <eran.harary@intel.com> iwlwifi: 8000: add default NVM file name in family 8000

The 8000 family products need a file on the file system
which is used as NVM. This file is a must, if no filename
is supplied as module parameter, use a default filename.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
14b485f041e35f60212317017c2127b8a9b6be31 23-Apr-2014 Eran Harary <eran.harary@intel.com> iwlwifi: mvm: prevent nic to powered up at driver load

A few devices aren't allowed to be powered up at driver
load time. Add "power_up_nic_in_init" flag to iwl_cfg
structure to customize the load flow according to the
device.

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>
ae397472f64d6db307edea87db27303c78670352 30-Mar-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: BT Coex - send priority tables from iwl_send_bt_init_conf

Calling iwl_send_bt_init_conf for INIT firmware is not a
problem, and calling iwl_send_bt_prio_tbl from
iwl_send_bt_init_conf allows us to prepare for new API.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
ad2549d8edf8f10a6330ab60bfbdaea096281a79 30-Mar-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: remove IWL_UCODE_TLV_FLAGS_PM_CMD_SUPPORT flag

All the supported firmwares have this flag set.

Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
d6cb37a35932d179a58f20b5ad6806d8592d36b4 23-Feb-2014 Inbal Hacohen <Inbal.Hacohen@intel.com> iwlwifi: mvm: remove redundant define in fw.c

This define is a leftover from dvm (in mvm, it
was replaced by MVM_UCODE_ALIVE_TIMEOUT).

Signed-off-by: Inbal Hacohen <Inbal.Hacohen@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
fde73834eadb56962fd3b00f231ce58de5f00170 12-Feb-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: nvm: remove reading valid antennas from NVM

These values aren't used as the firmware values should be used,
so reading them is pointless and hides potential errors when
somebody uses these values. Leave them zero to make it clearer
that they can't be used. We can't remove the struct members as
the DVM driver does read the values from EEPROM/OTP and the
structure is shared between drivers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
ffa702647c0ed534be042542d492f4ed94d178f8 11-Feb-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: don't dump log of second CPU when not relevant

The new API for ALIVE notification was misunderstood.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
4ed735e7599e60add8b04669a3ff6af69a31f769 12-Feb-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: remove iwl_fw_valid_(tx|rx)_ant inlines

These inlines are pretty pointless now as they just return a
fixed struct value, remove them - the code even gets shorter.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
01a9ca510ba4413895d4add6f26665d6c37a5413 03-Feb-2014 Eran Harary <eran.harary@intel.com> iwlwifi: mvm: support alive notification api version2

Alive notification ver2 support error table information
for 2 CPUs.
This is useful to fetch the error information in case of
firmware assert.

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>
c1cb92fc1ecd2159b7fb148ed8d5f09d511ae030 28-Jan-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: remove support for legacy power API

If the driver detects old firmware, we disable support for
power management.
This greatly simplifies the code.

Reviewed-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
7498cf4cebc2dab430d41ea5ccaac2197b9c7020 16-Jan-2014 Eliad Peller <eliad@wizery.com> iwlwifi: mvm: allow transport sleep when FW is operational

Hold a bitmap of taken references, according to the
reference reason (e.g. down, scan).

This will allow us validate our state and add some debugfs
entries later on.

Unref the transport when the FW is fully initialized,
allowing it to go into a low power mode.

Disallow the transition to low-power while recovery is in
progress.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
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>
0c0e2c71b4da1818693acd73d49c4971283c8e72 17-Jan-2014 Ido Yariv <ido@wizery.com> iwlwifi: mvm: handle platform PCIe power limitation

The tx backoff settings used by the thermal throttling mechanism can
also be used for enforcing a limit on the power consumption of the module.

Handle the platform PCIe power limitation by translating the limit
(measured in mw) to its respective tx backoff value. The translation is
module specific.

The resulting tx backoff value is sent to the ucode, and also serves as the
minimal backoff value that can be set by the thermal throttling mechanism.

Signed-off-by: Ido Yariv <idox.yariv@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
51368bf792c79eb917694a4155d62f04359e3734 30-Dec-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: Update Copyright to 2014

Happy new year!

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
a4082843674000ffc5db76c2d0e66455ca5af490 24-Nov-2013 Arik Nemtsov <arik@wizery.com> iwlwifi: trans: divide stop_hw into stop_device/op_mode_leave

The stop_hw trans callback is not well defined. It is missing in many
cleanup flows and the division of labor between stop_device/stop_hw
is cumbersome. Remove stop_hw and use stop_device to perform both.
Implement this for all current transports.

PCIE needs some extra configuration the op-mode is leaving to configure
RF kill. Expose this explicitly as a new op_mode_leave trans callback.
Take the call to stop_device outside iwl_run_mvm_init_ucode, this
makes more sense and WARN when we want to run the INIT firmware while
it has run already.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
1f3b0ff8eccefb0a22398bb044fa12f7e3f6f058 06-Oct-2013 Lilach Edelstein <lilach.edelstein@intel.com> iwlwifi: mvm: Add Smart FIFO support

Send firmware a Smart FIFO Configuration host command to allow
interrupt coalescing. The smart FIFO is enabled when there is
only one bound interface (other than p2p devices which are
ignored) and it is of type station, and activated while the
station is associated.

Smart Fifo allows aggragations of DMA transactions and by that
causes processor and memory controller to stay for a longer time
on lower c-states, thus saving platform power.
Firmware relies on driver to activate and disable it.

Signed-off-by: Lilach Edelstein <lilach.edelstein@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
befe9b6fd897e1bfce224b662ce62dd751843c34 25-Oct-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: warn if firmware image doesn't exist

If the firmware image that we attempt to load doesn't
actually exist we have a broken firmware file or other
code not checking things correctly, so warn in such a
case. Also avoid assigning cur_ucode/ucode_loaded then.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
19e737c98479f040e23987e50596a861e5e88b92 09-Sep-2013 Eytan Lifshitz <eytan.lifshitz@intel.com> iwlwifi: mvm: add support for NICs which have only 16 Tx queues.

Some NICs embedded in platforms that have only 16 Tx queues,
this affect the mapping of the Tx queues.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
81a67e32c444f05b9f7ba5d33c9221db9d0133e1 11-Sep-2013 Eytan Lifshitz <eytan.lifshitz@intel.com> iwlwifi: mvm: prevent the NIC to be powered at driver load time.

Some NICs aren't allowed to be powered up at driver load time.
Fix it, and move the external NVM loading from driver load time to
driver up time (parsing the external nvm file remains at driver load time).

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
64b928c4e2898dea07d5850a0708dceeb118fa3b 03-Sep-2013 Alexander Bondar <alexander.bondar@intel.com> iwlwifi: mvm: Add device wide power command

FW starts using legacy power table command (0x77) for device wide power
settings. Currently this command contains only option flags field.
It can configure the following: CAM (Continuous Active Mode) and
POWER_SAVE_ENABLE debug option. Send this command when firmware is
loaded - D0 and D3.
Note: Setting this command is important to avoid unwanted FW behavior.
It particularly fixes a bug when a device does not drop to low power
after disassociation from AP.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
ff116373f6b2e080208fc0478457734a13d8e6dc 02-Sep-2013 Eytan Lifshitz <eytan.lifshitz@intel.com> iwlwifi: mvm: change the name of init_ucode_run flag

In RF KILL the init ucode is running, but don't complete
all its tasks, so we need to run the init ucode again.
Change the flag name to init_ucode_complete, to be more appropriate.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
58fa2aad295579a0fcab699eb76bff79eb8df3a8 25-Jun-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: remove the default calibration values for 7000

The fw is now able to run TX_IQ_SKEW and RX_IQ_SKEW by
itself. No need for default values any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9ee718aa9269cf56040cf12f0f6ac6e0057397b2 19-May-2013 Eytan Lifshitz <eytan.lifshitz@intel.com> iwlwifi: mvm: add thermal throttling and CT kill

In order to avoid NIC destruction due to high temperature,
CT kill will power down the NIC.

To avoid this, thermal throttling will decrease throughput
to prevent the NIC from reaching the temperature at which
CT kill is performed.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4f59334bb4a626b91ea31f2bb3515e6a586ea1ae 13-May-2013 Eran Harary <eran.harary@intel.com> iwlwifi: fix initialisation while RF-kill is asserted

If RF-kill is asserted while a device is initialized, the
firmware INIT image can now be run to retrieve the NVM
data and register to mac80211 properly. Previously, the
initialisation would fail in this scenario and the driver
wouldn't register with mac80211 at all, making the device
unusable.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
53a9d61eb74e574aec2db86f63d9809b6116d164 28-Apr-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Change PHY context handling

1. All the phy contexts are added immediately after the
firmware is loaded and up.
2. Whenever a PHY context needs to be used, its reference
counter is incremented and the PHY context is being
configured to the appropriate configuration.
3. When a PHY context is no longer needed, its reference
count is decremented.
4. PHY contexts are never removed.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
332235427a566d8be04b9676a7ac380c8853aa9b 09-Mar-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV

This is the right source of information for the valid Tx
antennas, not the NVM.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1b53f218e2960525861cff7e75ef29a9c9522be2 13-Mar-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: print the flags in ALIVE notification

This has valuable data about RFkill state seen from the fw
side.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
b9545b48ff4c725ea71f1d9fd9b78da08ddd6551 06-Mar-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: MVM op_mode is supported on 7000 only

The code removed in this patch was used for bring up on
older NICs. No MVM capable fw will ever be released for
older NICs, so remove that code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
931d416049cdb6e8382792231317f76be0d922ce 17-Jan-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: begin basic BT-Coex implementation

Send the PRIO table before the calibrations. This table
tells the fw what priority to give to what (WiFi / BT)
according to events.

Send a hardcoded BT_COEX command to the fw to enable basic
BT coexistence.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
410dc5aa5906ed49e2733b451a5287884e8a16dc 18-Feb-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: a few fixes in license

7000.c was released as GPL only by mistake: it should be
dual licensed - GPL / BSD.
The file that contains the license in the kernel is COPYING
and not LICENSE.GPL.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
de8bc6dd2d52cacaa76ea381ffdc00919b100a2c 27-Feb-2013 Dor Shaish <dor.shaish@intel.com> iwlwifi: mvm: Remove overriding calibrations for the 7000 family

This fix removes the override of calibration request values sent
to the FW.
Due to that, the sending of default values to now implemented
calibrations is removed.

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6221d47cf7a57eb1e2b5b51c65e2edcde369a0d4 27-Feb-2013 Dor Shaish <dor.shaish@intel.com> iwlwifi: mvm: Take the phy_cfg from the TLV value

The phy_cfg is given from the TLV value and does not have to be
built by us.

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
e07cbb536acb249db5fd63f6884354630ae875ad 27-Feb-2013 Dor Shaish <dor.shaish@intel.com> iwlwifi: mvm: Set valid TX antennas value before calib request

We must set the valid TX antennas number in the ucode before
sending the phy_cfg_cmd and request for calibrations.

Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
c9f7a8ab7792b48259af6e94706a5d02dd74caef 27-Jan-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: don't ack the card state notification

This is not needed with MVM firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8ca151b568b67a7b72dcfc6ee6ea7c107ddd795c 24-Jan-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: add the MVM driver

Newer firmware revisions have a completely new
firmware API. This is the new driver for this
new API.

I've listed the people who directly contributed
code, but many others from various teams have
contributed in other ways.

Cc: Alexander Bondar <alexander.bondar@intel.com>
Cc: Amit Beka <amit.beka@intel.com>
Cc: Amnon Paz <amnonx.paz@intel.com>
Cc: Assaf Krauss <assaf.krauss@intel.com>
Cc: David Spinadel <david.spinadel@intel.com>
Cc: Dor Shaish <dor.shaish@intel.com>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: Eytan Lifshitz <eytan.lifshitz@intel.com>
Cc: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>