summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/mvm/tx.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-07-01 12:54:25 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-09-16 12:57:50 +0300
commitf1daa00e36c97e24b4d9a210397349212422ed85 (patch)
tree5a5201c381a69628ab406d6a09b46876057d7415 /drivers/net/wireless/iwlwifi/mvm/tx.c
parentb71d9c8a9d7284a5cc6c93e01bf258323f0d334a (diff)
iwlwifi: mvm: Update TX power in TPC reports
Introduce new tx command flag (TX_CMD_FLG_WRITE_TX_POWER) which requests the fw to update the tx power value at some constant offset. Set this flag when transmitting either TPC report or Link measurement report action frames. In addition, introduce new tlv which indicates whether the fw supports power insertion (IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT) and publish the corresponding nl80211 feature. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/tx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index c67296efa04d..d84f3ca75f63 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -133,6 +133,11 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
!is_multicast_ether_addr(ieee80211_get_DA(hdr)))
tx_flags |= TX_CMD_FLG_PROT_REQUIRE;
+ if ((mvm->fw->ucode_capa.capa[0] &
+ IWL_UCODE_TLV_CAPA_TXPOWER_INSERTION_SUPPORT) &&
+ ieee80211_action_contains_tpc(skb))
+ tx_flags |= TX_CMD_FLG_WRITE_TX_POWER;
+
tx_cmd->tx_flags = cpu_to_le32(tx_flags);
/* Total # bytes to be transmitted */
tx_cmd->len = cpu_to_le16((u16)skb->len);