Commit Graph

481050 Commits

Author SHA1 Message Date
Eran Harary
dcab8ecd56 iwlwifi: mvm: support ucode load for family_8000 B0 only
The ucode load flow changed for B0 hardware step.
Change the code accordingly.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 13:00:16 +02:00
David Spinadel
a993749dc9 iwlwifi: mvm: remove a dangling line of documentation
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:46 +02:00
Emmanuel Grumbach
655e5cf0d5 iwlwifi: pcie: claim ownership on the device after stop_device()
Not doing so would allow other possible users of the device
to take ownership and prevent normal WiFi operation.

This fixes the second part of:
https://bugzilla.kernel.org/show_bug.cgi?id=87191

Reviewed-by: Moshe Harel <moshe.harel@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:45 +02:00
Emmanuel Grumbach
e70af8e099 iwlwifi: don't load on 7265D with old NVM
7265D are new devices that should always have a new NVM
(at least 0x0c11). The firmware has issues with older
versions of the NVM which are not and will not be available
to the common mortals.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:44 +02:00
Idan Kahlon
a4e5df283c iwlwifi: mvm: support NVM file with header
Handle NVM file header. When NVM header detected, skip
the header and reading only the sections data.

Signed-off-by: Idan Kahlon <idanx.kahlon@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:43 +02:00
Luciano Coelho
8ed4e659f3 iwlwifi: mvm: add channel information to the netdetect notifications
Add the channels on which there was a match for every match reported
by the firmware.  The firmware reports the channels as indices to the
array of channels that was passed in the scheduled scan request, so we
need to save the array when entering D3 to make sure it is available
when we resume.

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>
2014-12-01 12:04:42 +02:00
Luciano Coelho
d9718da82f iwlwifi: mvm: add SSID match information for net-detect
Add SSID information to the net-detect indication to userspace.  Fetch
the matched profiles from the firmware in order to find the correct
SSIDs in the profiles that matched.

Since the net-detect information is stored in cfg80211, and in theory
it could change while we are waking up and reading the matched
profiles, we need to save it when we enter D3 so it is available
during resume.

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>
2014-12-01 12:04:42 +02:00
Eliad Peller
804d4c5a81 iwlwifi: pcie: refactor cmd_in_flight set/clear code
A following patche will use trans_pcie->cmd_in_flight
for reference accounting as well. get ready for it.

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>
2014-12-01 12:04:41 +02:00
Eliad Peller
160acc0e8d iwlwifi: mvm: add missing mvm ref debug print
IWL_MVM_REF_PROTECT_CSA is missing from the ref strings
used by debugfs.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:40 +02:00
Emmanuel Grumbach
2c2bd58167 iwlwifi: mvm: BT Coex - change the MPLUT registers' value
This impacts the partition between BT and Wifi.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:39 +02:00
Emmanuel Grumbach
94bbed728d iwlwifi: mvm: remove IWL_UCODE_TLV_API_CSA_FLOW
All the supported firmwares have this TLV flag set.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:39 +02:00
Emmanuel Grumbach
c8b06a9940 iwlwifi: mvm: remove IWL_UCODE_TLV_API_WOWLAN_CONFIG_TID
All the supported firmwares have this TLV flag set.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:38 +02:00
Emmanuel Grumbach
2d2c0e9c81 iwlwifi: mvm: remove IWL_UCODE_TLV_CAPA_EXTENDED_BEACON
This TLV flag is set for all the supported firmwares.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:37 +02:00
Emmanuel Grumbach
6d8e09ee77 iwlwifi: deprecate -8.ucode for 3160 / 7260 / 7265
This firmware is not supported anymore.
Stop loading this firmware - and remove the code that
handled older versions.

Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:36 +02:00
Luciano Coelho
b04998f3d5 iwlwifi: mvm: check and report if wake up was due to net detect
Query the firmware for scan offload matches when waking up in order to
report net detect as the reason for the wake up.

This requires a new command API to be implemented.  Additionally,
remove some net detect command entries that are not valid anymore.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:35 +02:00
Johannes Berg
a52703b202 iwlwifi: move firmware file format definitions to correct header
The firmware file-format is described in iwl-fw-file.h, while the
internal handling structures and functions are in iwl-fw.h.

