History log of /drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
Revision Date Author Comments
3edf8ff6179dc470d53f3b88d4a778e241a73654 30-Jul-2014 Avri Altman <avri.altman@intel.com> iwlwifi: mvm: prepare for scheduler config command

The scheduler is a HW sub-block that directs the work of the Flow
Handler by issuing requests for frame transfers, specifying source
and destination. Its primary function is to allocate flows into the
TX FIFOs based upon a pre-determined mapping.

The driver has some responsibilities to the scheduler, namely
initialising and maintaining the hardware registers. This is
currently done by directly accessing them, which can cause races
with the firmware also accessing the registers.

To address this problem, change the driver to no longer directly
access the registers but go through the firmware for this if the
firmware has support for DQA and thus the new command.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
f991e17ba2584e2be66476cc468f19769efd55cc 26-Aug-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: align CSA GO NOA time event naming with the firmware

The time event used for CSA GO will also be used by CSA client.
Rename the symbols to something more generic and aligned with the
firmware code.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
7c8b3bc688bdcfd7789efbd17da4d85b104ad351 30-Jul-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client

In commit cad3f08c (iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when
forced_assoc_off is set) the code to set the MAC_FILTER_IN_BEACON flag
was accidentally moved to the main block of the if statement, while it
should be in the else block instead. Move it to the right place.

