wifi: iwlwifi: cfg: reduce configuration struct sizeWe don't need the CORES() match nor jacket (which really doesn'teven make sense to match to the RF anyway), and since the subdevicemasks we car
wifi: iwlwifi: cfg: reduce configuration struct sizeWe don't need the CORES() match nor jacket (which really doesn'teven make sense to match to the RF anyway), and since the subdevicemasks we care about are contiguous, we can encode them as highestand lowest bit set (automatically.) By encoding whether to match ornot as separate flags and taking advantage of the limited range ofthe RF type, step and ID we can reduce the amount of memory neededfor the table, while also making the logic (apart perhaps from thesubdevice mask) easier to understand.This reduces the size of the module by about 1.5KiB on x86-64.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250511195137.38a805a7c96f.Ieece00476cea6054b0827cd075eb8ba5943373df@changeid
show more ...
wifi: iwlwifi: cfg: remove MAC type/step matchingNow that it's all split into MAC and RF configs, removethe matching on MAC type and step. If we ever need to dosomething based on the MAC step, we
wifi: iwlwifi: cfg: remove MAC type/step matchingNow that it's all split into MAC and RF configs, removethe matching on MAC type and step. If we ever need to dosomething based on the MAC step, we'll have to find somenew mechanism (since the MAC type is known already fromthe PCI IDs table, but not the step), or just handle the(likely small) differences in code.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250510214621.fca99a5ab315.Iae27b781221fd29845493adf2c29d9e4f7a9c33b@changeid
wifi: iwlwifi: tests: make subdev match test more preciseIt's OK to match with subdevice_mask as long as that doesn'toverlap the RF ID/BW limit/cores fields in that.Signed-off-by: Johannes Berg
wifi: iwlwifi: tests: make subdev match test more preciseIt's OK to match with subdevice_mask as long as that doesn'toverlap the RF ID/BW limit/cores fields in that.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250510214621.87cc0ad360a8.I9be361caedd7258e8e817d4100c549681396f307@changeid
wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfgWith all the cleanups now, we can rename the structure tobetter indicate the functionality. For older devices thisisn't quite accurate, of course, but i
wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfgWith all the cleanups now, we can rename the structure tobetter indicate the functionality. For older devices thisisn't quite accurate, of course, but it's better to have aname that reflects future use for maintenance.Add some kernel-doc while at it.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Link: https://patch.msgid.link/20250509104454.2582160-9-miriam.rachel.korenblit@intel.comSigned-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
wifi: iwlwifi: cfg: clean up Sc/Dr/Br configsFor now, the WH and PE radios require the same config asFM, so just add a #define for those instead of copyingthe data. Since this is true, Sc/Dr/Br a
wifi: iwlwifi: cfg: clean up Sc/Dr/Br configsFor now, the WH and PE radios require the same config asFM, so just add a #define for those instead of copyingthe data. Since this is true, Sc/Dr/Br all used the sameconfigs for all RF types, but that's confusing, so nowuse the defined WH/PE names for the correct combinations.We can also now enable the unit test that ensures we haveno duplicate RF configs.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Link: https://patch.msgid.link/20250509104454.2582160-8-miriam.rachel.korenblit@intel.comSigned-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
wifi: iwlwifi: rename cfg_trans_params to mac_cfgSince 9000 series devices, the devices are split into MAC andCRF parts. Currently, "struct iwl_cfg" reflects some MAC andsome RF parameters, but w
wifi: iwlwifi: rename cfg_trans_params to mac_cfgSince 9000 series devices, the devices are split into MAC andCRF parts. Currently, "struct iwl_cfg" reflects some MAC andsome RF parameters, but we want to clean this up and move theMAC data to what's now "struct iwl_cfg_trans_params". As thefirst step, to reflect the intent, rename this structure.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Link: https://patch.msgid.link/20250508121306.1277801-9-miriam.rachel.korenblit@intel.comSigned-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
wifi: iwlwifi: tests: simplify devinfo_no_trans_cfg_dups()There's no need to build a list of individual configsfirst and then compare them, we can just go through allof them and compare if the po
wifi: iwlwifi: tests: simplify devinfo_no_trans_cfg_dups()There's no need to build a list of individual configsfirst and then compare them, we can just go through allof them and compare if the pointers aren't the same.The complexity (in terms of number of comparisons) is abit higher that way, but it's just a test and the codecomplexity is much lower without that.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250504132447.85911c59d96a.I540f464229da3566d1726dfb61b46002fbb73bde@changeid
wifi: iwlwifi: tests: allow same config for different MACsFor different MACs we maintain the configs in differentfiles, and while it's a small waste of space, this is aworthwhile trade-off for ma
wifi: iwlwifi: tests: allow same config for different MACsFor different MACs we maintain the configs in differentfiles, and while it's a small waste of space, this is aworthwhile trade-off for maintenance and simplicity. Soallow different MAC types to have the same config. Thiscould allow the same config for two MACs in the same MACfamily, but that's not hugely important. Also simplifythe test to not build a config list, there's no goodreason to do that.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250504132447.27f5d570eb32.I1649309a0e54a1d446a38c5b2124a582de9f6d61@changeid
wifi: iwlwifi: tests: check for duplicate name stringsWe don't need the same name multiple times in the binary,add a check for that.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-
wifi: iwlwifi: tests: check for duplicate name stringsWe don't need the same name multiple times in the binary,add a check for that.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.9adf2790122e.Ia85152c072c7944f0b80e819cf59a51d6adeb49a@changeid
wifi: iwlwifi: cfg: move all names out of configsMove all the names into dev info structs and removethe pointer from the configs.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off
wifi: iwlwifi: cfg: move all names out of configsMove all the names into dev info structs and removethe pointer from the configs.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.1538369bffde.Id430ff71f57cbb37c19ecc5b41c831e5ba9b0695@changeid
wifi: iwlwifi: cfg: finish config splitA long time ago, when transport vs. device configs wereintroduced, we wanted to eventually have a list of PCIIDs and a separate list of devices, but for sim
wifi: iwlwifi: cfg: finish config splitA long time ago, when transport vs. device configs wereintroduced, we wanted to eventually have a list of PCIIDs and a separate list of devices, but for simplicityembedded the transport config in the whole config, andit all got confusing.Finish splitting that out. Doing so requires having moreIWL_DEV_INFO() entries, but the whole trans/cfg aliasinggoes away and the code becomes a lot simpler.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.e03f65c0f693.I076a997f800db455b575008f9488b151738ad7ec@changeid
wifi: iwlwifi: cfg: clean up BW limit and subdev matchingThe BW limit, cores and RF ID are matched in the subdevice ID,so it doesn't really make sense to have both SUBDEV() match anda match on an
wifi: iwlwifi: cfg: clean up BW limit and subdev matchingThe BW limit, cores and RF ID are matched in the subdevice ID,so it doesn't really make sense to have both SUBDEV() match anda match on any of those three. In particular, for Killer devicesthe subdevice ID doesn't even follow the layout, so no matchingshould be on those three values at all, only with SUBDEV().Change the logic around the BW limit to have it more like allthe other things: only a bw_limit match in the dev_info, andput the actual bandwidth into struct iwl_cfg. This duplicates anumber of those values, but that way the logic is clearer.Add a test that checks that the three matches mentioned aboveare not used in conjunction with SUBDEV(), and check that ifthe bw_limit is matched, a BW limit is provided in the config.Also check that the "Killer" devices have a SUBDEV() match.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.a185eac2736c.I87ee87300c92518a1d3296d3eda9fd4163e9085e@changeid
wifi: iwlwifi: tests: check transport configs are not duplicatedAdd a kunit test to check that all (used) transport config structsare not duplicated, since there's no value in having the same info
wifi: iwlwifi: tests: check transport configs are not duplicatedAdd a kunit test to check that all (used) transport config structsare not duplicated, since there's no value in having the same infoin two places in memory.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.a151af19aaba.Id57f099a899e09318c6218ed1859151f00232b41@changeid
wifi: iwlwifi: tests: check configs are not duplicatedAdd a kunit test to check that all (used) config structsare not duplicated, ignoring the name since that can behandled differently via the de
wifi: iwlwifi: tests: check configs are not duplicatedAdd a kunit test to check that all (used) config structsare not duplicated, ignoring the name since that can behandled differently via the dev-info list.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502155404.0cfd9fb8322e.I9567b839405be8d1e4be0bfca7a17b5d222b0158@changeid
wifi: iwlwifi: tests: check for device namesAdd a unit test that checks that each device has a name,either via the specific name entry or the config's name.Signed-off-by: Johannes Berg <johannes
wifi: iwlwifi: tests: check for device namesAdd a unit test that checks that each device has a name,either via the specific name entry or the config's name.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://patch.msgid.link/20250502151751.c04287134280.Iedc7c05a41dc8bfe04dc8b95fea38543513eac2d@changeid
wifi: iwlwifi: make no_160 more genericWe'll have devices that are EHT capable but don't support 320 MHz andthose devices look like the 320 MHz capable devices, but have distinctsubsystem ID.We
wifi: iwlwifi: make no_160 more genericWe'll have devices that are EHT capable but don't support 320 MHz andthose devices look like the 320 MHz capable devices, but have distinctsubsystem ID.We already had the same type of differentiation for HE devices thatsupport 160 MHz or not.Enhance that mechanism and now the _IWL_DEV_INFO macro gets anindication whether the bandwidth should be limited for that specificdevice.The subsystem ID gives a binary answer about the bandwidth limitationand iwl_pci_find_dev_info() compares this to the list of _IWL_DEV_INFOentries.Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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/20250205145347.1ba406c538a5.I6e24123f60a764aedfeaaac8768c26e136c320cf@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
module: Convert symbol namespace to string literalClean up the existing export namespace code along the same lines ofcommit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)to __s
module: Convert symbol namespace to string literalClean up the existing export namespace code along the same lines ofcommit 33def8498fdd ("treewide: Convert macro and uses of __section(foo)to __section("foo")") and for the same reason, it is not desired for thenamespace argument to be a macro expansion itself.Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; doneRequested-by: Masahiro Yamada <masahiroy@kernel.org>Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlcAcked-by: Greg KH <gregkh@linuxfoundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuildPull Kbuild updates from Masahiro Yamada: - Avoid 'constexpr', which is a keyword in C23 - Allow
Merge tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuildPull 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 ...
kbuild: use $(src) instead of $(srctree)/$(src) for source directoryKbuild conventionally uses $(obj)/ for generated files, and $(src)/ forchecked-in source files. It is merely a convention withou
kbuild: use $(src) instead of $(srctree)/$(src) for source directoryKbuild conventionally uses $(obj)/ for generated files, and $(src)/ forchecked-in source files. It is merely a convention without any functionaldifference. In fact, $(obj) and $(src) are exactly the same, as definedin scripts/Makefile.build: src := $(obj)When the kernel is built in a separate output directory, $(src) doesnot accurately reflect the source directory location. While Kbuildresolves this discrepancy by specifying VPATH=$(srctree) to search forsource files, it does not cover all cases. For example, when adding aheader search path for local headers, -I$(srctree)/$(src) is typicallypassed to the compiler.This introduces inconsistency between upstream and downstream Makefilesbecause $(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 followingmeanings: $(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 treeConsequently, $(srctree)/$(src) in upstream Makefiles need to be replacedwith $(src).Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
wifi: iwlwifi: add a kunit test for PCI table duplicatesWe shouldn't have entries in the table that match the samedevice; it's possible to have a specific entry followed bya less specific entry (
wifi: iwlwifi: add a kunit test for PCI table duplicatesWe shouldn't have entries in the table that match the samedevice; it's possible to have a specific entry followed bya less specific entry (i.e. NNNN followed by ANY), but notentries that are dead, where an earlier entry matches thesame as a later one.Add a test similar to the existing devinfo test to catchthis situation.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://msgid.link/20240319100755.826b859abd62.I8140d7e9ae52ac50c6830818f8f95ccd0d94b3d3@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>
wifi: iwlwifi: add kunit test for devinfo orderingWe used to have a test built into the code for this internally,but now we can put that into kunit and let everyone run it, toverify the devinfo t
wifi: iwlwifi: add kunit test for devinfo orderingWe used to have a test built into the code for this internally,but now we can put that into kunit and let everyone run it, toverify the devinfo table ordering if it's changed.Signed-off-by: Johannes Berg <johannes.berg@intel.com>Reviewed-by: Benjamin Berg <benjamin.berg@intel.com>Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>Link: https://msgid.link/20240123200528.a4a8af7c091f.I0fb09083317b331168b99b8db39656a126a5cc4d@changeidSigned-off-by: Johannes Berg <johannes.berg@intel.com>