Emmanuel Grumbach
cac9544cec
wifi: iwlwifi: mvm: replace CONFIG_PM by CONFIG_PM_SLEEP
...
Replace the ifdef CONFIG_PM by CONFIG_PM_SLEEP. CONFIG_PM was useful
when we had CONFIG_PM_RUNTIME but that was removed long ago.
Use PM_SLEEP consistently across the driver.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.44e47ba584de.I64f985d0405345252b76b7157291b79677abd64d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-06 12:56:03 +02:00
Jakub Kicinski
43b7724487
Merge tag 'wireless-next-2024-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
...
Kalle Valo says:
====================
pull-request: wireless-next-2024-09-04
here's a pull request to net-next tree, more info below. Please let me know if
there are any problems.
====================
Conflicts:
drivers/net/wireless/ath/ath12k/hw.c
38055789d1 ("wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850")
8be12629b4 ("wifi: ath12k: restore ASPM for supported hardwares only")
https://lore.kernel.org/87msldyj97.fsf@kernel.org
Link: https://patch.msgid.link/20240904153205.64C11C4CEC2@smtp.kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
2024-09-04 17:20:14 -07:00
Miri Korenblit
a032b5fc24
wifi: iwlwifi: mvm: properly set the rates in link cmd
...
When a channel ctx is assigned to a link, we set the
LINK_CONTEXT_MODIFY_RATES_INFO to indicate that the rate fields are now
valid. But then we always take the rates of 2.4 GHz regardless of actual
used band.
This is because we are getting the band from bss_conf->chanctx_conf, but
this is assigned only after drv_assign_vif_chanctx returns, so we take
the bands of 2.4 GHz.
Fix it by taking the band from the iwl_mvm_link_info::phy_ctxt instead,
as this has already assigned in this point.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.11c2d3609609.I8fa59e29b6bb38e5d06f3536d54dfb2c5d5bab11@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:27 +02:00
Daniel Gabay
36dc21bce9
wifi: iwlwifi: mvm: Remove unused last_sub_index from reorder buffer
...
The last_sub_index field is not used and appears to be a leftover
from a previous implementation, remove it.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240901071542.da75cfef9144.I6e1fb635b2893618e6bd28501fb858042d8aa44e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:27 +02:00
Miri Korenblit
5b0c478378
wifi: iwlwifi: mvm: remove mvm prefix from iwl_mvm_tx_resp*
...
These are not mvm specific
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.22e28b56da2c.Ib859a05ed133fa5a1426c5feffa8999a18bba6f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:27 +02:00
Miri Korenblit
530addf2d2
wifi: iwlwifi: s/iwl_mvm_remove_sta_cmd/iwl_remove_sta_cmd
...
This is not mvm specific.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.57efe93c2702.I4619885f691cc295cc440a62f23405392da338f4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:27 +02:00
Miri Korenblit
07aeccf161
wifi: iwlwifi: STA command structure shouldn't be mvm specific
...
This strcuture is not specific to mvm, so rename it.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.39c9ceea41d3.I2a06bfca589c467fa84ad82ff86e73ec82e72a5e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:26 +02:00
Miri Korenblit
b61ed2b809
wifi: iwlwifi: s/IWL_MVM_STATION_COUNT_MAX/IWL_STATION_COUNT_MAX
...
This isn't mvm specific.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240901071542.5d71a0a2b56c.I7e0fe636d914852963e7a2f5e6037d0c3e367145@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:26 +02:00
Emmanuel Grumbach
07fb53783b
wifi: iwlwifi: mvm: tell the firmware about CSA with mode=1
...
When we de-activate a link because it started a CSA with mode=1, we want
to tell the firmware it can no longer transmit any frame for that link.
The firmware will do that on its own if the CSA indication (beacon /
action frame) was received on that same link, but with MLO, things got
more complex and the firmware can't track cross link CSA.
Tell the firmware if we de-activate a link because of CSA with mode=1 to
prevent it from transmitting, even if it is only an NDP PM=1 frame that
is part of the de-activation flow.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240901071542.4bef89d438d4.If7147a7a84054e67c05414c753d73f4e2e0e6e37@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:26 +02:00
Johannes Berg
1a7d2870f4
wifi: iwlwifi: mvm: refactor scan channel description a bit
...
The channel number is at the same position across all versions
of the channel description struct, so move it out of the union
that versions it. Also add __packed annotations to all of the
sub-structs and the union so it's packed correctly, and fully
document the structure.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Reviewed-by: Ilan Peer <ilan.peer@intel.com >
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240901071542.e31623ae4201.I1ea69a8ec3d39492f39d84e31fb105b159359c28@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-09-03 11:55:26 +02:00
Emmanuel Grumbach
76364f3edf
wifi: iwlwifi: mvm: allow ESR when we the ROC expires
...
We forgot to release the ROC reason for ESR prevention when the remain
on channel expires.
Add this.
Fixes: a1efeb8230 ("wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is active")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.8f8765f359cc.I16fcd6198072d422ff36dce68070aafaf011f4c1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:56 +02:00
Miri Korenblit
557a6cd847
wifi: iwlwifi: mvm: avoid NULL pointer dereference
...
iwl_mvm_tx_skb_sta() and iwl_mvm_tx_mpdu() verify that the mvmvsta
pointer is not NULL.
It retrieves this pointer using iwl_mvm_sta_from_mac80211, which is
dereferencing the ieee80211_sta pointer.
If sta is NULL, iwl_mvm_sta_from_mac80211 will dereference a NULL
pointer.
Fix this by checking the sta pointer before retrieving the mvmsta
from it. If sta is not NULL, then mvmsta isn't either.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20240825191257.880921ce23b7.I340052d70ab6d3410724ce955eb00da10e08188f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Anjaneyulu
ff5aabe7c2
wifi: iwlwifi: allow only CN mcc from WRDD
...
Block other mcc expect CN from WRDD ACPI.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.fe6ea7aa4b39.I86004687a2963fe26f990770aca103e2f5cb1628@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Johannes Berg
1c7e1068a7
wifi: iwlwifi: mvm: drop wrong STA selection in TX
...
This shouldn't happen at all, since in station mode all MMPDUs
go through the TXQ for the STA, and not this function. There
may or may not be a race in mac80211 through which this might
happen for some frames while a station is being added, but in
that case we can also just drop the frame and pretend the STA
didn't exist yet.
Also, the code is simply wrong since it uses deflink, and it's
not easy to fix it since the mvmvif->ap_sta pointer cannot be
used without the mutex, and perhaps the right link might not
even be known.
Just drop the frame at that point instead of trying to fix it
up.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.45ad105dc7fe.I6d45c82e5758395d9afb8854057ded03c7dc81d7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Miri Korenblit
fa21770fe4
wifi: iwlwifi: bump FW API to 93 for BZ/SC devices
...
Start supporting API version 93 for new devices.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20240808232017.5c9846f4c2c3.I6c825bc93aa23db302f24db5617f9b9b06042ec8@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Miri Korenblit
7dd22dad8d
wifi: iwlwifi: mvm: cleanup iwl_mvm_get_wd_timeout
...
This used to extract the timeout from the debug TLV
(FW_DBG_TRIGGER_TXQ_TIMERS), which is not in use.
Cleanup iwl_mvm_get_wd_timeout to not consider the debug TLV.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240808232017.7a6944bc2e38.I532b4b5487c6be9203ff4db9742d7cc5b148d502@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Miri Korenblit
7921c41149
wifi: iwlwifi: use default command queue watchdog timeout
...
We used to have the opmode configuring it to the trans according to the
debug tlv value (FW_DBG_TRIGGER_TXQ_TIMERS).
But this debug is not used, so trans can just have the default value
hardcoded.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.87af3f063025.I2222981ead13f6a917f2d4b116c5b94200dc9e51@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:55 +02:00
Emmanuel Grumbach
a08cf01905
wifi: iwlwifi: mvm: handle the new EML OMN failure notification
...
Take the proper action upon EML OMN frame failure.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825090005.01ff45fa69db.I9f2d3ea851050f6031ac07bbe69eb38000fd5683@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Ilan Peer
1987bf29f8
wifi: iwlwifi: mvm: Stop processing MCC update if there was no change
...
When processing a MCC update notification from the firmware, if
the firmware indicates that the regulatory configuration didn't
change, abort the flow and do not notify higher layers.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.60dd273d00e0.I985b3bc61ca4a6cac7c1d1365b5c0afba04f3031@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Emmanuel Grumbach
4d8ff1f7df
wifi: iwlwifi: mvm: add API for EML OMN frame failure
...
When the firmware fails to send EML OMN frames, it notifies the host and
the host need to take proper action.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.0c6bc216ef8c.Ida85d2062734a569e1af35f47d14cc5bb4bf893e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Emmanuel Grumbach
cdade20821
wifi: iwlwifi: mvm: exit EMLSR if both links are missing beacons
...
If both links are missing 5 beacons, we need to exit EMLSR, if only one
link misses beacons, we need to wait until 11 beacons are missed.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.b7785943a4fe.I70a459c5e7db85f398d5795ba83bb15f65d6bf9d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Emmanuel Grumbach
313e32f60d
wifi: iwlwifi: mvm: handle the new missed beacons notification
...
Use the same handler for both types and just convert the old version to
the new. Drop the unused fields from the old one and fake the new
fields.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.a64ffc998569.I7d181052b1a69c331d07263f20c1e00cbc0bc891@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Emmanuel Grumbach
ec6ba5367e
wifi: iwlwifi: mvm: add the new API for the missed beacons notification
...
Note that the new API does not have the same notification ID as the
previous notification: the new notification belongs to the group 0x3.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.4ea52360b32e.Ibc25dcabd8aeadda906549482a6c77bc42fb55bb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Emmanuel Grumbach
658b8b56c1
wifi: iwlwifi: mvm: rename iwl_missed_beacons_notif
...
A new version is coming up. Rename the current struct to include the
current version.
s/iwl_missed_beacons_notif/iwl_missed_beacons_notif_v4
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.b5c3a83a05ef.I698611582b5ca8395f42a535c51f7230307e2c6f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Daniel Gabay
b2a7c91bf9
wifi: iwlwifi: mvm: Offload RLC/SMPS functionality to firmware
...
Currently, the driver handles SMPS decisions by tracking AP
capabilities, BT coexistence changes, sending necessary SMPS
frames to the AP, and updating firmware with RX chain info
using the RLC_CONFIG_CMD.
Starting with version 3 of the RLC_CONFIG_CMD, the firmware
takes over this responsibility. It now tracks SMPS, sends
frames, and configures the RLC.
In this patch:
1. Stop sending RLC_CONFIG_CMD when firmware supports RLC
offload (version 3), as rlc.rx_chain_info is not needed by
firmware, and no other field in the cmd is used.
2. Prevent the driver from forwarding any SMPS requests to
mac80211, i.e., the driver should not transmit SMPS frames
to the AP as firmware handles that.
3. Set NL80211_FEATURE_DYNAMIC_SMPS and NL80211_FEATURE_STATIC_SMPS
conditionally based on RLC version.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240808232017.45da23be1f65.I0d46db82dd990a82e8a66876fe2f5310bc9513be@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:54 +02:00
Christophe JAILLET
3a3d1afd25
wifi: lib80211: Handle const struct lib80211_crypto_ops in lib80211
...
lib80211_register_crypto_ops() and lib80211_unregister_crypto_ops() don't
modify their "struct lib80211_crypto_ops *ops" argument. So, it can be
declared as const.
Doing so, some adjustments are needed to also constify some date in
"struct lib80211_crypt_data", "struct lib80211_crypto_alg" and the
return value of lib80211_get_crypto_ops().
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Reviewed-by: Simon Horman <horms@kernel.org >
Link: https://patch.msgid.link/c74085e02f33a11327582b19c9f51c3236e85ae2.1722839425.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:28:49 +02:00
Miri Korenblit
36a95e9c51
wifi: iwlwifi: mvm: add and improve EMLSR debug info
...
Add prints of the per-link MPDU counters, and change the other MPDU
counters related prints to use DL_INFO, which is already used for all
EMLSR tests anyway, instead of DL_STATS which pollutes the logs with all
the RX signal info.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Daniel Gabay <daniel.gabay@intel.com >
Link: https://patch.msgid.link/20240729201718.02bd85837c87.I85480c9c4fab0f7a574dd69cbeafd82674146921@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:15 +02:00
Somashekhar(Som)
b312e35720
wifi: iwlwifi: Enable channel puncturing for US/CAN from bios
...
Add support for enabling channel puncturing for US/CAN based
on BIOS configuration through UEFI
Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.828f3ecf5118.I5561ab8c7cd48ad4e5d6daf21b037bf88c619a4a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:15 +02:00
Emmanuel Grumbach
db9979d5aa
wifi: iwlwifi: mvm: add firmware debug points for EMLSR entry / exit
...
This will help to dump the firmware logs at the right spot if needed.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.3a91e89e32f8.Ieb28d7756c47dee52c912a71abe82fa0b08b19da@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Emmanuel Grumbach
2b7ee1a10a
wifi: iwlwiif: mvm: handle the new BT notif
...
Iterate all the links and check if any action must be taken.
The new notification impacts only the esr decision.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.00cfc07879c6.I8491483fda3b5888ea6ffa10fbd17807e443f943@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Emmanuel Grumbach
b85b397a9e
wifi: iwlwifi: mvm: start to support the new BT profile notification
...
We have a new notification the BT profile. It contains almost nothing,
only the wifi loss information. Copy this into mvm. We still need to
iterate over the vifs / links to use this data.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.637499f3a85a.I8bf654cf5d8aa038100273876c936845ecc338f7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Emmanuel Grumbach
1c9c5aebb5
wifi: iwlwifi: mvm: s/iwl_bt_coex_profile_notif/iwl_bt_coex_prof_old_notif
...
The iwl_bt_coex_profile_notif is now being obsoleted. It'll be replaced
by a new notification coming with a non-legacy group. Rename it to avoid
confusion.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.dc29fd0d7817.I5881fce86ec8b76ae98d2948265434b8e7d860c1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Avraham Stern
3a7ee94559
wifi: iwlwifi: mvm: increase the time between ranging measurements
...
The algo running in fw may take a little longer than 5 milliseconds,
(e.g. measurement on 80MHz while associated). Increase the minimum
time between measurements to 7 milliseconds.
Fixes: 830aa3e7d1 ("iwlwifi: mvm: add support for range request command version 13")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.d3f3c26e00d9.I09e951290e8a3d73f147b88166fd9a678d1d69ed@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Avraham Stern
a949075d4b
wifi: iwlwifi: mvm: set the cipher for secured NDP ranging
...
The cipher pointer is not set, but is derefereced trying to set its
content, which leads to a NULL pointer dereference.
Fix it by pointing to the cipher parameter before dereferencing.
Fixes: 626be4bf99 ("wifi: iwlwifi: mvm: modify iwl_mvm_ftm_set_secured_ranging() parameters")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.24e83369f136.I80501ddcb82920561f450d00020d860e7a3f90c6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:14 +02:00
Ilan Peer
87c1c28a9a
wifi: iwlwifi: mvm: Fix a race in scan abort flow
...
When the upper layer requests to cancel an ongoing scan, a race
is possible in which by the time the driver starts to handle the
upper layers scan cancel flow, the FW already completed handling
the scan request and the driver received the scan complete
notification but still did not handle the notification. In such a
case the FW will simply ignore the scan abort request coming from
the driver, no notification would arrive from the FW and the entire
abort flow would be considered a failure.
To better handle this, check the status code returned by the FW for
the scan abort command. In case the status indicates that
no scan was aborted, complete the scan abort flow with success, i.e.,
the scan was aborted, as the flow is expected to consume the scan
complete notification.
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825085558.483989d3baef.I3340556a222388504c6330b333360bf77d10f9e2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:15:05 +02:00
Emmanuel Grumbach
6d1b52cc9a
wifi: iwlwifi: mvm: set ul_mu_data_disable when needed
...
The firmware needs to know what we had in the HE CAP, propagate that
setting to the firmware through the LINK command.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.fef270d2995b.I328237837df30e1cb98764987eaaf8e8993e058c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:27 +02:00
Avraham Stern
27c8f12e97
wifi: iwlwifi: mei: add support for SAP version 4
...
SAP version 4 uses larger Host to MEI notification queue.
Since it is unknown which SAP version is used by the CSME firmware
when the driver loads, try version 4 first. In case the CSME firmware
uses version 3, the memory allocation will fail. In this case the
driver will try again to allocate the memory for version 3.
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.8372e040282f.Ia0085784e08a35159c9293f986c3d2774038f4c4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:27 +02:00
Johannes Berg
8131dd5281
wifi: iwlwifi: config: label 'gl' devices as discrete
...
The 'gl' devices are in the bz family, but they're not,
integrated, so should have their own trans config struct.
Fix that, also necessitating the removal of LTR config,
and while at it remove 0x2727 and 0x272D IDs that were
only used for test chips.
Fixes: c30a2a6478 ("wifi: iwlwifi: add a new PCI device ID for BZ device")ticket=none
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.95aed0620080.Ib9129512c95aa57acc9876bdff8b99dd41e1562c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:27 +02:00
Johannes Berg
70d400ba7f
wifi: iwlwifi: pcie: print function scratch before writing
...
We may want to know the value of this register for certain
debug scenarios before we overwrite it, it indicates which
parts of the chip have recently been reset.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.737e5f8bb8df.Ia3f3637ac4a0fb4b35ffd652f92eb75de652ee12@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Johannes Berg
4f1591d292
wifi: iwlwifi: mvm: use correct key iteration
...
In the cases changed here, key iteration isn't done from
an RCU critical section, but rather using the wiphy lock
as protection. Therefore, just use ieee80211_iter_keys().
The link switch case can therefore also use sync commands.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.69a2d18580c1.I2148e04d4b467d0b100beac8f7e449bfaaf775a5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Miri Korenblit
cb2b6ce8b2
wifi: iwlwifi: remove MVM prefix from FW macros
...
These are not mvm specific.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20240729201718.939b32f84f46.I293957bf172680871eba24448d9d1870e49100b6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Emmanuel Grumbach
535f01905a
wifi: iwlwifi: mvm: add support for new REDUCE_TXPOWER_CMD versions
...
New API versions are coming up for this command.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.7ec1527be98c.I52dede6532bc61041c441caee5273734f14a1d78@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Emmanuel Grumbach
cfc13542aa
wifi: iwlwifi: mvm: prepare the introduction of V9 of REDUCED_TX_POWER
...
* Rename iwl_dev_tx_power_cmd to iwl_dev_tx_power_cmd_v3_v8
* struct iwl_dev_tx_power_common needs to be packed. It was always the
case, but now that its size is not a multiple of 4, it becomes
meaningful.
* Move per_band data out of the common structure since it won't be
present in the new versions of the command.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240729201718.8da29a66984f.I922bdef4740d990f98cb452e858c4157bbc491c5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 10:14:26 +02:00
Emmanuel Grumbach
094513f8a2
wifi: iwlwifi: clear trans->state earlier upon error
...
When the firmware crashes, we first told the op_mode and only then,
changed the transport's state. This is a problem if the op_mode's
nic_error() handler needs to send a host command: it'll see that the
transport's state still reflects that the firmware is alive.
Today, this has no consequences since we set the STATUS_FW_ERROR bit and
that will prevent sending host commands. iwl_fw_dbg_stop_restart_recording
looks at this bit to know not to send a host command for example.
To fix the hibernation, we needed to reset the firmware without having
an error and checking STATUS_FW_ERROR to see whether the firmware is
alive will no longer hold, so this change is necessary as well.
Change the flow a bit.
Change trans->state before calling the op_mode's nic_error() method and
check trans->state instead of STATUS_FW_ERROR. This will keep the
current behavior of iwl_fw_dbg_stop_restart_recording upon firmware
error, and it'll allow us to call iwl_fw_dbg_stop_restart_recording
safely even if STATUS_FW_ERROR is clear, but yet, the firmware is not
alive.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.9d7427fbdfd7.Ia056ca57029a382c921d6f7b6a6b28fc480f2f22@changeid
[I missed this was a dependency for the hibernation fix, changed
the commit message a bit accordingly]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-27 09:54:24 +02:00
Emmanuel Grumbach
3a84454f52
wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
...
There is a WARNING in iwl_trans_wait_tx_queues_empty() (that was
recently converted from just a message), that can be hit if we
wait for TX queues to become empty after firmware died. Clearly,
we can't expect anything from the firmware after it's declared dead.
Don't call iwl_trans_wait_tx_queues_empty() in this case. While it could
be a good idea to stop the flow earlier, the flush functions do some
maintenance work that is not related to the firmware, so keep that part
of the code running even when the firmware is not running.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.a7cbd794cee9.I44a739fbd4ffcc46b83844dd1c7b2eb0c7b270f6@changeid
[edit commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:42:38 +02:00
Avraham Stern
454f6306a3
wifi: iwlwifi: mvm: allow 6 GHz channels in MLO scan
...
MLO internal scan may include 6 GHz channels. Since the 6 GHz scan
indication is not set, the channel flags are set incorrectly, which
leads to a firmware assert.
Since the MLO scan may include 6 GHz and non 6 GHz channels in one
request, add support for non-PSC 6 GHz channels (PSC channels are
already supported) when the 6 GHz indication is not set.
Fixes: 38b3998dfb ("wifi: iwlwifi: mvm: Introduce internal MLO passive scan")
Signed-off-by: Avraham Stern <avraham.stern@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.04807f8213b2.Idd09d4366df92a74853649c1a520b7f0f752d1ac@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:41:45 +02:00
Emmanuel Grumbach
0668ebc8c2
wifi: iwlwifi: mvm: pause TCM when the firmware is stopped
...
Not doing so will make us send a host command to the transport while the
firmware is not alive, which will trigger a WARNING.
bad state = 0
WARNING: CPU: 2 PID: 17434 at drivers/net/wireless/intel/iwlwifi/iwl-trans.c:115 iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi]
RIP: 0010:iwl_trans_send_cmd+0x1cb/0x1e0 [iwlwifi]
Call Trace:
<TASK>
iwl_mvm_send_cmd+0x40/0xc0 [iwlmvm]
iwl_mvm_config_scan+0x198/0x260 [iwlmvm]
iwl_mvm_recalc_tcm+0x730/0x11d0 [iwlmvm]
iwl_mvm_tcm_work+0x1d/0x30 [iwlmvm]
process_one_work+0x29e/0x640
worker_thread+0x2df/0x690
? rescuer_thread+0x540/0x540
kthread+0x192/0x1e0
? set_kthread_struct+0x90/0x90
ret_from_fork+0x22/0x30
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.5abe71ca1b6b.I97a968cb8be1f24f94652d9b110ecbf6af73f89e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:41:23 +02:00
Anjaneyulu
3ee22f07a3
wifi: iwlwifi: fw: fix wgds rev 3 exact size
...
Check size of WGDS revision 3 is equal to 8 entries size with some header,
but doesn't depend on the number of used entries. Check that used entries
are between min and max but allow more to be present than are used to fix
operation with some BIOSes that have such data.
Fixes: 97f8a3d161 ("iwlwifi: ACPI: support revision 3 WGDS tables")
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.cc71dfc67ec3.Ic27ee15ac6128b275c210b6de88f2145bd83ca7b@changeid
[edit commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:39:57 +02:00
Emmanuel Grumbach
cd6f46c2fd
wifi: iwlwifi: mvm: take the mutex before running link selection
...
iwl_mvm_select_links is called by the link selection worker and it
requires the mutex.
Take it in the link selection worker.
This logic used to run from iwl_mvm_rx_umac_scan_complete_notif which
had the mvm->mutex held. This was changed to run in a worker holding the
wiphy mutex, but we also need the mvm->mutex.
Fixes: 2e194efa38 ("wifi: iwlwifi: mvm: Fix race in scan completion")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Reviewed-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.0cacecd5db1e.Iaca38a078592b69bdd06549daf63408ccf1810e4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:39:17 +02:00
Daniel Gabay
916a5d9c53
wifi: iwlwifi: mvm: fix iwl_mvm_max_scan_ie_fw_cmd_room()
...
Driver creates also the WFA TPC element, consider that in the
calculation.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Reviewed-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20240825191257.e710ce446b7f.I2715c6742e9c3d160e2ba41bc4b35de370d2ce34@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-08-26 17:38:59 +02:00