Fixes: cad3f08c23de ("iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
110cf810852f0f5333bcfb10065995006d8ecbbb 01-Aug-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: use iwl_mvm_mac_get_queues_mask() more

There are a few places that can call the function
iwl_mvm_mac_get_queues_mask() instead of open-coding the
equivalent, so do that. This requires changing it to return
the multicast queue as part of the bitmap, which broke GO
mode because including it in the broadcast station queues
seems to confuse the firmware, so work around that.

Also, the API defines that the CAB queue shouldn't be
included in the TFD queue mask, adjust the comment
accordingly (not a bug).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
3dfd3a97c8b0484e85e365472fe7e292e6e8de7e 11-Aug-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: correct firmware disassoc command sequence

The firmware would like to have a MAC context (unassoc)
before the AP station is removed (we do this) but would
like to keep the BSSID until after it is removed, so we
need to send two commands - one with the BSSID before
and one without the BSSID after.

In order to do this, we need to store the BSSID as it
will have been cleared by mac80211 by the time we get
notified of the disassociation. Also pass it around as
an override to the various functions needing it, and
keep taking it from the mac80211 data otherwise. This
avoids having to keep track of the BSSID in all modes.

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>
d4578ea810ce468fdb8e1b7014818c31db9be5e2 01-Aug-2014 Johannes Berg <johannes.berg@intel.com> iwlwifi: trans: allow skipping scheduler hardware config

In a later patch, the hardware configuration will be moved to
firmware. Prepare for this by allowing hardware configuration
in the transport to be skipped by not passing a configuration
on enable and passing configure_scd=false on disable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
4601879419f94a89fcbf427b4d3bfbf4ce294174 16-Jul-2014 Eliad Peller <eliad@wizery.com> iwlwifi: mvm: pass beacons from foreign APs

In AP mode, configure the fw to pass beacons from
foreign APs, in order to be able to set the ht
protection IE properly.

Add the same filters in case of GO (which didn't have
any configured filter_flags, probably by mistake)

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
003e5236a1fcab3fc4576fe643e31a3d83027256 25-May-2014 Andrei Otcheretianski <andrei.otcheretianski@intel.com> iwlwifi: mvm: Use CS tx block bit for AP/GO

An AP/GO may perform the channel switch slightly before its stations.
This scenario may result in packet loss, since the transmission may start
before the client is actually on a new channel. In order to prevent
potential packet loss disable tx to all the stations when the channel
switch flow starts. Clear the disable_tx bit when a station is seen on a
target channel, or after IWL_MVM_CS_UNBLOCK_TX_TIMEOUT beacons on a new
channel. In addition call ieee80211_sta_block_awake in order to inform
mac80211 that the frames for this station should be buffered.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
7f0a7c671cdc0396f99b60b77bd02e2dee7c4838 04-May-2014 Andrei Otcheretianski <andrei.otcheretianski@intel.com> iwlwifi: mvm: Reflect GO channel switch in NoA

According to the spec, GO/AP should perform the channel switch just
before "beacon 0". However, since the exact timing isn't defined,
it may result in a sudden GO disappearance from the channel.
Prevent potential packet loss when performing the CS by scheduling
NoA time event and executing the channel switch flow when a notification
from fw is received.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
664322fa43b7a52a9e8be9a3874c024412c24a50 05-Jun-2014 Andrei Otcheretianski <andrei.otcheretianski@intel.com> iwlwifi: mvm: Protect mvm->csa_vif with RCU

Currently mvm->csa_vif is protected with mvm mutex. The RCU protection
is required for "iwlwifi: mvm: Reflect GO channel switch in NoA" patch.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
fe887665a87b4c45be21253c4a6904ad1334be85 10-Apr-2014 Andrei Otcheretianski <andrei.otcheretianski@intel.com> iwlwifi: mvm: Use beacon_get_template instead of beacon_get

Call ieee80211_beacon_get_template instead of ieee80211_beacon_get and sync the
CSA counters with mac80211 after each beacon transmission.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
dc271ee0d04d12d6bfabacbec803289a7072fbd9 03-Jul-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: disable CTS to Self

Firmware folks seem say that this flag can make trouble.
Drop it. The advantage of CTS to self is that it slightly
reduces the cost of the protection, but make the protection
less reliable.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
75f6b9b64eeead2a7726f342b89a0c74c985e584 02-Jun-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwivi: mvm: BT Coex - properly set the priority of beacons

Since the new API allows multiple priorities, we need to
properly set the beacon's prorities in the TX cmd associated
to it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
1c87bbad439d818f94f2e8bff98f73d6fb568dfc 27-Feb-2014 David Spinadel <david.spinadel@intel.com> iwlwifi: mvm: support extended beacon notification

Use extended beacon notification when supported by FW.
Set last beacon system time to AP or GO interface.
System time of last beacon can be used to avoid TBTT overlapping
between two interfaces, CSA and other uses.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
bca49d9a220b2f277f8e6000ac3a9d129d88972c 13-May-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: pass force_assoc_off all the way down to avoid hacks

In some cases, we need to force the association to be off in the
MAC_CONTEXT_CMD command we send to the firmware. Instead of having to
hack the vif->bss_conf.assoc value, pass it all the way down the call
chain.

Additionally, for the iwl_mvm_mac_ctxt_add() case, we *always* set
forced_assoc_off to true, so we can remove the hack in the d3 code
that was forcing it to off by hacking the bss_conf.assoc value.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
53446699892b7a171128295a85014732b9a1796b 15-May-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: set the MAC_FILTER_IN_BEACON flag also for P2P

There doesn't seem to be a good reason for not enabling the
MAC_FILTER_IN_BEACON flag for P2P client, as we do for station.

This can prevent potential, hard-to-reproduce problems during
association.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
cad3f08c23deb733c1c69d8c4355ea10dfbc3110 14-May-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set

Set the MAC_FILTER_IN_BEACON flag in iwl_mvm_mac_ctxt_cmd_sata() also
when forced_assoc_off is set, so it's aligned with when we are not
associated.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
cf52023ccdcef90779085d49acc92d76cf4d3f47 13-May-2014 Luciano Coelho <luciano.coelho@intel.com> iwlwifi: mvm: combine p2p and station mac context functions

Instead of having two nearly identical functions to send the mac
context commands, use a single way that can handle both the p2p and
!p2p cases.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
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>
bd3398e2864e264842f5f702e5a69e30582a4d18 22-Oct-2013 Andrei Otcheretianski <andrei.otcheretianski@intel.com> iwlwifi:mvm: Add AP/GO channel switch support

Publish WIPHY_FLAG_HAS_CHANNEL_SWITCH if the fw supports
newly introduced IWL_UCODE_TLV_API_CSA_FLOW.
When CSA starts, save the switching vif inside mvm and during the CSA period
configure fw with a new beacon after each beacon transmission in order to
update the csa counters.
Also, handle correctly the CSA unbind-bind flow which is triggered by mac80211
when the actual channel switch happens.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
c13b172559403eb6e6b23918736740d937feac54 27-Mar-2014 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: deprecate -7 firmware

This firmware is not supported any more.
A few code paths specific to old firmware can be removed.
We can now assume that a few TLV flags are always set since
we won't load firmware that didn't support the corresponding
features. This will be done in a separate patch.

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>
2c3e62a14864c630720cd7b123bdd5ba93280ddc 02-Feb-2014 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: modify the tsf_id master/slave logic

For TSF master/slave synchronization, the FW does not require
exact match in the beacon interval between the master interface
and the slave one, but instead requires that the beacon interval
of one interface is the module of the other.

Modify the tsf_id selection to align with the above.

Signed-off-by: Ilan Peer <ilan.peer@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>
6e97b0d2984a7f80b1d6ba4f62d84d2ce8106069 23-Dec-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: dynamically update tsf_id

Currently, the MAC context tsf_id assignment and the master/slave
relations are determined only when a new vif is added, as part
of the MAC context resource allocation. However, at this stage, the
beacon interval is not known, and thus could not be taken into account
in the master-slave algorithm.

To fix this, recalculate the MAC context tsf_id assignment,
just before the MAC context is activated, i.e., just before
a station VMAC is configured to associated and before an AP
VMAC is started.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9f8f8ca580b6108c8377469dfaaf91940dcc356a 24-Dec-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: change the parameters for calculating an AP TBTT

Change the parameters for calculating an AP TBTT to 64/36 instead of
80/20, to increase the interval between a station vif and an AP
vif TBTT events.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
12d423e816c69b0b4457bc047dda9a0a1c1a53c1 24-Dec-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Add a missed beacons threshold

Instead of always calling ieee80211_beacon_loss() on every missed
beacons notification, call this function only if the number of
consecutive missed beacons from last rx is higher than a predefined
threshold.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
3dd94794a9fb39c28eb60760ec90731144149ace 19-Dec-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: fix AC / FIFO mapping

The AC / fifo mapping was wrong - BE packets landed in VO
FIFO. The iwl_mvm_tx_fifo enumeration isn't in the same
order as ieee80211_ac_numbers enumeration.
Since the firmware relies on fifo / ac mapping - this led
to wrong behavior. E.g. the firmware sends beacon with the
same QoS parameters as VO, and it actually took the
parameters of BK. There are probably more severe issues.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
8a5e3660c645200ca5d965903c73b97fb86c9518 12-Nov-2013 Avri Altman <avri.altman@intel.com> iwlwifi: mvm: fix ht protection flags

The HT protection flags have been a mess for a long time,
this patch fixes all this.

The proper source of information for this is the
protection in the HT operation mode IE which is
propagated to bss_conf by mac80211.

1) No need to set the HT protection flags when the link
doesn't support HT.
2) We need to set the TGG protection when ERP is active.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
fb8b8ee10e1bff6531d588525d6b6c3440e71e11 21-Oct-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: capture the FCS in monitor mode