Fix the separation between the files by moving file format
definitions to iwl-fw-file.h.

Also add a missing description for a kernel-doc member, and it's
not needed to include iwl-fw-file.h again from the code (thanks
to Liad Kaufman).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01 12:04:32 +02:00
Emmanuel Grumbach
e7331845df Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-next
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Conflicts:
	drivers/net/wireless/iwlwifi/iwl-fw.h
2014-11-25 07:53:57 +02:00
Emmanuel Grumbach
dcad8e4299 iwlwifi: update the secure mem space and for the CPUs
Also update the timeout for the data verification.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:44 +02:00
Oren Givon
3c4e2998a4 iwlwifi: sdio: new SDIO card id for 4165 series
Add a new SDIO card id intended for the new 4165 series.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:44 +02:00
Eliad Peller
47abce8f2d iwlwifi: declare d0i3 support for IWL_DEVICE_8000
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:43 +02:00
Arik Nemtsov
e198f5e76f iwlwifi: mvm: disconnect TDLS peers before channel switch
In case of channel switch, we need to teardown the TDLS peers.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:42 +02:00
Eyal Shapira
339b30864e iwlwifi: mvm: declare support for VHT BF info in radiotap
The driver knows whether an rx frame was beamformed and marks
it in the radiotap VHT flags. However it should also declare
that it knows to extract this info otherwise this gets discarded
by sniffers like Wireshark.

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>
2014-11-24 08:30:41 +02:00
Chaya Rachel Ivgy
30269c125b iwlwifi: mvm: add support to MFUART loading notification
Add support to MFUART loading notification (print notification
data with IWL_DEBUG_INFO)

