linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Shaul Triebitz <shaul.triebitz@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 15/17] iwlwifi: do not fail on large amount of channels
Date: Fri,  8 Feb 2019 00:36:20 +0200	[thread overview]
Message-ID: <20190207223622.9642-16-luca@coelho.fi> (raw)
In-Reply-To: <20190207223622.9642-1-luca@coelho.fi>

From: Shaul Triebitz <shaul.triebitz@intel.com>

Until supporting UHB (ultra high band) channels for
devices AX210, do not fail if number of channels reported
by firmware is greater than NL80211_MAX_SUPP_REG_RULES.
The Driver in that case will use only the non-UHB channels.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 484ef4556953..503860a2b36d 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -1102,12 +1102,12 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
 	int max_num_ch = cfg->nvm_type == IWL_NVM_EXT ?
 			 IWL_NVM_NUM_CHANNELS_EXT : IWL_NVM_NUM_CHANNELS;
 
-	if (WARN_ON_ONCE(num_of_ch > NL80211_MAX_SUPP_REG_RULES))
-		return ERR_PTR(-EINVAL);
-
 	if (WARN_ON(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);
+
 	IWL_DEBUG_DEV(dev, IWL_DL_LAR, "building regdom for %d channels\n",
 		      num_of_ch);
 
-- 
2.20.1


  parent reply	other threads:[~2019-02-07 22:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 22:36 [PATCH 00/17] iwlwifi: updates intended for v5.1 2019-02-07 Luca Coelho
2019-02-07 22:36 ` [PATCH 01/17] iwlwifi: bump FW API to 45 for 9000 and 22000 series Luca Coelho
2019-02-07 22:36 ` [PATCH 02/17] iwlwifi: pcie: fix emergency path Luca Coelho
2019-02-07 22:36 ` [PATCH 03/17] iwlwifi: dvm: don't use IWL_DL_FW_ERRORS Luca Coelho
2019-02-07 22:36 ` [PATCH 04/17] iwlwifi: pcie: add TPT oriented prints Luca Coelho
2019-02-07 22:36 ` [PATCH 05/17] iwlwifi: dbg_ini: implement monitor sram memory dump Luca Coelho
2019-02-07 22:36 ` [PATCH 06/17] iwlwifi: mvm: don't require WOWLAN images when unified Luca Coelho
2019-02-07 22:36 ` [PATCH 07/17] iwlwifi: dbg_ini: implement monitor dram memory dump Luca Coelho
2019-02-07 22:36 ` [PATCH 08/17] iwlwifi: mvm: support FTM responder Luca Coelho
2019-02-07 22:36 ` [PATCH 09/17] iwlwifi: mvm: support FTM initiator Luca Coelho
2019-02-07 22:36 ` [PATCH 10/17] iwlwifi: mvm: clean up NO_PSDU case Luca Coelho
2019-02-07 22:36 ` [PATCH 11/17] iwlwifi: receive umac and lmac error table addresses from TLVs Luca Coelho
2019-02-07 22:36 ` [PATCH 12/17] iwlwifi: dbg_ini: rewrite trigger flow and align to FW API changes Luca Coelho
2019-02-07 22:36 ` [PATCH 13/17] iwlwifi: introduce device family AX210 Luca Coelho
2019-02-07 22:36 ` [PATCH 14/17] iwlwifi: add FW recovery flow Luca Coelho
2019-02-07 22:36 ` Luca Coelho [this message]
2019-02-07 22:36 ` [PATCH 16/17] iwlwifi: mvm: Fix possible NULL pointer dereference Luca Coelho
2019-02-07 22:36 ` [PATCH 17/17] iwlwifi: mvm: support beacon IE injection Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207223622.9642-16-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=shaul.triebitz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).