aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-29iwlwifi: mvm: support v2 of the WoWLAN patterns commandLuca Coelho1-5/+53
Add new definitions for the WoWLAN patterns API version 2 and support for version 2 of the WoWLAN patterns command without implementing the new features. With this commit we only supporting the existing bitmask pattern match. Use the new version only if the TLV is set. Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: mvm: use dump worker during restart instead of sync dumpShahar S Matityahu1-1/+0
In restart flow, the driver requests HW restart from mac80211 and then mac80211 uses a worker to do the restart flow. In that flow a sync dump is performed. Instead, schedule the dump worker before requesting HW restart from mac80211. This approach simplifies the restart flow. Also, it is neeeded in order to differentiate between the handling of SW and HW errors in a future commit. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-03-22iwlwifi: mvm: Support new format of SCAN_OFFLOAD_PROFILES_QUERY_RSPIlan Peer1-15/+74
Newer FWs use a new format of the SCAN_OFFLOAD_PROFILES_QUERY_RSP, which now supports indicating match on an higher number of channels. Modify the code to support both the old format and the newer one, based on a FW TLV. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-02-14iwlwifi: receive umac and lmac error table addresses from TLVsShahar S Matityahu1-1/+1
TLV 54 holds umac debug related addresses. TLV 55 holds lmac debug related addresses. These TLVs aim to replace the alive notification data in the future. Parse and keep error table addresses received from the TLVs for both lmac and umac and use these addresses instead of the pointer received from alive notification. The feature supports only unified image. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2019-01-25iwlwifi: mvm: support mac80211 TXQs modelSara Sharon1-6/+2
Move to use the new mac80211 TXQs implementation. This has quite a few benefits for us. We can get rid of the awkward mapping of DQA to mac80211 queues. We can stop buffering traffic while waiting for the queue to be allocated. We can also use mac80211 AMSDUs instead of building it ourselves. The usage is pretty simple: Each ieee80211_txq contains iwl_mvm_txq. There is such a queue for each TID, and one for management frames. We keep having static AP queues for probes and non-bufferable MMPDUs, along with broadcast and multicast queues. Those are being used from the "old" TX invocation path - iwl_mvm_mac_tx. When there is a new frame in a TXQ, iwl_mvm_mac_wake_tx is being called, and either invokes the TX path, or allocates the queue if it does not exist. Most of the TX path is left untouched, although we can consider cleaning it up some more, for example get rid of the duplication of txq_id in both iwl_mvm_txq and iwl_mvm_dqa_txq_info. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-12-20iwlwifi: mvm: d3: use struct_size() in kzalloc()Gustavo A. R. Silva1-4/+2
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = kzalloc(sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = kzalloc(struct_size(instance, entry, count), GFP_KERNEL); This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2018-11-11iwlwifi: dbg: avoid passing trigger aroundSara Sharon1-1/+1
The trigger structure is being passed around, when all we care about is whether to dump only monitor or not. Pass a bool instead. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-10-08iwlwifi: mvm: move rt status check to the start of the resume flowShahar S Matityahu1-25/+35
Move the rt status checking to the start of the resume flow in order to avoid sending D0I3_END_CMD to the FW. Also, collect dump if an assert was encountered. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-10-08iwlwifi: mvm: don't send keys when entering D3Sara Sharon1-1/+3
In the past, we needed to program the keys when entering D3. This was since we replaced the image. However, now that there is a single image, this is no longer needed. Note that RSC is sent separately in a new command. This solves issues with newer devices that support PN offload. Since driver re-sent the keys, the PN got zeroed and the receiver dropped the next packets, until PN caught up again. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-09-28iwlwifi: mvm: cleanup dead code on resume flow for non unified image.Dreyfuss, Haim1-15/+6
CDB support has nothing to do with non unified image. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-09-28iwlwifi: fw: stop and start debugging using host commandSara Sharon1-1/+1
In new devices, access to periphery is forbidden. Send instead host command to start and stop debugging. Memory allocation is written in context info, but in case we need to update it there is a dedicated command. Add definitions, currently unused, of the new command. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-09-28iwlwifi: fw: add a restart FW debug functionSara Sharon1-1/+1
Move the restart FW debug code to a function. This avoids code duplication and lays the infra to support the new start and stop host commands in some future devices. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: avoid code duplication in stopping fw debug data recordingShahar S Matityahu1-1/+1
Make all FW debug data stop recording flows to use iwl_fw_dbg_stop_recording function instead of writing to FW registers directly. Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: mvm: support new WoWLAN status FW APILuca Coelho1-41/+113
A new FW API has been added for WOWLAN_GET_STATUSES to support multiple GTK keys and IGTK keys. Check the respective TLV and use the new API when it is set. Let most of the code use the new version (v7) and convert the old version (v6) to the new one when needed. Also refactor some functions a bit so that they can be reused more easily. Particularly the part that calls WOWLAN_GET_STATUSES which is reused in D3 and D0i3. Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: mvm: remove duplicate if in iwl_mvm_setup_connection_keep()Luca Coelho1-4/+3
We repeated the same if twice in a row. Remove the second one and move the code block into the previous one. Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: add d3 debug data supportShahar S Matityahu1-0/+3
During d3, the firmware records debug data into internal buffer if debug data collection occurs, collect the data that was written to the buffer Signed-off-by: Shahar S Matityahu <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-08-02iwlwifi: d3: disable dbg recording before entering D3Luca Coelho1-0/+7
Currently the firmware does not stop recording debugging data when entering D3 and this causes trouble (e.g. sporadic wake ups). Fix that by stopping dbg recording when suspending. Signed-off-by: Luca Coelho <[email protected]>
2018-04-26iwlwifi: mvm: set wakeup filters for wowlan "any" configurationEliad Peller1-5/+10
In case of "any" wowlan trigger is configured, no valid wakeup filter was configured. Moreover, the fw assumes there's no connection when there are no configured wakeup filters. This leads to the station info not being updated on D3 command, causing rate_n_flags to be 0 when the offloading code sends tx frame (triggering SYSASSERT_102C due to invalid antenna param) Note: "any" trigger is currently assumed to only be used when entering d0i3 (which has a different flow). However, we still reach this code when using d3_test. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-04-20iwlwifi: mvm: add traffic condition monitoring (TCM)Luca Coelho1-0/+7
Traffic condition monitor gathers data about the traffic load and other conditions and can be used to make decisions regarding latency, throughput etc. This patch introduces the code and data structures to collect this data for future use. Signed-off-by: Luca Coelho <[email protected]>
2018-03-02iwlwifi: Cancel and set MARKER_CMD timer during suspend-resumeHaim Dreyfuss1-0/+8
While entering to D3 mode there is a gap between the time the driver handles the D3_CONFIG_CMD response to the time the host is going to sleep. In between there might be cases which MARKER_CMD can tailgate. Also during resume flow the MARKER_CMD might get sent while D0I3_CMD is being handled in the FW. Cancel MARKER_CMD timer and set it again properly during suspend resume flows to prevent this command from being sent accidentlly. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-11-25iwlwifi: mvm: remove TCP wakeup supportJohannes Berg1-231/+1
This feature was actually removed from firmware, but without ever telling the driver. Since nobody is actually using it, just remove it entirely without bothering with a capability check. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-10-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo1-1/+1
Mark Brown reported that there are conflicts in iwlwifi between the two trees so fix those now.
2017-10-06iwlwifi: mvm: Add new quota command APIDavid Spinadel1-6/+10
New quota command adds a field indicating low latency direction per quota. A TLV API bit was added to indicate the new API. Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-09-08iwlwifi: mvm: fix wowlan resume failed to load INIT ucodeMatt Chen1-1/+1
If we set disconnect on wowlan and run suspend/resume, will run into: ...snipped iwlwifi 0000:01:00.0: Failed to load firmware chunk! iwlwifi 0000:01:00.0: Could not load the [0] uCode section iwlwifi 0000:01:00.0: Failed to start INIT ucode: -110 iwlwifi 0000:01:00.0: Failed to run INIT ucode: -110 iwlwifi 0000:01:00.0: Failed to start RT ucode: -110 It is because we still keep IWL_MVM_STATUS_IN_HW_RESTART in __iwl_mvm_resume. When mac80211 starts the device as __iwl_mvm_mac_start(), we will miss iwl_mvm_restart_cleanup(mvm). Signed-off-by: Matt Chen <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-29iwlwifi: unify external & internal modparam namesJohannes Berg1-4/+4
Where possible (all except for "11n_disable", which isn't valid in C) rename the internal names for module parameters to be the same as the externally visible names, to aid finding their use etc. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-28Merge tag 'iwlwifi-next-for-kalle-2017-06-28' of ↵Kalle Valo1-19/+20
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next More iwlwifi patches for 4.13 * Some changes in suspend/resume handling to support new FWs; * A bunch of RF-kill related fixes; * Continued work towards the A000 family; * Support for a new version of the TX flush FW API; * Some fixes in monitor interfaces; * A few fixes in the recovery flows; * Johannes' documentation fixes and FW API struct cleanups continue; * Remove some noise from the kernel logs; * Some other small improvements, fixes and cleanups;
2017-06-23iwlwifi: mvm: support D0I3_END_CMD at the start of resumeLuca Coelho1-3/+19
New FW versions require the D0I3_END_CMD to be sent as the first command to the FW in the resume flow. If the TLV is set, send that command first, otherwise keep the original behavior (i.e. send last). Signed-off-by: Luca Coelho <[email protected]>
2017-06-23iwlwifi: mvm: make D0I3_END_CMD sync during system resumeLuca Coelho1-4/+1
There is no need to send D0I3_END_CMD as ASYNC during the system resume flow. Additionally, the other flags used are meaningless in this case (they were just copied from the runtime resume flow), so remove them all. Signed-off-by: Luca Coelho <[email protected]>
2017-06-23iwlwifi: remove resp_pkt NULL checksJohannes Berg1-12/+0
Contrary to what some of the comments say, if rfkill was asserted the transport will return -ERFKILL instead of success, if CMD_WANT_SKB was set, so it's not necessary to check cmd.resp_pkt for being NULL if the return code was success. Validate that this is true in iwl_trans_send_cmd(). Most of the other code modifications were done with the following spatch: @@ struct iwl_host_cmd cmd; identifier pkt; @@ <... ( pkt = cmd.resp_pkt; ... -if (!pkt) { ... } | pkt = cmd.resp_pkt; ... -if (WARN_ON(!pkt)) { ... } | -if (!cmd.resp_pkt) { ... } ) ...> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-16networking: introduce and use skb_put_data()Johannes Berg1-2/+2
A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-04-19iwlwifi: mvm: spin off SAR profile selection functionLuca Coelho1-0/+4
For dynamic SAR, we will need to select the current profile from different places. In preparation for that, spin the profile selection code out of iwl_mvm_sar_init(). Signed-off-by: Luca Coelho <[email protected]>
2017-04-19iwlwifi: mvm: prepare for station count changeSara Sharon1-1/+1
In a000 devices we will support up to 32 stations. The max station define is used also for invalid station marking which makes finding usages of actual maximum station pretty hard to sort through - change it to be a different define in order to make future changes easier. Use also ARRAY_SIZE intead of define when possible. Do not move yet to 32 stations until firmware do it though. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-11iwlwifi: mvm: support new ADD_MODIFY_STA_KEY commandSara Sharon1-1/+3
The command was changed to support PN offload and TKIP offload. The FW will do TKIP calculations in D0 only for a000 devices, but API is aligned anyway. However, for all devices we can stop sending the wowlan tkip command. Firmware will fetch the keys from the station key command. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-11iwlwifi: mvm: support new binding APISara Sharon1-2/+14
For a000 devices the binding API needs to include relevant lmac ID - support the new API. The new API should be used regardless if the device had CDB or not. If there is no actual CDB support the binding is bound to first lmac regardless of the band. There are some functionality changes in binding restrictions and quota allocations that will be handled in future patches. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-02-03iwlwifi: mvm: fix D3 replay counter valueJohannes Berg1-1/+1
This fixes a long-standing bug that was introduced when this code was introduced: cfg80211 passes a pointer, but we treat it as if it was passing a value. The result is that we pass the pointer to the firmware, instead of the value. It's not clear how this could ever have worked, unless the firmware is ignoring this value. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-02-03iwlwifi: mvm: support new alive notificationSara Sharon1-1/+1
Support getting alive from two LMACs and dumping debug data from both. Deprecate older alive notifications no one is using. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-01-23iwlwifi: mvm: don't restart HW if suspend fails with unified imageLuca Coelho1-5/+8
For unified images, we shouldn't restart the HW if suspend fails. The only reason for restarting the HW with non-unified images is to go back to the D0 image. Fixes: 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho <[email protected]>
2016-10-19iwlwifi: mvm: fix netdetect starting/stopping for unified imagesLuca Coelho1-0/+19
With unified images, we need to make sure the net-detect scan is stopped after resuming, since we don't restart the FW. Also, we need to make sure we check if there are enough scan slots available to run it, as we do with other scans. Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho <[email protected]>
2016-10-19iwlwifi: mvm: comply with fw_restart mod param on suspendHaim Dreyfuss1-1/+4
If the suspend flow fails, we restart the hardware to go back to the D0 image (with non-unified images), but we don't comply with the fw_restart module parameter. If something goes wrong when starting the D3 image, we may want to debug it, so we should comply with the fw_restart flag to avoid clearing everything up and losing the firmware state when the error occurred. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-10-19iwlwifi: mvm: fix d3_test with unified D0/D3 imagesLuca Coelho1-10/+15
When a unified D0/D3 image is used, we don't restart the FW in the D0->D3->D0 transitions. Therefore, the d3_test functionality should not call ieee8021_restart_hw() when the resuming either. Fixes: commit 23ae61282b88 ("iwlwifi: mvm: Do not switch to D3 image on suspend") Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: use helpers to get iwl_mvm_staSara Sharon1-6/+2
Getting the mvm station out of station id requires dereferencing the station id to get ieee80211_sta, then checking for pointer validity and only then extract mvm station out. Given that there are helpers to do it - use them instead of duplicating the code whenever we need only mvm station. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-03-30iwlwifi: mvm: support bss dynamic alloc/dealloc of queuesLiad Kaufman1-1/+1
"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-02iwlwifi: mvm: update ucode status before stopping deviceChaya Rachel Ivgi1-2/+1
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-28iwlwifi: mvm: Disable beacon storing in D3 when WOWLAN configuredMatti Gottlieb1-2/+1
Currently when entering D3 with WOWLAN configured, we enable in the configuration flags beacon storing, and do not disable beacon filtering, and do not wake up from a magic packet. Having both enabled is wrong (should not have both enabled), and causes problems in the RX queues in the FW, causing the FW not to recognize the magic packet when it comes. Disable beacon storing in wowlan configuration. Signed-off-by: Matti Gottlieb <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-27Merge tag 'mac80211-next-for-davem-2016-02-26' into next2Emmanuel Grumbach1-5/+10
Here's another round of updates for -next: * big A-MSDU RX performance improvement (avoid linearize of paged RX) * rfkill changes: cleanups, documentation, platform properties * basic PBSS support in cfg80211 * MU-MIMO action frame processing support * BlockAck reordering & duplicate detection offload support * various cleanups & little fixes
2016-02-24iwlwifi: mvm: move TX PN assignment for TKIP to the driverEliad Peller1-5/+10
If protocol offloading is configured, the fw might generate some frames (e.g. arp response) on its own during d3/d0i3. On d3/d0i3 exit the driver queries the updated PN (if relevant), and updates its keys (for the d0i3 case, this is done by iwl_mvm_d0i3_exit_work(), which is scheduled on d0i3 exit) While in d0i3, iwlmvm defers tx frames until d0i3 exit, and then continues their processing. This is problematic with TKIP, since the frame's PN has already been set at this stage (in contrast to CCMP, where the PN is being set only later on), so both the frame's PN and the upcoming PN update (from d0i3 exit work) might be wrong. Fix it by moving the TX PN assignment (for TKIP) to the driver, similarly to CCMP. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2016-02-01iwlwifi: mvm: support beacon storingSara Sharon1-1/+2
Currently firmware is configured to filter out beacons. In case a beacon was changed - it is waking the host. However, some vendors change their IEs frequently without any significant change, and redundant wakeups are triggered as a result. As a solution disable beacon filtering when entering d0i3. Instead, firmware will store the latest beacon and upon exiting d0i3 it will send it up to the host, so the host can act upon changes (if there were any). This beacon will arrive as a dedicated notification - support it as well. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-02-01iwlwifi: mvm: Do not switch to D3 image on suspendMatti Gottlieb1-21/+49
Currently when the driver is configured with wowlan parameters, and enters D3 mode, the driver switches the FW image to D3, and when it exists suspend, it reloads the D0 image. If the firmware supports the consolidation of the D0 & D3 images there is no need to load the D3 image on suspend, and no need to reload the D0 image on resume. Do not switch images on suspend / resume, for firmwares that support consolidated images. Signed-off-by: Matti Gottlieb <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: initialize gtkdata->mvm correctlyEliad Peller1-0/+1
gtkdata->mvm wasn't set in iwl_mvm_d0i3_update_keys, resulting in kernel panic in some flows (when mvm is actually used...) Fixes: a3f7ba5c8825 ("iwlwifi: update key params on d0i3 entrance/exit") Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-01-07iwlwifi: mvm: check PN for CCMP/GCMP in the driverJohannes Berg1-20/+94
As we're working on multi-queue RX, we want to parallelise checking the PN in order to avoid having to serialise the RX processing. It may seem that doing parallel PN checking is insecure, but it turns out to be OK because queue assignment is done based on the data in the frame (IP/TCP) and thus cannot be manipulated by an attacker, since the data is encrypted and must first have been decrypted successfully. There are some corner cases, in particular when the peer starts using fragmentation which redirects the packet to the default queue. However this redirection is remembered (for the STA, per TID) and thus cannot be exploited by an attacker either. Leave checking on the default queue (queue 0) to mac80211, since we get fragmented packets there and those are subject to stricter checks during reassembly. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>