aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm
AgeCommit message (Collapse)AuthorFilesLines
2016-07-14Merge tag 'wireless-drivers-next-for-davem-2016-07-13' of ↵David S. Miller28-506/+1579
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.8 Major changes: iwlwifi * more work on the RX path for the 9000 device series * some more dynamic queue allocation work * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) mwifiex * implement get_tx_power and get_antenna cfg80211 operation callbacks wl18xx * add support for 64bit clock rtl8xxxu * aggregation support (optional for now) Also wireless-drivers is merged to fix some conflicts. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-07-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo3-6/+22
This is to fix some conflicts in iwlwifi. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c drivers/net/wireless/intel/iwlwifi/mvm/scan.c
2016-07-08Merge tag 'iwlwifi-next-for-kalle-2016-07-06' of ↵Kalle Valo26-423/+1286
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work on DQA continued * SAR BIOS implementation * some work on debugging capabilities * added support for GCMP encryption * data path rework in preparation for new HW * some cleanup to remove transport dependency on mac80211 * support for MSIx in preparation for new HW * lots of work in preparation for HW support (9000 and a000 series) * general cleanups * general bugfixes
2016-07-06mac80211: Add support for beacon report radio measurementAvraham Stern1-8/+29
Add the following to support beacon report radio measurement with the measurement mode field set to passive or active: 1. Propagate the required scan duration to the device 2. Report the scan start time (in terms of TSF) 3. Report each BSS's detection time (also in terms of TSF) TSF times refer to the BSS that the interface that requested the scan is connected to. Signed-off-by: Assaf Krauss <[email protected]> Signed-off-by: Avraham Stern <[email protected]> [changed ath9k/10k, at76c59x-usb, iwlegacy, wl1251 and wlcore to match the new API] Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2016-07-06iwlwifi: mvm: support v4 of the TX power commandLuca Coelho3-13/+32
Add support for the v4 version of the TX power command. Just add a new version and do the same sizing tricks that were done when support for v3 was introduced. This patch doesn't support the new functionality introduced, but makes the driver work with the new size of the command. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: decouple PCIe transport from mac80211Johannes Berg1-0/+3
The PCIe transport needs to store two pointers in each TX SKB, and currently assumes mac80211's ieee80211_tx_info is present in the CB to do that. In order to remove that assumption, have the opmodes pass in the offset to where the pointers can be stored in the CB and use the offset in the PCIe code. To make the disentanglement complete, remove mac80211.h includes from everywhere in the generic iwlwifi code. This required adding an include of cfg80211.h in one place. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: store cipher scheme independent of mac80211Johannes Berg2-3/+17
In order to reduce reliance on mac80211 structs in the core iwlwifi code, store the cipher schemes in the format given by the firmware and convert it later, rather than storing it in the mac80211 format. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: free RX reorder buffer on restartSara Sharon1-3/+4
Restart flow zeroes the rx_ba_sessions counter. Mac80211 asks driver to tear down of the session only afterwards, and as a result driver didn't free the data. Fix it. Signed-off-by: Sara Sharon <[email protected]> Fixes: 10b2b2019d81 ("iwlwifi: mvm: add infrastructure for tracking BA session in driver") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: add RX aggregation printsSara Sharon2-2/+11
Add some prints to track BAID assignment. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support dqa-mode scd queue redirectionLiad Kaufman1-5/+110
Make sure that in DQA mode, the SCD's configuration of a queue is redirected to the lower AC of the streams of the queue. Make sure that this queue is redirected to the lowest AC when adding a new RA/TID to an existing queue. If it isn't - redirect the queue. Also, as redirection revealed a bug in the marking of a shared queue, this patch contains a small fix to make sure a shared queue maintains the appropriate "shared queue marking". Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support tdls in dqa modeLiad Kaufman2-13/+26
Support TDLS when working in DQA mode. This is done mainly by NOT doing any special things for TDLS, as the queues are dynamically created anyway, so no need to allocate them ahead of time. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: unmap the paging memory before freeing itEmmanuel Grumbach1-4/+8
This led to a DMA splat. Fixes: a6c4fb4441f4 ("iwlwifi: mvm: Add FW paging mechanism for the UMAC on PCI") Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix the channel inhibition table for Channel 14Emmanuel Grumbach1-1/+1
The value for Channel 14 was wrong. Fix it. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix coex related commentsEmmanuel Grumbach1-2/+2
Those comments were wrong, fix them. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: write the correct internal TXF indexGolan Ben-Ami1-1/+2
The TX fifos are arranged consecutively in the SMEM, beginning with the regular fifos, and tailed by the internal fifos. In the current code, while trying to read the internal fifos, we read the fifos beginning with the index zero. By doing this we actually re-read the regular fifos. In order to read the internal fifos, start the reading index from the number of regular fifos configured by the fw. Signed-off-by: Golan Ben-Ami <[email protected]> Fixes: 39654cb3a6a2 ("iwlwifi: don't access a nonexistent register upon assert") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: read SAR BIOS table from ACPILuca Coelho1-0/+173
Read the SAR BIOS table from the ACPI and parse it into the iwl_mvm_sar_table structure. If the table is enabled, send it to the firmware via REDUCE_TX_POWER_CMD. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: cleanup the coex codeEmmanuel Grumbach3-231/+0
We removed support for old API for coexistence, but we forgot to remove defines and variable that are not needed anymore. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: checksum IPv6 fragmented packetSara Sharon1-15/+6
Our HW does not support checksum of fragmented packets. Fix code accordingly to checksum those packets in the driver. Signed-off-by: Sara Sharon <[email protected]> Fixes: 5e6a98dc4863 ("iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlmvm: mvm: set correct state in smart-fifo configurationstriebit1-1/+1
Currently the state sent in SF configuration is always FULL_ON. This commit sets the correct state (e.g. INIT_OFF when station is not associated). Fixes: commit f4a3ee493e69 ("iwlwifi: mvm: Always enable the smart FIFO") Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support new statistics notificationSara Sharon6-6/+56
For 9000 family we will get extended statistics notification with averaged data for RSSI, TCM and rogue AP detection. Support it. Future patches will added the required algorithms. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: add support for GCMP encryptionAyala Beker6-24/+85
Newer hardware supports GCMP and GCMP 256-bit ciphers. Add support for adding/setting GCMP key for TX mode. In the TX command handling GCMP-256 is handled in a different way as the key size should be up to 128-bits: Set the key value to the key index in the key table, and specify that this key should be taken form the key table instead of from the TX command. While at it - convert security control flags to an enum. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix txq aggregation bugOren Givon1-1/+9
Fix an issue where nullfunc frames and block ack requests had the same tid as aggregation frames and were queued on a non aggregation queue. The pending frames counter included those frames but the check whether to decrement the pending frames counter relied on the tid status and not on the txq id. The result was an inconsistent state of the pending frames counter followed by a failure to remove the station. This failure triggered SYSASSERT 0x3421. In addition, fix a situation in DQA mode where the number of pending frames turned negative. This was due to the TX queue being on the IWL_EMPTYING_HW_QUEUE_DELBA state and its frames were still decremented. Even though the SYSASSERT issue is fixed when DQA is disabled, the issue is not completely solved when DQA is enabled and should still be fixed. Signed-off-by: Oren Givon <[email protected]> Fixes: cf961e16620f ("iwlwifi: mvm: support dqa-mode agg on non-shared queue") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: avoid harmless -Wmaybe-uninialized warningArnd Bergmann1-20/+21
gcc is apparently unablel to track the state of the local 'resp_v2' variable across the kzalloc() function, and warns about the response variable being used without an initialization: drivers/net/wireless/intel/iwlwifi/mvm/nvm.c: In function ‘iwl_mvm_update_mcc’: drivers/net/wireless/intel/iwlwifi/mvm/nvm.c:727:36: warning: ‘mcc_resp_v1’ may be used uninitialized in this function [-Wmaybe-uninitialized] resp_cp->n_channels = mcc_resp_v1->n_channels; drivers/net/wireless/intel/iwlwifi/mvm/nvm.c:721:3: warning: ‘mcc_resp’ may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(resp_cp, mcc_resp, resp_len); The warning showed up in x86 allmodconfig after my patch to unhide -Wmaybe-uninitialized warnings by default was merged, though it always existed in randconfig builds. I did not catch the warning earlier because I was testing on ARM, which never produced the warning. This rearranges the code in a way that improves readability for both humans and the compiler, and that avoids the warning. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 6fa52430f0b3 ("iwlwifi: mvm: change mcc update API") Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: rs: add rate scaling support for 160MHz channelsGregory Greenman2-22/+60
Expand TLC to support 160MHz channels. Full support for A-MSDU case will be added separately. Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix RX mpdu status enumAyala Beker1-2/+2
FW sets status for each RX packet. Enum in the driver doesn't match with FW definition - fix it. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: Do not open aggregations for null data packetsMatti Gottlieb3-8/+9
Currently we try to open an aggregation for every packet (given that one is not already open). This causes redundant overhead (addba/delba) for null data packets. Do not open an aggregation for null data packets. Signed-off-by: Matti Gottlieb <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: remove unnecessary device conversion when reading the MCCLuca Coelho1-3/+1
We convert the mvm device to a PCI device and then back again when trying to find the handle for the device's ACPI data. This is unnecessary, so it can be removed. Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support dqa-enable hcmdLiad Kaufman2-0/+35
Support sending the DQA-enablement HCMD to the FW when working in DQA mode. This HCMD will enable DQA-specific flows in the FW. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: update aux queue in dqa modeLiad Kaufman3-8/+27
In DQA mode the AUX queue is mapped elsewhere than in non- DQA mode. Update the code to reflect this. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmdLiad Kaufman2-0/+11
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. In case the queue isn't connected to a specific station but rather is a static "generic" queue - the sta_id should be set to 0x10 (max supported STA is 0x0f). Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support dqa queue sharingLiad Kaufman3-22/+175
Support DQA queue sharing when no free queue exists for allocation to a STA that already exists. This means that a single queue will serve more than a single TID (although the RA will be the same for all TIDs served). We try to choose the lowest AC possible, to ensure the shared queues have the lowest possible combined AC requirements. The queue to share is chosen only from the same RA's DATA queues as follows (in descending priority): 1. An AC_BE queue 2. Same AC queue 3. Highest AC queue that is lower than new AC 4. Any existing AC (there always is at least 1 DATA queue) If any aggregations existed for any of the TIDs of the shared queue - they are stopped (the FW is notified), but no delBA is sent. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: silence uninitialized variable warningDan Carpenter1-0/+2
"max_amsdu_len" isn't set if kstrtouint() fails. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: remove an unused variableDan Carpenter1-3/+2
We never initialize ampdu_status so it causes a static checker warning when we pass it to iwl_mvm_pass_packet_to_mac80211(). Fortunately, it's never used so we can just remove it. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: change scan timeout to a delayed workLuca Coelho4-15/+14
Some transports may sleep when writing to registers, which is done when calling iwl_force_nmi(). So we can't call iwl_force_nmi() in a timer context. To solve that, convert the scan timeout timer to a delayed work. Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: fix possible division by zeroSara Sharon1-0/+3
Theoretically we may get only one IRQ from OS, in which case we will have only 1 queue even in MSIx mode. This will cause division by zero in the indirection table calculation. We do not need send the command in that case, as there is only one queue so all RX traffic will be directed to it anyway. Bail out early if there is only one queue. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: mvm: support dqa queue inactivation upon timeoutLiad Kaufman5-15/+398
Support marking queues as inactive upon a timeout expiring, and allow inactive queues to be re-assigned to other RA/TIDs if no other queue is free. This is done by keeping a timestamp of the latest frame TXed for every RA/TID, and then going over the queues currently in use when a new queue is needed, inactivating all those that are inactive. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-05Merge tag 'iwlwifi-next-for-kalle-2016-07-01' of ↵Kalle Valo11-83/+293
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * More work on the RX path for the 9000 device series * Some more dynamic queue allocation work * A few bugfixes and other improvements
2016-07-01iwlwifi: mvm: handle FRAME_RELEASE in MQ codeJohannes Berg1-2/+2
For some reason, the FRAME_RELEASE message handling for the default queue ended up being in the only/default queue for non-RSS devices; fix that and handle FRAME_RELEASE properly on the default queue for RSS devices. Fixes: 585a6fccf5b8 ("iwlwifi: mvm: infrastructure for frame-release message") Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: Support CSA countdown offloadingAndrei Otcheretianski8-21/+193
Add support CSA countdown offloading. When CSA starts, the driver specifies the offsets to the eCSA and CSA IEs in the beacon template command and the fw performs the countdown. The fw notifies the driver when the channel switch flow should be performed. Beacon sent notifications are not used anymore. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: free dqa queues on STA removal also in non-bssLiad Kaufman1-2/+3
Support queue removal in DQA mode in iwl_mvm_rm_sta() also when the device isn't a STA connected to an AP. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: update mpdu metadata APISara Sharon3-22/+54
rx_phy notification is no longer sent in devices with multiple rx queues. All the needed data is now set in the metadata - update code accordingly to reflect all the features as in the previous RX path. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: remove RX_PHY support for 9000 deviceSara Sharon3-16/+0
In multiple RX queues architecture, the RX_PHY notification is no longer useful as it is received in the default queue even for packets that are received on RSS queue, and cannot be accessed without locking. All the needed data is in the new RX packet metadata and firmware will no longer send this notification for 9000 devices. Remove support of it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: rename CAPA_P2P_STANDALONE_UAPSD to CAPA_P2P_SCM_UAPSDAvraham Stern3-4/+4
Ucode capability bit 26 indicates support for UAPSD on P2P interface even with a simultaneous BSS station interface, as long as both interfaces are in the same binding. Change the name of the capability bit to reflect that. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: fix comment indentationJohannes Berg1-14/+14
Somehow we ended up without leading spaces here, fix that. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: do not trust NSSN for amsdu sub-framesSara Sharon1-2/+18
We cannot trust NSSN for AMSDU sub-frames that are not the last. The reason is that NSSN advances on the first sub-frame, and may cause the reorder buffer to advance before all the sub-frames arrive. Example: Reorder buffer contains SN 0 & 2. We receive AMSDU with SN 1 and NSSN for first sub frame 3. The result us that driver releases SN 0,1, 2. When sub-frame 1 arrives - reorder buffer is already ahead and it will be dropped. If the last sub-frame is not on this queue - we will get frame release notification with up to date NSSN. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: advertise maximal MPDU length when Rx MQ is supportedEmmanuel Grumbach1-0/+5
The new hardware that supports multiple queue also de-aggregates A-MSDUs. This means that we can advertise the maximal size of A-MSDUs regardless of the receive buffer's size. In order to be able to forcefully use a lower A-MSDU size, add a default value for the module parameter. Pre-9000 will have a default of 4K, and 9000 will have 12K. Setting the amsdu_size module parameter to 4K will limit the A-MSDU on 9000 as well. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-06-10iwlwifi: mvm: fix a few firmware capability checksJohannes Berg1-4/+4
My cleanup in "iwlwifi: prepare for higher API/CAPA bits" accidentally inverted a few tests - fix them. Fixes: 859d914c8f5c ("iwlwifi: prepare for higher API/CAPA bits") Reported-by: Sara Sharon <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-06-10iwlwifi: mvm: set the encryption type of an IGTK keyAyala Beker1-0/+8
The FW expect the driver to set the encryption algorithm type when installing the IGTK key in the HW. Currently when installing CMAC IGTK key we don't set the algorithm type and as a result the FW fails to calculate the MIC of multicast management frames. Fix it. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-06-10iwlwifi: mvm: fix potential NULL-dereference in iwl_mvm_reorder()Luca Coelho1-1/+3
We try to access sta before we check for IS_ERR_OR_NULL(), so we may end up accessing a NULL pointer. To prevent that, move the conversion from sta to mvm_sta below the check. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-06-10iwlwifi: mvm: fix RCU splat in TKIP's update_keyEmmanuel Grumbach1-1/+7
The commit below mistakenly changed an rcu_dereference_check to a rcu_dereference_protected which introduced the following RCU warning: [ INFO: suspicious RCU usage. ] 4.6.0-rc7-next-20160513-dbg-00004-g8de8b92-dirty #655 Not tainted ------------------------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:1069 suspicious rcu_dereference_protected() usage! Call Trace: [<ffffffff8106b836>] lockdep_rcu_suspicious+0xf7/0x100 [<ffffffffa03b2321>] iwl_mvm_get_key_sta.part.0+0x5d/0x80 [iwlmvm] [<ffffffffa03b4acb>] iwl_mvm_update_tkip_key+0xd3/0x162 [iwlmvm] [<ffffffffa03a2b60>] iwl_mvm_mac_update_tkip_key+0x17/0x19 [iwlmvm] [<ffffffffa0329646>] ieee80211_tkip_decrypt_data+0x22c/0x24b [mac80211] [<ffffffffa0318bb1>] ieee80211_crypto_tkip_decrypt+0xc5/0x110 [mac80211] [<ffffffffa033102e>] ieee80211_rx_handlers+0x9bb/0x1fe1 [mac80211] Fixes: 13303c0fb148 ("iwlwifi: mvm: use helpers to get iwl_mvm_sta") Reported-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>