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: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 11/20] iwlwifi: mvm: BT Coex - don't change AP SMPS mode
Date: Tue, 22 Jul 2014 22:26:42 +0300	[thread overview]
Message-ID: <1406057211-31752-11-git-send-email-egrumbach@gmail.com> (raw)
In-Reply-To: <53CEB854.9000008@gmail.com>

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

Leave it to default instead - regardless of the BT activity.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/coex.c        | 21 ++++++++-------------
 drivers/net/wireless/iwlwifi/mvm/coex_legacy.c | 17 +++++++----------
 2 files changed, 15 insertions(+), 23 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c
index a65b1bb..2291bbc 100644
--- a/drivers/net/wireless/iwlwifi/mvm/coex.c
+++ b/drivers/net/wireless/iwlwifi/mvm/coex.c
@@ -768,13 +768,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 		smps_mode = IEEE80211_SMPS_AUTOMATIC;
 		break;
 	case NL80211_IFTYPE_AP:
-		/* default smps_mode for AP / GO is OFF */
-		smps_mode = IEEE80211_SMPS_OFF;
-		if (!mvmvif->ap_ibss_active) {
-			iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
-					    smps_mode);
+		if (!mvmvif->ap_ibss_active)
 			return;
-		}
 		break;
 	default:
 		return;
@@ -785,10 +780,10 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 	/* If channel context is invalid or not on 2.4GHz .. */
 	if ((!chanctx_conf ||
 	     chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) {
-		/* ... relax constraints and disable rssi events */
-		iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
-				    smps_mode);
 		if (vif->type == NL80211_IFTYPE_STATION) {
+			/* ... relax constraints and disable rssi events */
+			iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
+					    smps_mode);
 			iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id,
 						    false);
 			iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
@@ -800,9 +795,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 	if (bt_activity_grading >= BT_HIGH_TRAFFIC)
 		smps_mode = IEEE80211_SMPS_STATIC;
 	else if (bt_activity_grading >= BT_LOW_TRAFFIC)
-		smps_mode = vif->type == NL80211_IFTYPE_AP ?
-				IEEE80211_SMPS_OFF :
-				IEEE80211_SMPS_DYNAMIC;
+		smps_mode = IEEE80211_SMPS_DYNAMIC;
 
 	/* relax SMPS contraints for next association */
 	if (!vif->bss_conf.assoc)
@@ -816,7 +809,9 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 		       "mac %d: bt_activity_grading %d smps_req %d\n",
 		       mvmvif->id, bt_activity_grading, smps_mode);
 
-	iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, smps_mode);
+	if (vif->type == NL80211_IFTYPE_STATION)
+		iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
+				    smps_mode);
 
 	/* low latency is always primary */
 	if (iwl_mvm_vif_low_latency(mvmvif)) {
diff --git a/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c b/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
index 9e3ba5a..a3be333 100644
--- a/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
+++ b/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
@@ -793,13 +793,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 		smps_mode = IEEE80211_SMPS_AUTOMATIC;
 		break;
 	case NL80211_IFTYPE_AP:
-		/* default smps_mode for AP / GO is OFF */
-		smps_mode = IEEE80211_SMPS_OFF;
-		if (!mvmvif->ap_ibss_active) {
-			iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
-					    smps_mode);
+		if (!mvmvif->ap_ibss_active)
 			return;
-		}
 		break;
 	default:
 		return;
@@ -810,10 +805,10 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 	/* If channel context is invalid or not on 2.4GHz .. */
 	if ((!chanctx_conf ||
 	     chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) {
-		/* ... relax constraints and disable rssi events */
-		iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
-				    smps_mode);
 		if (vif->type == NL80211_IFTYPE_STATION) {
+			/* ... relax constraints and disable rssi events */
+			iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
+					    smps_mode);
 			iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id,
 						    false);
 			iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
@@ -838,7 +833,9 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
 		       mvmvif->id, data->notif->bt_status, bt_activity_grading,
 		       smps_mode);
 
-	iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, smps_mode);
+	if (vif->type == NL80211_IFTYPE_STATION)
+		iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
+				    smps_mode);
 
 	/* low latency is always primary */
 	if (iwl_mvm_vif_low_latency(mvmvif)) {
-- 
1.8.3.2


  parent reply	other threads:[~2014-07-22 19:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 19:15 pull request: iwlwifi-next 2014-07-22 Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 01/20] iwlwifi: mvm: BT Coex - fix TLC with old API Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 02/20] iwlwifi: add max RX aggregation size Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 03/20] iwlwifi: fix Kconfig issues Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 04/20] iwlwifi: mvm: use C99 initializers for add_sta Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 05/20] iwlwifi: mvm: fix wrong offset while reading from NVM Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 06/20] iwlwifi: mvm: add some missing iwl_mvm_ref_sync() calls Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 07/20] iwlwifi: mvm: Enabling Aux Queue Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 08/20] iwlwifi: mvm: Define AUX ROC Command Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 09/20] iwlwifi: mvm: add Aux ROC request/response flow Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 10/20] iwlwifi: mvm: BT Coex - fix the ACK / CTS kill mask Emmanuel Grumbach
2014-07-22 19:26 ` Emmanuel Grumbach [this message]
2014-07-22 19:26 ` [PATCH 12/20] iwlwifi: mvm: wait for handlers when stopping scans Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 13/20] iwlwifi: mvm: minor change in debug print Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 14/20] iwlwifi: fix inconsistency about power_save module parameter Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 15/20] iwlwifi: split fw-error-dump between transport and mvm Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 16/20] iwlwifi: dump periphery registers to fw-error-dump Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 17/20] iwlwifi: dump CSRs " Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 18/20] iwlwifi: mvm: update smart fifo / beacon filtering upon association Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 19/20] iwlwifi: mvm: reset beacon filtering and BT Coex data upon FW restart Emmanuel Grumbach
2014-07-22 19:26 ` [PATCH 20/20] iwlwifi: mvm: teardown TDLS peers during chan-switch and AP DCM Emmanuel Grumbach
2014-07-23 17:08 ` pull request: iwlwifi-next 2014-07-22 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=1406057211-31752-11-git-send-email-egrumbach@gmail.com \
    --to=egrumbach@gmail.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).