]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoiwlwifi: mvm: do string formatting in debug triggers
Johannes Berg [Tue, 31 Mar 2015 07:12:54 +0000 (09:12 +0200)]
iwlwifi: mvm: do string formatting in debug triggers

The current code has a lot of duplicates of printing into a buffer
(while having to make sure it's NUL-filled and -terminated) and
then passing that to the debug trigger collection.

Since that's error-prone, instead make the debug trigger collection
function take a format string and format arguments (with compiler
validity checking) and handle the buffer internally.

This makes one behavioural change -- instead of sending the whole
buffer to userspace (clearing is needed to not leak stack data) it
just passes the actual string (including NUL-terminator.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: fix spelling errors
Sara Sharon [Tue, 31 Mar 2015 09:24:05 +0000 (12:24 +0300)]
iwlwifi: fix spelling errors

Fix spelling error across the driver.
Modified only comments and prints.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: don't return uninitialized value in get_survey()
Johannes Berg [Wed, 1 Apr 2015 08:00:31 +0000 (10:00 +0200)]
iwlwifi: mvm: don't return uninitialized value in get_survey()

If ucode_loaded isn't true the function returns the 'ret' variable
without having assigned a value properly. Fix that.

Reported-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: add trigger for firmware dump upon MLME failures
Emmanuel Grumbach [Tue, 10 Feb 2015 12:29:48 +0000 (14:29 +0200)]
iwlwifi: mvm: add trigger for firmware dump upon MLME failures

This will allow to catch failures in MLME and get the
firmware data when this happens.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoMerge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-next
Emmanuel Grumbach [Thu, 2 Apr 2015 06:26:51 +0000 (09:26 +0300)]
Merge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-next

Lots of updates for net-next; along with the usual flurry
of small fixes, cleanups and internal features we have:
 * VHT support for TDLS and IBSS (conditional on drivers though)
 * first TX performance improvements (the biggest will come later)
 * many suspend/resume (race) fixes
 * name_assign_type support from Tom Gundersen

9 years agoiwlwifi: mvm: remove unused arguments
Johannes Berg [Tue, 31 Mar 2015 06:58:16 +0000 (08:58 +0200)]
iwlwifi: mvm: remove unused arguments

The str/len arguments to iwl_fw_dbg_trigger_simple_stop() aren't used,
and for a simple trigger don't really need to be used as the trigger
code itself encodes the reason, so remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queue
Matti Gottlieb [Mon, 30 Mar 2015 13:50:07 +0000 (16:50 +0300)]
iwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queue

Sending multiple action frames off channel, one after the other can create
a race that will result in a timeout:

1. Start sending action frame off channel.
2. Once the frame is sent or the time event is over, the flow will
eventually call ieee80211_start_next_roc to start the next roc frame &
iwl_mvm_roc_finished schedules to schedule a work to flush the queue.
3. Start sending new roc frame and write it to the queue before the
flush work has started.
4. The work is called and it flushes the new packet that was placed on the
on the queue so the packet is lost.

This causes the frame to be removed & not sent, that causes a timeout in
userspace.

Flush the work queue that flushes the roc/off channel queue before starting
to send a new frame off channel, in order to avoid a race between the new
frame that is transmitted off channel & the flushing of the queue.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
9 years agoiwlwifi: mvm: always reconfigure last MCC on init
Arik Nemtsov [Mon, 23 Mar 2015 12:32:53 +0000 (14:32 +0200)]
iwlwifi: mvm: always reconfigure last MCC on init

Currently the last found MCC is reconfigured only in the recovery flow.
But it should always be used when available, for the ifdown/up or
RF-Kill/CT-Kill scenarios.
While at it, fix a couple of bugs in the init-from-last-MCC flow. Return
an error value when a current MCC is not found. Pass on the regdomain to
cfg80211 only if it was changed and don't ignore the return value from
the cfg80211-setter function.

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: add debugfs entry with the number of net-detect scans
Luciano Coelho [Mon, 30 Mar 2015 17:46:32 +0000 (20:46 +0300)]
iwlwifi: mvm: add debugfs entry with the number of net-detect scans

Our testers need to know the number of scans performed while in
net-detect mode before the device wakes up.  The firmware already
passes this information to the driver, so we can save it and report it
in a debugfs entry.

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>
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 agomac80211: set QoS capability before changing station state
Johannes Berg [Mon, 30 Mar 2015 13:09:20 +0000 (15:09 +0200)]
mac80211: set QoS capability before changing station state

In the upcoming fast-xmit patch, changing station state will
build a header cache based on the station's capabilities, and
as the QoS capability (sta.wme) impacts the header, it needs
to be set before.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: send HT/VHT IEs in TDLS discovery response
Arik Nemtsov [Mon, 30 Mar 2015 08:16:23 +0000 (11:16 +0300)]
mac80211: send HT/VHT IEs in TDLS discovery response

These are mandated by IEEE802.11-2012 section 8.5.8.6 and IEEE802.11ac-2013
section 8.5.8.16.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: add VHT support for IBSS
Janusz.Dziedzic@tieto.com [Fri, 20 Mar 2015 05:37:01 +0000 (06:37 +0100)]
mac80211: add VHT support for IBSS

Add VHT support for IBSS. Drivers could activate
this feature by setting NL80211_EXT_FEATURE_VHT_IBSS
flag.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: IBSS fix scan request
Janusz.Dziedzic@tieto.com [Fri, 20 Mar 2015 05:37:00 +0000 (06:37 +0100)]
mac80211: IBSS fix scan request

In case of wide bandwidth (wider than 20MHz) used by IBSS,
scan all channels in chandef to be able to find neighboring
IBSS netwqworks that use the same overall channels but a different
control channel.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: factor out station lookup from ieee80211_build_hdr()
Johannes Berg [Sat, 21 Mar 2015 08:13:45 +0000 (09:13 +0100)]
mac80211: factor out station lookup from ieee80211_build_hdr()

In order to look up the RA station earlier to implement a TX
fastpath, factor out the lookup from ieee80211_build_hdr().
To always have a valid station pointer, also move some of the
checks into the new function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: make sta.wme indicate whether QoS is used
Johannes Berg [Sat, 21 Mar 2015 07:09:55 +0000 (08:09 +0100)]
mac80211: make sta.wme indicate whether QoS is used

Indicating just the peer's capability is fairly pointless
if the local device doesn't support it. Make the variable
track both combined, and remove the 'local support' check
in the TX path.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: send AP probe as unicast again
Johannes Berg [Sat, 21 Mar 2015 06:41:04 +0000 (07:41 +0100)]
mac80211: send AP probe as unicast again

Louis reported that a static checker was complaining that
the 'dst' variable was set (multiple times) but not used.
This is due to a previous commit having removed the usage
(apparently erroneously), so add it back.

Fixes: a344d6778a98 ("mac80211: allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR")
Reported-by: Louis Langholtz <lou_langholtz@me.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80111: aes_gcm: clean up ieee80211_aes_gcm_key_setup_encrypt()
Johannes Berg [Mon, 23 Mar 2015 14:08:14 +0000 (17:08 +0300)]
mac80111: aes_gcm: clean up ieee80211_aes_gcm_key_setup_encrypt()

This code is written using an anti-pattern called "success handling"
which makes it hard to read, especially if you are used to normal kernel
style.  It should instead be written as a list of directives in a row
with branches for error handling.

(Basically copied from Dan's previous patch for CCM)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80111: aes_ccm: cleanup ieee80211_aes_key_setup_encrypt()
Dan Carpenter [Mon, 23 Mar 2015 14:08:14 +0000 (17:08 +0300)]
mac80111: aes_ccm: cleanup ieee80211_aes_key_setup_encrypt()

This code is written using an anti-pattern called "success handling"
which makes it hard to read, especially if you are used to normal kernel
style.  It should instead be written as a list of directives in a row
with branches for error handling.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: Fix misplaced return in AES-GMAC key setup
Jouni Malinen [Mon, 23 Mar 2015 13:41:15 +0000 (15:41 +0200)]
mac80211: Fix misplaced return in AES-GMAC key setup

Commit 8ade538bf39b ("mac80111: Add BIP-GMAC-128 and BIP-GMAC-256
ciphers") had the success return in incorrect place before the
crypto_aead_setauthsize() call which practically ended up skipping that
call unconditionally.

The missing call did not actually change any functionality since
GMAC_MIC_LEN (16) is identical to the maxauthsize in gcm(aes) and as
such, the default value used for the authsize parameter.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: pass name_assign_type to rdev_add_virtual_intf()
Tom Gundersen [Wed, 18 Mar 2015 10:13:39 +0000 (11:13 +0100)]
cfg80211: pass name_assign_type to rdev_add_virtual_intf()

This will expose in /sys whether the ifname of a device is set by
userspace or generated by the kernel. The latter kind (wlanX, etc)
is not deterministic, so userspace needs to rename these devices
to names that are guaranteed to stay the same between reboots. The
former, however should never be renamed, so userspace needs to be
able to reliably tell the difference.

Similar functionality was introduced for the rtnetlink core in
commit 5517750f058e ("net: rtnetlink - make create_link take name_assign_type")

Signed-off-by: Tom Gundersen <teg@jklm.no>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
[reformat changelog to fit 72 cols]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: fix typo in debug output
Michael Braun [Wed, 18 Mar 2015 06:17:37 +0000 (07:17 +0100)]
mac80211: fix typo in debug output

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: reject aggregation sessions with non-HT peers
Johannes Berg [Mon, 9 Mar 2015 10:13:04 +0000 (11:13 +0100)]
mac80211: reject aggregation sessions with non-HT peers

If a peer or some local agent (rate control, ...) decides to start
an aggregation session but doesn't support HT (which also implies
QoS), reject it.

This is mostly a corner case as such peers normally won't try to
use block-ack sessions and rate control wouldn't start them, but
technically QoS stations could request it according to the spec.

However, since drivers don't really support such non-HT sessions
it's better to reject them.

Also, while at it, move the tracing for TX sessions earlier so it
captures the error cases as well.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg/mac80211: add regulatory classes IE during TDLS setup
Arik Nemtsov [Wed, 18 Mar 2015 06:46:08 +0000 (08:46 +0200)]
cfg/mac80211: add regulatory classes IE during TDLS setup

Seems Broadcom TDLS peers (Nexus 5, Xperia Z3) refuse to allow TDLS
connection when channel-switching is supported but the regulatory
classes IE is missing from the setup request.
Add a chandef to reg-class translation function to cfg80211 and use it
to add the required IE during setup. For now add only the current
regulatory class as supported - it is enough to resolve the
compatibility issue.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: small clarification of the sched_scan delay attribute
Luciano Coelho [Wed, 18 Mar 2015 08:47:02 +0000 (10:47 +0200)]
nl80211: small clarification of the sched_scan delay attribute

Just clarify that the delay is only before the first cycle.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: stop scan before connection
David Spinadel [Tue, 17 Mar 2015 17:58:38 +0000 (19:58 +0200)]
mac80211: stop scan before connection

Stop scan before authentication or association to make sure
that nothing interferes with connection flow.

Currently mac80211 defers RX auth and assoc packets (among other ones)
until after the scan is complete, so auth during scan is likely to fail
if scan took too much time.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agonl80211: add net-detect delay to wowlan info
Luciano Coelho [Tue, 17 Mar 2015 14:36:01 +0000 (16:36 +0200)]
nl80211: add net-detect delay to wowlan info

Pass the initial net-detect delay (NL80211_ATTR_SCHED_SCAN_DELAY)
attribute in the WoWLAN info response.

Additionally, remove a bogus TODO comment.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: notify the driver about deauth
Emmanuel Grumbach [Mon, 16 Mar 2015 21:23:37 +0000 (23:23 +0200)]
mac80211: notify the driver about deauth

This can allow the driver to take action based on the reason
of the deauth.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: notify the driver about association status
Emmanuel Grumbach [Mon, 16 Mar 2015 21:23:36 +0000 (23:23 +0200)]
mac80211: notify the driver about association status

This can allow the driver to take action based on the
success / failure of the association.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: notify the driver about authentication status
Emmanuel Grumbach [Mon, 16 Mar 2015 21:23:35 +0000 (23:23 +0200)]
mac80211: notify the driver about authentication status

This can allow the driver to take action based on the
success / failure of the authentication.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: convert rssi_callback() to event_callback()
Emmanuel Grumbach [Mon, 16 Mar 2015 21:23:34 +0000 (23:23 +0200)]
mac80211: convert rssi_callback() to event_callback()

We will be able to add more events, such as MLME events and
others. The low level driver may be interested in knowing
about these events to dump firmware data upon failures, or
to change parameters in case connection attempts fail etc...

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: agg-tx: avoid sending DelBA with sta->lock held
Johannes Berg [Thu, 12 Mar 2015 18:28:31 +0000 (19:28 +0100)]
mac80211: agg-tx: avoid sending DelBA with sta->lock held

The rate control locking caused a potential deadlock here due to the
locks being acquired in different orders, so that change cannot yet
be applied. However, there's no fundamental reason for this code to
hold the sta->lock while transmitting frames.

Clearly it's better not to hold the lock for longer periods of time,
which can happen here since we call all the way down to the driver.
Change the code a bit to not hold it while doing that.

Signed-off-by: Johannes Berg <johannes.berg@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 agocfg80211: add vlan to station add/change tracing
Johannes Berg [Fri, 20 Mar 2015 18:56:41 +0000 (19:56 +0100)]
cfg80211: add vlan to station add/change tracing

This helps debug issues with VLAN modifications that are otherwise
not really visible in any tracing/debugging.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: avoid duplicate TX path station lookup
Johannes Berg [Fri, 20 Mar 2015 13:18:27 +0000 (14:18 +0100)]
mac80211: avoid duplicate TX path station lookup

Instead of looking up the destination station twice in the TX path
(first to build the header, and then for control processing), save
it when building the header and use it later in the TX path.

To avoid having to look up the station in the many callers, allow
those to pass %NULL which keeps the existing lookup.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: mesh: avoid pointless station lookup
Johannes Berg [Fri, 20 Mar 2015 15:01:52 +0000 (16:01 +0100)]
mac80211: mesh: avoid pointless station lookup

In ieee80211_build_hdr(), the station is looked up to build the
header correctly (QoS field) and to check for authorization. For
mesh, authorization isn't checked here, and QoS capability is
mandatory, so the station lookup can be avoided.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: drop 4-addr VLAN frames earlier if not connected
Johannes Berg [Fri, 20 Mar 2015 13:05:02 +0000 (14:05 +0100)]
mac80211: drop 4-addr VLAN frames earlier if not connected

If there's no station on the 4-addr VLAN interface, then frames
cannot be transmitted. Drop such frames earlier, before setting
up all the information for them.

We should keep the old check though since that code might be used
for other internally-generated frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: don't look up destination station twice
Johannes Berg [Fri, 20 Mar 2015 12:29:29 +0000 (13:29 +0100)]
mac80211: don't look up destination station twice

There's no need to look up the destination station twice while
building the 802.11 header for a given frame if the frame will
actually be transmitted to the station we initially looked up.

This happens for 4-addr VLAN interfaces and TDLS connections, which
both directly send the frame to the station they looked up, though
in the case of TDLS some station conditions need to be checked.

To avoid that, add a variable indicating that we've looked up the
station that the frame is going to be transmitted to, and avoid the
lookup/flag checking if it already has been done.

In the TDLS case, also move the authorized/wme_sta flag assignment
to the correct place, i.e. only when that station is really used.
Before this change, the new lookup should always have succeeded so
that the potentially erroneous data would be overwritten.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: remove drop_unencrypted code
Johannes Berg [Fri, 20 Mar 2015 10:37:36 +0000 (11:37 +0100)]
mac80211: remove drop_unencrypted code

This mechanism was historic, and only ever used by IBSS, which
also doesn't need to have it as it properly manages station's
802.1X PAE state (or, with WEP, always has a key.)

Remove the mechanism to clean up the code.

Signed-off-by: Johannes Berg <johannes.berg@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 agomac80211: Get IV len from key conf and not cipher scheme
Cedric Izoard [Tue, 17 Mar 2015 10:47:33 +0000 (10:47 +0000)]
mac80211: Get IV len from key conf and not cipher scheme

When a key is installed using a cipher scheme, set a new
internal key flag (KEY_FLAG_CIPHER_SCHEME) on it, to allow
distinguishing such keys more easily.

In particular, use this flag on the TX path instead of
testing the sta->cipher_scheme pointer, as the station is
NULL for broad-/multicast message, and use the key's iv_len
instead of the cipher scheme information.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
[add missing documentation, rewrite commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: IBSS: refactor ieee80211_rx_bss_info
Janusz.Dziedzic@tieto.com [Mon, 9 Mar 2015 06:58:15 +0000 (07:58 +0100)]
mac80211: IBSS: refactor ieee80211_rx_bss_info

Put station specific code in ieee80211_update_sta_info
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: minstrel_ht: fix rounding issue in MCS duration calculation
Felix Fietkau [Fri, 13 Mar 2015 09:54:44 +0000 (10:54 +0100)]
mac80211: minstrel_ht: fix rounding issue in MCS duration calculation

On very high MCS bitrates, the calculated duration of rates that are
next to each other can be very imprecise, due to the small packet size
used as reference (1200 bytes).
This is most visible in VHT80 nss=2 MCS8/9, for which minstrel shows the
same throughput when the probability is also the same. This leads to a
bad rate selection for such rates.

Fix this issue by introducing an average A-MPDU size factor into the
calculation.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agocfg80211: Process all pending regulatory requests/hints
Ben [Thu, 12 Mar 2015 13:37:34 +0000 (09:37 -0400)]
cfg80211: Process all pending regulatory requests/hints

It is possible that there are several regulatory requests
pending, but the processing of the last one does not call
CRDA, and thus the other requests are not handled.

Fix this by rescheduling the work until all requests have
been processed.

Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: initialize rate control earlier for tdls station
Marek Puzyniak [Sun, 8 Mar 2015 16:04:22 +0000 (18:04 +0200)]
mac80211: initialize rate control earlier for tdls station

Currently when TDLS station in driver goes from authenticated
to associated state it can not use rate control parameters
because rate control is not initialized yet. Some drivers
require parameters already initialized by rate control when
entering associated state. It can be done by initializing
rate control after station transition to associated state but
before notifying driver about that.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
[fix comment to say 'associated' instead of 'authorized']
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: refactor drop connection/unlock in CSA processing
Johannes Berg [Thu, 12 Mar 2015 06:53:25 +0000 (08:53 +0200)]
mac80211: refactor drop connection/unlock in CSA processing

The schedule_work()/mutex unlocking code is duplicated many times,
refactor that to a common place in the function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: allow to get wireless_dev structure from ieee80211_vif
Emmanuel Grumbach [Thu, 12 Mar 2015 06:53:24 +0000 (08:53 +0200)]
mac80211: allow to get wireless_dev structure from ieee80211_vif

This will allow mac80211 drivers to call cfg80211 APIs with
the right handle.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: add comment for rx_path_lock
Johannes Berg [Mon, 16 Mar 2015 08:08:20 +0000 (09:08 +0100)]
mac80211: add comment for rx_path_lock

Add a comment explaining how the RX path lock is used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
9 years agomac80211: move netdev stats to common function
Johannes Berg [Mon, 16 Mar 2015 08:05:23 +0000 (09:05 +0100)]
mac80211: move netdev stats to common function

Move the netdev stats accounting into the common function
ieee80211_deliver_skb() that is called in both places.

Signed-off-by: Johannes Berg <johannes.berg@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>