This can be useful when using the device as a sniffer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
5023d96616a1faf46656f8bb5545387d7cca9026 31-Jul-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: add IBSS support

At the firmware level, IBSS support has similar programming
requirements as AP/GO support, so use the same functions with
just small differences.

With IBSS only a single virtual interface can be used, so no
changes in the advertised interface combinations are needed.

For now, don't use hardware crypto for the GTKs in IBSS mode,
the firmware should support it though.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6d9d32b89ab0f9cbd182f807cc484e66e15c6972 06-Aug-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: keep connection to AP after WoWLAN

Until now, after WoWLAN, we weren't able to keep the
connection to the AP because the firmware didn't give
us the right information. Since the firmware API has
been changed to include all the information we need,
change the driver to work with the new API (if it is
available) and program all the relevant information
in mac80211 to keep the connection.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@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>
2e0cc86535fe85910935f896f098f8d74389a355 20-Aug-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: use CTS to Self if firmware allows it

Newer firmware fixed a bug that prevented to use CTS to
self. Firmwares with API greater than 8 have this bug
fixed. Enable the feature for these firmwares only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
fd11bd05552e8639abbdc2f1d478f70dfb9b5e3e 15-Jun-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Return on inconsistency in add interface

Return in case that HW restart is in progress but the added
interface is not found during the iteration over all the interfaces.

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>
3a3cb92e1daf2f2627df0a1f8c9577501663fef3 13-Jun-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Change the settings of AP beacon time

In case that an AP/GO interface is started while there is a
station/P2P client associated, need to make sure that the AP/GO
beacon time is far enough from the station's one in oder to allow
the station to receive the DTIM beacons and the following traffic
etc.

To resolve this, when the AP is started, check if there is an
active station interface, and guarantee that the AP/GO TBTT is far
enough from the station one.

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>
837fb69f10588caafc883c4473a864660e1403ce 09-Jun-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: don't set the MCAST queue in STA's queue list

The MCAST queue should be enabled after DTIM only.
According to fw API, the MCAST must not be attached to any
station, but should appear in the mcast_qid of the AP's
mac context only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
86a91ec757338edbce51de5dabd7afb0366f485c 26-May-2013 Emmanuel Grumbach <emmanuel.grumbach@intel.com> iwlwifi: mvm: correctly configure MCAST in AP mode

The AP mode needs to use the MCAST fifo for the MCAST
frames sent after the DTIM. This fifo needs to be
configured with the same parameters as the VOICE FIFO.

