Commit Graph

5025 Commits

Author SHA1 Message Date
Kalle Valo
0cf151bdf9 * Location Aware Regulatory was added by Arik
* 8000 device family work
 * Update to the BT Coex firmware API
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVAYnmAAoJEC0Llv5uNjIB3MUQAIhWBI+R9s6Dzz0stjs+CdJX
 V5k/yNOleRuwVPXzIbeX8hN+rAuiIoxS1/SLi7vRqNRwuz7Wn0DFIXsK9+WG3kQ1
 3KOtY3LpJyoVxGck6vxmVZN9tFMFH0RpYuz54XY3qO7ZXDPBfB3VZCD3AH2faAWW
 S990Wg7W8z92L8XFBzfnJ+6gF5iiS7LP14dqvRu05Gp1NoZog8s0DMZrpSYuVg6u
 AyobaA9RGfJ90f9e/RX5KbTZE5LUFSEYUmB95LXJkqDGu6zj2ac9VNoSczstjuvb
 s7ceA9Ds3WCghvfUUcIVnBVBcjkVa4I9UbbKR7lHyj+4rOfWO0XO9qNOXRrqfDhx
 KB0eQN9S4cEOML5HeX/d+63Pm1fcRT0TzE7O+LIzBNQUd1jQC5hyK6Src2rLK/6w
 XS2wEU0qnKYMqzl6GzhQsSzfaFfMand65+podYSdMPVi0qjZ70wTFe+vGL1cwnVJ
 zXn/xxonNadH/IRdEP/roJK8vVnk2uSwJePxGgrQzIIqWYQmRm0KsreKY0dg4B9R
 dPmZW2FaWPnuv2/RyDe0VWuC2jr1ZdEcXuVF7lykPMkcy1CyLBrWSN/DIeXchQUN
 5QF+dKTJc4IWN+NgOSW5ADXeR8mMSGnyoBmm8FlrmtBbFsiSKkWYwOdaZ0q1ODhL
 8GIrb23uFg93mOXIJlrF
 =l2Ap
 -----END PGP SIGNATURE-----

Merge tag 'iwlwifi-next-for-kalle-2015-03-12' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

