aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel
AgeCommit message (Collapse)AuthorFilesLines
2024-05-23wifi: iwlwifi: always print the firmware version in hexEmmanuel Grumbach1-10/+4
All our firmware versions should now be printed in hex. Signed-off-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.cae4c562b2c3.I5043383bd0e81f872c55046afd2c6560f482c8e0@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: fw: avoid bad FW config on RXQ DMA failureJohannes Berg1-2/+5
In practice, iwl_trans_get_rxq_dma_data() will not fail, it only can do that if called with the wrong arguments. But it does have an error value and doesn't initialize the argument when it fails, so don't use the value then. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.faf3a1b87589.I77c950173cb914676fbd28483e5ef420bb9f1bc9@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: fw: api: Add new timepoint for scan failureMukesh Sisodiya1-0/+7
Add new time point to get the details of scan failure While on it added other missing enum to match with FW. Signed-off-by: Mukesh Sisodiya <[email protected]> Reviewed-by: Pagadala Yesu Anjaneyulu <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.6781e76990c4.Iadfb3f6dd63a98fc35019772266b5ebddc5b5270@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mei: unify iwl_mei_set_power_limit() prototypeJohannes Berg1-2/+2
The two versions of iwl_mei_set_power_limit() are a bit different, and while really the const isn't all that necessary on the inline, it's still better to have it be the same. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.854427753c92.I557716085cb1f6a35d1f97640388fa421f42a56a@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: mark bad no-data RX as having bad PLCPJohannes Berg1-3/+6
Just like with any other frame, mac80211 will do sanity checks on no-data RX (representing e.g. sounding PPDUs), and if e.g. the NSS is wrong, it will warn. This isn't a good idea if we already know the frame wasn't received well, e.g. has bad PLCP. Unless the firmware reports "no error", set the bad PLCP flag to skip checks in mac80211. Also, since we're now extracting two different values from the info field, use le32_get_bits() for both. Signed-off-by: Johannes Berg <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.e6adcb9a6ece.Ic14c2e8ed5e80d48af78b2f04e9f08beeb62d68e@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: bump FW API to 91 for BZ/SC devicesMiri Korenblit2-2/+2
Start supporting API version 91 for new devices. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.27c00099e8b7.I99b4f24bba073414dd04a6e04a359c7fbba52990@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: add a of print of a few commandsMiri Korenblit1-0/+25
This is needed for debugging. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.65fc46e2ffbc.I19d4ef2cc06bfee7d9644a376d39399f0f6eaa15@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: Use the SMPS cfg of the correct linkMiri Korenblit1-1/+1
The exiting code is checking the SMPS mode of deflink. Use the SMPS mode of the link_sta function parameter. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.f3e2834e78f5.Ie24b431a6ad0dbf977afbbd4d2116bfe2426a0d5@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: don't always set antenna in beacon template cmdMiri Korenblit1-4/+5
This needs to be set only if the FW is not capable of selecting an antenna on its own. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.73d790911268.I158dc1dbc9c2e199c69d8213e5496d2de72da28b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: remove redundant reading from NVM fileChaya Rachel Ivgi1-7/+1
The driver reads xtal_calib from NVM file, but actually never uses it. This is only used in dvm driver. Signed-off-by: Chaya Rachel Ivgi <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.c4d1a4571049.I7d7b73dccb793e220f023e0d049b082b043ca95e@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: remove fw_running opShahar S Matityahu3-9/+1
fw_running assumes that memory can be retrieved only after alive. This assumption is no longer true as we support dump before alive. To avoid invalid access to the NIC, check that STATUS_DEVICE_ENABLED bit in trans status is set before dumping instead of the prior check. Signed-off-by: Shahar S Matityahu <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.ca07138cedeb.I090e31d3eaeb4ba19f5f84aba997ccd36927e9ac@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: Don't set NO_HT40+/- flags on 6 GHz bandAndrei Otcheretianski1-1/+5
These flags are not needed on 6 GHz channels, and anyway they were set incorrectly. This in turn resulted in alternating channel flags, preventing reg domain rules to be merged together, so cfg80211 couldn't even send them to the user space, as the regulatory domain was too large. Fix it. Signed-off-by: Andrei Otcheretianski <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.b0d51b2229f8.I092e21cde43320ffc2eff17f5748ff9c87c87fcf@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: call ieee80211_sta_recalc_aggregates on A-MSDU size updateMiri Korenblit1-0/+3
The driver needs to call this function when the A-MSDU size changes. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.632ee6612a79.Ice3a536a4cbfe60d0edfa231fcb79ee7ab9495dd@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: set A-MSDU size on the correct linkMiri Korenblit1-1/+1
The existing code sets the max A-MSDU size to the deflink, set it on the given link instead. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.4de5c1a031ca.I063bc1508e5068b32e321b0f268bc51dba0c0747@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: define link_sta in the relevant scopeMiri Korenblit1-1/+2
The link_sta pointer is now only used inside this if, so define it inside its scope. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.e0a1dd285d9a.Id5ff16fb98af0c5f533aed6b5ec3cc856401e488@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: debugfs: add entry for setting maximum TXOP timeAvraham Stern3-0/+44
Add an entry for setting the maximum TXOP time in microseconds. The configured value can be read from the same entry. Signed-off-by: Avraham Stern <[email protected]> Reviewed-by: Gregory Greenman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.b8d17a9c1731.I57c33574a61edd68bd0ec1aa7009f31111fd7efe@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: allow UAPSD when in SCMAvraham Stern1-4/+12
Allow UAPSD when P2P and BSS interfaces share the same channel. Signed-off-by: Avraham Stern <[email protected]> Reviewed-by: Luciano Coelho <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.1ec19d432497.Id6de5337c878fa70e85bfcf6f4e0e34ce60756fb@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: mvm: simplify the uAPSD coexistence limitation codeEmmanuel Grumbach1-28/+27
uAPSD can't be enabled on BSS or P2P Client if there is another active interface (e.g. associated client). Allow the code that apply those limitations to run on BSS as well. Also forbid uAPSD if we have an IBSS or NAN interface in the system. Since we are now forbidding uAPSD in any concurrency scenario, we don't need to check the number of PHY contexts. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240510170500.4ac26534adf7.Ib892020177e86603b2be3a105f8717b9a15951d3@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-23wifi: iwlwifi: dvm: clean up rs_get_rate() logicJohannes Berg1-13/+8
The logic here is rather convoluted - we cannot get here with lq_sta being NULL as mac80211 will (no longer) call us like that, and since I removed the rate_control_send_low() call in this function there's no longer any point in setting priv_sta to NULL either. So the only thing that remains to check is if we have actually initialized our lq_sta->drv pointer, and exit if we didn't in which case we'll use the data mac80211 already set up for the low rate usage. Reviewed-by: Luciano Coelho <[email protected]> Link: https://msgid.link/20240510170500.a4cdb41825eb.Id202bcc967c32829f70ab1412f8893b6eb7f78e2@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-22tracing/treewide: Remove second parameter of __assign_str()Steven Rostedt (Google)2-2/+2
With the rework of how the __string() handles dynamic strings where it saves off the source string in field in the helper structure[1], the assignment of that value to the trace event field is stored in the helper value and does not need to be passed in again. This means that with: __string(field, mystring) Which use to be assigned with __assign_str(field, mystring), no longer needs the second parameter and it is unused. With this, __assign_str() will now only get a single parameter. There's over 700 users of __assign_str() and because coccinelle does not handle the TRACE_EVENT() macro I ended up using the following sed script: git grep -l __assign_str | while read a ; do sed -e 's/\(__assign_str([^,]*[^ ,]\) *,[^;]*/\1)/' $a > /tmp/test-file; mv /tmp/test-file $a; done I then searched for __assign_str() that did not end with ';' as those were multi line assignments that the sed script above would fail to catch. Note, the same updates will need to be done for: __assign_str_len() __assign_rel_str() __assign_rel_str_len() I tested this with both an allmodconfig and an allyesconfig (build only for both). [1] https://lore.kernel.org/linux-trace-kernel/[email protected]/ Link: https://lore.kernel.org/linux-trace-kernel/[email protected] Cc: Masami Hiramatsu <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Julia Lawall <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Christian König <[email protected]> for the amdgpu parts. Acked-by: Thomas Hellström <[email protected]> #for Acked-by: Rafael J. Wysocki <[email protected]> # for thermal Acked-by: Takashi Iwai <[email protected]> Acked-by: Darrick J. Wong <[email protected]> # xfs Tested-by: Guenter Roeck <[email protected]>
2024-05-18Merge tag 'kbuild-v6.10' of ↵Linus Torvalds4-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Avoid 'constexpr', which is a keyword in C23 - Allow 'dtbs_check' and 'dt_compatible_check' run independently of 'dt_binding_check' - Fix weak references to avoid GOT entries in position-independent code generation - Convert the last use of 'optional' property in arch/sh/Kconfig - Remove support for the 'optional' property in Kconfig - Remove support for Clang's ThinLTO caching, which does not work with the .incbin directive - Change the semantics of $(src) so it always points to the source directory, which fixes Makefile inconsistencies between upstream and downstream - Fix 'make tar-pkg' for RISC-V to produce a consistent package - Provide reasonable default coverage for objtool, sanitizers, and profilers - Remove redundant OBJECT_FILES_NON_STANDARD, KASAN_SANITIZE, etc. - Remove the last use of tristate choice in drivers/rapidio/Kconfig - Various cleanups and fixes in Kconfig * tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (46 commits) kconfig: use sym_get_choice_menu() in sym_check_prop() rapidio: remove choice for enumeration kconfig: lxdialog: remove initialization with A_NORMAL kconfig: m/nconf: merge two item_add_str() calls kconfig: m/nconf: remove dead code to display value of bool choice kconfig: m/nconf: remove dead code to display children of choice members kconfig: gconf: show checkbox for choice correctly kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in scripts/Makefile.modfinal Makefile: remove redundant tool coverage variables kbuild: provide reasonable defaults for tool coverage modules: Drop the .export_symbol section from the final modules kconfig: use menu_list_for_each_sym() in sym_check_choice_deps() kconfig: use sym_get_choice_menu() in conf_write_defconfig() kconfig: add sym_get_choice_menu() helper kconfig: turn defaults and additional prompt for choice members into error kconfig: turn missing prompt for choice members into error kconfig: turn conf_choice() into void function kconfig: use linked list in sym_set_changed() kconfig: gconf: use MENU_CHANGED instead of SYMBOL_CHANGED kconfig: gconf: remove debug code ...
2024-05-14wifi: iwlegacy: do not skip frames with bad FCSAndrii Batyiev2-2/+2
Monitor/sniffer mode benefits from all types of frames, even if FCS check fails. But we must mark frames as such. Tested on iwl3945 only. Signed-off-by: Andrii Batyiev <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
2024-05-10kbuild: use $(src) instead of $(srctree)/$(src) for source directoryMasahiro Yamada4-4/+4
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for checked-in source files. It is merely a convention without any functional difference. In fact, $(obj) and $(src) are exactly the same, as defined in scripts/Makefile.build: src := $(obj) When the kernel is built in a separate output directory, $(src) does not accurately reflect the source directory location. While Kbuild resolves this discrepancy by specifying VPATH=$(srctree) to search for source files, it does not cover all cases. For example, when adding a header search path for local headers, -I$(srctree)/$(src) is typically passed to the compiler. This introduces inconsistency between upstream and downstream Makefiles because $(src) is used instead of $(srctree)/$(src) for the latter. To address this inconsistency, this commit changes the semantics of $(src) so that it always points to the directory in the source tree. Going forward, the variables used in Makefiles will have the following meanings: $(obj) - directory in the object tree $(src) - directory in the source tree (changed by this commit) $(objtree) - the top of the kernel object tree $(srctree) - the top of the kernel source tree Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced with $(src). Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
2024-05-06wifi: iwlwifi: Ensure prph_mac dump includes all addressesDaniel Gabay1-7/+2
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 <[email protected]> Reviewed-by: Eilon Rinat <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.31fa9ce91a1c.Ia0c86f70c7a6874c15ffc6f8235aa88530208546@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: don't request statistics in restartMiri Korenblit1-0/+7
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 <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240506095953.16638dec9f7b.I093514312179bae566ad8d73ffb0355c6eee288a@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: exit EMLSR if secondary link is not usedMiri Korenblit3-2/+40
Exit EMLSR mode if the secondary link is not used enough for Rx/Tx Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240506095953.99ad1d71e9b9.Ide825433488ec809773efdc36937e3089d0012df@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: add beacon template version 14striebit2-4/+16
In version 14 tim_size became the offset of the broadcast TWT IE. Signed-off-by: striebit <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.76957de93810.I2c718b0d648f2559fe1337df39915c5e772856bc@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: align UATS naming with firmwareJohannes Berg3-10/+11
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.b0dfe17d5f44.I8f5f5a831c7b934ce3140f838315827c018103bb@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: Force SCU_ACTIVE for specific platformsDaniel Gabay2-2/+34
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 <[email protected]> Reviewed-by: Ofer Kimelman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.3d0c56c2bb1a.I97d9da402890d2085b5698666cceffc417b6b6df@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: record and return channel survey informationBenjamin Berg6-8/+430
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.9287591a5999.I54a3f9f6480d3694e67eea1cb4f5853beace2780@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: add the firmware API for channel surveyBenjamin Berg2-1/+33
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.1facde532676.I3864ac4bc0fecb7fd5136e85c07585ab7100234b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Fix race in scan completionIlan Peer4-29/+55
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: 07bf5297d392 ("wifi: iwlwifi: mvm: Implement new link selection algorithm") Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.1f484a86324b.I63ed445a47f144546948c74ae6df85587fdb4ce3@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Add a print for invalid link pair due to bandwidthYedidya Benshimol1-11/+20
When validating a link pair for EMLSR, add a print for invalid link pair due to bandwidth Signed-off-by: Yedidya Benshimol <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.9e57ad898cf4.Id8edfd5e3774ea6475d5f4178ab7ea75a870ef95@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: add a debugfs for reading EMLSR blocking reasonsYedidya Benshimol3-5/+40
Add a reading for all active EMLSR blocking reasons for testing purposes. Signed-off-by: Yedidya Benshimol <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.6d494a335e81.Ic0fa6a9636e3c1a3b1420e85e704a19d4a56e8d9@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Add active EMLSR blocking reasons printsYedidya Benshimol1-12/+24
Upon adding/removing an EMLSR blocking reason add to the print the EMLSR disabling mask Signed-off-by: Yedidya Benshimol <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.1e34fe2c3e51.Ia7db0392d81818ceb70a7b199d3f5fa8a4ad198d@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: bump FW API to 90 for BZ/SC devicesMiri Korenblit2-2/+2
Start supporting API version 90 for new devices. Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.4e4b19128b56.I2f9196191f1ea78e96e92f9db8ecb3cc9bbfd9b3@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: fix primary link settingMiri Korenblit1-1/+1
mvmvif::primary link holds the ID and not a bitmap. Fix this Fixes: 07bf5297d392 ("wifi: iwlwifi: mvm: Implement new link selection algorithm") Signed-off-by: Miri Korenblit <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Link: https://msgid.link/20240506095953.779bf6949053.Ia9297991ff2fdc82ae7c730e0069e2dd6e5f2902@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: use already determined cmd_idJohannes Berg1-7/+2
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240506095953.f894ede03b26.I18f03c272b1c0807767f2713f3ffbb2941c57d9b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: don't reset link selection during restartJohannes Berg1-3/+6
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.e81db303f1dc.Ie8267082f623d14376a2052d222e18da6545f34b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: Print EMLSR states nameDaniel Gabay2-9/+50
This is useful for debug instead of looking for the hex value. Signed-off-by: Daniel Gabay <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.f3509cf652f2.Ic086b6b2132ffe249b3c4bdd24c673ce7fd1b614@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Block EMLSR when a p2p/softAP vif is activeYedidya Benshimol7-19/+133
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 <[email protected]> Co-developed-by: Miri Korenblit <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.916193759f8a.Idf3a3caf5cdc3e69c81710b7ceb57e87f2de87e4@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: fix typo in debug printMiri Korenblit1-2/+2
Change EMSLR to EMLSR Fixes: 6cf7df9f013f ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status") Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.db629302bfdc.I135e28b89fab3b614ad8758c0305834934f8c0af@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: exit EMLSR when CSA happensJohannes Berg5-26/+115
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 <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.3ffff9577f08.I2620971fa5aef789e0d4a588def4c2621e8bed5b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Disable/enable EMLSR due to link's bandwidth/bandYedidya Benshimol4-35/+63
Enable EMLSR when bandwidth settings meet the criteria in both band and width, otherwise disable. Signed-off-by: Yedidya Benshimol <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.4e473d4f7f5c.I3adf5619b60bfba8af0cd7eae9dac947419603b6@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: avoid always prefering single-linkMiri Korenblit1-2/+2
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 <[email protected]> Link: https://msgid.link/20240505091420.4614e6891dbd.Ie40eae0dd99d82ba60dea5b6dbcd42dcdf16b90d@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: trigger link selection upon TTLM start/endMiri Korenblit1-0/+5
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 <[email protected]> Reviewed-by: Ilan Peer <[email protected]> Link: https://msgid.link/20240505091420.ed2b386566a8.I0168e61da86b2027633743aaf5d97e483991f0dc@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: consider FWs recommendation for EMLSRMiri Korenblit5-1/+58
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 <[email protected]> Link: https://msgid.link/20240505091420.2fd3387882eb.I7a8a5b24658744ed732bfc03b1872c9298483d62@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Activate EMLSR based on traffic volumeMiri Korenblit10-8/+244
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 <[email protected]> Link: https://msgid.link/20240505091420.9480f99ac8fc.If9eb946e929a39e10fe5f4638bc8bc3f8976edf1@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: don't always unblock EMLSRMiri Korenblit1-3/+5
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: 6cf7df9f013f ("wifi: iwlwifi: mvm: Add helper functions to update EMLSR status") Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.eb861402dac9.I6a1d9f774f5551cfab60ea37b71a62640496af9b@changeid Signed-off-by: Johannes Berg <[email protected]>
2024-05-06wifi: iwlwifi: mvm: Always allow entering EMLSR from debugfsMiri Korenblit3-14/+8
EMLSR can't be activated from mac80211. Except for the debugfs, which is intended for testing purposes. Currently we don't allow entering EMLSR from debugfs if EMLSR is blocked, i.e. if mvmvif::esr_disable_reason is not 0. But we need a way to activate EMLSR regardless of the vif being blocked, for testing. Remove the check of esr_disable_reason Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240505091420.bc3c24d9e0e6.Iad60e22a0d7e2b2b989051e1140b6dc98bef7bcc@changeid Signed-off-by: Johannes Berg <[email protected]>