A separate SCD queue is mapped to this fifo - the cab_queue
(cab stands for Content After Beacon). This queue isn't
connected to any station, but rather to the MAC context.
This queue should (and is already) be set as the MCAST
queue - this is part of the of MAC context command.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
d64048edcd714095a5cf2d7019769d0d94e19892 13-Mar-2013 Hila Gonen <hila.gonen@intel.com> iwlwifi: mvm: Add support for connection monitor offload

The firmware supports periodic keep alive and beacon monitoring,
so advertise connection monitor offload capability by setting
IEEE80211_HW_CONNECTION_MONITOR flag. Implement missed beacons
notification handler. Call ieee80211_beacon_loss in case of
missed beacons, so AP probing by mac80211 can be triggered.

Signed-off-by: Hila Gonen <hila.gonen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@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>
ba283927268d45184c17c37ff78d427e59026229 02-May-2013 Alexander Bondar <alexander.bondar@intel.com> iwlwifi: mvm: Prevent setting assoc flag in MAC_CONTEXT_CMD

In the normal flow first MAC_CONTEXT_CMD for particular interface is
never sent while associated. The exception is fw restart flow when
resuming from suspend when WoWLAN is enabled. In this case successive
"add" and "modify" MAC_CONTEXT_CMD commands may be sent with assoc flag
set what cause FW mal functioning. To prevent this never set assoc flag
in MAC_CONTEXT_CMD with action "add".

Cc: stable@vger.kernel.org
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>
67baf66339f82b5ddef5731caedb1e6db496818d 21-Mar-2013 Janusz Dziedzic <janusz.dziedzic@gmail.com> mac80211: add P2P NoA settings

Add P2P NoA settings for STA mode.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
[fix docs]
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>
5358549575aab8ed98c55100650510bdfb6ef5ef 18-Mar-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: specify filter flags in monitor mode

In firmware "listener" (monitor) mode, we still need to
open up the filters with the filter flags to receive all
frames.

Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
398e8c6c4eea39853a80cc1513f80026c1a62519 13-Mar-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Remove obsolete queue definitions

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>
571765c8598a86c81b658e55285643506770fb2d 05-Mar-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Add beacon notification handler

Mostly for debugging purposes

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>
506a81e6ba1148a4435dec95651cd93874c2b7cf 28-Feb-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: don't read system time when modifying AP/GO MAC

When modifying a MAC, we update its beacon system time which
is taken as a base to calculate TBTT. The firmware doesn't use
the new timestamp because the time is never used after the MAC
and broadcast station were added, but it is safer to not rely
on this and avoids the overhead of reading the register every
time the MAC is updated.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1dcd15eed073d5c7b37b43eff645e6c1dae342d9 14-Feb-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Update MAC context filter flags

1. For P2P Device filter in only probe requests.
2. For station mode filter in all group cast frames,
and in addition beacons as long as we are not associated.
3. For AP/GO filter in all group cast and in addition probe
requests.

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>
cc7ee2bab3d90b0a09651dcfa2d0c9ec1a115bc8 18-Feb-2013 Dor Shaish <dor.shaish@intel.com> iwlwifi: mvm: don't use cts to self

The current fw doesn't currently support cts to self. There
is a bug in the fw that prevents us from using cts to self.
Use full protection (including RTS) for now.

Signed-off-by: Dor Shaish <dor.shaish@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>
ec8b6885b543ceeb47fdb0c0e6981bb7420ab59e 13-Feb-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Reserve MAC id 0 for managed interfaces

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1e849c93ee5bd07b2ce84d1c3cbcd5d06cb9d2a5 12-Feb-2013 Ilan Peer <ilan.peer@intel.com> iwlwifi: mvm: Fix resource allocation for P2P Device

The time event data structures are required also for P2P Device
interface.

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>
d2931bbd5471c35f55856e5a4f001160df9951dc 05-Feb-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: program DTIM timings properly

For the firmware to know when DTIM beacons arrive
we have to program the DTIM time in TSF and system
time in the MAC context. Since mac80211 now tracks
the different times (on demand), this becomes easy.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
210a544e78c7ce4e5aa5ec199eeb807b0f03b5b2 24-Jan-2013 Johannes Berg <johannes.berg@intel.com> iwlwifi: mvm: don't delay the association until after beacon

If we haven't heard a beacon before we associate we can
still start the association process and set the MAC in
the firmware to associated only after having received a
beacon with DTIM period by reacting to the new change
flag (BSS_CHANGED_DTIM_PERIOD) from mac80211.

This reduces the association time in these cases.

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>