Kalle Valo [Tue, 2 Apr 2024 18:19:58 +0000 (21:19 +0300)]
Merge tag 'ath-next-
20240402' of git://git./linux/kernel/git/kvalo/ath
ath.git patches for v6.10
ath drivers now have no remaining sparse warnings, otherwise smaller
fixes and some refactoring.
ath11k
* P2P support for QCA6390, WCN6855 and QCA2066
Kalle Valo [Mon, 25 Mar 2024 15:58:38 +0000 (17:58 +0200)]
wifi: mt76: mt7915: workaround dubious x | !y warning
Sparse warns:
drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:526:9: warning: dubious: x | !y
Workaround it by using the '?' operator. Compile tested only.
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240325155838.1558680-1-kvalo@kernel.org
Gustavo A. R. Silva [Mon, 25 Mar 2024 03:12:05 +0000 (21:12 -0600)]
wifi: mwl8k: Avoid -Wflex-array-member-not-at-end warnings
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
There is currently an object (`header`), at the beginning of multiple
structures, that contains a flexible structure (`struct mwl8k_cmd_pkt`),
for example:
struct mwl8k_cmd_get_hw_spec_sta {
struct mwl8k_cmd_pkt header;
...
__le32 num_tx_desc_per_queue;
__le32 total_rxd;
} __packed;
So, in order to avoid ending up with flexible-array members in the
middle of multiple other structs, we use the `__struct_group()` helper
to separate the flexible array from the rest of the members in the
flexible structure:
struct mwl8k_cmd_pkt {
__struct_group(mwl8k_cmd_pkt_hdr, hdr, __packed,
... the rest of the members
);
char payload[];
} __packed;
With the change described above, we now declare objects of the type of
the tagged struct, in this case `struct mwl8k_cmd_pkt_hdr`, without
embedding flexible arrays in the middle of another struct:
struct mwl8k_cmd_get_hw_spec_sta {
struct mwl8k_cmd_pkt_hdr header;
...
__le32 num_tx_desc_per_queue;
__le32 total_rxd;
} __packed;
Also, update the type of a couple of variables and function parameters
from `struct mwl8k_cmd_pkt` to `struct mwl8k_cmd_pkt_hdr`.
So, with these changes, fix 33 of the following warnings[1]:
drivers/net/wireless/marvell/mwl8k.c:2353:30: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Link: https://gist.github.com/GustavoARSilva/7a841a92c0f24e5efdb30ce02b601eb8
Link: https://github.com/KSPP/linux/issues/202
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/ZgDrhe5pbV/WvDiZ@neat
Gustavo A. R. Silva [Mon, 25 Mar 2024 02:09:04 +0000 (20:09 -0600)]
wifi: ti: Avoid a hundred -Wflex-array-member-not-at-end warnings
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
Remove unused flexible-array members in multiple structures, and fix
a hundred -Wflex-array-member-not-at-end warnings[1] in
drivers/wireless/ti/
Link: https://gist.github.com/GustavoARSilva/fbf63c114d01319bbd19baf95b4d704b
Link: https://github.com/KSPP/linux/issues/202
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/ZgDcwIgxkhs6ZVdY@neat
Johannes Berg [Mon, 25 Mar 2024 17:08:51 +0000 (18:08 +0100)]
wifi: iwlwifi: mvm: fix check in iwl_mvm_sta_fw_id_mask
In the previous commit, I renamed the variable to differentiate
mac80211/mvm link STA, but forgot to adjust the check. The one
from mac80211 is already non-NULL anyway, but the mvm one can
be NULL when the mac80211 isn't during link switch conditions.
Fix the check.
Fixes: 2783ab506eaa ("wifi: iwlwifi: mvm: select STA mask only for active links")
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240325180850.e95b442bafe9.I8c0119fce7b00cb4f65782930d2c167ed5dd0a6e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Uwe Kleine-König [Wed, 6 Mar 2024 18:35:38 +0000 (19:35 +0100)]
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>
Johannes Berg [Mon, 25 Mar 2024 14:05:03 +0000 (15:05 +0100)]
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>
Johannes Berg [Wed, 20 Mar 2024 21:26:38 +0000 (23:26 +0200)]
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: d2d0468f60cd ("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>
Johannes Berg [Wed, 20 Mar 2024 21:26:37 +0000 (23:26 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 21:26:36 +0000 (23:26 +0200)]
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: aea99650f731 ("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>
Johannes Berg [Wed, 20 Mar 2024 21:26:35 +0000 (23:26 +0200)]
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: 32a5690e9acb ("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>
Anjaneyulu [Wed, 20 Mar 2024 21:26:34 +0000 (23:26 +0200)]
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>
Ilan Peer [Wed, 20 Mar 2024 21:26:33 +0000 (23:26 +0200)]
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>
Miri Korenblit [Wed, 20 Mar 2024 21:26:31 +0000 (23:26 +0200)]
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
164a52d45e4a ("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>
Emmanuel Grumbach [Wed, 20 Mar 2024 21:26:30 +0000 (23:26 +0200)]
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>
Daniel Amosi [Wed, 20 Mar 2024 21:26:29 +0000 (23:26 +0200)]
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>
Emmanuel Grumbach [Wed, 20 Mar 2024 21:26:28 +0000 (23:26 +0200)]
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>
Emmanuel Grumbach [Wed, 20 Mar 2024 21:26:27 +0000 (23:26 +0200)]
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>
Benjamin Berg [Wed, 20 Mar 2024 21:26:26 +0000 (23:26 +0200)]
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>
Benjamin Berg [Wed, 20 Mar 2024 21:26:25 +0000 (23:26 +0200)]
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: 12bacfc2c065 ("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>
Benjamin Berg [Wed, 20 Mar 2024 21:26:24 +0000 (23:26 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 07:14:05 +0000 (09:14 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 07:14:04 +0000 (09:14 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 07:14:03 +0000 (09:14 +0200)]
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>
Ayala Beker [Wed, 20 Mar 2024 07:14:02 +0000 (09:14 +0200)]
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: 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>
Ilan Peer [Wed, 20 Mar 2024 07:14:01 +0000 (09:14 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 07:14:00 +0000 (09:14 +0200)]
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>
Johannes Berg [Wed, 20 Mar 2024 07:13:59 +0000 (09:13 +0200)]
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>
Johannes Berg [Tue, 19 Mar 2024 08:10:27 +0000 (10:10 +0200)]
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: 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>
Johannes Berg [Tue, 19 Mar 2024 08:10:26 +0000 (10:10 +0200)]
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>
Ilan Peer [Tue, 19 Mar 2024 08:10:25 +0000 (10:10 +0200)]
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: 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>
Johannes Berg [Tue, 19 Mar 2024 08:10:24 +0000 (10:10 +0200)]
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>
Johannes Berg [Tue, 19 Mar 2024 08:10:23 +0000 (10:10 +0200)]
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>
Johannes Berg [Tue, 19 Mar 2024 08:10:21 +0000 (10:10 +0200)]
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>
Benjamin Berg [Tue, 19 Mar 2024 08:10:19 +0000 (10:10 +0200)]
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>
Emmanuel Grumbach [Tue, 19 Mar 2024 08:10:18 +0000 (10:10 +0200)]
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>
Johannes Berg [Tue, 19 Mar 2024 08:10:16 +0000 (10:10 +0200)]
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>
Avraham Stern [Tue, 19 Mar 2024 08:10:15 +0000 (10:10 +0200)]
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>
Ilan Peer [Tue, 19 Mar 2024 08:10:14 +0000 (10:10 +0200)]
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>
Ilan Peer [Tue, 19 Mar 2024 08:10:13 +0000 (10:10 +0200)]
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>
Ayala Beker [Mon, 18 Mar 2024 16:53:31 +0000 (18:53 +0200)]
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>
Benjamin Berg [Mon, 18 Mar 2024 16:53:29 +0000 (18:53 +0200)]
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: 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>
Benjamin Berg [Mon, 18 Mar 2024 16:53:28 +0000 (18:53 +0200)]
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>
Benjamin Berg [Mon, 18 Mar 2024 16:53:27 +0000 (18:53 +0200)]
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>
Johannes Berg [Mon, 18 Mar 2024 16:53:25 +0000 (18:53 +0200)]
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>
Anjaneyulu [Mon, 18 Mar 2024 16:53:24 +0000 (18:53 +0200)]
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>
Anjaneyulu [Mon, 18 Mar 2024 16:53:23 +0000 (18:53 +0200)]
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>
Ayala Beker [Mon, 18 Mar 2024 16:53:21 +0000 (18:53 +0200)]
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>
Johannes Berg [Mon, 18 Mar 2024 16:53:20 +0000 (18:53 +0200)]
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>
Johannes Berg [Mon, 18 Mar 2024 16:53:19 +0000 (18:53 +0200)]
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>
Johannes Berg [Mon, 18 Mar 2024 16:53:18 +0000 (18:53 +0200)]
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: 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>
Johannes Berg [Mon, 18 Mar 2024 16:53:17 +0000 (18:53 +0200)]
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>
Aditya Kumar Singh [Wed, 13 Mar 2024 14:54:02 +0000 (20:24 +0530)]
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>
Jeff Johnson [Tue, 19 Mar 2024 18:26:25 +0000 (11:26 -0700)]
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>
Jeff Johnson [Tue, 19 Mar 2024 18:26:24 +0000 (11:26 -0700)]
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>
Jeff Johnson [Tue, 19 Mar 2024 18:26:23 +0000 (11:26 -0700)]
wifi: nl80211: rename enum plink_actions
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>
Johannes Berg [Tue, 12 Mar 2024 10:20:48 +0000 (11:20 +0100)]
wifi: mac80211: spectmgmt: simplify 6 GHz HE/EHT handling
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>
Kang Yang [Tue, 12 Mar 2024 04:59:46 +0000 (12:59 +0800)]
wifi: mac80211: supplement parsing of puncturing bitmap
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>
Johannes Berg [Mon, 11 Mar 2024 06:28:15 +0000 (08:28 +0200)]
wifi: iwlwifi: pcie: remove duplicate PCI IDs entry
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>
Ilan Peer [Mon, 11 Mar 2024 06:28:12 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: Refactor scan start
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>
Johannes Berg [Mon, 11 Mar 2024 06:28:11 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: advertise IEEE80211_HW_HANDLES_QUIET_CSA
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>
Johannes Berg [Mon, 11 Mar 2024 06:28:10 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: fix flushing during quiet CSA
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>
Shaul Triebitz [Mon, 11 Mar 2024 06:28:09 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: support wowlan notif version 4
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>
Shaul Triebitz [Mon, 11 Mar 2024 06:28:08 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: skip keys of other links
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>
Shaul Triebitz [Mon, 11 Mar 2024 06:28:07 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: stop assuming sta id 0 in d3
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>
Shaul Triebitz [Mon, 11 Mar 2024 06:28:06 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: fix the sta id in offload
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>
Ilan Peer [Mon, 11 Mar 2024 06:28:04 +0000 (08:28 +0200)]
wifi: iwlwifi: mvm: Move beacon filtering to be per link
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>
Shaul Triebitz [Mon, 11 Mar 2024 06:28:03 +0000 (08:28 +0200)]
wifi: iwlwifi: fix firmware API kernel doc
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>
Kalle Valo [Wed, 20 Mar 2024 17:06:56 +0000 (19:06 +0200)]
wifi: ath9k: eeprom: fix sparse endian warnings
Sparse warns:
drivers/net/wireless/ath/ath9k/eeprom_9287.c:82:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_9287.c:82:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_9287.c:83:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_9287.c:83:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_def.c:138:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:138:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_def.c:139:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:139:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_def.c:140:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:140:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_4k.c:79:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_4k.c:79:9: warning: cast from restricted __le32
antCtrlChain is an array of __le32 so le32_to_cpu() needs to be used.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://msgid.link/20240320170656.3534265-4-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 17:06:55 +0000 (19:06 +0200)]
wifi: ath9k: fix ath9k_use_msi declaration
Sparse warns:
drivers/net/wireless/ath/ath9k/init.c:79:5: warning: symbol 'ath9k_use_msi' was not declared. Should it be static?
Move the extern to ath9k.h so that it's visible in init.c.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://msgid.link/20240320170656.3534265-3-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 17:06:54 +0000 (19:06 +0200)]
wifi: ath9k: ath9k_set_moredata(): fix sparse warnings
Sparse warns:
drivers/net/wireless/ath/ath9k/xmit.c:1677:20: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ath/ath9k/xmit.c:1677:20: expected unsigned short [usertype] mask
drivers/net/wireless/ath/ath9k/xmit.c:1677:20: got restricted __le16 [usertype]
drivers/net/wireless/ath/ath9k/xmit.c:1681:17: warning: restricted __le16 degrades to integer
drivers/net/wireless/ath/ath9k/xmit.c:1682:42: warning: restricted __le16 degrades to integer
drivers/net/wireless/ath/ath9k/xmit.c:1682:36: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/xmit.c:1682:36: expected restricted __le16 [usertype] frame_control
drivers/net/wireless/ath/ath9k/xmit.c:1682:36: got int
Fix ath9k_set_moredata() to use __le16 with masks and use if statement instead
of multiply operator.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Link: https://msgid.link/20240320170656.3534265-2-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 18:24:49 +0000 (20:24 +0200)]
wifi: wil6210: fix sparse warnings
Sparse warns:
drivers/net/wireless/ath/wil6210/fw.c: note: in included file (through drivers/net/wireless/ath/wil6210/wil6210.h):
drivers/net/wireless/ath/wil6210/fw.h:96:47: warning: array of flexible structures
drivers/net/wireless/ath/wil6210/cfg80211.c: note: in included file (through drivers/net/wireless/ath/wil6210/wil6210.h):
drivers/net/wireless/ath/wil6210/fw.h:96:47: warning: array of flexible structures
I decided to remove the combos field altogether and just do pointer arithmetic
instead. Not pretty but I didn't want to waste too much time on an orphaned
driver.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-5-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 18:24:48 +0000 (20:24 +0200)]
wifi: wcn36xx: main: fix sparse warnings
Sparse warns:
drivers/net/wireless/ath/wcn36xx/main.c:758:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/wcn36xx/main.c:758:58: expected unsigned short [usertype] vht_rx_mcs_map
drivers/net/wireless/ath/wcn36xx/main.c:758:58: got restricted __le16 [usertype] rx_mcs_map
drivers/net/wireless/ath/wcn36xx/main.c:760:58: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/wcn36xx/main.c:760:58: expected unsigned short [usertype] vht_tx_mcs_map
drivers/net/wireless/ath/wcn36xx/main.c:760:58: got restricted __le16 [usertype] tx_mcs_map
le16_to_cpu() was just missing. Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-4-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 18:24:47 +0000 (20:24 +0200)]
wifi: wcn36xx: buff_to_be(): fix sparse warnings
Sparse warns:
drivers/net/wireless/ath/wcn36xx/txrx.c: note: in included file (through drivers/net/wireless/ath/wcn36xx/txrx.h):
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: expected unsigned int [usertype]
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: got restricted __be32 [usertype]
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: expected unsigned int [usertype]
drivers/net/wireless/ath/wcn36xx/wcn36xx.h:107:24: got restricted __be32 [usertype]
Use void pointers and two separate variables to workaround the warning. Also
now the callers don't need any casting. There's actually cpu_to_be32_array()
available but decided to do minimal changes instead.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-3-kvalo@kernel.org
Kalle Valo [Wed, 20 Mar 2024 18:24:46 +0000 (20:24 +0200)]
wifi: ath6kl: fix sparse warnings
Sparse warns:
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: got unsigned short [usertype]
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: got unsigned short [usertype]
Use put_unaligned_le16() so that the value is converted to little endian before
storing it to the header.
Compile tested only.
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-2-kvalo@kernel.org
Li Zhijian [Thu, 21 Mar 2024 11:42:47 +0000 (13:42 +0200)]
wifi: ath: Convert sprintf/snprintf to sysfs_emit
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: Jeff Johnson <jjohnson@kernel.org>
CC: linux-wireless@vger.kernel.org
CC: ath11k@lists.infradead.org
CC: ath10k@lists.infradead.org
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240315055211.1347548-1-lizhijian@fujitsu.com
Breno Leitao [Tue, 19 Mar 2024 17:26:19 +0000 (10:26 -0700)]
wifi: qtnfmac: allocate dummy net_device dynamically
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
Lorenzo Bianconi [Tue, 19 Mar 2024 15:12:47 +0000 (16:12 +0100)]
wifi: mt76: mt7915: workaround too long expansion sparse warnings
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
Li Zhijian [Fri, 15 Mar 2024 05:52:11 +0000 (13:52 +0800)]
wifi: ti: Convert sprintf/snprintf to sysfs_emit
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
Li Zhijian [Fri, 15 Mar 2024 05:52:10 +0000 (13:52 +0800)]
wifi: b43: Convert sprintf/snprintf to sysfs_emit
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
Kang Yang [Wed, 20 Mar 2024 13:37:57 +0000 (15:37 +0200)]
wifi: ath11k: remove duplicate definitions in wmi.h
There are some duplicate definitions in wmi.h, remove them.
No functional changes, compile tested only.
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240314021654.304451-1-quic_kangyang@quicinc.com
Baochen Qiang [Thu, 11 Jan 2024 07:14:06 +0000 (15:14 +0800)]
wifi: ath11k: do not process consecutive RDDM event
Currently we do reset for each RDDM event from MHI, however there are
cases, see below log, that we get two or more consecutive events, and
it is pointless to do reset for the subsequent ones. What's more, it
makes reset process more likely to fail.
[ 1502.115876] ath11k_pci 0000:04:00.0: boot notify status reason MHI_CB_EE_RDDM
[ 1502.115884] ath11k_pci 0000:04:00.0: firmware crashed: MHI_CB_EE_RDDM
[ 1502.224041] ath11k_pci 0000:04:00.0: boot notify status reason MHI_CB_EE_RDDM
[ 1502.224050] ath11k_pci 0000:04:00.0: firmware crashed: MHI_CB_EE_RDDM
Add a check to avoid reset again and again. This is done by tracking previous
MHI status: if we receive a new RDDM event while the previous one is
also the same, we treat it as duplicate and ignore it, because normally
we should receive a MHI_CB_EE_MISSION_MODE event between them.
Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240111071406.14053-1-quic_bqiang@quicinc.com
Karthikeyan Periyasamy [Wed, 20 Mar 2024 01:06:15 +0000 (06:36 +0530)]
wifi: ath12k: Refactor error handler of Rxdma replenish
The Rxdma replenish handler currently contains redundant code in both the
success and error cases. To avoid the redundant code, implement a
conditional jump mechanism by placing a goto statement to prevent
unnecessary execution of the error handling code when the operation is
successful. This change streamline the code readability and enhance its
efficiency.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320010615.91331-4-quic_periyasa@quicinc.com
Karthikeyan Periyasamy [Wed, 20 Mar 2024 01:06:14 +0000 (06:36 +0530)]
wifi: ath12k: Optimize the lock contention of used list in Rx data path
When a packet arrives in Rx rings, the RX descriptor moves from the used
list to the free list. Then, the rxdma ring gets replenished, where the Rx
descriptor again moves from the free list to the used list. At the end, the
descriptor came to the used list with unnecessary list movement. The
descriptor used list is maintained in the Rxdma ring structure, which
creates lock contention for the list operations (add, delete) in the Rx
data path. Optimize the Rx data path by removing the used list from the
common Rxdma ring and maintain as a local variable in the Rx ring handler
itself, which avoid lock contention. Now, to find the used list descriptor
during descriptor cleanup, we need to check the in_use flag for each Rx
descriptor.
This is a simple UDP UL throughput test case results on x86+NUC device
with QCN9274 card, which clearly shows 8% to 12% improvement in the CPU
idle for the same ingress traffic.
Before:
Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
Average: all 0.24 0.00 12.54 0.08 0.00 23.33 0.00 0.00 0.00 63.81
After:
Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
Average: all 0.34 0.00 4.60 0.00 0.00 19.59 0.00 0.00 0.00 75.47
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320010615.91331-3-quic_periyasa@quicinc.com
Karthikeyan Periyasamy [Wed, 20 Mar 2024 01:06:13 +0000 (06:36 +0530)]
wifi: ath12k: Refactor Rxdma buffer replinish argument
Currently, the Rxdma buffer replenish procedure implicitly retrieves the
number of free entries when the caller passes req_entries as zero. This is
helpful to replenishing the Rxdma ring when the caller is unaware of the
number of entries to replenish. After the Rxdma ring is initialized, we
can pass req_entries as zero to replenish all the free entry in the Rxdma
ring. This change helps to align the argument req_entries to the used list
entries for better code readability.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320010615.91331-2-quic_periyasa@quicinc.com
Aloka Dixit [Thu, 14 Mar 2024 20:46:51 +0000 (13:46 -0700)]
wifi: ath12k: use correct flag field for 320 MHz channels
Due to an error during rebasing the patchset 320 MHz channel support got
broken. ath12k was setting the QoS bit instead of the correct flag.
WMI_PEER_EXT_320MHZ (0x2) is defined as an extended flag, replace
peer_flags by peer_flags_ext while sending peer data.
This affected both QCN9274 and WCN7850 which use the same flag.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Fixes: 6734cf9b4cc7 ("wifi: ath12k: peer assoc for 320 MHz")
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240314204651.11075-1-quic_alokad@quicinc.com
Kang Yang [Thu, 14 Mar 2024 02:18:30 +0000 (10:18 +0800)]
wifi: ath12k: remove duplicate definitions in wmi.h
There are some duplicate definitions in wmi.h, remove them.
No functional changes, compile tested only.
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240314021830.305021-1-quic_kangyang@quicinc.com
Thiraviyam Mariyappan [Mon, 11 Mar 2024 18:07:08 +0000 (23:37 +0530)]
wifi: ath12k: fix desc address calculation in wbm tx completion
In tx completion, status desc is obtained from offsetting the address
from wbm ring. Having HTT_TX_WBM_COMP_STATUS_OFFSET(8) and reserved 8
bytes in status desc offsets the address twice and read the values
from the incorrect address. Hence, remove the
HTT_TX_WBM_COMP_STATUS_OFFSET from wbm completion address calculation.
Also this patch is applicable for WCN7850.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Thiraviyam Mariyappan <quic_tmariyap@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240311180708.9334-1-quic_tmariyap@quicinc.com
Víctor Gonzalo [Wed, 13 Mar 2024 18:31:56 +0000 (20:31 +0200)]
wifi: mwifiex: Add missing MODULE_FIRMWARE() for SD8801
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
Kang Yang [Wed, 28 Feb 2024 09:35:37 +0000 (17:35 +0800)]
wifi: ath11k: advertise P2P dev support for QCA6390/WCN6855/QCA2066
Now that all the necessary pieces are implemented we can enable P2P
support for QCA6390/WCN6855/QCA2066.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-7-quic_kangyang@quicinc.com
Kang Yang [Wed, 28 Feb 2024 09:35:36 +0000 (17:35 +0800)]
wifi: ath11k: change scan flag scan_f_filter_prb_req for QCA6390/WCN6855/QCA2066
Current ROC scan will filter probe request. So P2P device cannot receive
probe request. But it is necessary for P2P mode. A P2P device cannot be
discovered if it doesn't respond to others' probe request.
In addition, station won't filter probe request with common scan. But
for station, there is no needed to receive probe request.
Based on the above two points, change scan flag scan_f_filter_prb_req
for QCA6390/WCN6855/QCA2066.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-6-quic_kangyang@quicinc.com
Kang Yang [Wed, 28 Feb 2024 09:35:35 +0000 (17:35 +0800)]
wifi: ath11k: change WLAN_SCAN_PARAMS_MAX_IE_LEN from 256 to 512
Mac80211 needs more space for P2P scan ie in P2P mode, 256 is not
enough, resize it to 512.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-5-quic_kangyang@quicinc.com
Kang Yang [Wed, 28 Feb 2024 09:35:34 +0000 (17:35 +0800)]
wifi: ath11k: implement handling of P2P NoA event
The NoA(Notice of Absence) attribute is used by the P2P Group Owner to
signal its absence due to power save timing, concurrent operation, or
off-channel scanning. It is also used in the P2P Presence Request-Response
mechanism.
The NoA attribute shall be present in the P2P IE in the beacon frames
transmitted by a P2P Group Owner when a NoA schedule is being advertised,
or when the CTWindow is non-zero.
So add support to update P2P information after P2P GO is up through
event WMI_P2P_NOA_EVENTID, and always put it in probe resp.
Create p2p.c and p2p.h for P2P related functions and definitions.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-4-quic_kangyang@quicinc.com
Kang Yang [Wed, 28 Feb 2024 09:35:33 +0000 (17:35 +0800)]
wifi: ath11k: add P2P IE in beacon template
P2P Element is a necessary component of P2P protocol communication.
It contains the Vendor Specific Information Element which includes
the WFA OUI and an OUI Type indicating P2P.
Add P2P IE in beacon template, and implement WMI interface for it.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-3-quic_kangyang@quicinc.com
Kang Yang [Wed, 28 Feb 2024 09:35:32 +0000 (17:35 +0800)]
wifi: ath11k: change interface combination for P2P mode
Current interface combination doesn't support P2P mode.
So change it for P2P mode.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240228093537.25052-2-quic_kangyang@quicinc.com
Fiona Klute [Mon, 11 Mar 2024 10:37:13 +0000 (11:37 +0100)]
wifi: rtw88: SDIO device driver for RTL8723CS
This driver uses the new rtw8703b chip driver code.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For SDIO
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240311103735.615541-10-fiona.klute@gmx.de
Fiona Klute [Mon, 11 Mar 2024 10:37:12 +0000 (11:37 +0100)]
wifi: rtw88: Reset 8703b firmware before download
Sometimes 8703b firmware is still active from previous use when the
driver needs to download the firmware during MAC activation. Reset it
in that case.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240311103735.615541-9-fiona.klute@gmx.de
Fiona Klute [Mon, 11 Mar 2024 10:37:11 +0000 (11:37 +0100)]
wifi: rtw88: Add rtw8703b_tables.c
Initialization tables for rtw8703b: Initial register values and TX
power limits.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240311103735.615541-8-fiona.klute@gmx.de
Fiona Klute [Mon, 11 Mar 2024 10:37:10 +0000 (11:37 +0100)]
wifi: rtw88: Add rtw8703b_tables.h
Initialization table definitions for rtw8703b.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240311103735.615541-7-fiona.klute@gmx.de
Fiona Klute [Mon, 11 Mar 2024 10:37:09 +0000 (11:37 +0100)]
wifi: rtw88: Add rtw8703b.c
This is the main source for the new rtw88_8703b chip driver.
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240311103735.615541-6-fiona.klute@gmx.de