linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 16/43] iwlwifi: make uapsd_disable module param a bitmap
Date: Wed, 30 Mar 2016 17:04:48 +0300	[thread overview]
Message-ID: <1459346715-7954-16-git-send-email-emmanuel.grumbach@intel.com> (raw)
In-Reply-To: <1459346667.4731.9.camel@intel.com>

This allows to disable uapsd for BSS only, or P2P client
separately. Remove the now unneeded
IWL_MVM_P2P_UAPSD_STANDALONE constant.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c       | 10 ++++++----
 drivers/net/wireless/intel/iwlwifi/iwl-modparams.h | 10 ++++++++--
 drivers/net/wireless/intel/iwlwifi/mvm/constants.h |  1 -
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  3 ++-
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h       |  3 ++-
 5 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index f899666..2cd9c31 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1561,7 +1561,7 @@ struct iwl_mod_params iwlwifi_mod_params = {
 	.d0i3_disable = true,
 	.d0i3_entry_delay = 1000,
 #ifndef CONFIG_IWLWIFI_UAPSD
-	.uapsd_disable = true,
+	.uapsd_disable = IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT,
 #endif /* CONFIG_IWLWIFI_UAPSD */
 	/* the rest are 0 by default */
 };
@@ -1681,11 +1681,13 @@ module_param_named(lar_disable, iwlwifi_mod_params.lar_disable,
 MODULE_PARM_DESC(lar_disable, "disable LAR functionality (default: N)");
 
 module_param_named(uapsd_disable, iwlwifi_mod_params.uapsd_disable,
-		   bool, S_IRUGO | S_IWUSR);
+		   uint, S_IRUGO | S_IWUSR);
 #ifdef CONFIG_IWLWIFI_UAPSD
-MODULE_PARM_DESC(uapsd_disable, "disable U-APSD functionality (default: N)");
+MODULE_PARM_DESC(uapsd_disable,
+		 "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 0)");
 #else
-MODULE_PARM_DESC(uapsd_disable, "disable U-APSD functionality (default: Y)");
+MODULE_PARM_DESC(uapsd_disable,
+		 "disable U-APSD functionality bitmap 1: BSS 2: P2P Client (default: 3)");
 #endif
 
 /*
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
index d1a5dd1..6c5c2f9 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-modparams.h
@@ -92,6 +92,11 @@ enum iwl_amsdu_size {
 	IWL_AMSDU_12K = 2,
 };
 
+enum iwl_uapsd_disable {
+	IWL_DISABLE_UAPSD_BSS		= BIT(0),
+	IWL_DISABLE_UAPSD_P2P_CLIENT	= BIT(1),
+};
+
 /**
  * struct iwl_mod_params
  *
@@ -109,7 +114,8 @@ enum iwl_amsdu_size {
  * @debug_level: levels are IWL_DL_*
  * @ant_coupling: antenna coupling in dB, default = 0
  * @nvm_file: specifies a external NVM file
- * @uapsd_disable: disable U-APSD, default = 1
+ * @uapsd_disable: disable U-APSD, see %enum iwl_uapsd_disable, default =
+ *	IWL_DISABLE_UAPSD_BSS | IWL_DISABLE_UAPSD_P2P_CLIENT
  * @d0i3_disable: disable d0i3, default = 1,
  * @d0i3_entry_delay: time to wait after no refs are taken before
  *	entering D0i3 (in msecs)
@@ -131,7 +137,7 @@ struct iwl_mod_params {
 #endif
 	int ant_coupling;
 	char *nvm_file;
-	bool uapsd_disable;
+	u32 uapsd_disable;
 	bool d0i3_disable;
 	unsigned int d0i3_entry_delay;
 	bool lar_disable;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
index 4b560e4..b96b1c6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h
@@ -75,7 +75,6 @@
 #define IWL_MVM_WOWLAN_PS_RX_DATA_TIMEOUT	(10 * USEC_PER_MSEC)
 #define IWL_MVM_SHORT_PS_TX_DATA_TIMEOUT	(2 * 1024) /* defined in TU */
 #define IWL_MVM_SHORT_PS_RX_DATA_TIMEOUT	(40 * 1024) /* defined in TU */
-#define IWL_MVM_P2P_UAPSD_STANDALONE		0
 #define IWL_MVM_P2P_LOWLATENCY_PS_ENABLE	0
 #define IWL_MVM_UAPSD_RX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
 #define IWL_MVM_UAPSD_TX_DATA_TIMEOUT		(50 * USEC_PER_MSEC)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index cff9c16..1a3481b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -2345,7 +2345,8 @@ static void iwl_mvm_check_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 		return;
 	}
 