Signed-off-by: Chaya Rachel Ivgy <chaya.rachel.ivgi@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:41 +02:00
Eliad Peller
465921c841 iwlwifi: mvm: call iwl_trans_suspend/resume
call the appropriate iwl_trans_suspend/resume ops
on iwl_mvm_suspend/resume calls.

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>
2014-11-24 08:30:40 +02:00
Eliad Peller
8e551e503b iwlwifi: trans: add suspend/resume ops
Add suspend/resume trans ops that will be called from
mac80211's suspend/resume ops.

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>
2014-11-24 08:30:39 +02:00
Luciano Coelho
2021a89d7b iwlwifi: mvm: treat netdetect wake up separately
When the device wakes up due to netdetect, we need to query different
things from the firmware than when it wakes up with a normal WoWLAN.
To make this easier, separate the netdetect wake up handling from the
rest.  For now, we don't send netdetect as a wake up reason, treating
it as a non-wireless wake up.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:38 +02:00
Luciano Coelho
ec12f457d6 iwlwifi: mvm: refactor iwl_mvm_query_wakeup_reasons()
Refactor the iwl_mvm_query_wakeup_reasons() function to split the part
that gets the firmware status from the part that sets up the WoWLAN
status.  This will allow netdetect to reuse the 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>
2014-11-24 08:30:38 +02:00
Luciano Coelho
3acc952b03 iwlwifi: mvm: refactor wowlan and netdetect configuration when suspending
We need to send a WOWLAN_CONFIGURATION command also for netdetect and
configure the rfkill release trigger if needed.  To do so, refactor
the code that configures wowlan and netdetect when suspending and send
the WOWLAN_CONFIGURATION command also for net_detect.

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>
2014-11-24 08:30:37 +02:00
Luciano Coelho
c55385f55c iwlwifi: mvm: add support for net detect
Add the net detect WoWLAN flag to indicate support and use the
nd_config from the WoWLAN configuration to start net detect, if it is
set.  The WoWLAN configuration takes precedence over the debugfs
configuration.

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>
2014-11-24 08:30:36 +02:00
Luciano Coelho
686e7fe1c4 iwlwifi: mvm: protect session during CSA
When another vif is also running during a channel switch, we need to
use a session protection when we move to the new channel, so that we
don't miss the beacons.  Without this, sometimes the other vif
repeatedly gets time exactly when we should be hearing the beacons,
preventing channel switch from completing.  Adding a session
protection that lasts from the moment the channel changes until 2
TBTTs later, ensures that we will hear the beacons on the destination
channel.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:35 +02:00
Luciano Coelho
0c6505c6ed iwlwifi: mvm: clear TE data if CSA time event fails to start
If setting the CSA time event fails, we must clear the TE data,
otherwise we'll try to remove it when, for instance, a disconnection
occurs, causing a SYSASSERT.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:35 +02:00
Luciano Coelho
c6e0a3e044 iwlwifi: mvm: disable beacon filtering during CSA
After a channel switch, transmission on the new channel is only
started once we see a beacon on it.  Thus, beacon filtering needs to
be disabled during channel switch so that mac80211 receives this
beacon and finishes the process.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:34 +02:00
Luciano Coelho
622e3f9b71 iwlwifi: mvm: add a channel_switch op to bypass mac80211 timer
We need to call ieee80211_chswitch_done() ourselves just when the
absence TE started, so we perform the actual context switch early
enough.  To do so, add a dummy channel_switch op, which will cause
mac80211 to skip the countdown timer and allow us to call
ieee80211_chswitch_done() to complete the operation.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:33 +02:00
Luciano Coelho
a57c688d34 iwlwifi: mvm: finalize on post_switch instead of unassign
Now that mac80211 waits for the first beacon on the new channel before
calling post_channel_switch, the reconfiguration of the firmware
should be done in the post_channel_switch operation instead of when
assigning the vif to the new context.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:32 +02:00
Luciano Coelho
4500e13376 iwlwifi: mvm: schedule CSA time event a bit before beacon 1
Instead of using a hardcoded number of TUs before beacon 0 as the time
to start the absence and actual channel switch, calculate it in
relation to the beacon interval.  We use 10 TUs + beacon interval
before beacon 0 to target a bit before beacon 1.  This gives us enough
time to switch to the new channel before the AP/GO switches.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:32 +02:00
Luciano Coelho
dc88b4baa9 iwlwifi: mvm: add CSA absent time event for clients
Add an absent time event when pre_channel_switch is called and use the
time event started indication to set the disable_tx bit instead of
doing it in unassign_vif().  This is done so that the firmware queues
are stopped before the actual switch takes place to avoid losing
packets while the AP/GO is performing its actual switch.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:31 +02:00
Luciano Coelho
4741dd049a iwlwifi: mvm: use switching_chanctx argument instead of csa_active
Now that all CSA flows are using the switch_vif_chanctx op, we can
rely on the switching_chanctx boolean that is passed to the
__iwl_mvm_assign_vif_chanctx() and __iwl_mvm_unassign_vif_chanctx()
functions to decide whether the context switch flows need to be
executed.  In this way we make the chanctx switch flow more generic,
without having to rely on the csa_active flag being set.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:30 +02:00
Luciano Coelho
f6c34820d3 iwlwifi: mvm: disable PS during channel switch
Disable PS when pre_channel_switch is called and add the
post_channel_switch operation to re-enable PS when the channel switch
is completed.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:29 +02:00
Andrei Otcheretianski
7ef0aab66b iwlwifi: mvm: Handle failed beacon transmissions during CSA
The spec requires to decrement the CSA counters based on TBTT,
regardless if the beacon was actually transmitted. Previously, the fw
would send beacon notifications only for successfully transmitted
beacons. This behavior resulted in inaccurate CSA countdown. In order
to address this issue, the fw was changed to send beacon
notifications also for not transmitted beacons. Such notifications
have TX_STATUS_INTERNAL_ABORT (0x92).
Don't start the CSA countdown before first successfully transmitted
beacon, in order to guarantee that the CSA is announced for a
required period.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2014-11-24 08:30:29 +02:00
Luciano Coelho
6fd1fb63ab iwlwifi: mvm: return the actual error code when switch_vif_chanctx fails
We have code to recover and go back to the original channel context if
something fails in the middle of switch_vif_chanctx, but we return the
error code of the recover calls instead of the original code, so if
the recovery succeeds, we will return 0 (success).  Fix this by not
assigning the return value of the recovery calls to ret.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:28 +02:00
Luciano Coelho
48a256e8ae iwlwifi: mvm: add support for CHANCTX_SWMODE_REASSIGN_VIF
Add support to reassign vif in switch_vif_chanctx.  This is similar to
the existing CHANCTX_SWMODE_SWAP_CONTEXTS mode, but doesn't delete the
old context nor creates a new one, doing to switch between two
existing contexts.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:27 +02:00
Luciano Coelho
50cc9574d6 iwlwifi: mvm: refactor iwl_mvm_switch_vif_chanctx to support other modes
Currently we only support the CHANCTX_SWMODE_SWAP_CONTEXTS mode, but
we need to support other modes as well.  Spin a new function off in
order to make it easier to support other modes.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:26 +02:00
Luciano Coelho
6b20d77437 iwlwifi: mvm: only save csa_vif in AP/GO mode
We only need the csa_vif in AP/GO modes, and assigning for other
interfaces may cause problems, because csa_vif is never cleared.  To
prevent this, only assign the value if the iftype is
NL80211_IFTYPE_AP.  Use a switch to do this, even though, for now,
only the AP interface type is handled, because soon other interface
types will be added as well.

