Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8cfa08e authored by Tova Mussai's avatar Tova Mussai Committed by Luca Coelho
Browse files

iwlwifi: allocate bigger nvm data in case of UHB



In case of Ultra-high-band (UHB), need to allocate nvm data structure in
size of UHB channels array.

Signed-off-by: default avatarTova Mussai <tova.mussai@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 2c0c0240
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -942,7 +942,11 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
	u16 lar_config;
	u16 lar_config;
	const __le16 *ch_section;
	const __le16 *ch_section;


	if (cfg->nvm_type != IWL_NVM_EXT)
	if (cfg->uhb_supported)
		data = kzalloc(struct_size(data, channels,
					   IWL_NVM_NUM_CHANNELS_UHB),
					   GFP_KERNEL);
	else if (cfg->nvm_type != IWL_NVM_EXT)
		data = kzalloc(struct_size(data, channels,
		data = kzalloc(struct_size(data, channels,
					   IWL_NVM_NUM_CHANNELS),
					   IWL_NVM_NUM_CHANNELS),
					   GFP_KERNEL);
					   GFP_KERNEL);