summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25wifi: mac80211: don't ask driver about no-op link changesJohannes Berg1-1/+4
If the links won't actually change, nothing will happen. This was previously done in the inner function (twice in some cases), but we shouldn't bother the driver with it. Clean that up. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320091155.a8190a312a27.If4e6f5ce8228eda7afac0fc8c17dd731c5da9ed9@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: don't select link ID if not provided in scan requestAyala Beker1-12/+4
If scan request doesn't include a link ID to be used for TSF reporting, don't select it as it might become inactive before scan is actually started by the driver. Instead, let the driver select one of the active links. Fixes: cbde0b49f276 ("wifi: mac80211: Extend support for scanning while MLO connected") Signed-off-by: Ayala Beker <ayala.beker@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320091155.a6b643a15755.Ic28ed9a611432387b7f85e9ca9a97a4ce34a6e0f@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211_hwsim: Declare HE/EHT capabilities support for P2P interfacesIlan Peer1-8/+12
Declare HE/EHT capabilities support also for P2P client and P2P GO interface types. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320091155.73ae309d27c2.I31ef6af2f1ebf54281858e2f63afcb10b61985fe@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: clarify IEEE80211_STATUS_SUBDATA_MASKJohannes Berg2-2/+2
We have 13 bits for the status_data, so restricting type to 4 and subdata to 8 bits is confusing, even if we don't need more bits now. Change subdata mask to be 9 bits instead, just to make things match up. If we actually need more types or more subdata bits we can later also reshuffle the bits between these, but we should probably keep them at 13 bits together. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320091155.28ac7b665039.I1abbb13e90f016cab552492e05f5cb5b52de6463@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: don't enter idle during link switchJohannes Berg3-16/+22
When doing link switch with a disjoint set of links before and after the switch, we end up removing all channel contexts, adding new ones later. This looks like 'idle' to the code now, and we enter idle which also includes flushing queues. But we can't actually flush since we don't have a link active (bound to a channel context), and entering idle just to leave it again is also wrong. Fix this by passing through an indication that we shouldn't do any idle checks in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320091155.170328bac555.If4a522a9dd3133b91983854b909a4de13aa635da@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: allocate STA links only for active linksJohannes Berg1-3/+3
For the mvm driver, data structures match what's in the firmware, we allocate FW IDs for them already etc. During link switch we already allocate/free the STA links appropriately, but initially we'd allocate them always. Fix this to allocate memory, a STA ID, etc. only for active links. Fixes: 57974a55d995 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.f2093ff73465.Ie891e1cc9c9df09ae22be6aad5c143e376f40f0e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: enable monitor on passive/inactive channelsJohannes Berg2-3/+12
If firmware supports pure passive monitor on passive/inactive channels, enable that. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.7c62f421f03e.I9969d3a46fed48e67fa28a7d00080b0dd314dabd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: Do not warn on invalid link on scan completeIlan Peer1-1/+6
As it is possible that by the time the scan is completed the link was already removed. Fixes: 3a5a5cb06700 ("wifi: iwlwifi: mvm: Correctly report TSF data in scan complete") Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.619d3574a757.I0523e92547f0288c8b0119b1fdc5e967a5a8956e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: remove 6 GHz NVM overrideJohannes Berg1-5/+0
We shouldn't override the flags to zero here for 6 GHz capable devices any more, but since LAR will be there, this also shouldn't make a difference now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.73bff65d5597.I1ae23a509fad252c0237e74defba6cb74b6ca188@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: don't support puncturing in 5 GHzJohannes Berg1-0/+2
This is simply not supported, so set the flag for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.f61448c4a43a.Ib740b341af0ca6c3e06cc9a0b04447a6635df7a8@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: fw: add clarifying comments about iwl_fwrt_dump_dataJohannes Berg2-0/+6
iwl_fw_dbg_collect_sync() unconditionally accesses 'trig' at the beginning of the function, even though the data has an inner union and 'trig' isn't necessarily always used, it can be 'desc' instead. Add comments clarifying why this is OK, that 'trig'/'desc' must be first in the struct and how in it the use of the union's sub-structs is differentiated. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.49c3a39737cc.I91c588e0d66b49f0ee9103e8d4a0e501c2fd36d6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: always apply 6 GHz probe limitationsBenjamin Berg1-66/+89
When scanning on 6 GHz we allocate a set of short-SSIDs and BSSIDs to probe. However, when we need to do an active scan because of a hidden SSID, then we could add too many entries for probing causing an assertion in the firmware input validation. Reshuffle the code a bit to first calculate the maximum number of short-SSIDs and BSSIDs that are permitted for the channel. Then ensure that we do not set more than the permitted number of bits in the bitmasks and turn on force_passive when we have surpassed the limit. While at it, also change the logic so that allow_passive is always disabled in case a hidden SSID is included. Previously, we might not have done so if we added the short-SSID based on the number of BSSIDs already in the request. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.e0b114b68d1d.Ib86afccdb955f0d221ef5d7b8afdc1d67c3542ef@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8Emmanuel Grumbach3-2/+36
This just adds a __le32 that we (currently) don't use. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.29ff7a88ddac.I39cf2ff1d1ddf0fa62722538698dc7f21aaaf39e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: add a kunit test for PCI table duplicatesJohannes Berg3-2/+29
We shouldn't have entries in the table that match the same device; it's possible to have a specific entry followed by a less specific entry (i.e. NNNN followed by ANY), but not entries that are dead, where an earlier entry matches the same as a later one. Add a test similar to the existing devinfo test to catch this situation. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.826b859abd62.I8140d7e9ae52ac50c6830818f8f95ccd0d94b3d3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: add debugfs for forcing unprotected ranging requestAvraham Stern3-1/+19
Add an option to force sending unprotected ranging request even if the station is associated to the responder or a PASN keys are configured. This is used for testing. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.8523150148ec.I7ab6c547513717e69ec385f72a8f43ea00bd9e0a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: Add debugfs entry for triggering internal MLO scanIlan Peer1-0/+56
Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.3dd3e8c42c27.I9434dc641b837601c72f10684fbfad2c0fb31a99@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: Introduce internal MLO passive scanIlan Peer3-10/+88
Add a new scan type that can be used for internal MLO purposes, i.e., in case updated BSS information is required. Currently only passive scanning is supported. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240319100755.5ce3e756cf8f.I4a41065f6b3a6ec6c6e44e83bc97c277ff7c599e@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: add support for tearing down negotiated TTLMAyala Beker4-1/+90
In order to activate a link that is currently inactive due to a negotiated TTLM request, need to first tear down the negotiated TTLM request. Add support for sending TTLM teardown request and update the links state accordingly. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.d480cbf46fcf.Idedad472469d2c27dd2a088cf80a13a1e1cf9b78@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: cfg80211: ignore non-TX BSSs in per-STA profileBenjamin Berg1-9/+38
If a non-TX BSS is included in a per-STA profile, then we cannot set transmitted_bss for it. Even worse, if we do things properly we should be configuring both bssid_index and max_bssid_indicator correctly. We do not actually have both pieces of information (and, some APs currently do not include either). So, ignore any per-STA profile where the RNR says that the BSS is not transmitted. Also fix transmitted_bss to never be set for per-STA profiles. This fixes issues where mac80211 was setting the reference BSSID to an incorrect value. Fixes: 2481b5da9c6b ("wifi: cfg80211: handle BSS data contained in ML probe responses") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.6a0babed655a.Iad447fea417c63f683da793556b97c31d07a4aab@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: cfg80211: check BSSID Index against MaxBSSIDBenjamin Berg1-1/+2
Add a verification that the BSSID Index does not exceed the maximum number of BSSIDs in the Multiple-BSSID set. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.a7574d415adc.I02f40c2920a9f602898190679cc27d0c8ee2c67d@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: improve association error reporting slightlyBenjamin Berg1-8/+10
There is no reason to check the request flags for each of the links, so pull that out of the loop. Also, within the loop we can set the per-link error everywhere. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.695faa9be279.I71b11a8d66a9cae4c27e242a47d1d92922609b03@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: add flag to disallow puncturing in 5 GHzJohannes Berg3-0/+8
Some devices may not be capable of handling puncturing in 5 GHz only (vs. the current flag that just removes puncturing support completely). Add a flag to support such devices: check and then downgrade the channel width if needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.49759510da7d.I12c5a61f0be512e0c4e574c2f794ef4b37ecaf6b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: cfg80211: handle indoor AFC/LPI AP in probe response and beaconAnjaneyulu1-0/+4
Mark Indoor LPI and Indoor AFC power types as valid based on channel flags. While on it, added default case. Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.091cfaaa5f45.I23cfa1104a16fd4eb9751b3d0d7b158db4ff3ecd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: handle indoor AFC/LPI AP on assoc successAnjaneyulu2-3/+7
Update power_type in bss_conf based on Indoor AFC and LPI power types received in HE 6 GHz operation element on assoc success. Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.89c25dae34ff.Ifd8b2983f400623ac03dc032fc9a20025c9ca365@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: fix BSS_CHANGED_MLD_TTLM descriptionAyala Beker1-1/+1
BSS_CHANGED_MLD_TTLM purpose is to let the driver know that negotiated TTLM was updated and as a result MLD suspended links status was change. Fix the description to better reflect it. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.52b893a70758.I2dcb322b389441f33605fb952450cc2724eb9efd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: clarify the dormant/suspended links docsJohannes Berg1-3/+5
Since I keep getting confused about this and asking about it, update the documentation. In the future, especially when we add more reasons for a link to be disabled, we should add a per-link 'disable state' bitmap instead of maintaining all these bitmaps with subset logic, to indicate each of the different states separately. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.a5b24595b1a2.I92dd7d177b25df189b842d3bcddb1f2b13b1de13@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211_hwsim: move skip_beacons to be per linkJohannes Berg1-8/+11
Initially, we were only using this for non-MLO, but it could also be useful for MLO, and if we move it to per-link and the vif isn't an MLD, it'll be put in the same place (by mac80211) anyway. Move it to be per link. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.8b6691bd70eb.If8a28b893d277254906601065e4aaefa704b6fcb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()Johannes Berg1-1/+1
If there was a possibility of an MLE basic STA profile without subelements, we might reject it because we account for the one octet for sta_info_len twice (it's part of itself, and in the fixed portion). Like in ieee80211_mle_reconf_sta_prof_size_ok, subtract 1 to adjust that. When reading the elements we did take this into account, and since there are always elements, this never really mattered. Fixes: 7b6f08771bf6 ("wifi: ieee80211: Support validating ML station profile length") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.00bb0b20ed60.I8c41dd6fc14c4b187ab901dea15ade73c79fb98c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()Johannes Berg1-1/+1
For simplicity, we may want to pass a NULL element, and while we should then pass also a zero length, just be a bit more careful here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.4d983653cb8d.Ic3ea99b60c61ac2f7d38cb9fd202a03c97a05601@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211_hwsim: set link ID information during RxAditya Kumar Singh1-0/+3
Currently link ID information is not passed to mac80211 via Rx status by mac80211_hwsim. This leads to packet getting dropped in function __ieee80211_rx_handle_packet since it expects the link ID if packet is intended for a MLO station and the station is not directly passed via pubsta function argument. Add changes to pass the link ID information in Rx status. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://msgid.link/20240313145402.456514-1-quic_adisi@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: nl80211: cleanup nl80211.h kernel-docJeff Johnson1-28/+40
Fix all of the kernel-doc issues in nl80211.h. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://msgid.link/20240319-kdoc-nl80211-v1-3-549e09d52866@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: nl80211: fix nl80211 uapi comment style issuesJeff Johnson1-83/+83
Currently kernel-doc raises "warning: bad line:" for several comments that have invalid multi-line comment style; they are missing the leading '*'. And checkpatch.pl raises "WARNING: please, no space before tabs" for a large number of comments which have space then tab after the leading '*'. Fix those issues. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://msgid.link/20240319-kdoc-nl80211-v1-2-549e09d52866@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: nl80211: rename enum plink_actionsJeff Johnson1-1/+1
kernel-doc flagged the following issue: include/uapi/linux/nl80211.h:6081: warning: expecting prototype for enum nl80211_plink_action. Prototype was for enum plink_actions instead This is because the documentation doesn't match the code. Normally the correct fix for such an issue is to modify the documentation to match the code. However, in this case, since the actual name plink_actions is not referenced by any code, rename it to nl80211_plink_action to give it a proper prefix and match the documentation. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://msgid.link/20240319-kdoc-nl80211-v1-1-549e09d52866@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: spectmgmt: simplify 6 GHz HE/EHT handlingJohannes Berg1-7/+7
Clean up the code here a bit to have only a single call to ieee80211_chandef_he_6ghz_oper() by using a local pointer variable for the difference. Link: https://msgid.link/20240312112048.94c421d767f9.Ia7ca2f315b392c74d39b44fa9eb872a2e62e75c1@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: mac80211: supplement parsing of puncturing bitmapKang Yang2-0/+6
Current mac80211 won't parsing puncturing bitmap when process EHT Operation element in 6 GHz band or Bandwidth Indication element. This leads to puncturing bitmap cannot be updated in related situations, such as connecting to an EHT AP in 6 GHz band. So supplement parsing of puncturing bitmap for these elements. Signed-off-by: Kang Yang <quic_kangyang@quicinc.com> Link: https://msgid.link/20240312045947.576231-2-quic_kangyang@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: pcie: remove duplicate PCI IDs entryJohannes Berg1-1/+0
There's a duplicate entry for 0x51f1, which shouldn't be present, though the first entry will correctly be taken. Remove the second one. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.3e995954d519.I0d028993e17e26b63c0ee89d7b1714ec88f2a158@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: Refactor scan startIlan Peer1-7/+16
To support staring internal scan, refactor the scan code such that the body iwl_mvm_reg_scan_start() is now moved to a local function that can be used by other flows as well. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Reviewed-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.e7833d4cfc53.I43c1c533c2a5243229002fde6360d423946c54fa@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: advertise IEEE80211_HW_HANDLES_QUIET_CSAJohannes Berg2-4/+61
The firmware has handled quiet in CSA for a long time now, but it didn't really matter much. However, now with quiet CSA on a perhaps secondary link, we don't want mac80211 to stop queues, we can continue using a link that's not requiring quiet. Set the feature flag for MLO-capable devices indicating that we'll handle the quiet entirely in the driver/device. However, the firmware doesn't handle quiet in AP mode since we don't really expect to really be needing that (without radar detection), but - even for testing - make that work properly by simply not pulling from TXQs in this scenario. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.fa75403b5eaa.Ie3ff02215f810fcfefd6a22c481567f94f61c0c6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: fix flushing during quiet CSAJohannes Berg2-2/+19
If, for any reason, we're going to attempt to flush the queues while quiet CSA is happening, this cannot succeed. This could be the case if for example mac80211 were to flush after TXing e.g. a deauth frame due to disconnecting during the CSA. In this case, drop the frames instead, the firmware won't let us do any transmissions and may also become unhappy if we're not going to disconnect quickly enough. Currently this doesn't happen as mac80211 stops queues, but we'll want to let mac80211 know not to stop queues for proper multi-link support during CSA, so we need to handle this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.d5d629f32ea8.I86d9b849d92273542bfc2d9c671b66179e7ebb72@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: support wowlan notif version 4Shaul Triebitz2-6/+243
In version 4, in case of MLO GTK rekey during D3, the firmware sends all the new keys, including the keys on the non-active links. Update also the non active link keys. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.6524de988ed3.Id065ddd2f4a71b0243c33ae0c5476ac41bfe2dc2@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: skip keys of other linksShaul Triebitz1-0/+8
When waking up from wowlan, we iterate over the current keys and remove those that were rekeyed. With MLO, there might be keys of other links which should not be removed. Skip MLO keys on other links (other than the wowlan active link). Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.fdf527b50d61.I605a971d2d68107769dd363b896b471998259e64@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: stop assuming sta id 0 in d3Shaul Triebitz1-2/+7
In MLO, the station id in d3 can be other than 0. Do not assume the station id is 0 when waking up from d3. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.6379619f2987.I83de9d868224df76eee8df8dbcf352636535821a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: fix the sta id in offloadShaul Triebitz3-4/+10
With MLO, the station id in wowlan can be other than 0. Set the correct station in the protocol offload command. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.ace4f793872d.Id984110576a72acc84493217ca95564c3cd362bd@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: mvm: Move beacon filtering to be per linkIlan Peer6-57/+70
As the FW statistics are per link context and not per MAC context. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.47bdecc68e73.Icc0eaebb35d119f8c538c068fbc8f874aac194c3@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25wifi: iwlwifi: fix firmware API kernel docShaul Triebitz1-2/+2
Fix the comment of the associated struct of the wowlan info notification. Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240311081938.2ea25f49489b.I83fa1cdc39f74ad2aacf75c2c14412eeaf93e787@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-21wifi: qtnfmac: allocate dummy net_device dynamicallyBreno Leitao4-9/+18
Embedding net_device into structures prohibits the usage of flexible arrays in the net_device structure. For more details, see the discussion at [1]. Un-embed the net_device from struct qtnf_bus by converting it into a pointer. Then use the leverage alloc_netdev() to allocate the net_device object at qtnf_pcie_probe(). The free of the device occurs at qtnf_pcie_remove(). [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240319172634.894327-1-leitao@debian.org
2024-03-21wifi: mt76: mt7915: workaround too long expansion sparse warningsLorenzo Bianconi1-3/+3
Fix the following sparse warnings: drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion No functional changes, compile tested only. Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Acked-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/5457b92e41909dd75ab3db7a0e9ec372b917a386.1710858172.git.lorenzo@kernel.org
2024-03-21wifi: ti: Convert sprintf/snprintf to sysfs_emitLi Zhijian1-8/+3
Per filesystems/sysfs.rst, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. coccinelle complains that there are still a couple of functions that use snprintf(). Convert them to sysfs_emit(). sprintf() will be converted as weel if they have. Generally, this patch is generated by make coccicheck M=<path/to/file> MODE=patch \ COCCI=scripts/coccinelle/api/device_attr_show.cocci No functional change intended CC: Kalle Valo <kvalo@kernel.org> CC: linux-wireless@vger.kernel.org Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240315055211.1347548-3-lizhijian@fujitsu.com
2024-03-21wifi: b43: Convert sprintf/snprintf to sysfs_emitLi Zhijian2-19/+10
Per filesystems/sysfs.rst, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. coccinelle complains that there are still a couple of functions that use snprintf(). Convert them to sysfs_emit(). sprintf() will be converted as weel if they have. Generally, this patch is generated by make coccicheck M=<path/to/file> MODE=patch \ COCCI=scripts/coccinelle/api/device_attr_show.cocci No functional change intended CC: Larry Finger <Larry.Finger@lwfinger.net> CC: Kalle Valo <kvalo@kernel.org> CC: linux-wireless@vger.kernel.org CC: b43-dev@lists.infradead.org Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240315055211.1347548-2-lizhijian@fujitsu.com
2024-03-18wifi: mwifiex: Add missing MODULE_FIRMWARE() for SD8801Víctor Gonzalo1-0/+1
The module metadata for the firmware file mrvl/sd8801_uapsta.bin is missing. Signed-off-by: Víctor Gonzalo <victor.gonzalo@anddroptable.net> Acked-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240313183156.2234301-1-victor.gonzalo@anddroptable.net