aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2013-11-12 07:47:59 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-12-17 12:39:52 -0500
commit752096727cdec42c2fa91242dbc341c8f360e167 (patch)
treeebf68601a603c54e094740ccb190cbbebcc29a1b
parent128cb89e1d18c8f9d1dc82446a4c3003ca0b6f7e (diff)
iwlwifi: mvm: Add and examine TLV flag for P2P client uAPSD support
Current firmware doesn't handle well uAPSD in P2P Client. When it will be fixed, the firmware will set a TLV flag to notify the driver that uAPSD is supported in P2P client mode. Check this flag when sending power command for P2P client. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw.h2
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h
index 959562d9f55c..8704e3042ca1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@ -94,6 +94,7 @@
94 * containing CAM (Continuous Active Mode) indication. 94 * containing CAM (Continuous Active Mode) indication.
95 * @IWL_UCODE_TLV_FLAGS_P2P_PS: P2P client power save is supported (only on a 95 * @IWL_UCODE_TLV_FLAGS_P2P_PS: P2P client power save is supported (only on a
96 * single bound interface). 96 * single bound interface).
97 * @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save
97 */ 98 */
98enum iwl_ucode_tlv_flag { 99enum iwl_ucode_tlv_flag {
99 IWL_UCODE_TLV_FLAGS_PAN = BIT(0), 100 IWL_UCODE_TLV_FLAGS_PAN = BIT(0),
@@ -117,6 +118,7 @@ enum iwl_ucode_tlv_flag {
117 IWL_UCODE_TLV_FLAGS_DEVICE_PS_CMD = BIT(20), 118 IWL_UCODE_TLV_FLAGS_DEVICE_PS_CMD = BIT(20),
118 IWL_UCODE_TLV_FLAGS_P2P_PS = BIT(21), 119 IWL_UCODE_TLV_FLAGS_P2P_PS = BIT(21),
119 IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24), 120 IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24),
121 IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD = BIT(26),
120}; 122};
121 123
122/* The default calibrate table size if not specified by firmware file */ 124/* The default calibrate table size if not specified by firmware file */
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index d173ea27417e..483ecc67501f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -358,6 +358,10 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
358 if (!memcmp(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid, 358 if (!memcmp(mvmvif->uapsd_misbehaving_bssid, vif->bss_conf.bssid,
359 ETH_ALEN)) 359 ETH_ALEN))
360 allow_uapsd = false; 360 allow_uapsd = false;
361
362 if (vif->p2p &&
363 !(mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD))
364 allow_uapsd = false;
361 /* 365 /*
362 * Avoid using uAPSD if P2P client is associated to GO that uses 366 * Avoid using uAPSD if P2P client is associated to GO that uses
363 * opportunistic power save. This is due to current FW limitation. 367 * opportunistic power save. This is due to current FW limitation.