summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-fw.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-03-09 22:38:19 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-03-20 17:17:12 +0400
commit332235427a566d8be04b9676a7ac380c8853aa9b (patch)
tree1a4af05725814a13bd734bca87bff96799b0a686 /drivers/net/wireless/iwlwifi/iwl-fw.h
parentd110cb51cf109a6dff0e801d945ea98d2883bd01 (diff)
downloadlinux-332235427a566d8be04b9676a7ac380c8853aa9b.tar.xz
iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV
This is the right source of information for the valid Tx antennas, not the NVM. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-fw.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-fw.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h
index 4e932e04d87e..c4c446d41eb0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fw.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fw.h
@@ -203,4 +203,16 @@ struct iwl_fw {
bool mvm_fw;
};
+static inline u8 iwl_fw_valid_tx_ant(const struct iwl_fw *fw)
+{
+ return (fw->phy_config & FW_PHY_CFG_TX_CHAIN) >>
+ FW_PHY_CFG_TX_CHAIN_POS;
+}
+
+static inline u8 iwl_fw_valid_rx_ant(const struct iwl_fw *fw)
+{
+ return (fw->phy_config & FW_PHY_CFG_RX_CHAIN) >>
+ FW_PHY_CFG_RX_CHAIN_POS;
+}
+
#endif /* __iwl_fw_h__ */