aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19iwlwifi: mvm: Add support for RRM by scanAvrahams Stern1-0/+6
Implement support for RRM by adding an option to configure the scan dwell time and reporting scan start time and BSS detection time, and Advertise support for these features. Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-17Merge tag 'iwlwifi-next-for-kalle-2016-09-15-2' of ↵Kalle Valo1-8/+1
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work for new hardware support continues * dynamic queue allocation stabilization * improvements in the MSIx code * multiqueue support work continues * new firmware version support * general cleanups and improvements
2016-09-17Merge tag 'wireless-drivers-next-for-davem-2016-09-15' of ↵David S. Miller1-1/+25
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.9 Major changes: iwlwifi * preparation for new a000 HW continues * some DQA improvements * add support for GMAC * add support for 9460, 9270 and 9170 series mwifiex * support random MAC address for scanning * add HT aggregation support for adhoc mode * add custom regulatory domain support * add manufacturing mode support via nl80211 testmode interface bcma * support BCM53573 series of wireless SoCs bitfield.h * add FIELD_PREP() and FIELD_GET() macros mt7601u * convert to use the new bitfield.h macros brcmfmac * add support for bcm4339 chip with modalias sdio:c00v02D0d4339 ath10k * add nl80211 testmode support for 10.4 firmware * hide kernel addresses from logs using %pK format specifier * implement NAPI support * enable peer stats by default ath9k * use ieee80211_tx_status_noskb where possible wil6210 * extract firmware capabilities from the firmware file ath6kl * enable firmware crash dumps on the AR6004 ath-current is also merged to fix a conflict in ath10k. ==================== Signed-off-by: David S. Miller <[email protected]>
2016-09-15iwlwifi: mvm: support new shared memory config APISara Sharon1-8/+1
In a000 devices we have 15 fifos, so in the shared memory config the number of tx fifos in the array was changed accordingly. As it is in the middle of the struct, the parsing code needs to be duplicated. To minimize the duplication, do not save variables we never actually use. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-30iwlwifi: mvm: keep track of tid associated with each queueLiad Kaufman1-0/+1
When sending the SCD_QUEUE_CONFIG command, the queue is associated to a specific TID. If later there is a need to use this TID on a different queue instead, it first needs to be unassociated from the first queue. Keep track for every queue what TID is associated with it. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-30iwlwifi: mvm: re-aggregate shared queue after unsharingLiad Kaufman1-0/+17
When a shared queue becomes unshared, aggregations should be re-enabled if they've existed before. Make sure that they do this, if required. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: support new paging command formatSara Sharon1-0/+6
For a000 devices there is a support of 64 bit DMA addressing. The paging command was changed accordingly - support it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: support GMAC protocolAyala Beker1-1/+1
Add support for installing and removing GMAC key for newer FW versions that support GCM and MFP. GMAC provides authentication and integrity for multicast management frames. Firmware API was changed, update the driver accordingly. Signed-off-by: Ayala Beker <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-08-29iwlwifi: mvm: check if vif is NULL before using itSharon Dvir1-0/+2
wdev_to_ieee80211_vif() might return NULL. Check that vif != NULL before dereferencing it. Signed-off-by: Sharon Dvir <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-06iwlwifi: store cipher scheme independent of mac80211Johannes Berg1-0/+1
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: cleanup the coex codeEmmanuel Grumbach1-5/+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: add support for GCMP encryptionAyala Beker1-1/+2
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: support dqa queue sharingLiad Kaufman1-0/+6
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: change scan timeout to a delayed workLuca Coelho1-2/+2
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: support dqa queue inactivation upon timeoutLiad Kaufman1-1/+16
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-01iwlwifi: mvm: Support CSA countdown offloadingAndrei Otcheretianski1-0/+5
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: update mpdu metadata APISara Sharon1-0/+1
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 Sharon1-1/+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 Stern1-2/+2
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-05-10iwlwifi: mvm: support dqa-mode agg on non-shared queueLiad Kaufman1-6/+27
In non-shared queues, DQA requires re-configuring existing queues to become aggregated rather than allocating a new one. It also requires "un-aggregating" an existing queue when aggregations are turned off. Support this requirement for non-shared queues. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: add a new mvm reference type for RX dataLuca Coelho1-0/+1
When a data packet is received, we need to make sure that we stay awake until it can be processed and wait a while before trying to enter runtime_suspend os system_suspend again. To do so, add a new reference type for RX data and take the reference when sending the packet to mac80211. We only do this for data packets, all the other RX packets sent by the firmware (e.g. notifications) are not a reason to prevent suspend. Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: wake from runtime suspend before sending sync commandsLuca Coelho1-0/+1
If a host command was queued while in runtime suspend, it would go out before the D0I3_END_CMD was sent. Sometimes it works, but sometimes it fails, and it is obviously the wrong thing to do. To fix this, have the opmode take a reference before sending a SYNC command and make the pcie trans wait for the runtime state to become active before actually queueing the command. Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: add a flag to disable checksumSara Sharon1-1/+2
Add a constant to allow disabling checksum. This will enable easier debugging in early phases. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: utilize the frame release infrastructureSara Sharon1-1/+1
The firmware will send frame release notification in order to release "stuck" frames on a queue where no more frames arrive on. Upon receiving the message the driver shall indicate the frames up to the NSSN. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: add reorder timeout per frameSara Sharon1-0/+12
Add a timer in order to release expired frames from the reorder buffer. This is needed since some APs do not retransmit frames to fill in the reorder holes and in TCP it results with a complete stall of traffic. This has a few side effects on the general design: The nssn may not reflect the the head of the reorder buffer. This situation is valid, and packets with SN lower than the reorder buffer head will be dropped. Another side effect is that since the reorder timer might expire we need to lock the reorder buffer. This however is fine since the locking is only inside a single reorder buffer between RX path and reorder timeout and there is no outside contention. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: add reorder buffer per queueSara Sharon1-0/+24
Next hardware will direct packets to core based on the TCP/UDP streams. This logic can create holes in reorder buffer since packets that belong to other stream were directed to a different core. However, those are valid holes and the packets can be indicated in L3 order. The hardware will utilize a mechanism of informing the driver of the normalized ssn and the driver shall release all packets that SN is lower than the nssn. This enables managing the reorder across the queues without sharing any data between them. The reorder buffer is allocated and released directly in the RX path in order to avoid various races between control path and rx path. The code utilizes the internal messaging to notify rx queues of when to delete the reorder buffer. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: add infrastructure for tracking BA session in driverSara Sharon1-0/+25
According to the spec when a BA session is started there is a timeout set for the session in the ADDBA request. If there is not activity on the TA/TID then the session expires and a DELBA is sent. In order to check for the timeout, data must be shared among the rx queues. Add a timer that runs as long as BA session is active for the station and stops aggregation session if needed. This patch also lays the infrastructure for the reordering buffer which will be enabled in the next patches. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: change RX sync notification to be an attribute and not a typeSara Sharon1-0/+3
Currently the sync notification is a type of notification. However, it is better fitted as an attribute of a notification, since there might be another message in the payload (delba for instance) that should be sent while control path is waiting for all queues to process. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: implement driver RX queues sync commandSara Sharon1-0/+2
mac80211 will call the driver whenever there is a race between RSS queues and control path that requires a processing of all pending frames in RSS queues. Implement that by utilizing the internal notification mechanism: queue a message to all queues. When the message is received on a queue it decrements the atomic counter. This guarantees that all pending frames in the RX queue were processed since the message is in order inside the queue. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg1-3/+3
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 <[email protected]>
2016-03-30iwlwifi: mvm: add a scan timeout for regular scansLuca Coelho1-0/+2
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 <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmdLiad Kaufman1-0/+1
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 <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: mvm: improve RSS configurationSara Sharon1-1/+0
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 <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: remove support for fw older than -16.ucodeSara Sharon1-16/+0
API version lower than 16 is not supported anymore - don't load older ucode. Remove code handling older versions. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: mvm: support bss dynamic alloc/dealloc of queuesLiad Kaufman1-0/+7
"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 <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: make uapsd_disable module param a bitmapEmmanuel Grumbach1-1/+2
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 <[email protected]>
2016-03-30iwlwifi: mvm: modify the max SP to infiniteEmmanuel Grumbach1-1/+1
This makes u-APSD work with more peers. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: mvm: add LQM vendor command and notificationAviya Erenfeld1-0/+12
LQM stands for Link Quality Measurement. The firmware will collect a defined set of statitics (see the notification for details) that allow to know how busy the medium is. The driver issues a request to the firmware that includes the duration of the measurement (the firmware needs to be on channel for that amount of time) and the timeout (in case the firmware has a lot of offchannel activities). If the timeout elapses, the firmware will send partial results which are still valuable. In case of disassociation / channel switch and alike, the driver is in charge of stopping the measurements and the firmware will reply with partial results. The user space API for now is debugfs only and will be implmemented in an upcoming patch. Signed-off-by: Aviya Erenfeld <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-20iwlwifi: mvm: support dumping UMAC internal txfifosGolan Ben-Ami1-0/+3
In case of FW error, support dumping the UMAC internal txfifos. To do so, support version 2 of shared memory cfg command, which contains the sizes of the internal txfifos, and move the command to the system group. Signed-off-by: Golan Ben-Ami <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-09iwlwifi: mvm: return the cooling state index instead of the budgetChaya Rachel Ivgi1-2/+2
iwl_mvm_tcool_get_cur_state is the function that returns the cooling state index to the sysfs handler. This function returns mvm->cooling_dev.cur_state but that variable was set to the budget and not the cooling state index. Fix that. Add a missing blank line while at it. Signed-off-by: Chaya Rachel Ivgi <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06iwlwifi: mvm: avoid panics with thermal device usageEmmanuel Grumbach1-1/+0
Thermal zone device registration can fail, and in this case we don't want to remove WiFi functionality. This is why the thermal zone registration function is void, and the flows continue even if the thermal zone device registration failed. Same applies for the cooling device. This means that we at least need to remember that the thermal zone device didn't register properly and take the minimal precautions to avoid panic'ing when we access it. This was missing. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-02Merge branch 'fixes' into nextEmmanuel Grumbach1-0/+3
Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-02iwlwifi: mvm: support sw queue start/stop from mvmLiad Kaufman1-0/+4
Add a wrapper function to allow stopping SW queues from MVM as well. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-02iwlwifi: mvm: disable DQA supportLiad Kaufman1-2/+3
Do not allow entrance into DQA flows until feature is completely ready and merged. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-02iwlwifi: mvm: update ucode status before stopping deviceChaya Rachel Ivgi1-0/+6
Leaving ucode_loaded to true after stop_device() has been called is a recipe for problems. Flows that are not sync'ed with the driver life cycle (like debugfs hooks and thermal hooks) must check that the firmware is loaded before they interact with it. Therefore we need to keep this variable updated with the real status of the firmware. Signed-off-by: Chaya Rachel Ivgi <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27iwlwifi: mvm: kill iwl_mvm_enable_agg_txqEmmanuel Grumbach1-16/+0
iwl_mvm_enable_agg_txq has only one user. Kill it and adapt the call site. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27iwlwifi: mvm: support VHT MU-MIMO notificationSara Sharon1-0/+2
When the device is in d0i3/d3 we will not receive the VHT MU-MIMO group id management frame. Instead, firmware will notify us upon exit on the current status and we can in turn update mac80211. Support this notification. While at it, also check as a precaution that the vif is indeed the VHT MU-MIMO owner before updating the firmware. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27iwlwifi: mvm: add RSS queues notification infrastructureSara Sharon1-0/+4
In multi rx queue HW, without execessive locking, there is no sync between the ctrl path (default queue) and the rest of the rx queues. This might cause issues on certain situations. For example, in case a delBA was processed on a default queue but out of order packets still wait for processing on the other queue. The solution is to introduce internal messaging between the CTRL path and the other rx queues. The driver will send a message to the firmware, which will echo it to all the requested queues. The message will be in order inside the queue. This way we can avoid CTRL path and RSS queues races. Add support for this messaging mechanism. As the firmware is agnostic to the data sent, add internal representation of the data as well. Although currently only delBA flow will use it, the internal representation will enable generic use of this infrastructure for future uses. Next patch will utilize this messaging mechanism for the reorder buffer delBA flow. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27iwlwifi: mvm: support filtered frames notificationSara Sharon1-0/+2
During d0i3 frames might be filtered by the FW and this may cause reordering buffer a delay - as the frames will not be received and reorder will time out. Introduce an API function to receive notification of filtered frames and pass the information to the mac80211. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27iwlwifi: mvm: allow to limit the A-MSDU from debugfsEmmanuel Grumbach1-0/+1
in order to be able to tune the size of the desired A-MSDU based on link condition, add a knob to modify the length of the A-MSDU. Signed-off-by: Emmanuel Grumbach <[email protected]>