summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-08-26iwlwifi: mvm: Refactor setting of SSIDs for 6GHz scanIlan Peer1-76/+28
- Short SSIDs should always be added for direct SSIDs included in the scan request. However, this was not done in case that information for collocated APs was included. Fix this. - With the above fix, if the FW also supports discovery of hidden APs over the 6GHz band, also set the corresponding full SSID information. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.02512b7a1443.Ibb023b09b86179ed049a195f4e32e887c2f4971d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: silently drop encrypted frames for unknown stationAvraham Stern1-2/+2
When a station is removed, the driver-mac80211 station mapping is removed before the station is actually deleted from the FW. As a result, it is reasonable that the FW will continue to pass frames although the driver doesn't have a station for them anymore. Thus change the message severity level from ERR to DEBUG_DROP. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.a751177743c6.I5607504dade88ba461508643f58390dd661c05ba@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: implement RSC command version 5Johannes Berg3-30/+191
In later firmware we haven't needed the TSC anyway since we have it already (and firmware image doesn't change), but the new version adds the ability to send down replay counters for more than one GTK. Implement that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.28cd065e8c4a.Ic8406a78ee46b07e0ca1b8199522ef08ec6eef53@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: make key reprogramming iteration optionalJohannes Berg1-54/+48
Now that only reprogramming is left in the initial key iteration, skip it entirely on unified firmware images instead of skipping only the command sending inside of it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.c6f77325c430.I798ce9d757492a9e3d223c1de5d4e62ebbc00b2c@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: add separate key iteration for GTK typeJohannes Berg1-17/+46
If we're sending the KEK/KCK data we also need the GTK and IGTK type, add a separate key iteration for that so we can make the configure_key iteration optional later. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.c99f86423702.Icf7d4e93be77ea05a80235d01851ad0155593de9@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: refactor TSC/RSC configurationJohannes Berg1-81/+116
Refactor the TSC/RSC configuration out from the normal wowlan key iteration so we can replace it later with a different one adapted to a different firmware API. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.78e431c9aaeb.I5b83b8b30e3e7c04706a1f99b3970e4e5f36af9e@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: remove fixed cmd_flags argumentJohannes Berg1-14/+9
We only ever pass cmd_flags == CMD_ASYNC, so might as well not have the argument. Remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.9130db608b77.I352cbc35fefd98cc00aa0c69ea43863942aa62f5@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: d3: separate TKIP data from key iterationJohannes Berg1-49/+83
We do a key iteration to program the keys, and while at it we also collect the data necessary for TKIP. This code has all kinds of dependencies on the firmware API though, so take out the TKIP phase 1 key generation and do that in a separate key iteration only if necessary. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210805130823.80721fc0fd61.I5a8fbba4e3a9606f700ee41c7a4244dd5e2af935@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: simplify __iwl_mvm_set_sta_key()Johannes Berg1-19/+7
There's no need to differentiate identical default and cipher type cases, nor do we really need to have a 'ret' variable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.e89178b22fbf.I4d62baad9a9fdfd5c645a3cc5dbffb22feab5033@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: support new station key APIJohannes Berg2-16/+23
The new version 3 of the station key API has gotten rid of the strange hole in the sequence counter values, support that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.39a00ca1a1a6.Ifb4adeb4edd2b72232046dd2d59c0b3732f497c2@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: Fix umac scan request probe parametersIlan Peer1-3/+3
Both 'iwl_scan_probe_params_v3' and 'iwl_scan_probe_params_v4' wrongly addressed the 'bssid_array' field which should supposed to be any array of BSSIDs each of size ETH_ALEN and not the opposite. Fix it. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.04146f24794f.I90726440ddff75013e9fecbe9fa1a05c69e3f17b@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: implement Bz reset flowJohannes Berg1-3/+15
Bz device reset flow changed, now the hardware (instead of firmware) will reset the PCI bus etc., this can take up to 100ms. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.df30875c6ff9.I962ed0f2c3358903dc6ba1abb65726ce5acbbd48@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: implement Bz NMI behaviourJohannes Berg2-1/+8
The method to NMI the firmware also changed in Bz devices, implement the new logic. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.c9bd2034dc05.I983c25caa09c3776c7640fff73fe739362ecc5b6@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: implement Bz device startupJohannes Berg4-19/+68
Device startup changed in Bz, some register bits moved around. Change the code accordingly. The new Bz hardware changes also the way we wake it (grab NIC access) and the way we disable bus mastering, update the driver code accordingly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.00a137364a95.I059a2abac948965458862941ee7db6a2e1076fa6@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: read MAC address from correct place on BzJohannes Berg5-14/+56
On Bz devices, the MAC address CSRs changed from 0x380 to 0x30. Change the boolean configuration "mac_addr_from_csr" to hold the base address instead, and set it correctly for the different devices using this feature. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.928c7983f014.Ic5ba92d98946c1b4640280a05dcfd75119c0f0c0@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: give Bz devices their own nameJohannes Berg3-4/+6
The real name isn't determined yet, but give them a new name that isn't clashing with older devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.46b86c8074b2.I94d58b8e622ca87658dc05b05483fb954d526eab@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: split off Bz devices into their own familyJohannes Berg2-5/+29
These devices have some places with different behaviour required, so split them off into their own family as they should be. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.90257303559f.I4c4342229dcb9513099a3152605f0947423e86dc@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: yoyo: cleanup internal buffer allocation in D3Mukesh Sisodiya3-9/+2
With recent changes in the firmware SRAM debug during D3 is enabled by default and need not be enabled by driver. cleaning the code to align the same. Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802215208.8535203d0ef7.Ib1695ce5de921b0472d0b1052e729e071573b863@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: treat MMPDUs in iwl_mvm_mac_tx() as bcastJohannes Berg1-5/+5
There's no need for all the complicated conditions here, any bufferable MMPDUs or MMPDUs for client interfaces are already coming through the TXQ interface, not iwl_mvm_mac_tx(). Simplify the logic. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.3939f7c5c43a.I1d5cb5262e31a000023d79acbb897b8db50adf0d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: clean up number of HW queuesJohannes Berg1-1/+1
Since switching to mac80211 TXQs, we no longer need to advertise more hardware queues than ACs, since we don't even set QUEUE_CONTROL anyway, so the vif->hw_queue[] mapping array won't be used. All we need (at least for now) is for hw->queues to indicate that we have enough queues to handle QoS. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.80611a3c1ee7.I8a3d2b269421b6d8bada8c12cce3e095e6cfaeed@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: avoid static queue number aliasingJohannes Berg2-16/+38
When TVQM is enabled (iwl_mvm_has_new_tx_api() is true), then queue numbers are just sequentially assigned 0, 1, 2, ... Prior to TVQM, in DQA, there were some statically allocated queue numbers: * IWL_MVM_DQA_AUX_QUEUE == 1, * both IWL_MVM_DQA_INJECT_MONITOR_QUEUE and IWL_MVM_DQA_P2P_DEVICE_QUEUE == 2, and * IWL_MVM_DQA_AP_PROBE_RESP_QUEUE == 9. Now, these values are assigned to the members mvm->aux_queue, mvm->snif_queue, mvm->probe_queue and mvm->p2p_dev_queue by default. Normally, this doesn't really matter, and if TVQM is in fact available we override them to the real values after allocating a queue for use there. However, this allocation doesn't always happen. For example, for mvm->p2p_dev_queue (== 2) it only happens when the P2P Device interface is started, if any. If it's not started, the value in mvm->p2p_dev_queue remains 2. This wouldn't really matter all that much if it weren't for iwl_mvm_is_static_queue() which checks a queue number against one of those four static numbers. Now, if no P2P Device or monitor interface is added then queue 2 may be dynamically allocated, yet alias mvm->p2p_dev_queue or mvm->snif_queue, and thus iwl_mvm_is_static_queue() erroneously returns true for it. If it then gets full, all interface queues are stopped, instead of just backpressuring against the one TXQ that's really the only affected one. This clearly can lead to issues, as everything is stopped even if just a single TXQ filled its corresponding HW queue, if it happens to have an appropriate number (2 or 9, AUX is always reassigned.) Due to a mac80211 bug, this also led to a situation in which the queues remained stopped across a deauthentication and then attempts to connect to a new AP started failing, but that's fixed separately. Fix all of this by simply initializing the queue numbers to the invalid value until they're used, if TVQM is enabled, and also setting them back to that value when the queues are later freed again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.2e47e623f9e2.I9b0830dafbb68ef35b7b8f0f46160abec02ac7d0@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: use DEFINE_MUTEX() for mutex lockZheng Yongjun1-3/+1
mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.2a583d006739.Ia782c08525397b6430b1c877a870d688a7f3f494@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: remove trailing semicolon in macro definitionTom Rix2-2/+2
The macro use will already have a semicolon. Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.3db450ebbb3c.Ic63f85b85a043256318da49d7b5a63f7dddf3986@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: fix a memory leak in iwl_mvm_mac_ctxt_beacon_changedZhang Qilong1-1/+3
If beacon_inject_active is true, we will return without freeing beacon. Fid that by freeing it before returning. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> [reworded the commit message] Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.d16206ca60fc.I9984a9b442c84814c307cee3213044e24d26f38a@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: fix old-style static const declarationWei Yongjun1-1/+1
GCC reports warning as follows: drivers/net/wireless/intel/iwlwifi/mvm/rfi.c:14:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] 14 | const static struct iwl_rfi_lut_entry iwl_rfi_table[IWL_RFI_LUT_SIZE] = { | ^~~~~ Move static to the beginning of declaration. Fixes: 21254908cbe9 ("iwlwifi: mvm: add RFI-M support") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.f60b39bbb0c0.I8b0ad9105003d13cc4aa64fc957aec9582e8b26d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: remove check for vif in iwl_mvm_vif_from_mac80211()Luca Coelho1-2/+0
This check is useless, because we would return NULL in that case and none of the callers actually check that the return value was not NULL before accessing it. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.f1c4844a2650.If4dc009e22cda51099a1dc4237d04bf4313055d6@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: remove spaces from queue namesLuca Coelho1-5/+5
If we use spaces in the queue names, we get files with spaces in their name in procfs, which is ugly. Remove the spaces. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.0ef8aedd4f9b.If527b9ae5bf8de8c6877d4b6a21ed8d81b0f877e@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: restrict FW SMPS requestJohannes Berg2-4/+10
The firmware SMPS request should only be honoured if the connection is currently with HE and on 160 MHz, so check that and then potentially reapply any request if the BW changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.0cdcac5660da.I9ee7956fd4f48399855d1f97728bc58b36caf112@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: set replay counter on key installJohannes Berg1-0/+53
When installing a (new) key, set the replay counter so that after FW restart the firmware has the correct value of the replay counters. This doesn't have a large effect - for frames that reach the driver, it will do a replay check, and when installing a new key, the counter is normally zero to start with (not for GTK though, if joining the BSS for the first time). Since this only affects frames handled entirely by the FW, and that's restricted to a few unicast management frames, the only affect here is for those after a firmware restart. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.1cedf2ca7bb6.I2e609c28eaa301436e6740f4f1beca838f69a96a@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: remove trigger EAPOL time eventMordechay Goodstein1-10/+2
EAPOL failure results in deauthentication with various reasons, not related to AUTH failure specifically, so we just merge AUTH failure with failed to assoc to AP. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802172232.2ff350d85eab.I02c5b5d29c0d5c2e014bd1081b07ed33772ae04d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: iwl-dbg-tlv: add info about loading external dbg binMordechay Goodstein1-1/+4
This helps understand why and what debug capabilities are running. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.98980f8bd17f.Ifcedf415a545a87cb341a4142085b5723d8cac4d@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: Add support for hidden network scan on 6GHz bandIlan Peer2-15/+76
Add support for discovery of hidden networks on the 6GHz band, by including the scan request direct SSIDs in the FW scan request command: - In case a short SSID matches one of the direct SSIDs in the scan request command, add the matching SSID in the same offset in the 'direct_ssids' array. - Otherwise, add the SSID in one of the available slots. Additionally, as a preparation to handle hidden APs, refactor iwl_mvm_umac_scan_cfg_channels_v6_6g() the function. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.ffb540a70212.Ia2bb9bc9435b833820bcc7dc30adcedb5a5a9869@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: Do not use full SSIDs in 6GHz scanIlan Peer1-3/+6
The scan request processing populated the direct SSIDs in the FW scan request command also for 6GHz scan, which is not needed and might result in unexpected behavior. Fix the code to add the direct SSIDs only in case the scan is not a 6GHz scan. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.f465937c7bbf.Ic11a1659ddda850c3ec1b1afbe9e2b9577ac1800@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: print PNVM complete notification status in hexadecimalLuca Coelho1-1/+1
This value is not a simple incrementing integer, it contains some flags as well, so reading it in hexadecimal is easier. Change the print to do it in hex instead of decimal. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.5e35f930d0ed.I5f94575a835f060bdc8ed3477871256f8a2cbaaa@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: dump error on FW reset handshake failuresJohannes Berg3-6/+24
If the firmware crashes while we're waiting for the reset handshake then it cannot possibly make progress anymore, and we will just time out the wait. That's pointless, so just stop waiting at that point. Additionally, if it never acknowledges the reset handshake, something went wrong. Dump an error in both of these cases, but we need to do it synchronously here since the device will be turned off. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.8b6a33544b4b.I55f97f70f8efa64db064a9207177a094c60ac8f1@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: prepare for synchronous error dumpsJohannes Berg10-78/+113
In some cases it may be necessary to synchronously create a firmware error report, add the necessary infrastructure for this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.481b6642f0fc.I7c9c958408a285e3d19aceed2a5a3341cfc08382@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: free RBs during configureJohannes Berg2-1/+7
When switching op-modes, or more generally when reconfiguring, we might switch the RB size. In _iwl_pcie_rx_init() we have a comment saying we must free all RBs since we might switch the size, but this is actually too late: the switch has been done and we'll free the buffers with the wrong size. Fix this by always freeing the buffers, if any, at the start of configure, instead of only after the size may have changed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.42d7c93279c4.I07f74e65aab0e3d965a81206fcb289dc92d74878@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: pcie: optimise struct iwl_rx_mem_buffer layoutJohannes Berg1-2/+3
On 64-bit machines, struct iwl_rx_mem_buffer has a lot of padding due to the use of pointers after the small items. Move the list entry before them, and while at it also add documentation for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.6a62255b3df0.I47bb36530a3c2cdbd73454c796ce608ee2a32a6c@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: avoid FW restart while shutting downJohannes Berg1-0/+8
If the firmware crashes while we're already shutting down the system, there isn't much we can do since the shutdown process is continuing and we wanted to do that. Don't do a FW restart, with the implied debug collection, in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.43a7351ae6bd.I164d48ce4379accf76ea0637983fd946d52dc6f5@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: nvm: enable IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTFJohannes Berg1-0/+2
The device is capable of receiving MU-MIMO frames with 8 symbols, enable the bit here that says so. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.90cf2eb42794.I692e6d0fde6e99a1db97d2e678952f043f48f603@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: mvm: set BROADCAST_TWT_SUPPORTED in MAC policyShaul Triebitz2-2/+7
If broadcast TWT is supported in the BSS, tell the firmware about it by setting the BROADCAST_TWT_SUPPORTED in the MAC context command. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.736c3b1bc915.I10583bb6f808aa60954da26106bbc8c26620cbe8@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-26iwlwifi: iwl-nvm-parse: set STBC flags for HE phy capabilitiesMordechay Goodstein1-1/+5
Our HW supersets STBC for HE but never set it in assoc IE, fix it by setting it and enable using it. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20210802170640.0108f3e322b6.Ib25a91b5c48ff1fb2185b86a9e4bf5eec637df90@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-08-25Merge branch 'pktgen-samples-next'David S. Miller7-39/+74
Juhee Kang says: ==================== samples: pktgen: enhance the ability to print the execution results of samples This patch series improves the ability to print the execution result of pktgen samples by adding a line which calls the function before termination and adding trap SIGINT. Also, this series documents the latest pktgen usage options. Currently, pktgen samples print the execution result when terminated usually. However, sample03 is not working properly. This is results of sample04 and sample03: # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1 Running... ctrl^C to stop Device: eth0@0 Result: OK: 19(c5+d13) usec, 1 (60byte,0frags) 51762pps 24Mb/sec (24845760bps) errors: 0 # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1 Running... ctrl^C to stop Because sample03 doesn't call the function which prints the execution result when terminated normally, unlike other samples. So the first commit solves this issue by adding a line which calls the function before termination. Also, all pktgen samples are able to send infinite messages per thread by setting the count option to 0, and pktgen is stopped by Ctrl-C. However, the sample besides sample{3...5} don't work appropriately because Ctrl-C stops the script, not just pktgen. This is results of samples: # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0 Running... ctrl^C to stop ^CDevice: eth0@0 Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags) 148597pps 71Mb/sec (71326560bps) errors: 0 # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0 Running... ctrl^C to stop ^C # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample02_multiqueue.sh -n 0 Running... ctrl^C to stop ^C # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample06_numa_awared_queue_irq_affinity.sh -n 0 Running... ctrl^C to stop ^C # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_netif_receive.sh -n 0 Running... ctrl^C to stop ^C # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_bench_xmit_mode_queue_xmit.sh -n 0 Running... ctrl^C to stop ^C So the second commit solves this issue by adding trap SIGINT. Also, changes control_c function to print_results to maintain consistency with other samples on the first commit and second commit. And current pktgen.rst documentation doesn't add the latest pktgen sample usage options such as count and IPv6, and so on. Also, the old pktgen sample scripts are still included in the document. The old scripts were removed by the commit a4b6ade8359f ("samples/pktgen: remove remaining old pktgen sample scripts"). Thus, the last commit documents the latest pktgen sample usage and removes old sample scripts. And fixes a minor typo. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25pktgen: document the latest pktgen usage optionsJuhee Kang1-10/+8
Currently, the pktgen.rst documentation doesn't cover the latest pktgen sample usage options such as count and IPv6, and so on. Also, this documentation includes the old sample scripts which are no longer use because it was removed by the commit a4b6ade8359f ("samples/pktgen : remove remaining old pktgen sample scripts") Thus, this commit documents pktgen sample usage using the latest options and removes old sample scripts, and fixes a minor typo. Signed-off-by: Juhee Kang <claudiajkang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25samples: pktgen: add trap SIGINT for printing execution resultJuhee Kang5-27/+62
All pktgen samples can send indefinitely num messages per thread by setting the count option to 0(-n 0). If running sample with setting count 0 and press Ctrl-C to stop this program, the program prints the result of the execution so far. Currently, the samples besides sample{3...5} don't work properly. Because Ctrl-C stops the script, not just pktgen. This is results of samples: # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 0 Running... ctrl^C to stop ^CDevice: eth0@0 Result: OK: 569657(c569538+d118) usec, 84650 (60byte,0frags) 148597pps 71Mb/sec (71326560bps) errors: 0 # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -n 0 Running... ctrl^C to stop ^C In order to solve this, this commit adds trap SIGINT. Also, this commit changes control_c function to print_result to maintain consistency with other samples. Signed-off-by: Juhee Kang <claudiajkang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25samples: pktgen: fix to print when terminated normallyJuhee Kang1-2/+4
Currently, most pktgen samples print the execution result when the program is terminated normally. However, sample03 doesn't work appropriately. This is results of samples: # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample04_many_flows.sh -n 1 Running... ctrl^C to stop Device: eth0@0 Result: OK: 19(c5+d13) usec, 1 (60byte,0frags) 51762pps 24Mb/sec (24845760bps) errors: 0 # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample03_burst_single_flow.sh -n 1 Running... ctrl^C to stop The reason why it doesn't print the execution result when the program is terminated usually is that sample03 doesn't call the function which prints the result, unlike other samples. So, this commit solves this issue by calling the function before termination. Also, this commit changes control_c function to print_result to maintain consistency with other samples. Signed-off-by: Juhee Kang <claudiajkang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25Merge branch 'octeontx2-traffic-shaping'David S. Miller13-165/+757
Sunil Goutham says: ==================== Octeontx2: Traffic shaping and SDP link config support This patch series adds support for traffic shaping configuration on all silicons available after 96xx C0. And also adds SDP link related configuration needed when Octeon is connected as an end-point and traffic needs to flow from end-point to host and vice versa. Series also has other changes like - New mbox messages in admin function driver for PF/VF drivers to retrieve available HW resource count. HW resources like block LFs, bandwidth profiles etc are covered. - Added PTP device ID for new CN10K and 95O silicons. - etc ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25octeontx2-af: Add mbox to retrieve bandwidth profile free countSunil Goutham2-1/+42
Added mbox for PF/VF drivers to retrieve current ingress bandwidth profile free count. Also added current policer timeunit configuration info based on which ratelimiting decisions can be taken by PF/VF drivers. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25octeontx2-af: Remove channel verification while installing MCAM rulesSunil Goutham3-55/+0
New usecases are popping up where in user wants to install common MCAM filters for all interfaces. Having channel verification will result in duplicating such MCAM filters for each of the ingress interface. Hence removed channel verification. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-25octeontx2-af: Add PTP device id for CN10K and 95O silconsSubbaraya Sundeep1-25/+18
CN10K slicon has different device id for PTP device. Hence this patch updates the driver with new id. Though ptp driver being a separate driver AF manages configuring PTP block by all PFs. To manage ptp, AF driver checks in its probe whether 1. ptp hardware device found on silicon 2. A driver is bound to ptp device 3. The ptp driver probe is successful In failure of cases 1 and 3, AF proceeds with out ptp and for case 2 defers the probe. This patch refactors code also to check for all the PTP device ids given in ptp device ids table for case 1. Also added PTP device ID for 95O silicon Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>