diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c index eafc517a5f9e..acb79af6fa89 100644 --- a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c | |||
@@ -156,6 +156,19 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, | |||
156 | idle_cnt = chains_static; | 156 | idle_cnt = chains_static; |
157 | active_cnt = chains_dynamic; | 157 | active_cnt = chains_dynamic; |
158 | 158 | ||
159 | /* In scenarios where we only ever use a single-stream rates, | ||
160 | * i.e. legacy 11b/g/a associations, single-stream APs or even | ||
161 | * static SMPS, enable both chains to get diversity, improving | ||
162 | * the case where we're far enough from the AP that attenuation | ||
163 | * between the two antennas is sufficiently different to impact | ||
164 | * performance. | ||
165 | */ | ||
166 | if (active_cnt == 1 && num_of_ant(mvm->fw->valid_rx_ant) > 1 && | ||
167 | !mvm->cfg->rx_with_siso_diversity) { | ||
168 | idle_cnt = 2; | ||
169 | active_cnt = 2; | ||
170 | } | ||
171 | |||
159 | cmd->rxchain_info = cpu_to_le32(mvm->fw->valid_rx_ant << | 172 | cmd->rxchain_info = cpu_to_le32(mvm->fw->valid_rx_ant << |
160 | PHY_RX_CHAIN_VALID_POS); | 173 | PHY_RX_CHAIN_VALID_POS); |
161 | cmd->rxchain_info |= cpu_to_le32(idle_cnt << PHY_RX_CHAIN_CNT_POS); | 174 | cmd->rxchain_info |= cpu_to_le32(idle_cnt << PHY_RX_CHAIN_CNT_POS); |
@@ -187,7 +200,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, | |||
187 | iwl_mvm_phy_ctxt_cmd_data(mvm, &cmd, chandef, | 200 | iwl_mvm_phy_ctxt_cmd_data(mvm, &cmd, chandef, |
188 | chains_static, chains_dynamic); | 201 | chains_static, chains_dynamic); |
189 | 202 | ||
190 | ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, CMD_SYNC, | 203 | ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, 0, |
191 | sizeof(struct iwl_phy_context_cmd), | 204 | sizeof(struct iwl_phy_context_cmd), |
192 | &cmd); | 205 | &cmd); |
193 | if (ret) | 206 | if (ret) |