-	if (iwlwifi_mod_params.uapsd_disable) {
+	if (!vif->p2p &&
+	    (iwlwifi_mod_params.uapsd_disable & IWL_DISABLE_UAPSD_BSS)) {
 		vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD;
 		return;
 	}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 2e0a882..02ef1d9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1072,7 +1072,8 @@ bool iwl_mvm_is_p2p_standalone_uapsd_supported(struct iwl_mvm *mvm)
 {
 	return fw_has_capa(&mvm->fw->ucode_capa,
 			   IWL_UCODE_TLV_CAPA_P2P_STANDALONE_UAPSD) &&
-		IWL_MVM_P2P_UAPSD_STANDALONE;
+		!(iwlwifi_mod_params.uapsd_disable &
+		  IWL_DISABLE_UAPSD_P2P_CLIENT);
 }
 
 static inline bool iwl_mvm_has_new_rx_api(struct iwl_mvm *mvm)
-- 
2.5.0


  parent reply	other threads:[~2016-03-30 14:05 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 14:04 pull request: iwlwifi-next 2016-03-30 Grumbach, Emmanuel
2016-03-30 14:04 ` [PATCH 01/43] iwlwifi: pcie: clear trans reference on queue stop Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 02/43] iwlwifi: mvm: Decrease size of the paging download buffer Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 03/43] iwlwifi: mvm: make sure FW contains the right amount of paging sections Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 04/43] iwlwifi: mvm: support dumping UMAC internal txfifos Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 05/43] iwlwifi: mvm: add LQM vendor command and notification Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 06/43] iwlwifi: add a debugfs hook for LQM Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 07/43] iwlwifi: pcie: fix global table size Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 08/43] iwlwifi: pcie: enable interrupts explicitly on resume Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 09/43] iwlwifi: pcie: refcounting is not necessary anymore Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 10/43] iwlwifi: mvm: handle async temperature notification with unlocked mutex Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 11/43] iwlwifi: pcie: print error value as signed int Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 12/43] iwlwifi: mvm: modify the max SP to infinite Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 13/43] iwlwifi: pcie: do not pad QoS AMSDU Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 14/43] iwlwifi: mvm: add support for new TX CMD API Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 15/43] iwlwifi: add missing mutex_destroy statements Emmanuel Grumbach
2016-03-30 14:04 ` Emmanuel Grumbach [this message]
2016-03-30 14:04 ` [PATCH 17/43] iwlwifi: 9000: update device id and FW serial number Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 18/43] iwlwifi: mvm: remove is_data_qos variable in TX Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 19/43] iwlwifi: mvm: support bss dynamic alloc/dealloc of queues Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 20/43] iwlwifi: pcie: write to legacy register also in MQ Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 21/43] iwlwifi: remove IWLWIFI_UAPSD Kconfig Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 22/43] iwlwifi: mvm: update GSCAN capabilities Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 23/43] iwlwifi: remove support for fw older than -16.ucode Emmanuel Grumbach
2016-04-24  6:30   ` Pat Erley
2016-04-25 13:05     ` Kalle Valo
2016-03-30 14:04 ` [PATCH 24/43] iwlwifi: dvm: use alloc_ordered_workqueue() Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 25/43] iwlwifi: mvm: report checksum is done also for IPv6 packets Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 26/43] iwlwifi: mvm: set aux STA ID in scan config Emmanuel Grumbach
2016-03-30 14:04 ` [PATCH 27/43] iwlwifi: trans: fix iwl_trans_txq_scd_cfg.sta_id sign Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 28/43] iwlwifi: mvm: remove uneeded D0I3 checking Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 29/43] iwlwifi: pcie: request one more interrupt vector Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 30/43] iwlwifi: mvm: improve RSS configuration Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 31/43] iwlwifi: edit the 9000 series PCI IDs Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 32/43] iwlwifi: mvm: use bss client queue for bss station Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 33/43] iwlwifi: mvm: set sta_id in SCD_QUEUE_CONFIG cmd Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 34/43] iwlwifi: mvm: allocate dedicated queue for cab in dqa mode Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 35/43] iwlwifi: mvm: move cmd queue to be #0 " Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 36/43] iwlwifi: mvm: add a scan timeout for regular scans Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 37/43] iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 38/43] iwlwifi: remove IWL_*_UCODE_API_OK Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 39/43] iwlwifi: pcie: Fix index iteration on free_irq in MSIX mode Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 40/43] iwlwifi: store fw memory segments length and addresses in run-time Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 41/43] iwlwifi: mvm: fix inconsistent lock in dqa mode Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 42/43] iwlwifi: mvm: allow setting the thermal state in D0i3 Emmanuel Grumbach
2016-03-30 14:05 ` [PATCH 43/43] iwlwifi: pcie: remove duplicate assignment of variable isr_stats Emmanuel Grumbach
2016-04-06 18:17 ` pull request: iwlwifi-next 2016-03-30 Kalle Valo

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=1459346715-7954-16-git-send-email-emmanuel.grumbach@intel.com \
    --to=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).