Kai-Heng Feng
f3d049b35b
PCI/ASPM: Restore parent state to parent, child state to child
...
There's a typo that makes parent device uses child LNKCTL value and vice
versa. This causes Micron NVMe to trigger a reboot upon system resume.
Correct the typo to fix the issue.
Fixes: 64dbb2d707 ("PCI/ASPM: Disable L1 before configuring L1 Substates")
Link: https://lore.kernel.org/r/20240506051602.1990743-1-kai.heng.feng@canonical.com
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
[bhelgaas: update subject]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com >
2024-05-06 14:12:40 -05:00
Linus Torvalds
ee5b455b0a
Merge tag 'slab-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab
...
Pull slab fixes from Vlastimil Babka:
- Fix for cleanup infrastructure (Dan Carpenter)
This makes the __free(kfree) cleanup hooks not crash on error
pointers.
- SLUB fix for freepointer checking (Nicolas Bouchinet)
This fixes a recently introduced bug that manifests when
init_on_free, CONFIG_SLAB_FREELIST_HARDENED and consistency checks
(slub_debug=F) are all enabled, and results in false-positive
freepointer corrupt reports for caches that store freepointer outside
of the object area.
* tag 'slab-for-6.9-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
mm/slab: make __free(kfree) accept error pointers
mm/slub: avoid zeroing outside-object freepointer for single free
2024-05-06 10:27:58 -07:00
Linus Torvalds
c73677ca41
Merge tag 'auxdisplay-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay
...
Pull auxdisplay fixes from Andy Shevchenko:
- A couple of non-critical build fixes to Character LCD library
- Miscellaneous fixes here and there
* tag 'auxdisplay-v6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay:
auxdisplay: charlcd: Don't rebuild when CONFIG_PANEL_BOOT_MESSAGE=y
auxdisplay: charlcd: Add missing MODULE_DESCRIPTION()
auxdisplay: seg-led-gpio: Convert to platform remove callback returning void
auxdisplay: linedisp: Group display drivers together
2024-05-06 09:48:46 -07:00
Mateusz Polchlopek
deea427ffc
ice: refactor struct ice_vsi_cfg_params to be inside of struct ice_vsi
...
Refactor struct ice_vsi_cfg_params to be embedded into struct ice_vsi.
Prior to that the members of the struct were scattered around ice_vsi,
and were copy-pasted for purposes of reinit.
Now we have struct handy, and it is easier to have something sticky
in the flags field.
Suggested-by: Przemek Kitszel <przemyslaw.kitszel@intel.com >
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com >
Reviewed-by: Vaishnavi Tipireddy <vaishnavi.tipireddy@intel.com >
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com >
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com > (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2024-05-06 09:21:00 -07:00
Marcin Szycik
c5e6bd977d
ice: Deduplicate tc action setup
...
ice_tc_setup_redirect_action() and ice_tc_setup_mirror_action() are almost
identical, except for setting filter action. Reduce them to one function
with an extra param, which handles both cases.
Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com >
Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com >
Reviewed-by: Simon Horman <horms@kernel.org >
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com >
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2024-05-06 09:19:46 -07:00
Paul Greenwalt
a8e682f037
ice: update E830 device ids and comments
...
Update existing E830 device ids and comments to align with new naming 'C'
for 100G and 'CC' for 200G.
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com >
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com >
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com > (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2024-05-06 09:18:48 -07:00
Paul Greenwalt
4fd104018c
ice: add additional E830 device ids
...
Add support for additional E830 device ids which are supported by the
driver:
- 0x12D5: Intel(R) Ethernet Controller E830-C for backplane
- 0x12D8: Intel(R) Ethernet Controller E830-C for QSFP
- 0x12DA: Intel(R) Ethernet Controller E830-C for SFP
- 0x12DC: Intel(R) Ethernet Controller E830-XXV for backplane
- 0x12DD: Intel(R) Ethernet Controller E830-XXV for QSFP
- 0x12DE: Intel(R) Ethernet Controller E830-XXV for SFP
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com >
Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com >
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com > (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2024-05-06 09:11:17 -07:00
Kent Overstreet
71dac2482a
bcachefs: BCH_SB_LAYOUT_SIZE_BITS_MAX
...
Define a constant for the max superblock size, to avoid a too-large
shift.
Reported-by: syzbot+a8b0fb419355c91dda7f@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
88ab10186c
bcachefs: Add missing skcipher_request_set_callback() call
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
8060bf1d83
bcachefs: Fix snapshot_t() usage in bch2_fs_quota_read_inode()
...
bch2_fs_quota_read_inode() wasn't entirely updated to the
bch2_snapshot_tree() helper, which takes rcu lock.
Reported-by: syzbot+a3a9a61224ed3b7f0010@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
0ec5b3b7cc
bcachefs: Fix shift-by-64 in bformat_needs_redo()
...
Ancient versions of bcachefs produced packed formats that could
represent keys that our in memory format cannot represent;
bformat_needs_redo() has some tricky shifts to check for this sort of
overflow.
Reported-by: syzbot+594427aebfefeebe91c6@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
2bb9600d5d
bcachefs: Guard against unknown k.k->type in __bkey_invalid()
...
For forwards compatibility we have to allow unknown key types, and only
run the checks that make sense against them.
Fix a missing guard on k.k->type being known.
Reported-by: syzbot+ae4dc916da3ce51f284f@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
f39055220f
bcachefs: Add missing validation for superblock section clean
...
We were forgetting to check for jset entries that overrun the end of the
section - both in validate and to_text(); to_text() needs to be safe for
types that fail to validate.
Reported-by: syzbot+c48865e11e7e893ec4ab@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
6b8cbfc3db
bcachefs: Fix assert in bch2_alloc_v4_invalid()
...
Reported-by: syzbot+10827fa6b176e1acf1d0@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Reed Riley
9a0ec04511
bcachefs: fix overflow in fiemap
...
filefrag (and potentially other utilities that call fiemap) sometimes
pass ULONG_MAX as the length. fiemap_prep clamps excessively large
lengths - but the calculation of end can overflow if it occurs before
calling fiemap_prep. When this happens, filefrag assumes it has read to
the end and exits.
Signed-off-by: Reed Riley <reed@riley.engineer >
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
db42549d40
bcachefs: Add a better limit for maximum number of buckets
...
The bucket_gens array is a single array allocation (one byte per
bucket), and kernel allocations are still limited to INT_MAX.
Check this limit to avoid failing the bucket_gens array allocation.
Reported-by: syzbot+b29f436493184ea42e2b@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
18b4abcead
bcachefs: Fix lifetime issue in device iterator helpers
...
bch2_get_next_dev() and bch2_get_next_online_dev() iterate over devices,
dropping and taking refs as they go; we can't access the previous device
(for ca->dev_idx) after we've dropped our ref to it, unless we take
rcu_read_lock() first.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
3a2d025927
bcachefs: Fix bch2_dev_lookup() refcounting
...
bch2_dev_lookup() is supposed to take a ref on the device it returns, but
for_each_member_device() takes refs as it iterates,
for_each_member_device_rcu() does not.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
1267df40ac
bcachefs: Initialize bch_write_op->failed in inline data path
...
Normally this is initialized in __bch2_write(), which is executed in a
loop, but the inline data path skips this.
Reported-by: syzbot+fd3ccb331eb21f05d13b@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
feb077c177
bcachefs: Fix refcount put in sb_field_resize error path
...
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
4a8521b6bb
bcachefs: Inodes need extra padding for varint_decode_fast()
...
Reported-by: syzbot+66b9b74f6520068596a9@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
b30b70ad8b
bcachefs: Fix early error path in bch2_fs_btree_key_cache_exit()
...
Reported-by: syzbot+a35cdb62ec34d44fb062@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
a2ddaf965f
bcachefs: bucket_pos_to_bp_noerror()
...
We don't want the assert when we're checking if the backpointer is
valid.
Reported-by: syzbot+bf7215c0525098e7747a@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Kent Overstreet
7ffec9ccdc
bcachefs: don't free error pointers
...
Reported-by: syzbot+3333603f569fc2ef258c@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev >
2024-05-06 10:58:17 -04:00
Daniel Gabay
9875b54762
wifi: iwlwifi: Ensure prph_mac dump includes all addresses
...
In prph_mac_iter, ensure that all required addresses are dumped
even if a read fails. Currently, if a read fails, the region dump
is stopped, preventing the creation of prph_mac.lst.
By dumping all addresses even if a read fails, we can accurately
determine which addresses were successfully read and which were not.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Reviewed-by: Eilon Rinat <eilon.rinat@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.31fa9ce91a1c.Ia0c86f70c7a6874c15ffc6f8235aa88530208546@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Miri Korenblit
b31b77b73d
wifi: iwlwifi: mvm: don't request statistics in restart
...
During restart mac80211 notifies the driver about the association,
(if we was associated before the restart) which causes the driver to
request statistics from the FW. This causes to an immediate exit from
EMLSR after the restart is done, when the statistics notif is handled.
(too low TPT). There is no point in requesting statistics wnyway, since
the FW just started and don't have any.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240506095953.16638dec9f7b.I093514312179bae566ad8d73ffb0355c6eee288a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Miri Korenblit
df966c93f5
wifi: iwlwifi: mvm: exit EMLSR if secondary link is not used
...
Exit EMLSR mode if the secondary link is not used enough for Rx/Tx
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240506095953.99ad1d71e9b9.Ide825433488ec809773efdc36937e3089d0012df@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
striebit
bf0212fd8f
wifi: iwlwifi: mvm: add beacon template version 14
...
In version 14 tim_size became the offset of the
broadcast TWT IE.
Signed-off-by: striebit <shaul.triebitz@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.76957de93810.I2c718b0d648f2559fe1337df39915c5e772856bc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Johannes Berg
2848df961f
wifi: iwlwifi: mvm: align UATS naming with firmware
...
The firmware has different names for this, which is confusing
as even the convention of having the firmware name in a comment
after the struct definition wasn't met here. Fix the naming,
but keep UATS in some of it since that's the BIOS name.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.b0dfe17d5f44.I8f5f5a831c7b934ce3140f838315827c018103bb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Daniel Gabay
126ec41e54
wifi: iwlwifi: Force SCU_ACTIVE for specific platforms
...
Firmware 0x2F7 assert observed in Dell platforms when using GL HW.
This issue is mitigated by setting SCU_FORCE_ACTIVE during platform
low power states.
Driver shall indicate firmware to force SCU active by setting bit 29
in context info prph scratch control flags.
This mitigation is limited to Dell platforms with GL HW only.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Reviewed-by: Ofer Kimelman <ofer.kimelman@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.3d0c56c2bb1a.I97d9da402890d2085b5698666cceffc417b6b6df@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:26 +02:00
Benjamin Berg
fc61222241
wifi: iwlwifi: mvm: record and return channel survey information
...
While doing a passive scan, the firmware will report per-channel survey
information. This information is primarily useful for hostapd when doing
an ACS (Automatic Channel Selection). Collect this information and add
it to the result set when getting the survey information.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.9287591a5999.I54a3f9f6480d3694e67eea1cb4f5853beace2780@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Benjamin Berg
97320888cb
wifi: iwlwifi: mvm: add the firmware API for channel survey
...
When requested, the firmware can return per-channel survey information
generally used for ACS (automatic channel selection). Add the API for
this, which consists of a flag and a new channel survey notification.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.1facde532676.I3864ac4bc0fecb7fd5136e85c07585ab7100234b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Ilan Peer
2e194efa38
wifi: iwlwifi: mvm: Fix race in scan completion
...
The move of the scan complete notification handling to the wiphy worker
introduced a race between scan complete notification and scan abort:
- The wiphy lock is held, e.g., for rfkill handling etc.
- Scan complete notification is received but not handled yet.
- Scan abort is triggered, and scan abort is sent to the FW. Once the
scan abort command is sent successfully, the flow synchronously waits
for the scan complete notification. However, as the scan complete
notification was already received but not processed yet, this hangs for
a second and continues leaving the scan status in an inconsistent
state.
- Once scan complete handling is started (when the wiphy lock is not held)
since the scan status is not an inconsistent state, a warning is issued
and the scan complete notification is not handled.
To fix this issue, switch back the scan complete notification to be
asynchronously handling, and only move the link selection logic to
a worker (which was the original reason for the move to use wiphy lock).
While at it, refactor some prints to improve debug data.
Fixes: 07bf5297d3 ("wifi: iwlwifi: mvm: Implement new link selection algorithm")
Signed-off-by: Ilan Peer <ilan.peer@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.1f484a86324b.I63ed445a47f144546948c74ae6df85587fdb4ce3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Yedidya Benshimol
05fe96061d
wifi: iwlwifi: mvm: Add a print for invalid link pair due to bandwidth
...
When validating a link pair for EMLSR, add a print for invalid link
pair due to bandwidth
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.9e57ad898cf4.Id8edfd5e3774ea6475d5f4178ab7ea75a870ef95@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Yedidya Benshimol
ff907d9744
wifi: iwlwifi: mvm: add a debugfs for reading EMLSR blocking reasons
...
Add a reading for all active EMLSR blocking reasons for testing
purposes.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.6d494a335e81.Ic0fa6a9636e3c1a3b1420e85e704a19d4a56e8d9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Yedidya Benshimol
05f10dad03
wifi: iwlwifi: mvm: Add active EMLSR blocking reasons prints
...
Upon adding/removing an EMLSR blocking reason add to the print
the EMLSR disabling mask
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.1e34fe2c3e51.Ia7db0392d81818ceb70a7b199d3f5fa8a4ad198d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Miri Korenblit
b5b0cb5827
wifi: iwlwifi: bump FW API to 90 for BZ/SC devices
...
Start supporting API version 90 for new devices.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.4e4b19128b56.I2f9196191f1ea78e96e92f9db8ecb3cc9bbfd9b3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Miri Korenblit
4e8a56aab3
wifi: iwlwifi: mvm: fix primary link setting
...
mvmvif::primary link holds the ID and not a bitmap. Fix this
Fixes: 07bf5297d3 ("wifi: iwlwifi: mvm: Implement new link selection algorithm")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Johannes Berg <johannes.berg@intel.com >
Link: https://msgid.link/20240506095953.779bf6949053.Ia9297991ff2fdc82ae7c730e0069e2dd6e5f2902@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Johannes Berg
0897fc66ac
wifi: iwlwifi: mvm: use already determined cmd_id
...
In iwl_mvm_rs_fw_rate_init() we have a variable cmd_id that
holds the command ID, so we can just use that instead of the
various calculations of it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240506095953.f894ede03b26.I18f03c272b1c0807767f2713f3ffbb2941c57d9b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:25 +02:00
Johannes Berg
950a3f5f3f
wifi: iwlwifi: mvm: don't reset link selection during restart
...
After restart, we might want to end up with the same config
as before, even for multi-link/EMLSR. Therefore, don't reset
the stored link selection result in that case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.e81db303f1dc.Ie8267082f623d14376a2052d222e18da6545f34b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Daniel Gabay
966a4d9bd3
wifi: iwlwifi: Print EMLSR states name
...
This is useful for debug instead of looking for the hex value.
Signed-off-by: Daniel Gabay <daniel.gabay@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.f3509cf652f2.Ic086b6b2132ffe249b3c4bdd24c673ce7fd1b614@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Yedidya Benshimol
a1efeb8230
wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is active
...
When there's an active link in a non-station vif, the station vif is
not allowed to enter EMLSR
Note that blocking EMLSR by calling iwl_mvm_block_esr() we will schedule
an exit from EMLSR worker, but the worker cannot run before the
activation of the non-BSS link, as ieee80211_remain_on_channel already
holds the wiphy mutex.
Handle that by explicitly calling ieee80211_set_active_links()
to leave EMLSR, and then doing iwl_mvm_block_esr() only for
consistency and to avoid re-entering it before ready.
Note that a call to ieee80211_set_active_links requires to release the
mvm mutex, but that's ok since we still hold the wiphy lock. The only
thing that might race here is the ESR_MODE_NOTIF, so this changes its
handler to run under the wiphy lock.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Co-developed-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.916193759f8a.Idf3a3caf5cdc3e69c81710b7ceb57e87f2de87e4@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Miri Korenblit
eead359109
wifi: iwlwifi: mvm: fix typo in debug print
...
Change EMSLR to EMLSR
Fixes: 6cf7df9f01 ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.db629302bfdc.I135e28b89fab3b614ad8758c0305834934f8c0af@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Johannes Berg
2f876f910b
wifi: iwlwifi: mvm: exit EMLSR when CSA happens
...
If CSA is happening, then exit EMLSR to keep the better link,
which is the primary link unless that's doing the CSA with
quiet. This is done because we can't transmit the OMN frame
on a quiet link, but want to exit EMLSR during CSA for better
beacon reception, so we can follow the switch accurately.
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.3ffff9577f08.I2620971fa5aef789e0d4a588def4c2621e8bed5b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Yedidya Benshimol
ae7fe563e5
wifi: iwlwifi: mvm: Disable/enable EMLSR due to link's bandwidth/band
...
Enable EMLSR when bandwidth settings meet the criteria in
both band and width, otherwise disable.
Signed-off-by: Yedidya Benshimol <yedidya.ben.shimol@intel.com >
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.4e473d4f7f5c.I3adf5619b60bfba8af0cd7eae9dac947419603b6@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Miri Korenblit
8ecdc57078
wifi: iwlwifi: mvm: avoid always prefering single-link
...
The new link selection algorithm uses defaults values for BSS load if
the BSS Load element was not published by the AP.
For 6 GHz, that value is 0. So if the best link is 6 GHz, the EMLSR
grade to always be equal to the grade of the best link,
and then the best link grade is getting a bonus of 10 percent, meaning
that we will never activate EMLSR.
Change the logic to not give a bonus for the best link.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.4614e6891dbd.Ie40eae0dd99d82ba60dea5b6dbcd42dcdf16b90d@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Miri Korenblit
bc6a7fae76
wifi: iwlwifi: mvm: trigger link selection upon TTLM start/end
...
When non default TTLM is applied, mac80211 may force us to use a specific
link (For example, if the only active link becomes a dormant link,
mac80211 will pick the first usable link and set it as active).
When default TTLM is applied, we have new usable links that we might want
to select. Therefore, trigger MLO scan and link selection upon change in
TTLM.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Reviewed-by: Ilan Peer <ilan.peer@intel.com >
Link: https://msgid.link/20240505091420.ed2b386566a8.I0168e61da86b2027633743aaf5d97e483991f0dc@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Miri Korenblit
e619ad55b9
wifi: iwlwifi: mvm: consider FWs recommendation for EMLSR
...
FW sends a notification indicating whether activating EMLSR mode is
recommended or not.
Support the notification and enter EMLSR only if recommended.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.2fd3387882eb.I7a8a5b24658744ed732bfc03b1872c9298483d62@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:24 +02:00
Miri Korenblit
ec0d43d26f
wifi: iwlwifi: mvm: Activate EMLSR based on traffic volume
...
Adjust EMLSR activation to account for traffic levels. By
tracking the number of RX/TX MPDUs, EMLSR will be activated only when
traffic volume meets the required threshold.
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.9480f99ac8fc.If9eb946e929a39e10fe5f4638bc8bc3f8976edf1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:23 +02:00
Miri Korenblit
1d52e8ca4c
wifi: iwlwifi: mvm: don't always unblock EMLSR
...
When an event occurs to unblock EMLSR, the code attempts to re-enable
EMLSR. However, the current implementation always tries to activate
EMLSR, regardless of whether the blocker was set before the unblocking
event or not. If EMLSR was already unblocked, there is no need to
re-activate it.
Fixes: 6cf7df9f01 ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com >
Link: https://msgid.link/20240505091420.eb861402dac9.I6a1d9f774f5551cfab60ea37b71a62640496af9b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
2024-05-06 16:33:23 +02:00