linux/drivers/net/wireless/intel/iwlwifi
Johannes Berg 48a5494d6a iwlwifi: pcie: make cfg vs. trans_cfg more robust
If we (for example) have a trans_cfg entry in the PCI IDs table,
but then don't find a full cfg entry for it in the info table,
we fall through to the code that treats the PCI ID table entry
as a full cfg entry. This obviously causes crashes later, e.g.
when trying to build the firmware name string.

Avoid such crashes by using the low bit of the pointer as a tag
for trans_cfg entries (automatically using a macro that checks
the type when assigning) and then checking that before trying to
use the data as a full entry - if it's just a partial entry at
that point, fail.

Since we're adding some macro magic, also check that the type is
in fact either struct iwl_cfg_trans_params or struct iwl_cfg,
failing compilation ("initializer element is not constant") if
it isn't.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210330162204.6f69fe6e4128.I921d4ae20ef5276716baeeeda0b001cf25b9b968@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2021-04-14 12:07:16 +03:00
..
cfg iwlwifi: add 160Mhz to killer 1550 name 2021-04-14 12:07:15 +03:00
dvm iwlwifi: remove flags argument for nic_access 2021-02-10 14:39:40 +02:00
fw iwlwifi: fw: fix notification wait locking 2021-04-06 13:25:59 +03:00
mvm iwlwifi: mvm: don't allow CSA if we haven't been fully associated 2021-04-14 12:05:26 +03:00
pcie iwlwifi: pcie: make cfg vs. trans_cfg more robust 2021-04-14 12:07:16 +03:00
queue iwlwifi: queue: add fake tx time point 2021-02-10 14:39:40 +02:00
iwl-agn-hw.h
iwl-config.h iwlwifi: change step in so-gf struct 2021-04-14 12:07:15 +03:00
iwl-context-info-gen3.h
iwl-context-info.h
iwl-csr.h iwlwifi: pcie: clear only FH bits handle in the interrupt 2021-04-14 12:07:16 +03:00
iwl-dbg-tlv.c iwlwifi: dbg: remove unsupported regions 2021-02-10 14:39:38 +02:00
iwl-dbg-tlv.h iwlwifi: dbg: add op_mode callback for collecting debug data. 2021-02-10 14:39:39 +02:00
iwl-debug.c
iwl-debug.h
iwl-devtrace-data.h
iwl-devtrace-io.h
iwl-devtrace-iwlwifi.h
iwl-devtrace-msg.h
iwl-devtrace-ucode.h
iwl-devtrace.c
iwl-devtrace.h
iwl-drv.c iwlwifi: dbg: Mark ucode tlv data as const 2021-02-10 13:58:15 +02:00
iwl-drv.h
iwl-eeprom-parse.c iwlwifi: remove max_ht_ampdu_exponent config parameter 2021-02-11 01:52:10 +02:00
iwl-eeprom-parse.h
iwl-eeprom-read.c
iwl-eeprom-read.h
iwl-fh.h
iwl-io.c iwlwifi: remove flags argument for nic_access 2021-02-10 14:39:40 +02:00
iwl-io.h
iwl-modparams.h
iwl-nvm-parse.c iwlwifi: fix 11ax disabled bit in the regulatory capability flags 2021-04-06 13:25:45 +03:00
iwl-nvm-parse.h iwlmvm: set properly NIC_NOT_ACK_ENABLED flag 2021-02-11 01:52:11 +02:00
iwl-op-mode.h iwlwifi: avoid crash on unsupported debug collection 2021-02-22 09:22:16 +02:00
iwl-phy-db.c
iwl-phy-db.h
iwl-prph.h iwlwifi patches intended for v5.12 2021-02-08 18:52:00 +02:00
iwl-scd.h
iwl-trans.c iwlwifi: correction of group-id once sending REPLY_ERROR 2021-02-10 14:39:42 +02:00
iwl-trans.h iwlwifi: remove flags argument for nic_access 2021-02-10 14:39:40 +02:00
Kconfig
Makefile