Commit Graph

1253557 Commits

Author SHA1 Message Date
Uwe Kleine-König
597d817202 net: rfkill: gpio: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://msgid.link/20240306183538.88777-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:40:22 +01:00
Johannes Berg
f40db02e8f wifi: mac80211: use kvcalloc() for codel vars
This is a big array, but it's only used by software and
need not be contiguous in memory. Use kvcalloc() since
it's so big (order 5 allocation).

Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240325150509.9195643699e4.I1b94b17abc809491080d6312f31ce6b5decdd446@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:40:03 +01:00
Johannes Berg
96833fb3c7 wifi: iwlwifi: reconfigure TLC during HW restart
Since the HW restart flow with multi-link is very similar to
the initial association, we do need to reconfigure TLC there.
Remove the check that prevented that.

Fixes: d2d0468f60 ("wifi: iwlwifi: mvm: configure TLC on link activation")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.a00adcfe381a.Ic798beccbb7b7d852dc976d539205353588853b0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Johannes Berg
54cb0d049a wifi: iwlwifi: mvm: don't change BA sessions during restart
During restart, we haven't added BA sessions, so we also cannot
change them to switch between links when that happens in restart.
Short-circuit the appropriate function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.70ba08540db0.Ic604d384e660c755308a49a79d3f7e78bc27597c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Johannes Berg
2783ab506e wifi: iwlwifi: mvm: select STA mask only for active links
During reconfig, we might send keys, but those should be only
sent to already active link stations. Iterate only active ones
to fix that issue.

Fixes: aea99650f7 ("wifi: iwlwifi: mvm: set STA mask for keys in MLO")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.c6818d1c6033.I6357f05c55ef111002ddc169287eb356ca0c1b21@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Johannes Berg
b97b0c04f8 wifi: iwlwifi: mvm: set wider BW OFDMA ignore correctly
Clearly, I put this flag into the wrong place: devices using the
code in mac80211.c only do not support EHT, so this isn't even
relevant. Fix this by moving the code to the right function.

Fixes: 32a5690e9a ("wifi: iwlwifi: mvm: support wider-bandwidth OFDMA")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.0d5fb0e971e4.I3b67c5e0ddcbe6e58143ec0bc4e40dd6dba4f863@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Anjaneyulu
6b3e87cc0c wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD cmd v9
There is a requirement from OEMs to support new bits in DSM function 7,
which will indicate enablement of 5.9 GHz in Canada.
Add support for this by reading those bits from BIOS and sending it to the
FW. mask unii4 allow bitmap based on LARI_CONFIG_CHANGE_CMD version

Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Reviewed-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.5c31ccd73119.I0363992efc3607368648d34a7918b2534150a3ca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Ilan Peer
1031c8b4af wifi: iwlwifi: mvm: Declare HE/EHT capabilities support for P2P interfaces
Declare HE/EHT capabilities support also for P2P client and P2P GO
interface types.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.37fdea8e55a3.If074bdc6c6cd55b76c3421417a987d21ab6bb041@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Miri Korenblit
bf14d2533b wifi: iwlwifi: mvm: Remove outdated comment
This comment was added when iwl_mvm_alloc_sta_after_restart configured
the FW with an internal station, but then it was changed by
164a52d45e ("wifi: iwlwifi: mvm: send full STA during HW restart")
to configure the full sta, So there is no reason to "wait for mac80211 to
add the STA" as this is exacly where it happens.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://msgid.link/20240320232419.d656c2385b06.Icccd0640eb9f1ad72ff74792086435dfc0bee6eb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:55 +01:00
Emmanuel Grumbach
73c184e1fe wifi: iwlwifi: add support for BZ_W
BZ_W is another member of the BZ family.
Just like BZ_U, we also need to override the STEP.
While at it, add a few missing CNVi Chip ID values.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.40c315d51b22.I6b2b2083f8d5b4ec4119aa5b51c21b8428d96060@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Daniel Amosi
6795a37161 wifi: iwlwifi: Print a specific device name.
For FM and GL, the name printed on the logs was "TBD".
Change that to print the accurate name.

