linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <egrumbach@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Alexander Bondar <alexander.bondar@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 01/23] iwlwifi: mvm: several fixes in scan
Date: Wed,  7 May 2014 22:52:38 +0300	[thread overview]
Message-ID: <1399492380-12050-1-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <536A8EE3.2050906@gmail.com>

From: Alexander Bondar <alexander.bondar@intel.com>

The firmware doesn't handle properly the fragmented scan.
Stop using it.
While at it change max_out_time and suspend_time units from
usec to TUs as expected by firmware API.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h |  8 ++--
 drivers/net/wireless/iwlwifi/mvm/scan.c        | 53 ++++++--------------------
 2 files changed, 16 insertions(+), 45 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
index 9426905..d73a89e 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-scan.h
@@ -183,9 +183,9 @@ enum iwl_scan_type {
  *	this number of packets were received (typically 1)
  * @passive2active: is auto switching from passive to active during scan allowed
  * @rxchain_sel_flags: RXON_RX_CHAIN_*
- * @max_out_time: in usecs, max out of serving channel time
+ * @max_out_time: in TUs, max out of serving channel time
  * @suspend_time: how long to pause scan when returning to service channel:
- *	bits 0-19: beacon interal in usecs (suspend before executing)
+ *	bits 0-19: beacon interal in TUs (suspend before executing)
  *	bits 20-23: reserved
  *	bits 24-31: number of beacons (suspend between channels)
  * @rxon_flags: RXON_FLG_*
@@ -383,8 +383,8 @@ enum scan_framework_client {
  * @quiet_plcp_th:	quiet channel num of packets threshold
  * @good_CRC_th:	passive to active promotion threshold
  * @rx_chain:		RXON rx chain.
- * @max_out_time:	max uSec to be out of assoceated channel
- * @suspend_time:	pause scan this long when returning to service channel
+ * @max_out_time:	max TUs to be out of assoceated channel
+ * @suspend_time:	pause scan this TUs when returning to service channel
  * @flags:		RXON flags
  * @filter_flags:	RXONfilter
  * @tx_cmd:		tx command for active scan; for 2GHz and for 5GHz.
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index c91dc84..cba88a3 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -277,51 +277,22 @@ static void iwl_mvm_scan_calc_params(struct iwl_mvm *mvm,
 					    IEEE80211_IFACE_ITER_NORMAL,
 					    iwl_mvm_scan_condition_iterator,
 					    &global_bound);
-	/*
-	 * Under low latency traffic passive scan is fragmented meaning
-	 * that dwell on a particular channel will be fragmented. Each fragment
-	 * dwell time is 20ms and fragments period is 105ms. Skipping to next
-	 * channel will be delayed by the same period - 105ms. So suspend_time
-	 * parameter describing both fragments and channels skipping periods is
-	 * set to 105ms. This value is chosen so that overall passive scan
-	 * duration will not be too long. Max_out_time in this case is set to
-	 * 70ms, so for active scanning operating channel will be left for 70ms
-	 * while for passive still for 20ms (fragment dwell).
-	 */
-	if (global_bound) {
-		if (!iwl_mvm_low_latency(mvm)) {
-			params->suspend_time = ieee80211_tu_to_usec(100);
-			params->max_out_time = ieee80211_tu_to_usec(600);
-		} else {
-			params->suspend_time = ieee80211_tu_to_usec(105);
-			/* P2P doesn't support fragmented passive scan, so
-			 * configure max_out_time to be at least longest dwell
-			 * time for passive scan.
-			 */
-			if (vif->type == NL80211_IFTYPE_STATION && !vif->p2p) {
-				params->max_out_time = ieee80211_tu_to_usec(70);
-				params->passive_fragmented = true;
-			} else {
-				u32 passive_dwell;
 
-				/*
-				 * Use band G so that passive channel dwell time
-				 * will be assigned with maximum value.
-				 */
-				band = IEEE80211_BAND_2GHZ;
-				passive_dwell = iwl_mvm_get_passive_dwell(band);
-				params->max_out_time =
-					ieee80211_tu_to_usec(passive_dwell);
-			}
-		}
+	if (!global_bound)
+		goto not_bound;
+
+	params->suspend_time = 100;
+	params->max_out_time = 600;
+
+	if (iwl_mvm_low_latency(mvm)) {
+		params->suspend_time = 250;
+		params->max_out_time = 250;
 	}
 
+not_bound:
+
 	for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
-		if (params->passive_fragmented)
-			params->dwell[band].passive = 20;
-		else
-			params->dwell[band].passive =
-				iwl_mvm_get_passive_dwell(band);
+		params->dwell[band].passive = iwl_mvm_get_passive_dwell(band);
 		params->dwell[band].active = iwl_mvm_get_active_dwell(band,
 								      n_ssids);
 	}
-- 
1.8.3.2


  reply	other threads:[~2014-05-07 19:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07 19:52 pull request: iwlwifi-next 2014-05-07 Emmanuel Grumbach
2014-05-07 19:52 ` Emmanuel Grumbach [this message]
2014-05-07 19:52 ` [PATCH 02/23] iwlwifi: mvm: BT Coex - fix validity flags during init Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 03/23] iwlwifi: mvm: rs - s/CPTCFG/CONFIG Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 04/23] iwlwifi: mvm: rs: revert changes to search cycle rules Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 05/23] iwlwifi: mvm: rs: overhaul rs_get_best_rate Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 06/23] iwlwifi: mvm: rs: don't allow TPC when power save is disabled Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 07/23] iwlwifi: mvm: rs: avoid TPC while in search cycle Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 08/23] iwlwifi: mvm: rs: choose correct expected tpt table Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 09/23] iwlwifi: mvm: remove useless variable Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 10/23] iwlwifi: mvm: fix bug with OTP memory size Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 11/23] iwlwifi: mvm: prevent nic to powered up at driver load Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 12/23] iwlwifi: mvm: Prioritize external nvm values on top of the OTP values Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 13/23] iwlwifi: mvm: select the MAC address according to priority Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 14/23] iwlwifi: mvm: fix bug in parse_nvm_sections Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 15/23] iwlwifi: make LED support optional Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 16/23] iwlwifi: pcie: use bool for iwl_pcie_txq_build_tfd() argument Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 17/23] iwlwifi: pcie: get rid of q->n_bd Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 18/23] iwlwifi: mvm/pcie: capture last commands on firmware error Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 19/23] iwlwifi: mvm: wait for d0i3 exit in some more ampdu actions Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 20/23] iwlwifi:mvm: Add AP/GO channel switch support Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 21/23] iwlwifi: mvm: implement mac80211's flush callback Emmanuel Grumbach
2014-05-07 19:52 ` [PATCH 22/23] iwlwifi: mvm: fix sparse warning when _DEBUGFS isn't set Emmanuel Grumbach
2014-05-07 19:53 ` [PATCH 23/23] iwlwifi: mvm: rs: enable MCS9 for Tx Emmanuel Grumbach
2014-05-08 15:37 ` pull request: iwlwifi-next 2014-05-07 John W. Linville

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=1399492380-12050-1-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.com \
    --cc=alexander.bondar@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).