iwlwifi: pcie: simplify MSI-X cause mapping
authorJohannes Berg <johannes.berg@intel.com>
Tue, 17 May 2022 09:05:05 +0000 (12:05 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 18 May 2022 10:50:46 +0000 (12:50 +0200)
commitc1918196427b917d1fbf064b07538410807f8b03
tree5018b6e701e8c215867d62791670c9bc684cb856
parenta456021c6f1482b94dce77ebaeef77412cd37dba
iwlwifi: pcie: simplify MSI-X cause mapping

We're currently manually encoding a calculation here since the HW
just maps all the bits of specific registers to specific offsets,
which led to the bug fixed here previously with the Bz SW_ERROR
interrupt.

Clean up the code to only know about the mapping offset (-16 or
16 depending on the register) to avoid such issues in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20220517120044.19abe9a4d171.I934356911277f9b2a955808763f317986f69a461@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c