]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: iwlwifi: cfg: reduce configuration struct size
authorJohannes Berg <johannes.berg@intel.com>
Sun, 11 May 2025 16:53:10 +0000 (19:53 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 13 May 2025 10:13:56 +0000 (13:13 +0300)
commitee92656eba26d1b8b52704d32280b4de59b7f069
treee6fb626c978724ad18d183452660e3af9f8768fe
parent2538406172989c04a49447e7adfac1bdbbba6567
wifi: iwlwifi: cfg: reduce configuration struct size

We don't need the CORES() match nor jacket (which really doesn't
even make sense to match to the RF anyway), and since the subdevice
masks we care about are contiguous, we can encode them as highest
and lowest bit set (automatically.) By encoding whether to match or
not as separate flags and taking advantage of the limited range of
the RF type, step and ID we can reduce the amount of memory needed
for the table, while also making the logic (apart perhaps from the
subdevice 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
drivers/net/wireless/intel/iwlwifi/iwl-config.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/tests/devinfo.c