Additionally, convert the WARN() in the error case when a
channel-switch is already running to WARN_ONCE().

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:26 +02:00
Luciano Coelho
f028905c20 iwlwifi: mvm: use new pre_channel_switch op instead of channel_switch_beacon
A new callback has been added to prepare the device for a channel
switch.  Use the new callback instead of the old channel_switch_beacon
operation.

This makes it possible to remove the channel_switch_beacon operation
from mac80211.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24 08:30:25 +02:00
Arik Nemtsov
1d3c3f63f7 iwlwifi: mvm: implement mac80211 TDLS channel-switch APIs
Maintain a TDLS channel-switch state and update it according to
notifications from FW and timeouts. Explicitly check all state
transitions are valid.
When switching is initiated by mac80211, use a delayed work to
periodically reschedule it from iwlwifi.
Give the FW mac80211 generated TDLS channel-switch request/response
templates. It will change appropriate values (switch timings) and Tx
them at appropriate times.

Enable the channel switch wiphy capability bit when the FW supports it.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:24 +02:00
Liad Kaufman
9c126cd6e0 iwlwifi: mvm: block TID when using TDLS
Block TID 4 (VI) on a vif when using TDLS. This TID will be used by FW
for TDLS channel-switch requests and PTI requests.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
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>
2014-11-24 08:30:23 +02:00
Arik Nemtsov
a0f6bf2a5b iwlwifi: mvm: use private TFD queues for TDLS stations
When adding a TDLS station, allocate 4 new queues for it. Configure them
to FW and enable them. On station removal, drain the queues if needed
and disable them when empty.

Make sure to flush all packets in the private queues of TDLS stations in
the mac80211 flush() callback.

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>
2014-11-24 08:30:23 +02:00
Arik Nemtsov
cbd2ae2da6 iwlwifi: mvm: disconnect TDLS peers on reconfig
When TDLS peers are present the FW will send packets on a dedicated
TID vs. the peer when performing TDLS channel-switches. The driver
configures the TID on connection to the peer and the FW is responsible
for maintaining the state of QoS seqno and PN/IV for encryption.

If the FW asserts, the driver cannot correctly reconfigure the starting
seqno/PN to the reloaded FW, thus forcing us to reconnect the peer.

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>
2014-11-24 08:30:22 +02:00
Arik Nemtsov
a74346d75d iwlwifi: mvm: allow private per-STA TFD queues
TDLS stations will have private queues, so consider them as well when
allocating a new one. Consolidate the HW-queue iterating code into
a single exported function, to be used by the TDLS code in the future.

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>
2014-11-24 08:30:21 +02:00
Arik Nemtsov
307e47235a iwlwifi: mvm: configure TDLS peers to FW
Send a dedicated TDLS_CONFIG command when a TDLS peer joins/leaves. The
fields for the command are mostly place-holders, as most of the FW
functionality is not implemented. In the future the dedicated FW TID
will be used for channel-switching and buffer-sta functionality.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24 08:30:20 +02:00