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, Ilan Peer <ilan.peer@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 08/20] iwiwifi: mvm: Fix FW scan concurrency support assumptions
Date: Fri,  8 Feb 2019 12:47:00 +0200	[thread overview]
Message-ID: <20190208104712.16210-9-luca@coelho.fi> (raw)
In-Reply-To: <20190208104712.16210-1-luca@coelho.fi>

From: Ilan Peer <ilan.peer@intel.com>

- The FW supports up to 4 concurrent scans, so adjust the definitions
  accordingly.
- Only a single periodic scan is supported, so enforce it in the code.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/api/scan.h | 6 +++---
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c    | 9 +++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
index 18741889ec30..890a939c463d 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/scan.h
@@ -8,7 +8,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018        Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018        Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -434,7 +434,7 @@ struct iwl_periodic_scan_complete {
 /* The maximum of either of these cannot exceed 8, because we use an
  * 8-bit mask (see IWL_MVM_SCAN_MASK in mvm.h).
  */
-#define IWL_MVM_MAX_UMAC_SCANS 8
+#define IWL_MVM_MAX_UMAC_SCANS 4
 #define IWL_MVM_MAX_LMAC_SCANS 1
 
 enum scan_config_flags {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index 853bf679dc26..78694bc38e76 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -8,7 +8,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of version 2 of the GNU General Public License as
@@ -31,7 +31,7 @@
  * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
  * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
  * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
- * Copyright(c) 2018 Intel Corporation
+ * Copyright(c) 2018 - 2019 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1580,6 +1580,11 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type)
 	 * scheduled scan before starting a normal scan.
 	 */
 
+	/* FW supports only a single periodic scan */
+	if ((type == IWL_MVM_SCAN_SCHED || type == IWL_MVM_SCAN_NETDETECT) &&
+	    mvm->scan_status & (IWL_MVM_SCAN_SCHED | IWL_MVM_SCAN_NETDETECT))
+		return -EBUSY;
+
 	if (iwl_mvm_num_scans(mvm) < mvm->max_scans)
 		return 0;
 
-- 
2.20.1


  parent reply	other threads:[~2019-02-08 10:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 10:46 [PATCH 00/20] iwlwifi: updates intended for v5.1 2019-02-08 Luca Coelho
2019-02-08 10:46 ` [PATCH 01/20] iwlwifi: bump FW API to 46 for 9000 and 22000 series Luca Coelho
2019-02-08 10:46 ` [PATCH 02/20] iwlwifi: pcie: fix TX while flushing Luca Coelho
2019-02-08 10:46 ` [PATCH 03/20] iwlwifi: mvm: add support for 32kHz external clock indication Luca Coelho
2019-02-08 10:46 ` [PATCH 04/20] iwlwifi: dbg: temporarily skip periphery dump for AX210 devices Luca Coelho
2019-02-08 10:46 ` [PATCH 05/20] iwlwifi: align to new periphery address space for AX210 family Luca Coelho
2019-02-08 10:46 ` [PATCH 06/20] iwlwifi: add force NMI for AX210 devices Luca Coelho
2019-02-08 10:46 ` [PATCH 07/20] iwlwifi: mvm: add a debug_enable op Luca Coelho
2019-02-08 10:47 ` Luca Coelho [this message]
2019-02-08 10:47 ` [PATCH 09/20] iwlwifi: mvm: add support for new FTM fw API Luca Coelho
2019-02-08 10:47 ` [PATCH 10/20] iwlwifi: mvm: fix HE radiotap data4 for HE-TB PPDUs Luca Coelho
2019-02-08 10:47 ` [PATCH 11/20] iwlwifi: mvm: add debug prints for FTM Luca Coelho
2019-02-12  7:56   ` [PATCH 11/20 v2] " Luca Coelho
2019-02-13  6:55     ` [PATCH 11/20 v3] " Luca Coelho
2019-02-08 10:47 ` [PATCH 12/20] iwlwifi: start using B-step for some 9000 devices Luca Coelho
2019-02-08 10:47 ` [PATCH 13/20] iwlwifi: properly use delay option in dump trigger flow Luca Coelho
2019-02-08 10:47 ` [PATCH 14/20] iwlwifi: dbg_ini: enable ignore consecutive trigger feature Luca Coelho
2019-02-08 10:47 ` [PATCH 15/20] iwlwifi: mvm: fix the spatial reuse parsing for HE_TRIG PPDUs Luca Coelho
2019-02-08 10:47 ` [PATCH 16/20] iwlwifi: dbg: buffer overflow in non_collect_ts_start array Luca Coelho
2019-02-08 10:47 ` [PATCH 17/20] iwlwifi: mvm: Don't warn on command failure during restart Luca Coelho
2019-02-08 10:47 ` [PATCH 18/20] iwlwifi: mvm: Do not return an error value on HW restart Luca Coelho
2019-02-08 10:47 ` [PATCH 19/20] iwlwifi: dbg_ini: add early and after alive apply points to unified images Luca Coelho
2019-02-08 10:47 ` [PATCH 20/20] iwlwifi: mvm: stop static queues correctly 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=20190208104712.16210-9-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=ilan.peer@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@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).