Signed-off-by: Daniel Amosi <amosi.daniel@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.6fc9ad1396ca.I207626ce5e2ada170a7c01dccf5226110d09f135@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Emmanuel Grumbach
21317d18d0 wifi: iwlwifi: remove wrong CRF_IDs
Those CRF_IDs never existed and were a mistake. Those values are
CNVI_IDs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.b7bea022622b.Ia6ffa981397dc11bd1acb7e190c275155857823d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Emmanuel Grumbach
f473a7fd6d wifi: iwlwifi: remove devices that never came out
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320232419.b3715c0d4bdd.I1337ed9c3edbec4ea9ff7e8a8b02410d5e69bf74@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Benjamin Berg
f2c2799e1f wifi: iwlwifi: mvm: mark EMLSR disabled in cleanup iterator
During HW restart only one link will be active initially and other links
are only activated again later on. With only a single link EMLSR cannot
be enabled and having it marked enabled confuses the internal state.

Mark EMLSR as disabled in the cleanup iterator, it can be reenabled
later one once this is possible.

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/20240320232419.71eb622d6ce3.Ic4d50695b9bb332190dc712473096083aa96074b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Benjamin Berg
9737da2f00 wifi: iwlwifi: mvm: fix active link counting during recovery
During recovery, the chanctx_conf in mac80211 is still non-NULL even
though the channel context has not yet been assigned again. In that
case, the real count is actually lower.

Switch to instead count the phy_ctx assignment and ensure that the
assignment is cleared at the start of recovery.

Fixes: 12bacfc2c0 ("wifi: iwlwifi: handle eSR transitions")
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/20240320232419.55f37339e7d1.I57006568a90ffb7a1232def1b2f3264dea711ba6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:54 +01:00
Benjamin Berg
8598826012 wifi: iwlwifi: mvm: assign link STA ID lookups during restart
When restarting the HW, mac80211 first adds the STA back with only one
link enabled. This means that iwl_mvm_alloc_sta_after_restart will not
see the other links and will not do the assignment.

