* 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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>