aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2015-06-10mac80211: convert HW flags to unsigned long bitmapJohannes Berg
As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. The occurrences of an explicit __clear_bit() are intentional, the drivers were never supposed to change their supported bits on the fly. We should investigate changing this to be a per-frame flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-10Merge remote-tracking branch 'net-next/master' into mac80211-nextJohannes Berg
Merge back net-next to get wireless driver changes (from Kalle) to be able to create the API change across all trees properly. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-03Merge tag 'wireless-drivers-next-for-davem-2015-06-03' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== new driver mt7601u for MediaTek Wi-Fi devices MT7601U ath10k: * qca6174 power consumption improvements, enable ASPM etc (Michal) wil6210: * support Wi-Fi Simple Configuration in STA mode iwlwifi: * a few fixes (re-enablement of interrupts for certain new platforms that have special power states) * Rework completely the RBD allocation model towards new multi RX hardware. * cleanups * scan reworks continuation (Luca) mwifiex: * improve firmware debug functionality rtlwifi: * update regulatory database brcmfmac: * cleanup and new feature support in PCIe code * alternative nvram loading for router support ==================== Conflicts: drivers/net/wireless/iwlwifi/Kconfig Trivial conflict in iwlwifi Kconfig, two commits adding the same two chip numbers to the help text, but order transposed. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-03iwlwifi: mvm: advertise only HW-supported ciphersJohannes Berg
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: bump the iwlmvm API number to 15Emmanuel Grumbach
The driver is now ready to handle the -15.ucode. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: Add DC2DC_CONFIG_CMD (0x83) cmd & TLVMatti Gottlieb
Add DC2DC_CONFIG_CMD (0x83) cmd. Add IWL_UCODE_TLV_CAPA_DC2DC_CONFIG_SUPPORT tlv. The command allows the driver get & set the DCDC's frequency tune. (freq_tune is the divider that is used to calculate the actual DCDC's clock rate) The command always returns the current/updated frequency tune values of the DCDC. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: Remove old scan commandsMatti Gottlieb
The firmwares that used these commands is not supported anymore. Remove them. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: prepare for higher API/CAPA bitsJohannes Berg
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-06-03iwlwifi: mvm: simplify iwl_mvm_stop_roc()Johannes Berg
As pointed out by smatch, there's no need for a loop that always immediately terminates. Use an if statement instead and while at it clean up the mvmvif initialization. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: dvm: enable IEEE80211_HW_SUPPORT_FAST_XMITJohannes Berg
Since the firmware is responsible for duration calculation, the driver can easily support fast-xmit. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: enable IEEE80211_HW_SUPPORT_FAST_XMITJohannes Berg
Since the firmware is responsible for duration calculation, the driver can easily support fast-xmit. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: pcie: New RBD allocation modelSara Sharon
As a preperation for multiple RX queues change the RBD allocation model. The new model includes a background allocator. The allocator is called by the interrupt handler when there are two released buffers by the queue, and the allocator starts allocating eight pages per request. When the queue has released 8 pages it tries claiming the request. If the pages are not ready - it keeps claiming. This new model should make sure that RBDs are always available across the multiple queues. The RBDs are transferred between the allocator and the queue. The queue moves the free RBDs upon freeing them to the allocator. The allocator moves them back to the queue's possession when the request is claimed. The allocator has an initial pool to make sure there are always RBDs available for the request completion. Release of the buffers at exit is done per pools - the allocator frees its own initial pool and the queue frees its own pool. Existing code refactor - -Queue's initial pool is the size of the queue only as the allocation of the new buffers no longer uses this pool. -Removal of replenish background work, and replenish calls in the interrupt handler and restock(). -The replenish() and the rxq used_list are used only during initialization. -Moved page allocation to a new function for code reuse. New code - Allocator code - new structure and functions. Interrupt handler uses the allocator functions for replenishing buffers. Reuse of the restock() method. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: pcie: re-enable interrupts on resumeEliad Peller
On resume, all the interrupts are masked (CSR_INT_MASK is 0), and ict is disabled. Re-configure them both. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: don't use EBS for P2P findDavid Spinadel
Don't use EBS for P2P find to make sure we find all GOs in our only attempt. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: add inactive state to ebs statusDavid Spinadel
Currently EBS status in scan complete notifications is set to success if EBS wasn't activated. FW will add a special return value for cases when EBS wasn't activated and we add a print of this status. This change is needed for debug only, no behavior changes. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: pcie: Control access to the NIC's PM registers via iwl_cfgAvri Altman
Allow a cleaner way to access those hw-dependent registers, instead of using the product family type etc. Signed-off-by: Avri Altman <avri.altman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: wrt: add mipi type to debug typesLiad Kaufman
This adds the MIPI mode type to the types declared supported by the driver. Without this patch, when using MIPI mode and looking at the logs the user would see the debug destination "UNKNOWN". Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-03iwlwifi: mvm: rs: pass rate directly to column checksEyal Shapira
A minor refactoring for following patches. This enables the reuse of the checks functions. type=cleanup Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-06-02mac80211: rename single hw-scan flag to follow naming conventionJohannes Berg
The naming convention is to always have the flags prefixed with IEEE80211_HW_ so they're 'namespaced', make this flag follow it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2015-06-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/phy/amd-xgbe-phy.c drivers/net/wireless/iwlwifi/Kconfig include/net/mac80211.h iwlwifi/Kconfig and mac80211.h were both trivial overlapping changes. The drivers/net/phy/amd-xgbe-phy.c file got removed in 'net-next' and the bug fix that happened on the 'net' side is already integrated into the rest of the amd-xgbe driver. Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-28iwlwifi: mvm: clean interfaces on drv_stopArik Nemtsov
If a HW recovery was started but not completed since all interfaces went down, make sure to cleanup all interfaces before clearing the HW_RESTART flag. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: implement the BlockAck related debug triggersEmmanuel Grumbach
BlockAck sessions can have events that are interesting to debug. When we send or receive a BAR, it is may indicate that something bad is happening. Even more so when mac80211 tells us that a frame timed out in the reodering buffer. Add a few triggers for BlockAck session debugging. Allow per-TID debugging. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28Merge tag 'mac80211-next-for-davem-2015-05-06' into iwlwifi-nextEmmanuel Grumbach
Lots of updates for net-next for this cycle. As usual, we have a lot of small fixes and cleanups, the bigger items are: * proper mac80211 rate control locking, to fix some random crashes (this required changing other locking as well) * mac80211 "fast-xmit", a mechanism to reduce, in most cases, the amount of code we execute while going from ndo_start_xmit() to the driver * this also clears the way for properly supporting S/G and checksum and segmentation offloads
2015-05-28iwlwifi: mvm: treat scan races also on UMAC scansLuciano Coelho
For UMAC, we were not treating a race condition that happens in the scan flows, because it was not using the same state flags. Now that UMAC and LMAC scans use the same state flags, we can also handle the race conditions for UMAC. 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: make UMAC scans use the stopping scan statusLuciano Coelho
UMAC scans now use the general scan status for almost everything, the only part missing was in the scan complete notifications. Change it to use the stopping flags instead of clearing the flags when the stop comes from above and clean the handler function a bit. 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: combine regular and sched scan stop functionsLuciano Coelho
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: tracing: add rx cmd header fieldsEliad Peller
Having explicit rx cmd header fields is useful, as it can be used for event filtering (e.g. saving only debug logs, rather than the whole data) 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-05-28iwlwifi: pcie: Remove redundant check for family typeAvri Altman
This check for family type is redundant as the if clause above checks a family-dependent Boolean (which is not set for family 8000 anyway). Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: combine UMAC and LMAC scan_stop functionsLuciano Coelho
The UMAC and LMAC scan_stop functions are now nearly identical, so they can be combined into a single function instead. 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: remove code that stops multiple UMAC scans of a typeLuciano Coelho
We can only have one scan per type at the same time, so the code that tries to stop several scans of a type is unnecessary. Remove that to reduce code complexity. 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 Coelho
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: add support for 8 level scan priority APIAvraham Stern
Add support for scan priority API with 8 levels instead of the existing 3 levels. This API is needed to define the priority of new ooc activities, e.g. gscan. Add a TLV flag to indicate if the new API is supported so that devices that does not support the new API will continue to use the old one. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: rename some LMAC-specific scan functionsLuciano Coelho
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: rename umac scan stop functionLuciano Coelho
For consistency with the LMAC functions, rename the UMAC scan stop function to iwl_mvm_umac_scan_stop(). Additionally, move things around a bit to avoid an unnecessary forward declaration. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: combine part of the scan stop flowsLuciano Coelho
For UMAC scans, we were simply jumping into another function when scan stop functions were called, while for LMAC scans, the flow continued. To make the flows cleaner and more balanced, combine the UMAC part into the main stop functions. This also makes us take one step closer into combining the state flags for both APIs. Note that some STOPPING flags will be dangling in UMAC scans, but it doesn't matter because they are not used in UMAC yet (and this will be fixed in subsequent patches). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: don't stop regular scans when going out of idle stateLuciano Coelho
It is not necessary to stop regular scans when going out of idle state. Previously, we were doing so for LMAC scans because the iwl_mvm_scan_offload_stop() function was stopping both kinds of scans. Now that we have more granularity, we can skip it. 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 Coelho
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: BT Coex - fix shared antenna check with new APIEmmanuel Grumbach
The commit below fixed this for the old firmware API only. Since the new firmware API hasn't been released yet, this doesn't fix anything on currently existing firmwares. This completes: commit afcee962b09842d0f4191beb4a2d08251b4c7705 Author: Eyal Shapira <eyal@wizery.com> Date: Mon Feb 9 15:18:17 2015 +0200 iwlwifi: mvm: fix BT coex shared antenna activity check type=bugfix bug=not-tracked fixes=unknown Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: make iwl_mvm_config_sched_scan_profiles() staticLuciano Coelho
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: fix the net-detect SSIDs report orderLuciano Coelho
After the scan refactor, the order of the SSIDs passed to the firmware in all scans (including net-detect) are inverted. This was causing the reporting code to use the wrong SSIDs. To fix this, invert the array index when accessing the saved match SSIDs to report the wake-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-05-28iwlwifi: mvm: add UMAC scan iteration complete notificationAvraham Stern
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-28iwlwifi: mvm: print scanned channel list on scan iteration complete notificationAvraham Stern
When receiving scan iteration complete notification, print a list of the channels that have been scanned in this iteration. This is useful for debugging. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: BT Coex - allocate a short command on the stackEmmanuel Grumbach
The BT_CONFIG command used to be very long, hence it was allocated on the heap in the previous API. In the new API, this command is much smaller, and can now safely be allocated on the stack. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: BT Coex - remove useless codeEmmanuel Grumbach
Since we don't need to configure the Ack / CTS kill mask anymore in the new API, we don't need to iterate all the interfaces upon rssi event on one of the interfaces. Remove that code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: remove the UMAC specific scan typesLuciano Coelho
There is no need to have separate definitions for the UMAC scan types, since they are the same as the LMAC types. Remove UMAC scan types and use the generic ones instead. 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: Configure agg. queue before assigning it to STAAndrei Otcheretianski
In order to imeplement the extended VI session feature for Miracast, the FW requires to detect the VI queue. The detection of the VI queue is done when it is assigned to a STA with ADD_STA command, so by this time the FW expects the queue to be already configured (mapped to VI AC and aggregation enabled). Previously, the queue configuration was done after STA modificaton which broke the extended VI session feature and resulted in higher latencies. Fix this by calling iwl_mvm_enable_agg_txq before station modification. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: handle device start failure correctlyJohannes Berg
If the device fails to start correctly prior to loading the regular runtime firmware (after having run the INIT firmware), treat that error correctly by actually checking the return value of _iwl_trans_start_hw() and stopping the device again before returning an error. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: mvm: advertise randomised netdetect MAC addressJohannes Berg
According to the nl80211 documentation, we can neither advertise scheduled scan nor netdetect address randomisation. However, all the products that currently require this don't have a need for the full randomisation. Therefore, advertise the feature anyway which results in host- based randomisation, done whenever the system suspends. This is sufficient for the platforms currently requiring this feature. If we ever extend this in the future to do full randomisation in the firmware, then certainly this will still be sufficient for the current requirements, so it doesn't make a lot of sense to split the feature bits. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: update thermal throttling values for 8000 devicesIdo Yariv
8000 devices have different thermal throttling values from previous generations. Signed-off-by: Ido Yariv <idox.yariv@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2015-05-28iwlwifi: 8000: fallback to default NVM fileEran Harary
Set a default NVM in case the userspace specifies a file that doesn't match the hardware version. This allows not to change the boot scripts when someone replaces the device with a newer hardware step. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>