As such, do the assignment when mac80211 is activating the link for the
station.

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/20240320232419.4a3273e5c6be.I7cb6cf096ab135f4b489f2806b116563624aa5ee@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:53 +01:00
Johannes Berg
a0b9ecffc3 wifi: mac80211: reactivate multi-link later in restart
In case of restart, we currently reactivate multi-link on
interfaces before reconfiguring keys etc. which means the
drivers need to handle this case differently. Enable more
links later to allow them to handle it the same way.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320091155.d0f18a56335d.Ib3338d93872a4a568f38db0d02546534d3eff810@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:29 +01:00
Johannes Berg
6e02ba7c9e wifi: mac80211: improve drop for action frame return
If we use a drop we not only save the extra call to
dev_kfree_skb(), but also have a better reason in
tracing, so do that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240320091155.34daf0a89eb4.I60e0639511f9de64e40e6105b640adf90f8f57f7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-03-25 15:39:28 +01:00
Johannes Berg
2f51c87a15 wifi: mac80211: don't ask driver about no-op link changes
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-25 15:39:28 +01:00
Ayala Beker
80b0aacd1a wifi: mac80211: don't select link ID if not provided in scan request
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: cbde0b49f2 ("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-25 15:39:28 +01:00
Ilan Peer
e69b6cbebd wifi: mac80211_hwsim: Declare HE/EHT capabilities support for P2P interfaces
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-25 15:39:28 +01:00
Johannes Berg
21e29016d5 wifi: mac80211: clarify IEEE80211_STATUS_SUBDATA_MASK
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-25 15:39:28 +01:00
Johannes Berg
3c9ff1a1e1 wifi: mac80211: don't enter idle during link switch
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-25 15:39:28 +01:00
Johannes Berg
62bdd97598 wifi: iwlwifi: mvm: allocate STA links only for active links
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: 57974a55d9 ("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-25 15:39:11 +01:00
Johannes Berg
84ace57c22 wifi: iwlwifi: enable monitor on passive/inactive channels
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-25 15:39:11 +01:00
Ilan Peer
1c78d39f4e wifi: iwlwifi: mvm: Do not warn on invalid link on scan complete
As it is possible that by the time the scan is completed the link was
already removed.

Fixes: 3a5a5cb067 ("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-25 15:39:11 +01:00
Johannes Berg
2b6fb6fb7b wifi: iwlwifi: remove 6 GHz NVM override
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-25 15:39:10 +01:00
Johannes Berg
eb561c2993 wifi: iwlwifi: mvm: don't support puncturing in 5 GHz
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-25 15:39:10 +01:00
Johannes Berg
6decbba7f4 wifi: iwlwifi: fw: add clarifying comments about iwl_fwrt_dump_data
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-25 15:39:10 +01:00
Benjamin Berg
a615323f7f wifi: iwlwifi: mvm: always apply 6 GHz probe limitations
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-25 15:39:10 +01:00
Emmanuel Grumbach
8f892e225f wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8
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-25 15:39:10 +01:00
Johannes Berg
8b251253a2 wifi: iwlwifi: add a kunit test for PCI table duplicates
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-25 15:39:10 +01:00
Avraham Stern
1758f979b2 wifi: iwlwifi: mvm: add debugfs for forcing unprotected ranging request
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-25 15:39:09 +01:00
Ilan Peer
414adede2d wifi: iwlwifi: mvm: Add debugfs entry for triggering internal MLO scan
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-25 15:39:09 +01:00
Ilan Peer
38b3998dfb wifi: iwlwifi: mvm: Introduce internal MLO passive scan
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-25 15:39:09 +01:00
Ayala Beker
a17a58ad2f wifi: mac80211: add support for tearing down negotiated TTLM
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-25 15:38:15 +01:00
Benjamin Berg
97f8df4db4 wifi: cfg80211: ignore non-TX BSSs in per-STA profile
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: 2481b5da9c ("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-25 15:38:15 +01:00
Benjamin Berg
c7378d7d8b wifi: cfg80211: check BSSID Index against MaxBSSID
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-25 15:38:14 +01:00
Benjamin Berg
0dfedd48ac wifi: mac80211: improve association error reporting slightly
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-25 15:38:14 +01:00
Johannes Berg
6943e00331 wifi: mac80211: add flag to disallow puncturing in 5 GHz
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-25 15:38:13 +01:00
Anjaneyulu
dc63b1d083 wifi: cfg80211: handle indoor AFC/LPI AP in probe response and beacon
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-25 15:38:13 +01:00
Anjaneyulu
56cc479188 wifi: mac80211: handle indoor AFC/LPI AP on assoc success
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-25 15:38:13 +01:00
Ayala Beker
ff30bf1e42 wifi: mac80211: fix BSS_CHANGED_MLD_TTLM description
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-25 15:38:13 +01:00
Johannes Berg
385972ded3 wifi: mac80211: clarify the dormant/suspended links docs
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-25 15:38:13 +01:00
Johannes Berg
e475355022 wifi: mac80211_hwsim: move skip_beacons to be per link
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-25 15:38:12 +01:00
Johannes Berg
c121514df0 wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()
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: 7b6f08771b ("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-25 15:38:12 +01:00
Johannes Berg
b7793a1a2f wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
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-25 15:38:12 +01:00
Aditya Kumar Singh
e959521760 wifi: mac80211_hwsim: set link ID information during Rx
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-25 15:37:48 +01:00
Jeff Johnson
b8cf4f4d70 wifi: nl80211: cleanup nl80211.h kernel-doc
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-25 15:36:56 +01:00
Jeff Johnson
ec3a97d93b wifi: nl80211: fix nl80211 uapi comment style issues
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-25 15:36:55 +01:00