Commit graph

300 commits

Author SHA1 Message Date
Florian Westphal 860e9538a9 treewide: replace dev->trans_start update with helper
Replace all trans_start updates with netif_trans_update helper.
change was done via spatch:

struct net_device *d;
@@
- d->trans_start = jiffies
+ netif_trans_update(d)

Compile tested only.

Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: MPT-FusionLinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-04 14:16:49 -04:00
David S. Miller cba6532100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	net/ipv4/ip_gre.c

Minor conflicts between tunnel bug fixes in net and
ipv6 tunnel cleanups in net-next.

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-04 00:52:29 -04:00
David S. Miller ede00a5ceb wireless-drivers patches for 4.7
Major changes:
 
 brcmfmac
 
 * add support for nl80211 BSS_SELECT feature
 
 mwifiex
 
 * add platform specific wakeup interrupt support
 
 ath10k
 
 * implement set_tsf() for 10.2.4 branch
 * remove rare MSI range support
 * remove deprecated firmware API 1 support
 
 ath9k
 
 * add module parameter to invert LED polarity
 
 wcn36xx
 
 * fixes to get the driver properly working on Dragonboard 410c
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJXJztPAAoJEG4XJFUm622beSAIAKIw8zGcs7DWd/AGd9z8D7L5
 DeO6fxhiu/05AU3d1jM7Rp/Z5hZ42s41PDjRN1lkZJaF4Squa7XOxuB35JlPd+o8
 2S21lvaM6ABraSEcDdYL++rglXFL65gIesv/W4TuxqdJCmi9fL7ie7ccplQH17bi
 KyY3ePihHZPOR8aXMRbdEzTEjjPFaO/LlAghHPw5WKmVy7FkFKSyFR8muFEPnKEl
 DSBWmG6GqRQaHUuVl1QOmoEEqiv7h85D+YqwKiy/xEM4Yw5Rmt5n5pj02KA0i4y5
 IRZs59I/8zdAgDgBd+liVeBw9Gp2xAV5R8afOTdzViBDrqCbDCwNq6OPG1GmkLw=
 =lyGT
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-for-davem-2016-05-02' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers patches for 4.7

Major changes:

brcmfmac

* add support for nl80211 BSS_SELECT feature

mwifiex

* add platform specific wakeup interrupt support

ath10k

* implement set_tsf() for 10.2.4 branch
* remove rare MSI range support
* remove deprecated firmware API 1 support

ath9k

* add module parameter to invert LED polarity

wcn36xx

