Arik Nemtsov [Wed, 4 Mar 2015 11:16:03 +0000 (13:16 +0200)]
iwlwifi: mvm: clean interfaces on drv_stop
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.
iwlwifi: mvm: implement the BlockAck related debug triggers
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>
Merge tag 'mac80211-next-for-davem-2015-05-06' into iwlwifi-next
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
Luciano Coelho [Thu, 7 May 2015 14:21:09 +0000 (17:21 +0300)]
iwlwifi: mvm: treat scan races also on UMAC scans
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.
Luciano Coelho [Thu, 7 May 2015 14:05:30 +0000 (17:05 +0300)]
iwlwifi: mvm: make UMAC scans use the stopping scan status
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.
Luciano Coelho [Thu, 7 May 2015 11:41:44 +0000 (14:41 +0300)]
iwlwifi: mvm: remove code that stops multiple UMAC scans of a type
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.
Luciano Coelho [Thu, 7 May 2015 08:13:24 +0000 (11:13 +0300)]
iwlwifi: mvm: refactor UMAC scan UID handling
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.
Avraham Stern [Tue, 12 May 2015 09:19:48 +0000 (12:19 +0300)]
iwlwifi: mvm: add support for 8 level scan priority API
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.
Luciano Coelho [Wed, 6 May 2015 13:03:39 +0000 (16:03 +0300)]
iwlwifi: mvm: rename some LMAC-specific scan functions
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.
Luciano Coelho [Tue, 5 May 2015 08:21:34 +0000 (11:21 +0300)]
iwlwifi: mvm: rename umac scan stop function
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.
Luciano Coelho [Tue, 5 May 2015 07:05:42 +0000 (10:05 +0300)]
iwlwifi: mvm: combine part of the scan stop flows
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).
Luciano Coelho [Tue, 12 May 2015 06:30:36 +0000 (09:30 +0300)]
iwlwifi: mvm: don't stop regular scans when going out of idle state
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.
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().
iwlwifi: mvm: BT Coex - fix shared antenna check with new API
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:
Luciano Coelho [Wed, 6 May 2015 07:45:42 +0000 (10:45 +0300)]
iwlwifi: mvm: fix the net-detect SSIDs report order
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.
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.
Avraham Stern [Tue, 31 Mar 2015 13:22:33 +0000 (16:22 +0300)]
iwlwifi: mvm: print scanned channel list on scan iteration complete notification
When receiving scan iteration complete notification, print a list of
the channels that have been scanned in this iteration.
This is useful for debugging.
iwlwifi: mvm: BT Coex - allocate a short command on the stack
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.
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.
Luciano Coelho [Thu, 7 May 2015 07:10:57 +0000 (10:10 +0300)]
iwlwifi: mvm: remove the UMAC specific scan types
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.
iwlwifi: mvm: Configure agg. queue before assigning it to STA
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>
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>
Johannes Berg [Wed, 6 May 2015 12:56:51 +0000 (14:56 +0200)]
iwlwifi: mvm: advertise randomised netdetect MAC address
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.
Eran Harary [Sun, 19 Apr 2015 07:05:18 +0000 (10:05 +0300)]
iwlwifi: 8000: fallback to default NVM file
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>
Johannes Berg [Fri, 22 May 2015 09:28:58 +0000 (11:28 +0200)]
iwlwifi: refactor common transport alloc/init code
The transport modules all need to allocate memory and set up
certain values. Refactor that code into a new common function
to share it and to simplify the error handling.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
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.
iwlwifi: pcie: don't call set_pwr functions for family 8000
We should not call the iwl_pcie_set_pwr() functions in the
suspend/resume flows for family 8000, because the register used is
locked in devices from this family. Doing this causes an NMI
protection error (RT_NMI_INTERRUPT_PREG_PROTECTION).
To fix this, skip those calls if the device family is
IWL_DEVICE_FAMILY_8000.
Luciano Coelho [Mon, 4 May 2015 14:03:17 +0000 (17:03 +0300)]
iwlwifi: mvm: clean net-detect info if device was reset during suspend
If the device is reset during suspend with net-detect enabled, we
leave the net-detect information dangling and this causes the next
suspend to fail with a warning:
To fix this, call the iwl_mvm_free_nd() function in case of any error
during resume. Additionally, rename the "out_unlock" label to err to
make it clearer that it's only called in error conditions.
iwlwifi: mvm: take the UCODE_DOWN reference when resuming
The __iwl_mvm_resume() function always returns 1, which causes
mac80211 to do a reconfig with IEEE80211_RECONFIG_TYPE_RESTART. This
type of reconfig calls iwl_mvm_restart_complete(), where we unref the
IWL_MVM_REF_UCODE_DOWN, so we should always take the reference in this
case.
This prevents this kind of warning from happening:
Haim Dreyfuss [Wed, 20 May 2015 05:10:43 +0000 (08:10 +0300)]
iwlwifi: mvm: Free fw_status after use to avoid memory leak
fw_status is the only pointer pointing to a block of memory
allocated above and should be freed after use.
Note: this come from Klockwork static analyzer.
Cc: stable@vger.kernel.org [3.19+] Fixes: 2021a89d7b8a ("iwlwifi: mvm: treat netdetect wake up separately") Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
A few triggers have status = MLME_SUCCESS and they are still
interesting. E.g. if we want to collect data upon deauth,
the status will be MLME_SUCCESS. Fix that.
Fixes: d42f53503406 ("iwlwifi: mvm: add trigger for firmware dump upon MLME failures") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: pcie: don't disable the busmaster DMA clock for family 8000
Disabling the clocks is a standard procedure while stopping the
device. On family 8000 however, disabling the bus master DMA clock
increases the NIC's power consumption.
To fix this, skip this call if the device family is
IWL_DEVICE_FAMILY_8000.
3165 really needs to load iwlwifi-7265D-13.ucode. This
device is supported starting from -13.ucode, update the
MIN and OK defines accordingly. While at it, add 3165 to
the device list in the Kconfig file.
iwlwifi: mvm: forbid MIMO on devices that don't support it
There are devices that forbid MIMO by the mean of the NVM.
Detect thoses devices and forbid MIMO otherwise the firmware
would crash. STBC is still allowed on these devices.
Arik Nemtsov [Wed, 6 May 2015 13:28:31 +0000 (16:28 +0300)]
cfg80211: change GO_CONCURRENT to IR_CONCURRENT for STA
The GO_CONCURRENT regulatory definition can be extended to station
interfaces requesting to IR as part of TDLS off-channel operations.
Rename the GO_CONCURRENT flag to IR_CONCURRENT and allow the added
use-case.
Change internal users of GO_CONCURRENT to use the new definition.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: Allow GO concurrent relaxation after BSS disconnection
If a P2P GO was allowed on a channel because of the GO concurrent
relaxation, i.e., another station interface was associated to an AP on
the same channel or the same UNII band, and the station interface
disconnected from the AP, allow the following use cases unless the
channel is marked as indoor only and the device is not operating in an
indoor environment:
1. Allow the P2P GO to stay on its current channel. The rationale behind
this is that if the channel or UNII band were allowed by the AP they
could still be used to continue the P2P GO operation, and avoid connection
breakage.
2. Allow another P2P GO to start on the same channel or another channel
that is in the same UNII band as the previous instantiated P2P GO.
Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 5 May 2015 14:32:29 +0000 (16:32 +0200)]
mac80211: validate cipher scheme PN length better
Currently, a cipher scheme can advertise an arbitrarily long
sequence counter, but mac80211 only supports up to 16 bytes
and the initial value from userspace will be truncated.
Fix two things:
* don't allow the driver to register anything longer than
the 16 bytes that mac80211 reserves space for
* require userspace to specify a starting value with the
correct length (or none at all)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 20 Apr 2015 16:21:58 +0000 (18:21 +0200)]
mac80211: extend get_key() to return PN for all ciphers
For ciphers not supported by mac80211, the function currently
doesn't return any PN data. Fix this by extending the driver's
get_key_seq() a little more to allow moving arbitrary PN data.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 20 Apr 2015 16:12:41 +0000 (18:12 +0200)]
mac80211: extend get_tkip_seq to all keys
Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 23 Apr 2015 10:19:22 +0000 (12:19 +0200)]
mac80211: make LED triggering depend on activation
When LED triggers are compiled in, but not used, mac80211 will still
call them to update the status. This isn't really a problem for the
assoc and radio ones, but the TX/RX (and to a certain extend TPT)
ones can be called very frequently (for every packet.)
In order to avoid that when they're not used, track their activation
and call the corresponding trigger (and in the TPT case, account for
throughput) only when the trigger is actually used by an LED.
Additionally, make those trigger functions inlines since theyre only
used once in the remaining code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Apr 2015 19:07:39 +0000 (21:07 +0200)]
mac80211: clean up station debugfs
Remove items that can be retrieved through nl80211. This also
removes two items (tx_packets and tx_bytes) where only the VO
counter was exposed since they are split up per AC but in the
debugfs file only the first AC was shown.
Also remove the useless "dev" file - the stations have long
been in a sub-directory of the netdev so there's no need for
that any more.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Apr 2015 18:55:55 +0000 (20:55 +0200)]
mac80211: remove sta->tx_fragments counter
This counter is unsafe with concurrent TX and is only exposed
through debugfs and ethtool. Instead of trying to fix it just
remove it for now, if it's really needed then it should be
exposed through nl80211 and in a way that drivers that do the
fragmentation in the device could support it as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Apr 2015 18:47:28 +0000 (20:47 +0200)]
mac80211: move dot11 counters under MAC80211_DEBUG_COUNTERS
Since these counters can only be read through debugfs, there's
very little point in maintaining them all the time. However,
even just making them depend on debugfs is pointless - they're
not normally used. Additionally a number of them aren't even
concurrency safe.
Move them under MAC80211_DEBUG_COUNTERS so they're normally
not even compiled in.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 22 Apr 2015 18:25:20 +0000 (20:25 +0200)]
mac80211: clean up global debugfs statistics
The debugfs statistics macros are pointlessly verbose, so change
that macro to just have a single argument. While at it, remove
the unused counters and rename rx_expand_skb_head2 to the better
rx_expand_skb_head_defrag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
David Spinadel [Tue, 28 Apr 2015 15:06:45 +0000 (18:06 +0300)]
iwlwifi: mvm: include wildcard SSID in scans
Fix a copy paste bug that didn't copy wildcard SSIDs to
scan requests. This bug causes scan with only wildcard
SSID to be passive, and scans with more than one SSID to
send only the direct probes.
Fixes: 2a28ac14c518 ("iwlwifi: mvm: add common scan params to thw iwl_mvm_scan_params struct") 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>
iwlwifi: mvm: make thermal throttling values configurable per NIC family
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).
Johannes Berg [Mon, 20 Apr 2015 15:31:10 +0000 (17:31 +0200)]
iwlwifi: mvm: don't reset key index on HW restart
When a firmware restart is done, don't try to reprogram the keys to new
slots but rather just keep the old key index, while skipping keys that
weren't programmed before.
Not only does this restore the state more faithfully, but it will also
allow using the HW key index for internal purposes as an array index.
iwlwifi: mvm: rename generic_scan_cmd functions to dwell
The generic scan command functions are now irrelevant, since both
sched and regular scans are in the same code. So rename this
functions to dwell and isolate all the dwell-related setting to them.
Keeping the dwell code separate makes it easier to compare the LMAC
and UMAC versions.
iwlwifi: mvm: move all LMAC scan flags into a single funtion
Having an LMAC counterpart for the existing UMAC flags function makes
things more consistent and easy to compare and spot the differences.
The flags are the same, but are in different bits, so unfortunately we
can't use a single function for both APIs.
iwlwifi: allow to limit the size of the external buffer for firmware debugging
When we use an external buffer, it is allocated from the
t DRAM and can be as big as 64MB. This buffer is huge and
might not be needed for the specific issue being chased.
Especially if lots of dumps are going to be created.
Allow to limit the size of the buffer in the configuration.
With just a few differences left in the UMAC scan functions now, we
can merge them into one, taking care of the small difference according
to the total number of iterations required.
iwlwifi: mvm: trim sched scan delay down to 16-bit for LMAC as well
In theory, LMAC scans can handle a 32-bit delay, but since waiting for
over 18 hours to start the scan is a bit silly and to keep it aligned
with UMAC scans (which only support 16-bit delays), trim it down to
16-bits.
This makes the LMAC vs. UMAC and the UMAC reg scan vs. UMAC sched scan
code more similar.
iwlwifi: mvm: add number of scan iterations and multiplier to params
As another step towards combining the scan and sched scan functions,
add parameters that tell the scan function how many iterations we want
(i.e. 1 for normal scan, more for scheduled scan) and that set the
full scan multiplier (only meaningful for LMAC).
iwlwifi: mvm: rename scan_calc_params to scan_calc_dwell
To make things clearer, rename the iwl_mvm_scan_calc_params() function
to iwl_mvm_calc_dwell() and make it calculate and fill in only
dwell-related parameters.
iwlwifi: mvm: revert order of SSIDs for sched scans
The firmware inverts the order of the SSIDs sent out in probe requests
(for some reason). For regular scans, we've been passing the SSIDs in
the opposite order so they go out in the order we want. With
scheduled scans, we were not doing that, so they were sent out in
reverse order of priority. Fix that by using the reverse order when
populating the SSIDs array for scheduled scans as well.
iwlwifi: mvm: combine ssid_bitmap setting for regular scans
The only difference in the ssid_bitmap between LMAC and UMAC scans is
that in LMAC bits 1 to 20 are used, while in UMAC bits 0 to 19 are
used (*sigh*). So we can combine the bitmap creation into a single
function and simply shift left if LMAC is used.
iwlwifi: mvm: add common scan params to thw iwl_mvm_scan_params struct
Many parameters are common for all scans. Instead of parsing the
cfg80211 scan and sched scan requests differently in each flow, move
the parsing outside of the API/scan-type specific functions. In this
way, we only need to differentiate between scan types once.
iwlwifi: mvm: combine parts of UMAC and LMAC sched scans
Similarly to the regular scan patch, a lot of the UMAC and LMAC sched
scan code is also almost identical. Grab the low hanging fruits by
combining the obvious parts.
iwlwifi: clarify the device / firmware mapping in Kconfig
The lists of the devices supported by either MVM or DVM
firmwares was incomplete. Point to
https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi#firmware
instead of maintaining the lists.
Arik Nemtsov [Mon, 23 Feb 2015 12:42:41 +0000 (14:42 +0200)]
iwlwifi: mvm: iterate all interfaces during HW recovery cleanup
Usually during HW recovery the state of all active interfaces is cleaned
up during drv_start(). There's a special case where a HW restart is
requested when an interface is going down. In this case the iface-iterator
won't see this interface and we won't clean it. This has bad consequences
once the interface is legitimately brought up again.
Luciano Coelho [Fri, 27 Mar 2015 07:28:26 +0000 (10:28 +0300)]
iwlwifi: mvm: combine scan size checks into a common function
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.
Luciano Coelho [Mon, 30 Mar 2015 12:09:24 +0000 (15:09 +0300)]
iwlwifi: mvm: always use iwl_mvm_scan_size to calculate the scan size
We have a function (iwl_mvm_scan_size()) that can calculate the scan
size for both UMAC and LMAC scans. Use that function instead of
calculating manually for LMAC scan and sched scan.
Remove unused struct iwl_scan_offload_req and enum
iwl_scan_offload_flags which are not used anymore. Rename
iwl_scan_offload_schedule to iwl_scan_schedule_lmac to make it clear
that this is for LMAC only. And fix a small typo.
iwlwifi: rs: remove unneeded check of average tpt in window
Previously there was a check that compared window->average_tpt
to some value, and if it was different - it set it to that
value. However, this value was already calculated and set in
_rs_collect_tx_data(), so the entire check is unneeded.
Luciano Coelho [Fri, 20 Mar 2015 14:11:28 +0000 (16:11 +0200)]
iwlwifi: mvm: differentiate net-detect from sched scan
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.
Luciano Coelho [Fri, 20 Mar 2015 11:35:47 +0000 (13:35 +0200)]
iwlwifi: mvm: rename unified_scan symbols to just scan
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.
Luciano Coelho [Thu, 19 Mar 2015 20:58:33 +0000 (22:58 +0200)]
iwlwifi: mvm: generalize the other-scan stopping code
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.