Message ID | iwlwifi.20220130115024.3cb9828df280.I14abe7c71b45bbae3d3cd503e6e13fa2cd372ed4@changeid (mailing list archive) |
---|---|
State | Accepted |
Commit | 93470966c225a2c78edc235aa4ad32175919bd42 |
Delegated to: | Luca Coelho |
Headers | show |
Series | iwlwifi: updates intended for v5.18 2022-01-30 | expand |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 895b0bc6fd5a..0693dfda43a3 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1387,8 +1387,12 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, nvm_chan = iwl_nvm_channels; } - if (WARN_ON(num_of_ch > max_num_ch)) + if (num_of_ch > max_num_ch) { + IWL_DEBUG_DEV(dev, IWL_DL_LAR, + "Num of channels (%d) is greater than expected. Truncating to %d\n", + num_of_ch, max_num_ch); num_of_ch = max_num_ch; + } if (WARN_ON_ONCE(num_of_ch > NL80211_MAX_SUPP_REG_RULES)) return ERR_PTR(-EINVAL);