* fixes to get the driver properly working on Dragonboard 410c
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-05-03 00:35:16 -04:00
Luca Coelho f0d8f38cd9 iwlwifi: fix fw version reading for DVM devices
In commit 97f95c93c8 ("iwlwifi: remove support for fw older than
-16.ucode") we accidentally changed the fw version reading code for
DVM devices.  The code intended to remove the old fw version API,
because all MVM firmwares version 16 and above that we support don't
use it anymore.  But DVM devices still use the old FW API.

Fix that by bringing the code back in.

Reported-by: Pat Erley <pat-lkml@erley.org>
Tested-by: Kalle Valo <kvalo@codeaurora.org>
Fixes: 97f95c93c8 ("iwlwifi: remove support for fw older than-16.ucode")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-26 12:32:07 +03:00
David S. Miller 1602f49b58 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were two cases of simple overlapping changes,
nothing serious.

In the UDP case, we need to add a hlist_add_tail_rcu()
to linux/rculist.h, because we've moved UDP socket handling
away from using nulls lists.

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-23 18:51:33 -04:00
Johannes Berg 57fbcce37b cfg80211: remove enum ieee80211_band
This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-04-12 15:56:15 +02:00
Matti Gottlieb f742aaf36e iwlwifi: mvm: fix accessing Null pointer during fw dump collection
The firwmare file can come with data that is relevant for paging. This
data is availablet to the firmware upon request, but it stored in the
host's memory. During the firmware init flow, the driver configures the
firmware so that the firwmare knows where is the data.
When paging is used, the variable paging_mem_size is the number of bytes
that are available through paging. This variable is not zeror-ed if the
driver fails to configure the paging in the firmware, but the memory is
freed which is inconsistent.
This inconsistency led to a NULL pointer dereference in the code that
collects the debug data.

Fix this by zero-ing the paging_mem_size variable and NULLify the
relevant pointers, so that the code that collects the debug data will
know that the paging data is not available.

Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-04-12 11:52:39 +03:00
Sara Sharon e1ba684f76 iwlwifi: 8000: fix MODULE_FIRMWARE input
The firwmare name for 8000 is iwlwifi-8000C. The C is
appended based on a value read from a register. This
allows to load different firwmare versions based on
the hardware step during development. Now that the
hardware development is completed, we can hard code
the 'C' and along the way, fix the input to
MODULE_FIRMWARE.

This fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=116041

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-04-12 11:52:29 +03:00
Ayala Beker cd49727e1a iwlwifi: mvm: avoid to WARN about gscan capabilities
Gscan capabilities were updated with new capabilities supported
by the device. Update GSCAN capabilities TLV and avoid to WARN
if the firmware does not have the new capabilities.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-04-12 10:03:16 +03:00
Oren Givon d34475b964 iwlwifi: add device IDs for the 8265 device
Add new 8265 series PCI IDs.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-04-12 10:03:16 +03:00
David S. Miller bddf59046d wireless-drivers patches for 4.7
Major changes:
 
 iwlwifi
 
 * support for Link Quality measurement
 * more work 9000 devices and MSIx
 * continuation of the Dynamic Queue Allocation work
 * make the paging less memory hungry
 * 9000 new Rx path
 * removal of IWLWIFI_UAPSD Kconfig option
 
 ath10k
 
 * implement push-pull tx model using mac80211 software queuing support
 * enable scan in AP mode (NL80211_FEATURE_AP_SCAN)
 
 wil6210
 
 * add basic PBSS (Personal Basic Service Set) support
 * add initial P2P support
 * add oob_mode module parameter
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJXC5ZnAAoJEG4XJFUm622bcLgIAKxTHWfcirfNpzLg39gfR/jx
 vWTX8YifGdZUuQuaEJhc7pPZ6eiTyMlRLZsu9JDT0LErM6uwPKSOXkogzfiSFG00
 ntXGOWfQlGdyFyQshOoHWlXSkfE7bBWpLiROgk7dS2oyObQr2ETBT/yVd1bkP6Ka
 g13sgzM/a3CbxaZSllaK0S/YPQ6JhXlbeWotqOqE4SotYQD2QfLkYJiXSFRXNcQl
 OWDPCTjI3yybOVRLTnLMn2CoWrRqtUElwXaWBKJPhgY3EyxlU6R6UPw8OL8DvXIw
 EedpflIekKahwZJbipqdkKbhpxinUAa9kPsSkfCtlPJQWsiQvdwpG7R5KQmJ8Lc=
 =A2Lw
 -----END PGP SIGNATURE-----

Merge tag 'wireless-drivers-next-for-davem-2016-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next

Kalle Valo says:

====================
wireless-drivers patches for 4.7

Major changes:

iwlwifi

* support for Link Quality measurement
* more work 9000 devices and MSIx
* continuation of the Dynamic Queue Allocation work
* make the paging less memory hungry
* 9000 new Rx path
* removal of IWLWIFI_UAPSD Kconfig option

ath10k

* implement push-pull tx model using mac80211 software queuing support
* enable scan in AP mode (NL80211_FEATURE_AP_SCAN)

wil6210

* add basic PBSS (Personal Basic Service Set) support
* add initial P2P support
* add oob_mode module parameter
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-11 11:58:12 -04:00
Julian Calaby 84d17a2a5a iwl4965: Fix more memory leaks in __il4965_up()
In some of the non-success return paths, the memory allocated by
iwl4965_sta_alloc_lq() in iwl4965_alloc_bcast_station() is not freed.

In particular:
 - if the card isn't ready after il4965_prepare_card_hw()
 - if the card is hardware-rfkilled

In the hardware rfkilled path, the driver enables the rfkill
interrupt. When the card is unrfkilled and this interrupt is raised
we end up calling il4965_bg_restart() which calls __il4965_up() which
calls iwl4965_alloc_bcast_station() again.

Suggested-by: Jia-Ju Bai <baijiaju1990@163.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:37:50 +03:00
Jia-Ju Bai c2fd34469d iwl4965: Fix a memory leak in error handling code of __il4965_up
When il4965_hw_nic_init in __il4965_up fails, the memory allocated by
iwl4965_sta_alloc_lq in iwl4965_alloc_bcast_station is not freed.

This patches adds il_dealloc_bcast_stations in the error handling code of
__il4965_up to fix this problem.

This patch has been tested in real device, and it actually fixes the bug.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:37:49 +03:00
Jia-Ju Bai fe9b47944e iwl4965: Fix a null pointer dereference in il_tx_queue_free and il_cmd_queue_free
If "txq->cmd = kzalloc(...)" in il_tx_queue_init fails,
"kfree(txq->cmd[i])" in il_tx_queue_free and il_cmd_queue_free
in iwl4965_hw_txq_ctx_free will causes a null pointer dereference,
because txq->cmd is NULL at that time.

This patch fixes this problem by adding a if-check before kfree.
To avoid double free in il_tx_queue_free and il_cmd_queue_free
caused by the fixing, txq->meta and txq->cmd in error handling code
of il_tx_queue_init are assigned null values.
Otherwise, a double free will occur.

This patch has been tested in real device, and it actually fixes the bug.
Thanks Stanislaw for his suggestion.

Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:37:43 +03:00
Markus Elfring fb9693f045 iwlegacy: Return directly if allocation fails in il_eeprom_init()
Also remove an unused label.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
[Rewrote commit message]
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:37:42 +03:00
Geliang Tang ea544aab42 ipw2x00: use to_pci_dev()
Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-04-07 19:37:34 +03:00
Johannes Berg d63b548fff mac80211: allow passing transmitter station on RX
Sometimes drivers already looked up, or know out-of-band
from their device, which station transmitted a given RX
frame. Allow them to pass the station pointer to mac80211
to save the extra lookup.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2016-04-06 13:18:13 +02:00
Colin Ian King 46167a8fd4 iwlwifi: pcie: remove duplicate assignment of variable isr_stats
isr_stats is written twice with the same value, remove one of the
redundant assignments to isr_stats.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:52 +03:00
Luca Coelho 489c546dce iwlwifi: mvm: allow setting the thermal state in D0i3
We were not allowing the thermal state to be set when we were in D0i3
mode.  It was not very clearly specified how it should work, but now a
decision was made to allow the state to be set in D0i3 (which will
cause a brief wake up).  Remove the check in the set_cur_state
operation.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:51 +03:00
Liad Kaufman d2515a99b2 iwlwifi: mvm: fix inconsistent lock in dqa mode
When working in DQA mode, there is a lockdep log warning
about an inconsistent state of the mvmsta->lock and the
mvm->queue_info_lock. Fix this. This mode is not activated
for now.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:51 +03:00
Golan Ben-Ami a6017b9030 iwlwifi: store fw memory segments length and addresses in run-time
Currently reading the fw memory segments is done according to
addresses and data length that are hard-coded.
Lately a new tlv was appended to the ucode, that contains
the data type, length and address.
Parse this tlv, and in run-time store the memory segments length
and addresses that would be dumped upon a fw error.

Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:50 +03:00
Haim Dreyfuss 8d80717a12 iwlwifi: pcie: Fix index iteration on free_irq in MSIX mode
In MSIX mode we iterate over the allocated interrupt vectors and
register them to an handler. In case of registration failure,
we free all the allocated irq.
we use the outer index mistakenly instead of the inner one.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:50 +03:00
Emmanuel Grumbach 9d9b21d1b6 iwlwifi: remove IWL_*_UCODE_API_OK
_UCODE_API_OK was a intermediate version between MIN and
MAX. If a user had a firmware below _OK but above _MIN, the
driver would work but the user would get a warning in the
kernel log telling him to update his firmware.
This is not needed since most users won't look for these
messages in the kernel log if their wifi is working.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:49 +03:00
Sara Sharon 5e6a98dc48 iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family
Declare and enable support of RX and TX checksum for 9000 family.
Configure offload_assist in the TX cmd accordingly to support
TX csum.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:49 +03:00
Luca Coelho 728e825f81 iwlwifi: mvm: add a scan timeout for regular scans
If something goes wrong with the firmware and we never get a scan
complete notification, we stay stuck forever.  In order to avoid this
situation, add a timeout and trigger an NMI if it expires before
receiving the notification., so we can clean things up.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:48 +03:00
Liad Kaufman 097129c9e6 iwlwifi: mvm: move cmd queue to be #0 in dqa mode
Change the CMD queue to be queue #0 (rather than queue #9)
when working in DQA mode.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:48 +03:00
Liad Kaufman 0e0e44205c iwlwifi: mvm: allocate dedicated queue for cab in dqa mode
In DQA mode, allocate a dedicated queue (#3) for content
after beacon (AKA "CaB").

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:47 +03:00
Liad Kaufman f02669be45 iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd
Set the correct sta_id in the SCD_QUEUE_CONFIG command sent
to the FW when enabling/disabling queues. This is needed in
DQA-mode to allow the FW to associate between queue and STA.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:47 +03:00
Liad Kaufman d5216a2893 iwlwifi: mvm: use bss client queue for bss station
Use the reserved BSS Client queue when connecting to an AP
in DQA mode.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:46 +03:00
Oren Givon 0e32d5904c iwlwifi: edit the 9000 series PCI IDs
Edit some of the 9560 series and 5165 series PCI IDs.
These devices do not exist yet.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:24:46 +03:00
Sara Sharon 854d773e4a iwlwifi: mvm: improve RSS configuration
Improve current RSS configuration:
 * Use netdev_rss_key instead of keeping a local copy.
 * Configure also UDP hashing to have UDP traffic spread across queues.
 * Do not direct RSS traffic to our fallback queue.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:30 +03:00
Sara Sharon 013a67ea69 iwlwifi: pcie: request one more interrupt vector
We want to request an interrupt vector for RSS queue per CPU,
one vector for fallback queue, and one for non-rx interrupts.
Future patch will make sure that no RSS traffic is directed to
fallback queue.
This will enable us to enable fast path on traffic that otherwise
would have been received on the fallback queue.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:30 +03:00
Chaya Rachel Ivgi 0df1391fee iwlwifi: mvm: remove uneeded D0I3 checking
The driver can read the current state during D0I3,
therefore there is no reason not to do it.

Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:29 +03:00
Liad Kaufman 2a2e9d1007 iwlwifi: trans: fix iwl_trans_txq_scd_cfg.sta_id sign
For some reason, this was defined as a signed variable.
Make it unsigned.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:29 +03:00
David Spinadel 5db81fd401 iwlwifi: mvm: set aux STA ID in scan config
Auxilary station ID in flag in scan config command wasn't set
although we set the station ID. Add the flag.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:28 +03:00
Sara Sharon b238be0737 iwlwifi: mvm: report checksum is done also for IPv6 packets
Currently the code checks if hardware reported both L4 and L3
checksums as valid, and only then reports it as validated to
the stack.
However, IPv6 does not have checksum at all and the L3 checksum
valid bit is always off for IPv6 packets, with the result of the
stack re-validating L4 checksum.
Fix code to set CHECKSUM_UNNECESSARY also for IPv6 packets whose
TCP/UDP checksum was verified.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:28 +03:00
Eva Rachel Retuya b429a773c1 iwlwifi: dvm: use alloc_ordered_workqueue()
Use alloc_ordered_workqueue() to allocate the workqueue instead of
create_singlethread_workqueue() since the latter is deprecated and is scheduled
for removal.

There are work items doing related operations that shouldn't be swapped when
queued in a certain order hence preserve the strict execution ordering of a
single threaded (ST) workqueue by switching to alloc_ordered_workqueue().

WQ_MEM_RECLAIM flag is not needed since the worker is not depended
during memory reclaim.

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:27 +03:00
Sara Sharon 97f95c93c8 iwlwifi: remove support for fw older than -16.ucode
API version lower than 16 is not supported anymore - don't
load older ucode.
Remove code handling older versions.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:27 +03:00
Ayala Beker a0b09f1303 iwlwifi: mvm: update GSCAN capabilities
Gscan capabilities were updated with new capabilities supported
by the device. Update GSCAN capabilities TLV.

Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:26 +03:00
Emmanuel Grumbach 3a171386f9 iwlwifi: remove IWLWIFI_UAPSD Kconfig
We have a module parameter, this is enough.
per platform customizations will be done through the init
script of the platform.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:26 +03:00
Sara Sharon 0f851bbc28 iwlwifi: pcie: write to legacy register also in MQ
Due to hardware bug, upon any shadow free-queue register write
access, a legacy RBD shadow register must be written as well.
This is required in order to trigger a copy of the shadow registers
values after MAC exits sleep state.
Specifically, the driver has to write (any value) to the legacy RBD
register each time FRBDCB is accessed.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:25 +03:00
Liad Kaufman 24afba7690 iwlwifi: mvm: support bss dynamic alloc/dealloc of queues
"DQA" is shorthand for "dynamic queue allocation". This
enables on-demand allocation of queues per RA/TID rather than
statically allocating per vif, thus allowing a potential
benefit of various factors.

Please refer to the DOC section this patch adds to sta.h to
see a more in-depth explanation of this feature.

There are many things to take into consideration when working
in DQA mode, and this patch is only one in a series. Note that
default operation mode is non-DQA mode, unless the FW
indicates that it supports DQA mode.

This patch enables support of DQA for a station connected to
an AP, and works in a non-aggregated mode.

When a frame for an unused RA/TID arrives at the driver, it
isn't TXed immediately, but deferred first until a suitable
queue is first allocated for it, and then TXed by a worker
that both allocates the queues and TXes deferred traffic.

When a STA is removed, its queues goes back into the queue
pools for reuse as needed.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:25 +03:00
Johannes Berg 7ec54716e7 iwlwifi: mvm: remove is_data_qos variable in TX
"is_data_qos == true" is equivalent to "tid < IWL_MAX_TID_COUNT"
since tid is only assigned (and range-checked) in that case.

This removes a (harmless) smatch warning that occurs because it
can't seem to follow the above logic from the code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:24 +03:00
Haim Dreyfuss 2d3d31b562 iwlwifi: 9000: update device id and FW serial number
Update device id and FW serial number for 2X2 antenna devices
in 9000 generation product. These will not be available on
the market in the coming year.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:24 +03:00
Emmanuel Grumbach 11dee0b494 iwlwifi: make uapsd_disable module param a bitmap
This allows to disable uapsd for BSS only, or P2P client
separately. Remove the now unneeded
IWL_MVM_P2P_UAPSD_STANDALONE constant.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:23 +03:00
Emmanuel Grumbach a2a57a3548 iwlwifi: add missing mutex_destroy statements
iwlwifi / iwlmvm didn't destroy their mutexes. Fix that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:23 +03:00
Sara Sharon d8fe484470 iwlwifi: mvm: add support for new TX CMD API
TX CMD API has changed to support offload assist.
Currently we do not enable checksum yet, but must set the
padding indication, to avoid FW errors.
Set other amsdu flag as well.
The rest of the flags will be configured only if HW csum
is enabled and will be set in future patches.
This change is backward compatible.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:22 +03:00
Sara Sharon c772a3d3fa iwlwifi: pcie: do not pad QoS AMSDU
We insert padding if the MAC header's size is not a multiple of 4
to ensure that the SNAP header is DWORD aligned. When we do so, we
let the firmware know by setting a bit in Tx command
(TX_CMD_FLG_MH_PAD) which will instruct the firmware to drop those
2 bytes before sending the frame.
However, this is not needed for AMSDU as the sub frame header (14B)
complements the MAC header (26B) so that the SNAP header is DWORD
aligned without adding any pad.

Until 9000, the firmware didn't check the TX_CMD_FLG_MH_PAD bit
but rather checked the length of the MAC header itself and
assumed the entity that enqueued the frame (driver or internal
firmware code) added the pad.
Since the driver inserted the pad even for AMSDU this logic applied.
Note that the padding is a DMA optimization but it's not strictly
needed, so we could pad even if it was not needed.

However, the CSUM hardware introduced for the 9000 devices requires
to not pad AMSDU as it is not needed, and will fail if such a pad
exists.
Due to older FW not checking the padding bit but checking the mac
header size itself - we cannot do this adjustments for older
generations.
Do not align the size if it is an AMSDU and HW checksum is enabled -
which will only happen on 9000 devices and on.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:22 +03:00
Emmanuel Grumbach 6e2611f324 iwlwifi: mvm: modify the max SP to infinite
This makes u-APSD work with more peers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:21 +03:00
Emmanuel Grumbach 6ed5e4d64a iwlwifi: pcie: print error value as signed int
Bjorn pointed out that printing an error value as an
hexadecimal isn't very convenient. Change that.

Reported-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2016-03-30 16:21:21 +03:00