Benjamin Berg
83bb3633a2
wifi: iwlwifi: mvm: skip short statistics window when updating EMLSR
...
The statistics are not synchronized with the time that we enter EMLSR.
This means that we can receive the statistic notification just after
having cleared the counters, causing us to immediately exit EMLSR again.
Fix this by checking that most of the time for the window has passed. If
that is not the case, ignore this window and wait for the next
notification.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241227095718.0eb0f2044535.Ic2af92737ccfc873f3b6c228704238ebb9f983ca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:01:51 +01:00
Johannes Berg
193aa7eee2
wifi: iwlwifi: mvm: remove warning on unallocated BAID
...
Due to the firmware allocating the BAID, we can only install
the data structure after the BAID is valid from the firmware's
point of view. As a result, the firmware can start sending
frame release notifications to the driver immediately. This
isn't supposed to happen by protocol, since the peer STA is
not expected to use the blockack session until the AddBA has
a response. However, firmware doesn't know that, our RX path
can't know when it was, so simply don't WARN in this case but
only have a debug message.
Since the BAID comes from firmware, also use IWL_FW_CHECK()
instead of a warning for the validity check.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241227095718.4360f2b9e185.I447f9a5fc6dfdc78ec238200338e2da040ee7e61@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:01:51 +01:00
Johannes Berg
a3092c99b9
wifi: iwlwifi: differentiate NIC error types
...
Instead of differentiating only sync/async, differentiate
the type of error, and document that only reset handshake
timeout (IWL_ERR_TYPE_RESET_HS_TIMEOUT) needs sync handling.
The special sync handling is somewhat temporary, the idea
is to later split the nic_error() method into error dump,
synchronizing the dump, and SW reset methods, and the type
is mostly in order to unify command queue full handling
into that new architecture as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241227095718.aed9c9e4fac0.I2288042bec4728a75b61cb7f6ded5214bfa3ce85@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:01:51 +01:00
Daniel Gabay
7ceae9b73f
wifi: iwlwifi: mvm: Move TSO code to shared utility
...
Move TSO segment logic from mvm to the iwlwifi level, as this code is
not opmode-dependent and can be shared with the mld driver.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Link: https://patch.msgid.link/20250102163748.56efefb9566e.Ib7188572f18afb31840d193a348c17c9b292c7af@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:55 +01:00
Anjaneyulu
526cd9cd42
wifi: iwlwifi: mvm: add UHB canada support in GET_TAS_STATUS cmd resp
...
dump UHB canada is enabled or not based on firmware capability.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.dfd6b8893322.I196393dc3c9c28882f90b43a821a2d76a5c9a046@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:55 +01:00
Anjaneyulu
01c0e9c804
wifi: iwlwifi: mvm: add UHB canada support in TAS_CONFIG cmd
...
extend TAS table support to revision 2 for getting UHB canada
enablement from BIOS and send to firmware via TAS_CONFIG cmd
based on firmware capability. While on it fixed kernel-doc for
struct iwl_tas_config_cmd_v4.
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@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/20241226174257.0b1d92ad59b8.Ib80f8514a64fc2800a2a20131e730c2bd9c4c4af@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:55 +01:00
Daniel Gabay
1532c5d67d
wifi: iwlwifi: mvm: Use IWL_FW_CHECK() for BAR notif size validation
...
Use IWL_FW_CHECK() for BAR notification size validation, improving
diagnostics with a clear error message on failure.
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/20241226174257.913d5d476929.I8cd62f45bacc088c309b0152fc392dc2579e82e0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:55 +01:00
Somashekhar(Som)
9b45ba3976
wifi: iwlwifi: pcie: Add support for new device ids
...
Add support for new device-ids 0x2730 and 0x272F.
Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241226174257.6a0db60436e7.I50a66544dde6c88acd9abe4b31badab96ef04cfc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:55 +01:00
Emmanuel Grumbach
a968fc0218
wifi: iwlwifi: add a new NMI type
...
0x88 is not a regular firmware crash but a PREG NMI which means that we
access a place we're not supposed to.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.596dfc97f6b1.Iec765d5fe12ac74c6ee0035e9cb62b98c11639cb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Daniel Gabay
2afb0b9b95
wifi: iwlwifi: mvm: Check BAR packet size before accessing data
...
Validate the BAR frame release size before using its fields to avoid
potential invalid memory access.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.72161a6c07c3.I4887bad2355213b201fca2da1836c9a3203ab42d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Miri Korenblit
b1e8102a40
wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
...
Commit 6b3e87cc0c ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD
cmd v9")
added a few bits to iwl_lari_config_change_cmd::oem_unii4_allow_bitmap
if the FW has LARI version >= 9.
But we also need to send those bits for version 8 if the FW is capable
of this feature (indicated with capability bits)
Add the FW capability bit, and set the additional bits in the cmd when
the version is 8 and the FW capability bit is set.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241226174257.dc5836f84514.I1e38f94465a36731034c94b9811de10cb6ee5921@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Miri Korenblit
a581a0287c
wifi: iwlwifi: support BIOS override for UNII4 in CA/US also in LARI versions < 12
...
Commit ef7ddf4e2f ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12")
added a few bits to iwl_lari_config_change_cmd::chan_state_active_bitmap
if the FW has LARI version >= 12.
But we also need to send those bits for version 8-11 if the FW is capable
of this feature (indicated with capability bits)
Add the FW capability bit, and set the additional bits in the cmd when
the version is 8 and the FW capability bit is set.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241226174257.672651ad849c.I67a00d9544c48ad964f8e998ebe8c168071c3d01@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Miri Korenblit
09bdddd3ed
wifi: iwlwifi: bump FW API to 95 for BZ/SC devices
...
Start supporting API version 95 for new devices.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.d5b73c1e9e17.I121e155b0c1fdfb7fbac934bb2f84fe0e1d13ba0@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Benjamin Berg
f8f13ea27f
wifi: iwlwifi: mvm: log error for failures after D3
...
We only logged an error in the fast resume path. However, as the
hardware is being restarted it makes sense to log an error to make it
easier to understand what is happening.
Add a new error message into the normal resume path and update the
error in the fast resume path to match.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.df1e451d4928.Ibe286bc010ad7fecebba5650097e16ed22a654e4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Anjaneyulu
74f0b2db1f
wifi: iwlwifi: mvm: update documentation for iwl_nvm_channel_flags
...
Enhance the documentation for the enum iwl_nvm_channel_flags to
provide better clarity for NVM_CHANNEL_IBSS and NVM_CHANNEL_ACTIVE flags
Signed-off-by: Anjaneyulu <pagadala.yesu.anjaneyulu@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/20241226174257.d4018e62b2bd.Ie20fe3408bcc358078e3e5bf38edeb6b951c9a40@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Daniel Gabay
cbde1f2210
wifi: iwlwifi: Remove mvm prefix from iwl_mvm_compressed_ba_notif
...
This is not MVM specific.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com >
Link: https://patch.msgid.link/20241226174257.9b35dfce796b.Ie61e17a488f6a34bcbe814dd89a138fe1f55585c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Somashekhar(Som)
122b95012b
wifi: mvm: Request periodic system statistics earlier
...
Currently driver requests periodic statistics after entering EMLSR.
This means that when not in EMLSR, link selection decisions will be
done based on old statistics, from the association time.
Request periodic statistics already at association instead,
Signed-off-by: Somashekhar(Som) <somashekhar.puttagangaiah@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/20241226174257.4ca59fe0e060.Ic46280aad4dc7087a7d6d0773b86c255133cb7d6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Yedidya Benshimol
afff7cee11
wifi: iwlwifi: remove mvm from session protection cmd's name
...
As the session protection command will be used in mld, it shouldn't
be associated by name to mvm
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Link: https://patch.msgid.link/20241226174257.0cd9ae2499b6.If228310b0578e5da88ccb28ff8dceb56e1c61b27@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 14:00:54 +01:00
Miri Korenblit
58c131f088
wifi: iwlwifi: mvm: cleanup iwl_mvm_sta_del
...
Now it neither sets the ret argument or return something else than
false.
Cleanup this function to be void and to not receive the ret argument.
This also allows to get rid of the sta_in_fw parameter in
iwl_mvm_mld_free_sta_link.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241224192322.ecebfa16c62c.Ia1cc352b871593be4f51cb3db98f9eedd5267857@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 13:53:04 +01:00
Miri Korenblit
687a7c8a72
wifi: mac80211: change disassoc sequence a bit
...
Currently, the sequence goes like this (among others):
1. flush all stations (including the AP ones) -> this will tell the
drivers to remove the stations
2. notify the driver the vif is not associated.
Which means that in between 1 and 2, the state is that the vif is
associated, but there is no AP station, which makes no sense, and may be
problematic for some drivers (for example iwlwifi)
Change the sequence to:
1. flush the TDLS stations
2. move the AP station to IEEE80211_STA_NONE
3. notify the driver about the vif being unassociated
4. flush the AP station
In order to not break other drivers, add a vif flag to indicate whether
the driver wants to new sequence or not. If the flag is not set, then
things will be done in the old sequence.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241224192322.996ad1be6cb3.I7815d33415aa1d65c0120b54be7a15a45388f807@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 13:53:04 +01:00
Miri Korenblit
52674ee2f3
wifi: iwlwifi: mvm: send the right link id
...
in iwl_mvm_sta_del we call iwl_mvm_sec_key_remove_ap with link id 0,
when it might actually be something else, causing us to skip all
the keys.
Since the call to iwl_mvm_sec_key_remove_ap was mostly skipped (because
for STA mode we are not removing the ap sta immediately, but later when
the vif is set to unassocicated),
this was fine.
The other call to iwl_mvm_sec_key_remove_ap, when we actually do remove the
ap sta, was called with the right link id. So the bug didn't happen so far.
Now that mac80211 is going to change such that we can immediately
remove the ap sta, the call to iwl_mvm_sec_key_remove_ap with link id 0
will not be skipped, so no key will be removed, and then when
mac80211 eventually tells us to remove that keys, we no longer have the
sta ids for them.
Simply pass the right link id to iwl_mvm_sec_key_remove_ap.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://patch.msgid.link/20241224192322.db7a5f551492.I79fe16a14fa0bb20751ba2526c3195fef39ef772@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 13:53:03 +01:00
Miri Korenblit
2e564d86a0
wifi: iwlwifi: mvm: remove pre-mld code from mld path
...
This code is only relevant for older devices, that are not supporting
mld, so shouldn't be in iwl_mvm_sta_del, which is common to both pre-mld
and mld.
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/20241224192322.a665d16a3857.I840b00a7b38f3967ec5e75ff6a85e756f4d82437@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 13:53:03 +01:00
Rolf Eike Beer
efbb0fed02
wifi: iwlwifi: fix documentation about initial values in station table
...
The inverse value is stored in the table, make the documentation match the code.
Signed-off-by: Rolf Eike Beer <eb@emlix.com >
Acked-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://patch.msgid.link/2008554.usQuhbGJ8B@devpool47.emlix.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2025-01-13 13:51:27 +01:00
Quan Zhou
5ed54896b6
wifi: mt76: mt7921: fix a potential scan no APs
...
In multi-channel scenarios, the granted channel must be aborted before
station remove. Otherwise, the firmware will be put into a wrong state,
resulting in have chance to make subsequence scan no APs.
With this patch, the granted channel will be always aborted before
station remove.
Signed-off-by: Quan Zhou <quan.zhou@mediatek.com >
Reviewed-by: Sean Wang <sean.wang@mediatek.com >
Tested-by: David Ruth <druth@chromium.org >
Reviewed-by: David Ruth <druth@chromium.org >
Link: https://patch.msgid.link/1ac1ae779db86d4012199a24ea2ca74050ed4af6.1721300411.git.quan.zhou@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Ben Greear
512e26db35
wifi: mt76: Fix EHT NSS radiotap reporting.
...
Wireshark and iwlwifi use zero-based NSS reporting, adjust
mt76 to do the same.
Signed-off-by: Ben Greear <greearb@candelatech.com >
Link: https://patch.msgid.link/20240909211238.3237111-2-greearb@candelatech.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Ben Greear
e016239fcb
wifi: mt76: mt7996: Add eht radiotap tlv
...
This duplicates what the 7925 driver is doing, wireshark seems to
at least mostly decode it as expected.
Signed-off-by: Ben Greear <greearb@candelatech.com >
Link: https://patch.msgid.link/20240909211238.3237111-1-greearb@candelatech.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Nicolas Cavallari
f21b77cb55
wifi: mt76: mt7915: Fix mesh scan on MT7916 DBDC
...
commit c4f0755823 ("wifi: mt76: mt7915: fix command timeout in AP stop
period") changes the behavior of mt7915_bss_info_changed() in mesh mode
when enable_beacon becomes false: it calls mt7915_mcu_add_bss_info(...,
false) and mt7915_mcu_add_sta(..., false) while the previous code
didn't. These sends mcu commands that apparently confuse the firmware.
This breaks scanning while in mesh mode on AsiaRF MT7916 DBDC-based cards:
scanning works but no mesh frames get sent afterwards and the firmware
seems to be hosed. It breaks on MT7916 DBDC but not on MT7915 DBDC.
Fixes: c4f0755823 ("wifi: mt76: mt7915: fix command timeout in AP stop period")
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr >
Link: https://patch.msgid.link/20240927085350.4594-1-nicolas.cavallari@green-communications.fr
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Shen Lichuan
458417efd5
wifi: mt76: mt7615: Convert comma to semicolon
...
To ensure code clarity and prevent potential errors, it's advisable
to employ the ';' as a statement separator, except when ',' are
intentionally used for specific purposes.
Signed-off-by: Shen Lichuan <shenlichuan@vivo.com >
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com >
Link: https://patch.msgid.link/20240911034243.31596-1-shenlichuan@vivo.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Dan Carpenter
08fa656c91
wifi: mt76: mt7925: fix off by one in mt7925_load_clc()
...
This comparison should be >= instead of > to prevent an out of bounds
read and write.
Fixes: 9679ca7326 ("wifi: mt76: mt7925: fix a potential array-index-out-of-bounds issue for clc")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Link: https://patch.msgid.link/84bf5dd2-2fe3-4410-a7af-ae841e41082a@stanley.mountain
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Leon Yen
fbce6136da
wifi: mt76: mt7921s: fix a potential firmware freeze during startup
...
The maximum command quota of the firmware may be exceeded because the
command to retrieve the quota setting has not been taken into account.
This patch considers not only the quota usage of the command retrieving
quota settings but also limits the total quota usage.
Signed-off-by: Leon Yen <leon.yen@mediatek.com >
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com >
Link: https://patch.msgid.link/20240916060157.10157-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Hao Zhang
5a569e9016
wifi: mt76: mt792x: add P2P_DEVICE support
...
Regist the NL80211_IFTYPE_P2P_DEVICE to support p2p device
for mt792x chips
Signed-off-by: Hao Zhang <hao.zhang.mediatek@gmail.com >
Signed-off-by: allan.wang <allan.wang@mediatek.com >
Signed-off-by: Ming Yen Hsieh <MingYen.Hsieh@mediatek.com >
Link: https://patch.msgid.link/20240919081713.23787-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
StanleyYP Wang
569dd75b71
wifi: mt76: mt7996: set correct background radar capability
...
Some of the variants do not support background radar, so add a helper
to report background radar capability.
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Tested-by: Daniel Golle <daniel@makrotopia.org >
Link: https://patch.msgid.link/20240926032440.15978-3-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Shayne Chen
e8cb33ad54
wifi: mt76: mt7996: add support for more variants
...
Current varaints supported:
- mt7996 chipset: tri-band, 4+4+4 NSS, eFEM
- mt7992 chipset: dual-band, 4+4 NSS, eFEM
This patch adds support for the following variants:
- mt7996 chipset:
- tri-band, 4+4+4 NSS, iFEM
- tri-band, 2+3+3 NSS, eFEM
- tri-band, 2+3+3 NSS, iFEM
- mt7992 chipset:
- dual-band, 4+4 NSS, iFEM
- dual-band, 4+4 NSS, with band0 iFEM and band1 eFEM
- dual-band, 2+3 NSS, eFEM
- dual-band, 2+3 NSS, iFEM
Co-developed-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com >
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Tested-by: Daniel Golle <daniel@makrotopia.org >
Link: https://patch.msgid.link/20240926032440.15978-2-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:54 +01:00
Shayne Chen
0da2e41070
wifi: mt76: mt7996: extend flexibility of mt7996_mcu_get_eeprom()
...
Support passing customized buffer pointer and length to
mt7996_mcu_get_eeprom().
This is the preparation for adding more variants support which needs to
prefetch FEM module from efuse, and also fixes potential OOB issue when
reading the last efuse block.
Co-developed-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com >
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com >
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com >
Tested-by: Daniel Golle <daniel@makrotopia.org >
Link: https://patch.msgid.link/20240926032440.15978-1-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name >
2025-01-13 11:21:53 +01:00
Shivam Chaudhary
93b6bd4068
kernel-wide: add explicity||explicitly to spelling.txt
...
Correct the spelling dictionary so that future instances will be caught by
checkpatch, and fix the instances found.
Link: https://lkml.kernel.org/r/20241211154903.47027-1-cvam0000@gmail.com
Signed-off-by: Shivam Chaudhary <cvam0000@gmail.com >
Cc: Al Viro <viro@zeniv.linux.org.uk >
Cc: Christophe Leroy <christophe.leroy@csgroup.eu >
Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com >
Cc: Jason Gunthorpe <jgg@ziepe.ca >
Cc: Leon Romanovsky <leon@kernel.org >
Cc: Madhavan Srinivasan <maddy@linux.ibm.com >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Naveen N Rao <naveen@kernel.org >
Cc: Nicholas Piggin <npiggin@gmail.com >
Cc: Shivam Chaudhary <cvam0000@gmail.com >
Cc: Colin Ian King <colin.i.king@gmail.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
2025-01-12 20:21:06 -08:00
Easwar Hariharan
b29425972c
wifi: ath11k: convert timeouts to secs_to_jiffies()
...
Commit b35108a51c ("jiffies: Define secs_to_jiffies()") introduced
secs_to_jiffies(). As the value here is a multiple of 1000, use
secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication.
This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with
the following Coccinelle rules:
@@ constant C; @@
- msecs_to_jiffies(C * 1000)
+ secs_to_jiffies(C)
@@ constant C; @@
- msecs_to_jiffies(C * MSEC_PER_SEC)
+ secs_to_jiffies(C)
Link: https://lkml.kernel.org/r/20241210-converge-secs-to-jiffies-v3-14-ddfefd7e9f2a@linux.microsoft.com
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com >
Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com >
Cc: Alexander Gordeev <agordeev@linux.ibm.com >
Cc: Andrew Lunn <andrew+netdev@lunn.ch >
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de >
Cc: Catalin Marinas <catalin.marinas@arm.com >
Cc: Christian Borntraeger <borntraeger@linux.ibm.com >
Cc: Christophe Leroy <christophe.leroy@csgroup.eu >
Cc: Daniel Mack <daniel@zonque.org >
Cc: David Airlie <airlied@gmail.com >
Cc: David S. Miller <davem@davemloft.net >
Cc: Dick Kennedy <dick.kennedy@broadcom.com >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Florian Fainelli <florian.fainelli@broadcom.com >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Haojian Zhuang <haojian.zhuang@gmail.com >
Cc: Heiko Carstens <hca@linux.ibm.com >
Cc: Ilya Dryomov <idryomov@gmail.com >
Cc: Jack Wang <jinpu.wang@cloud.ionos.com >
Cc: Jakub Kicinski <kuba@kernel.org >
Cc: James Bottomley <James.Bottomley@HansenPartnership.com >
Cc: James Smart <james.smart@broadcom.com >
Cc: Jaroslav Kysela <perex@perex.cz >
Cc: Jeff Johnson <jjohnson@kernel.org >
Cc: Jens Axboe <axboe@kernel.dk >
Cc: Jeroen de Borst <jeroendb@google.com >
Cc: Jiri Kosina <jikos@kernel.org >
Cc: Joe Lawrence <joe.lawrence@redhat.com >
Cc: Johan Hedberg <johan.hedberg@gmail.com >
Cc: Josh Poimboeuf <jpoimboe@kernel.org >
Cc: Jozsef Kadlecsik <kadlec@netfilter.org >
Cc: Julia Lawall <julia.lawall@inria.fr >
Cc: Kalle Valo <kvalo@kernel.org >
Cc: Louis Peens <louis.peens@corigine.com >
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Madhavan Srinivasan <maddy@linux.ibm.com >
Cc: Marcel Holtmann <marcel@holtmann.org >
Cc: Martin K. Petersen <martin.petersen@oracle.com >
Cc: Maxime Ripard <mripard@kernel.org >
Cc: Michael Ellerman <mpe@ellerman.id.au >
Cc: Miroslav Benes <mbenes@suse.cz >
Cc: Naveen N Rao <naveen@kernel.org >
Cc: Nicholas Piggin <npiggin@gmail.com >
Cc: Nicolas Palix <nicolas.palix@imag.fr >
Cc: Oded Gabbay <ogabbay@kernel.org >
Cc: Ofir Bitton <obitton@habana.ai >
Cc: Pablo Neira Ayuso <pablo@netfilter.org >
Cc: Paolo Abeni <pabeni@redhat.com >
Cc: Petr Mladek <pmladek@suse.com >
Cc: Praveen Kaligineedi <pkaligineedi@google.com >
Cc: Ray Jui <rjui@broadcom.com >
Cc: Robert Jarzmik <robert.jarzmik@free.fr >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Roger Pau Monné <roger.pau@citrix.com >
Cc: Russell King <linux@armlinux.org.uk >
Cc: Scott Branden <sbranden@broadcom.com >
Cc: Shailend Chand <shailend@google.com >
Cc: Simona Vetter <simona@ffwll.ch >
Cc: Simon Horman <horms@kernel.org >
Cc: Sven Schnelle <svens@linux.ibm.com >
Cc: Takashi Iwai <tiwai@suse.com >
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Cc: Thomas Zimmermann <tzimmermann@suse.de >
Cc: Vasily Gorbik <gor@linux.ibm.com >
Cc: Xiubo Li <xiubli@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
2025-01-12 20:21:04 -08:00
Saeed Mahameed
df75ad562a
net/mlx5: SHAMPO: Introduce new SHAMPO specific HCA caps
...
Read and cache SHAMPO specific caps for header data split capabilities.
Will be used in downstream patch.
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com >
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com >
Signed-off-by: Tariq Toukan <tariqt@nvidia.com >
Link: https://patch.msgid.link/20250109204231.1809851-4-tariqt@nvidia.com
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com >
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-01-12 03:58:00 -05:00
Bitterblue Smith
4b6652bc6d
wifi: rtw88: Add support for LED blinking
...
Register a struct led_classdev with the kernel's LED subsystem and
create a throughput-based trigger for it. Then mac80211 makes the LED
blink.
Tested with Tenda U12 (RTL8812AU), Tenda U9 (RTL8811CU), TP-Link Archer
T2U Nano (RTL8811AU), TP-Link Archer T3U Plus (RTL8812BU), Edimax
EW-7611UCB (RTL8821AU), LM842 (RTL8822CU).
Also tested with devices which don't have LEDs: the laptop's internal
RTL8822CE and a no-name RTL8723DU.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/6c43451f-ab2f-4e76-ac6e-ff5a18dd981d@gmail.com
2025-01-12 10:07:38 +08:00
Fiona Klute
fb2fcfbe5e
wifi: rtw88: sdio: Fix disconnection after beacon loss
...
This is the equivalent of commit 28818b4d87 ("wifi: rtw88: usb: Fix
disconnection after beacon loss") for SDIO chips.
Tested on Pinephone (RTL8723CS), random disconnections became rare,
instead of a frequent nuisance.
Cc: stable@vger.kernel.org
Signed-off-by: Fiona Klute <fiona.klute@gmx.de >
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com > # Tested on Pinebook
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250106135434.35936-1-fiona.klute@gmx.de
2025-01-12 10:03:56 +08:00
Vasily Khoruzhick
a806a8160a
wifi: rtw88: 8703b: Fix RX/TX issues
...
Fix 3 typos in 8703b driver. 2 typos in calibration routines are not
fatal and do not seem to have any impact, just fix them to match vendor
driver.
However the last one in rtw8703b_set_channel_bb() clears too many bits
in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes
above MCS0-MCS1). Vendor driver clears only 2 most significant bits.
With the last typo fixed, the driver is able to reach MCS7 on Pinebook
Cc: stable@vger.kernel.org
Fixes: 9bb762b3a9 ("wifi: rtw88: Add definitions for 8703b chip")
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Tested-by: Fiona Klute <fiona.klute@gmx.de >
Tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250103075107.1337533-1-anarsoul@gmail.com
2025-01-12 10:01:06 +08:00
Bitterblue Smith
5ad483955a
wifi: rtw88: Delete rf_type member of struct rtw_sta_info
...
It's not used for anything.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/b80f7904-c6b4-4d12-a5f9-69ab9b965732@gmail.com
2025-01-12 09:56:11 +08:00
Bitterblue Smith
5b1b954526
wifi: rtw88: Add USB PHY configuration
...
Add some extra configuration for USB devices. Currently only RTL8822BU
version (cut) D needs this. The new code makes use of the existing
usb3_param_8822b array from rtw8822b.c.
A user reported that TP-Link Archer T3U in USB 3 mode was randomly
disconnecting from USB:
[ 26.036502] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
...
[ 27.576491] usb 2-2: USB disconnect, device number 3
[ 28.621528] usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
...
[ 45.984521] usb 2-2: USB disconnect, device number 4
...
[ 46.845585] usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 94.400380] usb 2-2: USB disconnect, device number 5
...
[ 95.590421] usb 2-2: new SuperSpeed USB device number 6 using xhci_hcd
This patch fixes that.
Link: https://github.com/lwfinger/rtw88/issues/262
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com >
Acked-by: Ping-Ke Shih <pkshih@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/9d312b14-0146-4be8-9c50-ef432234db50@gmail.com
2025-01-12 09:51:19 +08:00
Ping-Ke Shih
456ad3210a
wifi: rtw89: 8922ae: add variant info to support RTL8922AE-VS
...
RTL8922AE-VS is a variant of RTL8922AE, which is supported by firmware
version after 0.35.54.0 and only can support up to MCS11. Add a variant
struct to describe these requirements accordingly.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250108020955.14668-3-pkshih@realtek.com
2025-01-12 09:36:49 +08:00
Ping-Ke Shih
3f0e689089
wifi: rtw89: read hardware capabilities part 1 via firmware command
...
Firmware after version 0.35.51.0 defines and exports more hardware
capabilities, which driver will consider reported QAM field as
EHT MCS capability to register hardware.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250108020955.14668-2-pkshih@realtek.com
2025-01-12 09:35:22 +08:00
Ping-Ke Shih
ba4bb0402c
wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion
...
The rtwdev->scanning flag isn't protected by mutex originally, so
cancel_hw_scan can pass the condition, but suddenly hw_scan completion
unset the flag and calls ieee80211_scan_completed() that will free
local->hw_scan_req. Then, cancel_hw_scan raises null-ptr-deref and
use-after-free. Fix it by moving the check condition to where
protected by mutex.
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 2 PID: 6922 Comm: kworker/2:2 Tainted: G OE
Hardware name: LENOVO 2356AD1/2356AD1, BIOS G7ETB6WW (2.76 ) 09/10/2019
Workqueue: events cfg80211_conn_work [cfg80211]
RIP: 0010:rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core]
Code: 00 45 89 6c 24 1c 0f 85 23 01 00 00 48 8b 85 20 ff ff ff 48 8d
RSP: 0018:ffff88811fd9f068 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: ffff88811fd9f258 RCX: 0000000000000001
RDX: 0000000000000011 RSI: 0000000000000001 RDI: 0000000000000089
RBP: ffff88811fd9f170 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88811fd9f108 R11: 0000000000000000 R12: ffff88810e47f960
R13: 0000000000000000 R14: 000000000000ffff R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8881d6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007531dfca55b0 CR3: 00000001be296004 CR4: 00000000001706e0
Call Trace:
<TASK>
? show_regs+0x61/0x73
? __die_body+0x20/0x73
? die_addr+0x4f/0x7b
? exc_general_protection+0x191/0x1db
? asm_exc_general_protection+0x27/0x30
? rtw89_fw_h2c_scan_offload_be+0xc33/0x13c3 [rtw89_core]
? rtw89_fw_h2c_scan_offload_be+0x458/0x13c3 [rtw89_core]
? __pfx_rtw89_fw_h2c_scan_offload_be+0x10/0x10 [rtw89_core]
? do_raw_spin_lock+0x75/0xdb
? __pfx_do_raw_spin_lock+0x10/0x10
rtw89_hw_scan_offload+0xb5e/0xbf7 [rtw89_core]
? _raw_spin_unlock+0xe/0x24
? __mutex_lock.constprop.0+0x40c/0x471
? __pfx_rtw89_hw_scan_offload+0x10/0x10 [rtw89_core]
? __mutex_lock_slowpath+0x13/0x1f
? mutex_lock+0xa2/0xdc
? __pfx_mutex_lock+0x10/0x10
rtw89_hw_scan_abort+0x58/0xb7 [rtw89_core]
rtw89_ops_cancel_hw_scan+0x120/0x13b [rtw89_core]
ieee80211_scan_cancel+0x468/0x4d0 [mac80211]
ieee80211_prep_connection+0x858/0x899 [mac80211]
ieee80211_mgd_auth+0xbea/0xdde [mac80211]
? __pfx_ieee80211_mgd_auth+0x10/0x10 [mac80211]
? cfg80211_find_elem+0x15/0x29 [cfg80211]
? is_bss+0x1b7/0x1d7 [cfg80211]
ieee80211_auth+0x18/0x27 [mac80211]
cfg80211_mlme_auth+0x3bb/0x3e7 [cfg80211]
cfg80211_conn_do_work+0x410/0xb81 [cfg80211]
? __pfx_cfg80211_conn_do_work+0x10/0x10 [cfg80211]
? __kasan_check_read+0x11/0x1f
? psi_group_change+0x8bc/0x944
? __kasan_check_write+0x14/0x22
? mutex_lock+0x8e/0xdc
? __pfx_mutex_lock+0x10/0x10
? __pfx___radix_tree_lookup+0x10/0x10
cfg80211_conn_work+0x245/0x34d [cfg80211]
? __pfx_cfg80211_conn_work+0x10/0x10 [cfg80211]
? update_cfs_rq_load_avg+0x3bc/0x3d7
? sched_clock_noinstr+0x9/0x1a
? sched_clock+0x10/0x24
? sched_clock_cpu+0x7e/0x42e
? newidle_balance+0x796/0x937
? __pfx_sched_clock_cpu+0x10/0x10
? __pfx_newidle_balance+0x10/0x10
? __kasan_check_read+0x11/0x1f
? psi_group_change+0x8bc/0x944
? _raw_spin_unlock+0xe/0x24
? raw_spin_rq_unlock+0x47/0x54
? raw_spin_rq_unlock_irq+0x9/0x1f
? finish_task_switch.isra.0+0x347/0x586
? __schedule+0x27bf/0x2892
? mutex_unlock+0x80/0xd0
? do_raw_spin_lock+0x75/0xdb
? __pfx___schedule+0x10/0x10
process_scheduled_works+0x58c/0x821
worker_thread+0x4c7/0x586
? __kasan_check_read+0x11/0x1f
kthread+0x285/0x294
? __pfx_worker_thread+0x10/0x10
? __pfx_kthread+0x10/0x10
ret_from_fork+0x29/0x6f
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>
Fixes: 8959077797 ("rtw89: 8852a: add ieee80211_ops::hw_scan")
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250107114254.6769-1-pkshih@realtek.com
2025-01-12 09:31:11 +08:00
Zong-Zhe Yang
35642ba31d
wifi: rtw89: mcc: consider time limits not divisible by 1024
...
For each MCC role, time limits, including max_tob_us, max_toa_us, and
mac_dur_us, are calculated if there are NoA attributes. The relation
between these time limits is "max_dur_us = max_tob_us + max_toa_us".
Then, the unit is converted from us to TU. However, originally, each
time limit was divided by 1024 independently. It missed to consider
the cases that max_tob_us or max_toa_us is not divisible by 1024. It
causes the result breaks "max_dur (TU) = max_tob (TU) + max_toa (TU)".
Finally, when MCC calculates pattern parameters based on these kinds
of time limits, it might not perform well.
Fixes: b09df09b55 ("wifi: rtw89: mcc: initialize start flow")
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250103074412.124066-1-pkshih@realtek.com
2025-01-12 09:28:33 +08:00
Ping-Ke Shih
6ab452d458
wifi: rtw89: pci: treat first receiving part as first segment for 8922AE
...
For early chips, the RX BD info contains FS/LS bits for first/last segments
of a receiving packet. For 8922AE, the FS bit should be ignored, or it
may throw warning:
rtw89_8922ae 0000:1a:00.0: skb should not be ready before first segment start
To have compatible logic, FS determined by what pending skb is existing
(!new) or not.
Since we expect every single receiving packet in single one segment,
enlarge 4 bytes for RX BD info, and add a debug message to note if
RX buffer is possibly smaller than expected size.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250103025126.15378-1-pkshih@realtek.com
2025-01-12 09:24:21 +08:00
Chih-Kang Chang
2f7667675d
wifi: rtw89: avoid to init mgnt_entry list twice when WoWLAN failed
...
If WoWLAN failed in resume flow, the rtw89_ops_add_interface() triggered
without removing the interface first. Then the mgnt_entry list init again,
causing the list_empty() check in rtw89_chanctx_ops_assign_vif()
useless, and list_add_tail() again. Therefore, we have added a check to
prevent double adding of the list.
rtw89_8852ce 0000:01:00.0: failed to check wow status disabled
rtw89_8852ce 0000:01:00.0: wow: failed to check disable fw ready
rtw89_8852ce 0000:01:00.0: wow: failed to swap to normal fw
rtw89_8852ce 0000:01:00.0: failed to disable wow
rtw89_8852ce 0000:01:00.0: failed to resume for wow -110
rtw89_8852ce 0000:01:00.0: MAC has already powered on
i2c_hid_acpi i2c-ILTK0001:00: PM: acpi_subsys_resume+0x0/0x60 returned 0 after 284705 usecs
list_add corruption. prev->next should be next (ffff9d9719d82228), but was ffff9d9719f96030. (prev=ffff9d9719f96030).
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:34!
invalid opcode: 0000 [#1 ] PREEMPT SMP NOPTI
CPU: 2 PID: 6918 Comm: kworker/u8:19 Tainted: G U O
Hardware name: Google Anraggar/Anraggar, BIOS Google_Anraggar.15217.514.0 03/25/2024
Workqueue: events_unbound async_run_entry_fn
RIP: 0010:__list_add_valid_or_report+0x9f/0xb0
Code: e8 56 89 ff ff 0f 0b 48 c7 c7 3e fc e0 96 48 89 c6 e8 45 89 ff ...
RSP: 0018:ffffa51b42bbbaf0 EFLAGS: 00010246
RAX: 0000000000000075 RBX: ffff9d9719d82ab0 RCX: 13acb86e047a4400
RDX: 3fffffffffffffff RSI: 0000000000000000 RDI: 00000000ffffdfff
RBP: ffffa51b42bbbb28 R08: ffffffff9768e250 R09: 0000000000001fff
R10: ffffffff9765e250 R11: 0000000000005ffd R12: ffff9d9719f95c40
R13: ffff9d9719f95be8 R14: ffff9d97081bfd78 R15: ffff9d9719d82060
FS: 0000000000000000(0000) GS:ffff9d9a6fb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007e7d029a4060 CR3: 0000000345e38000 CR4: 0000000000750ee0
PKRU: 55555554
Call Trace:
<TASK>
? __die_body+0x68/0xb0
? die+0xaa/0xd0
? do_trap+0x9f/0x170
? __list_add_valid_or_report+0x9f/0xb0
? __list_add_valid_or_report+0x9f/0xb0
? handle_invalid_op+0x69/0x90
? __list_add_valid_or_report+0x9f/0xb0
? exc_invalid_op+0x3c/0x50
? asm_exc_invalid_op+0x16/0x20
? __list_add_valid_or_report+0x9f/0xb0
rtw89_chanctx_ops_assign_vif+0x1f9/0x210 [rtw89_core cbb375c44bf28564ce479002bff66617a25d9ac1]
? __mutex_unlock_slowpath+0xa0/0xf0
rtw89_ops_assign_vif_chanctx+0x4b/0x90 [rtw89_core cbb375c44bf28564ce479002bff66617a25d9ac1]
drv_assign_vif_chanctx+0xa7/0x1f0 [mac80211 6efaad16237edaaea0868b132d4f93ecf918a8b6]
ieee80211_reconfig+0x9cb/0x17b0 [mac80211 6efaad16237edaaea0868b132d4f93ecf918a8b6]
? __pfx_wiphy_resume+0x10/0x10 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed]
? dev_printk_emit+0x51/0x70
? _dev_info+0x6e/0x90
wiphy_resume+0x89/0x180 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed]
? __pfx_wiphy_resume+0x10/0x10 [cfg80211 572d03acaaa933fe38251be7fce3b3675284b8ed]
dpm_run_callback+0x37/0x1e0
device_resume+0x26d/0x4b0
? __pfx_dpm_watchdog_handler+0x10/0x10
async_resume+0x1d/0x30
async_run_entry_fn+0x29/0xd0
worker_thread+0x397/0x970
kthread+0xed/0x110
? __pfx_worker_thread+0x10/0x10
? __pfx_kthread+0x10/0x10
ret_from_fork+0x38/0x50
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>
Fixes: 68ec751b28 ("wifi: rtw89: chan: manage active interfaces")
Signed-off-by: Chih-Kang Chang <gary.chang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20250103024500.14990-1-pkshih@realtek.com
2025-01-12 09:21:19 +08:00
Po-Hao Huang
b2658bf4d7
wifi: rtw89: correct header conversion rule for MLO only
...
Header conversion should only be used with MLO connections. Otherwise
P2P connection fails due to wrong probe responses sent. Fix it
accordingly.
Fixes: b8499664fc ("wifi: rtw89: Add header conversion for MLO connections")
Signed-off-by: Po-Hao Huang <phhuang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20241231004811.8646-4-pkshih@realtek.com
2025-01-12 09:12:30 +08:00
Zong-Zhe Yang
e4790b3e31
wifi: rtw89: chan: fix soft lockup in rtw89_entity_recalc_mgnt_roles()
...
During rtw89_entity_recalc_mgnt_roles(), there is a normalizing process
which will re-order the list if an entry with target pattern is found.
And once one is found, should have aborted the list_for_each_entry. But,
`break` just aborted the inner for-loop. The outer list_for_each_entry
still continues. Normally, only the first entry will match the target
pattern, and the re-ordering will change nothing, so there won't be
soft lockup. However, in some special cases, soft lockup would happen.
Fix it by `goto fill` to break from the list_for_each_entry.
The following is a sample of kernel log for this problem.
watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [wpa_supplicant:2055]
[...]
RIP: 0010:rtw89_entity_recalc ([...] chan.c:392 chan.c:479) rtw89_core
[...]
Fixes: 68ec751b28 ("wifi: rtw89: chan: manage active interfaces")
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com >
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com >
Link: https://patch.msgid.link/20241231004811.8646-3-pkshih@realtek.com
2025-01-12 09:12:20 +08:00