wifi: iwlwifi: mvm: correctly access HE/EHT sband capa
authorJohannes Berg <johannes.berg@intel.com>
Wed, 14 Jun 2023 09:41:18 +0000 (12:41 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Jun 2023 10:05:25 +0000 (12:05 +0200)
commitf912959875761084fda351e1257dcfa9d1fa3037
treef1d6c69c8f9cc7232e926e3694abaac6f0e87269
parent7dd50fd5478056929a012c6bf8b3c6f87c7e9e87
wifi: iwlwifi: mvm: correctly access HE/EHT sband capa

We can't just dereference the sband->iftype_data pointer,
that's an array so we need to access the right entry. Use
the previously introduced helper functions to do that.

There are also cases, e.g. when loading with disable_11ax=1,
where the pointer might be NULL but we still attempt to use
it, causing a crash.

Fixes: 529281bdf0fc ("iwlwifi: mvm: limit TLC according to our HE capabilities")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230614123446.a1f2b17ee39b.I8808120be744be8804815ce9e3e24ce6d2b424e3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c