* Location Aware Regulatory was added by Arik
* 8000 device family work
* Update to the BT Coex firmware API
2015-03-13 15:09:18 +02:00
Emmanuel Grumbach
208d271a3f Merge branch 'iwlwifi-fixes' into iwlwifi-next 2015-03-12 14:38:26 +02:00
Johannes Berg
e111e96857 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>
2015-03-12 09:57:49 +02:00
Luciano Coelho
0c2ae049ae 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>
2015-03-12 09:57:48 +02:00
Johannes Berg
bca13904d0 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>
2015-03-12 09:57:47 +02:00
Eran Harary
f4a3ee493e 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>
2015-03-12 09:57:47 +02:00
Emmanuel Grumbach
82f0a9e602 iwlwifi: update copyright to include 2015
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:46 +02:00
Oren Givon
2bccec4e12 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>
2015-03-12 09:57:46 +02:00
Emmanuel Grumbach
aee8bf5d26 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>
2015-03-12 09:57:45 +02:00
Emmanuel Grumbach
9b666db492 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>
2015-03-12 09:57:45 +02:00
Emmanuel Grumbach
c22b0ff572 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>
2015-03-12 09:57:44 +02:00
Emmanuel Grumbach
e0b8d40513 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>
2015-03-12 09:57:43 +02:00
Eyal Shapira
ad82d8a536 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>
2015-03-12 09:57:43 +02:00
Arik Nemtsov
35af15d131 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>
2015-03-12 09:57:42 +02:00
Johannes Berg
36f4631c53 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>
2015-03-12 09:57:42 +02:00
Eran Harary
16bc119b6b 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>
2015-03-12 09:57:41 +02:00
Oren Givon
3a1a61476d 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>
2015-03-12 09:57:40 +02:00
Eyal Shapira
db7c689d08 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>
2015-03-12 09:57:40 +02:00
Arik Nemtsov
4557eaba13 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>
2015-03-12 09:57:39 +02:00
Arik Nemtsov
fcf23352e0 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>
2015-03-12 09:57:39 +02:00
Emmanuel Grumbach
9beda94059 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>
2015-03-12 09:57:38 +02:00
Emmanuel Grumbach
7d03182c5d 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>
2015-03-12 09:57:38 +02:00
Arik Nemtsov
f55286313a 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>
2015-03-12 09:57:37 +02:00
Emmanuel Grumbach
e70fe7eb9d iwlwifi: fix smatch warning: warn: inconsistent indenting
While at it, fix a few checkpatch issues.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:36 +02:00
Emmanuel Grumbach
6a65bd534e 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>
2015-03-12 09:57:36 +02:00
Emmanuel Grumbach
36277234da 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>
2015-03-12 09:57:35 +02:00
Eran Harary
7a42baa621 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>
2015-03-12 09:57:35 +02:00
Emmanuel Grumbach
7754ae79e2 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>
2015-03-12 09:57:34 +02:00
Emmanuel Grumbach
70e90992e7 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>
2015-03-12 09:57:33 +02:00
Emmanuel Grumbach
0ec850dc19 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>
2015-03-12 09:57:33 +02:00
Emmanuel Grumbach
767d6f9d43 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>
2015-03-12 09:57:32 +02:00
Emmanuel Grumbach
560ba3e6f4 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>
2015-03-12 09:57:32 +02:00
Jonathan Doron
47c8b154a7 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>
2015-03-12 09:57:31 +02:00
Jonathan Doron
7f0344c218 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>
2015-03-12 09:57:30 +02:00
Eran Harary
8ba2d7a1dd iwlwifi: mvm: take the MAC address from HW registers
For some configurations, the driver should get the MAC
address from the hardware registers and not from the
regular locations. Since the parsing of the MAC address
is the same regardless of its source, continue the regular
code path (parsing) after we read the registers.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:30 +02:00
Arik Nemtsov
5711cac489 iwlwifi: allow disabling LAR via module param
This module parameter is useful for debugging NVM and LAR related issues.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:29 +02:00
Eran Harary
ce5000710b iwlwifi: mvm: support new PHY_SKU nvm section for family 8000 B0
Starting from family 8000 B0 step the radio_cfg parameters
and the get_sku parameters moved from SW section to PHY_SKU section.

Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:29 +02:00
Eliad Peller
2926f9589b iwlwifi: disable 11ac if 11n is disabled
11ac depends on 11n, so disable it if 11n is disabled.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:28 +02:00
Matti Gottlieb
d0d1519736 iwlwifi: iwlmvm: LAR: disable LAR support due to NVM vs TLV conflict
If LAR is supported in TLV, but the NVM does not enable it, then disable
LAR support and ignore the TLV's bit that enabled LAR.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:27 +02:00
Eliad Peller
02a50495de iwlwifi: use IWL_DEFAULT_MAX_TX_POWER for max_eirp
max_eirp affects the txpower configured to the power,
so use the max tx power (22) instead of some other
value.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:27 +02:00
Matti Gottlieb
b281c93d23 iwlwifi: change last 5ghz channel to 165 & add support for 8000 family
Fix the last 5ghz channel to 165 instead of 161
Add support for 8000 family, until channel 181.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:26 +02:00
Arik Nemtsov
162ee3c9a8 iwlwifi: nvm: init correct nvm channel list for 8000 devices
Otherwise the regulatory data will mistakenly contain only 7000 series
channels.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:26 +02:00
Arik Nemtsov
88931cc928 iwlwifi: mvm: LAR: Add chub mcc change notify command
Chub (Communication Hub, CommsHUB) is a HW component that connects to the cellular
and connectivity cores that gets updates of mcc changes, and then notifies the FW
directly of any mcc change.

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

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:25 +02:00
Eliad Peller
a76f3bfe01 iwlwifi: don't declare support for 5ghz if not supported
Remove a useless debug print about unsupported channels.
Also add a comment about the LAR special case where channels
might become valid later.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:24 +02:00
Arik Nemtsov
bdf2fae837 iwlwifi: ignore IBSS flag as regulatory NO-IR indication
According to updated regulatory guidelines, the ACTIVE bit in the NVM
also allows ibss activity on the channel. The IBSS NVM bit is not updated
when LAR is active and is deprecated. Using this bit for NO-IR incorrectly
causes all 5Ghz channels to be marked as passive.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:24 +02:00
Arik Nemtsov
770ceda615 iwlwifi: mvm: consider LAR support during NVM parse
Register to cfg80211 with all channels enabled when LAR is supported.
Appropriate channels will later be disabled when a specific regulatory
domain is defined.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:23 +02:00
Arik Nemtsov
af45a9003f iwlwifi: create regdomain from mcc_update_cmd response
Parse the NVM channel data and create a regulatory domain with a rule
for every 20Mhz channel. Use the AUTO_BW flag so the regulatory core
can unify single-channel rules into ranges.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:22 +02:00
Arik Nemtsov
90d4f7db6c iwlwifi: mvm: init country code on init/recovery
During init queue a regulatory update to retrieve the default
regulatory settings from FW. If we're during recovery, only replay the
current country code to FW, if it exists.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:22 +02:00
Arik Nemtsov
dcaf9f5ecb iwlwifi: mvm: add MCC update FW API
The new API sets an MCC (mobile country code) to FW and receives a
channel structure to be used as a basis for an updated regulatory domain.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:21 +02:00
Emmanuel Grumbach
3c2d24a914 iwlwifi: fix max_ht_ampdu_exponent for older devices
The commit below didn't update the max_ht_ampdu_exponent
for the devices listed in iwl-[1-6]000.c which, in result,
became 0 instead of 8K. This reduced the size of the Rx
AMPDU from 64K to 8K which had an impact in the Rx
throughput. One user reported that because of this, his
downstream throughput droppped by a half.

CC: <stable@vger.kernel.org> [3.19]
Fixes: c064ddf318 ("iwlwifi: change max HT and VHT A-MPDU exponent")
Reported-and-tested-by: Valentin Manea <linux-wireless@mrs.ro>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-03-12 09:57:21 +02:00