aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/mvm.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18iwlwifi: move under intel vendor directoryKalle Valo1-1535/+0
Part of reorganising wireless drivers directory and Kconfig. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-11-04Merge tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds1-3/+3
Pull driver core updates from Greg KH: "Here's the "big" driver core updates for 4.4-rc1. Primarily a bunch of debugfs updates, with a smattering of minor driver core fixes and updates as well. All have been in linux-next for a long time" * tag 'driver-core-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: debugfs: Add debugfs_create_ulong() of: to support binding numa node to specified device in devicetree debugfs: Add read-only/write-only bool file ops debugfs: Add read-only/write-only size_t file ops debugfs: Add read-only/write-only x64 file ops debugfs: Consolidate file mode checks in debugfs_create_*() Revert "mm: Check if section present during memory block (un)registering" driver-core: platform: Provide helpers for multi-driver modules mm: Check if section present during memory block (un)registering devres: fix a for loop bounds check CMA: fix CONFIG_CMA_SIZE_MBYTES overflow in 64bit base/platform: assert that dev_pm_domain callbacks are called unconditionally sysfs: correctly handle short reads on PREALLOC attrs. base: soc: siplify ida usage kobject: move EXPORT_SYMBOL() macros next to corresponding definitions kobject: explain what kobject's sd field is debugfs: document that debugfs_remove*() accepts NULL and error values debugfs: Pass bool pointer to debugfs_create_bool() ACPI / EC: Fix broken 64bit big-endian users of 'global_lock'
2015-10-28Merge tag 'iwlwifi-next-for-kalle-2015-10-25' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextKalle Valo1-1/+1
* bug fix for TDLS * fixes and cleanups in scan * support of several scan plans * improvements in FTM * fixes in FW API * improvements in the failure paths when the bus is dead * other various small things here and there
2015-10-25iwlwifi: mvm: let any command flag be passed to iwl_mvm_flushtx_path()Luca Coelho1-1/+1
Instead of only allowing the caller to decide whether the CMD_ASYNC flag is set, let it pass the entire flags bitmask. This allows more flexibility and will be needed when we call this function in the suspend flow (where other flags are needed). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-10-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-0/+5
Conflicts: drivers/net/usb/asix_common.c net/ipv4/inet_connection_sock.c net/switchdev/switchdev.c In the inet_connection_sock.c case the request socket hashing scheme is completely different in net-next. The other two conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-05iwlwifi: mvm: add minimal multi-RXQ infrastructureJohannes Berg1-0/+6
Since the new multi-queue capability depends on a new firmware API, we can already add some code for it. If the new API is present, a new opmode ops struct is used that handles the new rx_rss method. For now, only restructure the RX handling to distinguish between the two. Future patches will convert the new infrastructure to actually use the new RX descriptor layout. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05iwlwifi: nvm: add nvm phy_sku section to debugfsMoshe Harel1-0/+1
The only NVM section not captured in debugfs. Signed-off-by: Moshe Harel <moshe.harel@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05iwlwifi: mvm: support enabling a queue with a given ssnLiad Kaufman1-2/+2
When enabling a queue, the default SSN is 0. Allow determining what that SSN should be, if required. This can happen, for example, if a queue gets reconfigured. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05iwlwifi: mvm: support using multiple ACs on single HW queueLiad Kaufman1-11/+29
"DQA" is shorthand for "dynamic queue allocation", with the idea of allocating queues per-RA/TID on-demand rather than using shared queues statically allocated per vif. The goal of this is to enable future features (like GO PM) and to improve performance measurements of TX traffic. When RA/TID streams can't be neatly sorted into different AC queues, DQA allows sharing queues for the same RA. This means that DQA allows different ACs may reach the same HW queue. Update the code to allow such queue sharing by having a mapping between the HW queue and the mac80211 queues using it (as this could be more than one queue). Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05iwlwifi: mvm: init card correctly on ctkill exit checkArik Nemtsov1-0/+5
During the CT-kill exit flow, the card is powered up and partially initialized to check if the temperature is already low enough. Unfortunately the init bails early because the CT-kill flag is set. Make the code bail early only for HW RF-kill, as was intended by the author. CT-kill is self-imposed and is not really RF-kill. Fixes: 31b8b343e019 ("iwlwifi: fix RFkill while calibrating") Cc: <stable@vger.kernel.org> [3.18+] Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-05iwlwifi: mvm: Correctly update MAC context on add/del stationIlan Peer1-4/+0
Commit "iwlwifi: mvm: don't ask beacons when AP vif and no assoc sta" directly called iwl_mvm_mac_ctxt_cmd_ap() to update the MAC context when adding/removing a station. However, this ignores the case that the vif is actually a P2P GO. Fix this by calling iwl_mvm_mac_ctxt_changed() that handles P2P GO case as well. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2015-10-04debugfs: Pass bool pointer to debugfs_create_bool()Viresh Kumar1-3/+3
Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument, when all it needs is a boolean pointer. It would be better to update this API to make it accept 'bool *' instead, as that will make it more consistent and often more convenient. Over that bool takes just a byte. That required updates to all user sites as well, in the same commit updating the API. regmap core was also using debugfs_{read|write}_file_bool(), directly and variable types were updated for that to be bool as well. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-28iwlwifi: mvm: remove SCD_QUEUE_CONFIG TLV flagLiad Kaufman1-5/+0
We don't support firmwares that don't use the new API. This also allows to use all the SCD queues, so increase the reported number of queues to 31. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: don't ask for beacons when AP vif and no assoc staGregory Greenman1-0/+6
When in AP mode, we need beacons from other APs for HT protection. However, when there's no any associated station we will not do any Tx and thus don't really need beacons. On the other hand, these beacons will cause a lot of unnecessary wakeups which increase our power consumption. Handle this by asking FW to pass beacons only when there's at least one associated station. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-28iwlwifi: mvm: fix statistics variables typeSara Sharon1-5/+5
When receiving statistics notification there is a field of average energy. This is defines as signed 8 bit, while FW refers to it as unsigned. when the energy is higher than 127 this causes in iwl_mvm_stat_iterator a wrong computation of the signal int sig = -stats->general.beacon_filter_average_energy; resulting in incorrect CQM event (change from low to high). While at it - update the rest of the fields to the correct type. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2015-08-16iwlwifi: pass NAPI struct from transport layerJohannes Berg1-2/+2
The mac80211 patch to pass the NAPI struct only changed iwlwifi to store the NAPI struct, but we can do better: pass it directly from the lower transport layer to the opmode during RX, and then on to mac80211 from there. When we add multiple RX queues, we can then pass the appropriate NAPI struct properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-16Merge tag 'mac80211-next-for-davem-2015-08-14' into nextEmmanuel Grumbach1-0/+1
Another pull request for the next cycle, this time with quite a bit of content: * mesh fixes/improvements from Alexis, Bob, Chun-Yeow and Jesse * TDLS higher bandwidth support (Arik) * OCB fixes from Bertold Van den Bergh * suspend/resume fixes from Eliad * dynamic SMPS support for minstrel-HT (Krishna Chaitanya) * VHT bitrate mask support (Lorenzo Bianconi) * better regulatory support for 5/10 MHz channels (Matthias May) * basic support for MU-MIMO to avoid the multi-vif issue (Sara Sharon) along with a number of other cleanups.
2015-08-04iwlwifi: mvm: add the ability to trigger only monitor dumpsOren Givon1-2/+4
Change the FW debug trigger tlv to include a monitor only option. Setting this option to true will cause fw dump triggers to only collect monitor data and skip other dumps such as SMEM, SRAM, CSR, PRPH, etc. This option is used when accessing the different parts of the firmware memory is not wanted and can cause unwanted behavior like when debugging TX latency. Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: Add FW paging mechanism for the UMAC on PCIMatti Gottlieb1-0/+5
Family 8000 products has 2 embedded processors, the first known as LMAC (lower MAC) and implements the functionality from previous products, the second one is known as UMAC (upper MAC) and is used mainly for driver offloads as well as new features. The UMAC is typically “less” real-time than the LMAC and is used for higher level controls. The UMAC's code/data size is estimated to be in the mega-byte arena, taking into account the code it needs to replace in the driver and the set of new features. In order to allow the UMAC to execute code that is bigger than its code memory, we allow the UMAC embedded processor to page out code pages on DRAM. When the device is master on the bus(PCI) the driver saves the UMAC's image pages in blocks of 32K in the DRAM and sends the layout of the pages to the FW. The FW can load / unload the pages on its own. The driver can support up to 1 MB of pages. Add paging mechanism for the UMAC on PCI in order to allow the program to use a larger virtual space while using less physical memory on the device. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: move TX PN assignment for CCMP to the driverJohannes Berg1-4/+11
Move the TX PN assignment (for CCMP only) to the driver. This prepares the driver for future DSO (driver segmentation offload) where it will split an SKB into multiple MPDUs by itself. For TDLS, split out the CCMP TX command handling so that it won't get a PN assigned, the firmware assigns the PN in that case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: Enable Rx Checksum hwAvri Altman1-0/+10
TCP software implementation on the host requires extensive computing power. Offloading even some of the TCP/IP stack to the NIC might save a significant overhead. In order to enable this feature on our hw, we need to configure it first. Once done, we mark this capability, to be advertised later to the OS via ieee80211_register_hw. The driver Rx indications for TCP Checksum is integrated within the standard Rx status. The driver responds to those indications as follows: If the frame was tested by hw and checksum ok report CHECKSUM_UNNECESSARY. Otherwise, report CHECKSUM_NONE. Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: update comment of power_scheme module parameterAvri Altman1-2/+1
Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: add wide firmware command infrastructure for TXAviya Erenfeld1-2/+2
As the firmware is slowly running out of command IDs and grouping of commands is desirable anyway, the firmware is extending the command header from 4 bytes to 8 bytes to introduce a group (in place of the former flags field, since that's always 0 on commands and thus can be easily used to distinguish between the two. In order to support this most easily in the driver widen the command command ID used in the command sending functions and encode the new values (group and version) in the ID. That way existing code doesn't have to be changed (since the higher bits are 0 automatically) and newer code can easily use the new ID generation function to create a value to use in place of just the command ID. Signed-off-by: Aviya Erenfeld <aviya.erenfeld@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: add basic Time of Flight (802.11mc FTM) supportGregory Greenman1-0/+2
ToF is a time based method for measurement of the WiFi device location within a WiFi environment. The driver functionality provided by this patch is the interface for communication with FW and receiving location related updates from the FW. The interface provided by this patch is via debugfs. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: remove command/return value from RX handlersJohannes Berg1-65/+42
In the mvm driver, neither the old command nor the return value are used, so remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-08-04iwlwifi: mvm: LRU-assign key offsetsJohannes Berg1-0/+1
The current key offset assignment algorithm always uses the lowest unused key offset, which will potentially lead to issues when the firmware will change to take the key material for TX from the key table rather than from the TX command. In order to avoid those issues (and avoid forgetting about them) change the key offset allocation algorithm now to avoid reusing key offsets quickly. The new algorithm always picks as the next offset the least recently freed offset, i.e. the offset that has been unused for the longest amount of time. This is implemented by having a generation counter for each key offset that is incremented every time a key is deleted, except for the one that's deleted, which is reset to zero. Thus the highest counter is the key that's been unused longest. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-07-17mac80211: don't store napi structJohannes Berg1-0/+1
When introducing multiple RX queues, a single NAPI struct will not be sufficient. Instead of trying to store multiple, simply change the API to have the NAPI struct passed to the RX function. This of course means that drivers using rx_irqsafe() cannot use NAPI, but that seems a reasonable trade-off, particularly since only two of all drivers are currently using it at all. While at it, we can now remove the IEEE80211_RX_REORDER_TIMER flag again since this code path cannot have a napi struct anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-03iwlwifi: mvm: advertise only HW-supported ciphersJohannes Berg1-0/+2
After the new ciphers CCMP-256 and GCMP-128/256 were implemented, wpa_supplicant could start negotiating them and use the software implementation. This, however, breaks D3 behaviour in the driver since it means that WoWLAN will not be possible. To avoid breaking that feature, advertise only ciphers that the hardware supports. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: prepare for higher API/CAPA bitsJohannes Berg1-8/+13
Currently, loading the firmware fails when it has higher API or CAPA bits than the driver supports. That's an issue with integration. At the same time, actually using api[0] and capa[0] will become confusing when we also have api[1] and capa[1], and it's almost certain that we'll mix up the bits and use the bits for api[1] with api[0] by accident. Avoid all this by translating the API/CAPA bits to the regular kernel test_bit() format, and also providing wrapper functions. Also use the __bitwise__ facility of sparse to check that we're testing the right one. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: combine regular and sched scan stop functionsLuciano Coelho1-4/+5
The regular and scheduled scan functions are very similar, so they can be combined into one. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: refactor UMAC scan UID handlingLuciano Coelho1-2/+1
We can only have one scan of each type running at the same time, so we can remove one attribute in the UID information we save. We had array index, UID and type, but only UID (== array_index) and type are necessary. Refactor the code to use this simplified array. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: rename some LMAC-specific scan functionsLuciano Coelho1-9/+9
Some LMAC specific functions had too generic names (i.e. *_scan_offload_*) and were hard to distinguish from functions that are really generic. Rename these functions to *_lmac_scan_* in to make it more consistent and easier to read. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: reorganize scan stopping functionsLuciano Coelho1-2/+2
The iwl_mvm_scan_offload_stop() function is used to stop LMAC regular scan, stop LMAC scheduled scan and stop UMAC scheduled scans (but not UMAC regular scans), making it very difficult to read. Reorganize the scan stopping functions by creating separate functions to stop regular and scheduled scans, separating the LMAC stopping part of the code from the rest and renaming the offload_stop function to iwl_mvm_lmac_scan_stop(). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: make iwl_mvm_config_sched_scan_profiles() staticLuciano Coelho1-2/+0
The iwl_mvm_config_sched_scan_profiles() function is only used in scan.c, so remove the declaration from mvm.h and make it static. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: add UMAC scan iteration complete notificationAvraham Stern1-0/+3
Add UMAC scan iteration complete notification. This notification can be enabled by setting scan_iter_notif_enabled through debugfs. Upon receiving this notification, print the list of channels that have been scanned in this iteration. This is useful for debugging. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-26iwlwifi: mvm: fix ROC reference accountingEliad Peller1-0/+1
commit b112889c5af8124 ("iwlwifi: mvm: add Aux ROC request/response flow") added aux ROC flow in addition to the existing ROC flow. While doing it, it moved the ROC reference release to a common work item, which is being called for both the ROC and aux ROC flows. This resulted in invalid reference accounting, as no reference was taken in case of aux ROC, while a reference was released on completion. Fix it by adding a reference for the aux ROC as well, and release only the relevant references on completion (according to the set bits). While at it, convert cancel_work_sync() to flush_work(), in order to make sure the references are being cleaned properly. Fixes: b112889c5af8 ("iwlwifi: mvm: add Aux ROC request/response flow") 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-04-29iwlwifi: mvm: make thermal throttling values configurable per NIC familyChaya Rachel Ivgi1-44/+2
The thermal throttling parameters were constant and hardcoded, not allowing changes for different NIC families. Change this so that the values are part of the NIC family configuration and are not constant (so they can be changed dynamically in the future). Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: remove deprecated command IDsDavid Spinadel1-4/+0
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: combine scan size checks into a common functionLuciano Coelho1-1/+1
Instead of repeating the same code in 4 different places, combine the comparisons into a new function. Additionally, this change fixes UMAC scans where the RRM IEs were not taken into consideration when calculating the IE length. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: differentiate net-detect from sched scanLuciano Coelho1-1/+6
Net-detect scans were using the same type as sched scan, which was causing the driver to return -EBUSY and prevent the system from suspending if there was an ongoing scheduled scan. To avoid this, add a new type for net-detect and don't stop anything when it is requested, so that the existing scheduled scan will be resumed when the system wakes up. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: move scan code from mac80211.c to scan.cLuciano Coelho1-10/+3
Move all the scan code that was in mac80211.c to scan.c where it belongs, leaving only the parts that are specific to mac80211 ops. Change some function definitions slightly to improve consistency. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: rename unified_scan symbols to just scanLuciano Coelho1-12/+8
All scans are using the unified APIs now, so using "unified" in the symbols is useless and just make them much longer and the main difference between scans now is LMAC vs. UMAC. Remove "unified" from all relevant symbols. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: generalize the other-scan stopping codeLuciano Coelho1-1/+4
Instead of hardcoding the differences between UMAC scans and LMAC scans (which in this case is the number of simultaneous scans that can run), introduce a max_scans variable and stop scans of the other type (i.e. stop sched scan if regular scan is being attempted and vice-versa) if the number of running scans reached the maximum. Add a function that checks if the maximum number of scans was reached and stops the appropriate scan to make room for the new scan. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-29iwlwifi: mvm: convert scan_status to a bitmapLuciano Coelho1-6/+16
LMAC scans cannot handle more than one scan at a time, but UMAC scans can. To avoid confusion we should combine the states of these two types of scans. To do so, we need to support mutliple scans at the same time for UMAC. This commit changes the scan_status element from a single value to a bitmask of running scan types for LMAC. Later, we will modify UMAC scans to use the same state bitmask. Additionally, add stopping scan flags for scheduled and regular scans. This makes it easier to differentiate and handle stop requests triggered by the driver and spontaneous stops generated by the firmware. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-28iwlwifi: mvm: don't power off the device between INIT and OPER firmwaresEran Harary1-1/+0
Our device needs two different firmwares: the INIT firmware and the operational (OPER) firmware. The first one is run when the driver loads and it returns calibrations results as well as the NVM. The second one implements the WiFi protocol. If the wlan interface is not brought up, the device is put to low power state: no firmware will be running. When the interface is brought up, we would run the OPER firmware only and reuse the results of the run of the INIT firmware when the driver was loaded. This is changing with this patch. We now run the INIT firmware every time mac80211 calls start(). The penalty for that is minimal since the INIT firwmare run fast. I now also avoid to power down the device between the INIT and OPER firmware on certains buses. The motivation for this change is that there are components on the device (MFUART) that are triggered by the INIT firmware and need the device to be powered up in order to keep running. Powering the device down between the INIT and OPER firmware would stop these components and prevent them from running again since they are triggered by the INIT firmware only. The new flow allows this and also allows to trigger these components again when the interface is brought up after it has been brought down. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-02iwlwifi: mvm: capture connection loss as part of MLME triggerEmmanuel Grumbach1-0/+2
The only other way to catch these would have been to monitor the Tx deauth event, but we can send a deauth when we roam. So it would have been tricky to make sure we capture the connection losses only. Define a separate trigger for the connection losses to make it easier to catch them. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-02iwlwifi: mvm: do string formatting in debug triggersJohannes Berg1-2/+2
The current code has a lot of duplicates of printing into a buffer (while having to make sure it's NUL-filled and -terminated) and then passing that to the debug trigger collection. Since that's error-prone, instead make the debug trigger collection function take a format string and format arguments (with compiler validity checking) and handle the buffer internally. This makes one behavioural change -- instead of sending the whole buffer to userspace (clearing is needed to not leak stack data) it just passes the actual string (including NUL-terminator.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-02iwlwifi: fix spelling errorsSara Sharon1-1/+1
Fix spelling error across the driver. Modified only comments and prints. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-04-02Merge tag 'mac80211-next-for-davem-2015-03-30' into iwlwifi-nextEmmanuel Grumbach1-2/+2
Lots of updates for net-next; along with the usual flurry of small fixes, cleanups and internal features we have: * VHT support for TDLS and IBSS (conditional on drivers though) * first TX performance improvements (the biggest will come later) * many suspend/resume (race) fixes * name_assign_type support from Tom Gundersen
2015-04-02iwlwifi: mvm: remove unused argumentsJohannes Berg1-3/+2
The str/len arguments to iwl_fw_dbg_trigger_simple_stop() aren't used, and for a simple trigger don't really need to be used as the trigger code itself encodes the reason, so remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>