diff options
author | Moshe Harel <moshe.harel@intel.com> | 2014-12-08 14:13:14 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-12-28 13:00:12 -0500 |
commit | a054427244158552e91dacc0a4fc0a1b5e7342b9 (patch) | |
tree | d2d789644dbe031ba3fd32497e2c5336bf035339 /drivers/net/wireless/iwlwifi/mvm/mvm.h | |
parent | 7074cc4280463c27161a1eba89dfaa01685161bd (diff) |
iwlwifi: mvm: support LnP 1x1 antenna configuration
The antenna configuration has to be read also from OTP
Currently read only from FW image
Guideline: An antenna exists only if appears both in FW image & NVM
Signed-off-by: Moshe Harel <moshe.harel@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/mvm.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index d24660fb4ef2..f3cb08976e23 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -937,6 +937,33 @@ int iwl_mvm_rx_statistics(struct iwl_mvm *mvm, | |||
937 | int iwl_nvm_init(struct iwl_mvm *mvm, bool read_nvm_from_nic); | 937 | int iwl_nvm_init(struct iwl_mvm *mvm, bool read_nvm_from_nic); |
938 | int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm); | 938 | int iwl_mvm_load_nvm_to_nic(struct iwl_mvm *mvm); |
939 | 939 | ||
940 | static inline u8 iwl_mvm_get_valid_tx_ant(struct iwl_mvm *mvm) | ||
941 | { | ||
942 | return mvm->nvm_data && mvm->nvm_data->valid_tx_ant ? | ||
943 | mvm->fw->valid_tx_ant & mvm->nvm_data->valid_tx_ant : | ||
944 | mvm->fw->valid_tx_ant; | ||
945 | } | ||
946 | |||
947 | static inline u8 iwl_mvm_get_valid_rx_ant(struct iwl_mvm *mvm) | ||
948 | { | ||
949 | return mvm->nvm_data && mvm->nvm_data->valid_rx_ant ? | ||
950 | mvm->fw->valid_rx_ant & mvm->nvm_data->valid_rx_ant : | ||
951 | mvm->fw->valid_rx_ant; | ||
952 | } | ||
953 | |||
954 | static inline u32 iwl_mvm_get_phy_config(struct iwl_mvm *mvm) | ||
955 | { | ||
956 | u32 phy_config = ~(FW_PHY_CFG_TX_CHAIN | | ||
957 | FW_PHY_CFG_RX_CHAIN); | ||
958 | u32 valid_rx_ant = iwl_mvm_get_valid_rx_ant(mvm); | ||
959 | u32 valid_tx_ant = iwl_mvm_get_valid_tx_ant(mvm); | ||
960 | |||
961 | phy_config |= valid_tx_ant << FW_PHY_CFG_TX_CHAIN_POS | | ||
962 | valid_rx_ant << FW_PHY_CFG_RX_CHAIN_POS; | ||
963 | |||
964 | return mvm->fw->phy_config & phy_config; | ||
965 | } | ||
966 | |||
940 | int iwl_mvm_up(struct iwl_mvm *mvm); | 967 | int iwl_mvm_up(struct iwl_mvm *mvm); |
941 | int iwl_mvm_load_d3_fw(struct iwl_mvm *mvm); | 968 | int iwl_mvm_load_d3_fw(struct iwl_mvm *mvm); |
942 | 969 | ||