diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index a7216dda9786..75b901b3eb1e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -211,10 +211,21 @@ static void iwlagn_chain_noise_reset(struct iwl_priv *priv) | |||
211 | } | 211 | } |
212 | } | 212 | } |
213 | 213 | ||
214 | static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info, | 214 | static void iwlagn_tx_cmd_protection(struct iwl_priv *priv, |
215 | __le32 *tx_flags) | 215 | struct ieee80211_tx_info *info, |
216 | __le16 fc, __le32 *tx_flags) | ||
216 | { | 217 | { |
217 | *tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK; | 218 | if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS || |
219 | info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) { | ||
220 | *tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK; | ||
221 | return; | ||
222 | } | ||
223 | |||
224 | if (priv->cfg->use_rts_for_aggregation && | ||
225 | info->flags & IEEE80211_TX_CTL_AMPDU) { | ||
226 | *tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK; | ||
227 | return; | ||
228 | } | ||
218 | } | 229 | } |
219 | 230 | ||
220 | /* Calc max signal level (dBm) among 3 possible receivers */ | 231 | /* Calc max signal level (dBm) among 3 possible receivers */ |
@@ -268,7 +279,7 @@ struct iwl_hcmd_utils_ops iwlagn_hcmd_utils = { | |||
268 | .build_addsta_hcmd = iwlagn_build_addsta_hcmd, | 279 | .build_addsta_hcmd = iwlagn_build_addsta_hcmd, |
269 | .gain_computation = iwlagn_gain_computation, | 280 | .gain_computation = iwlagn_gain_computation, |
270 | .chain_noise_reset = iwlagn_chain_noise_reset, | 281 | .chain_noise_reset = iwlagn_chain_noise_reset, |
271 | .rts_tx_cmd_flag = iwlagn_rts_tx_cmd_flag, | 282 | .tx_cmd_protection = iwlagn_tx_cmd_protection, |
272 | .calc_rssi = iwlagn_calc_rssi, | 283 | .calc_rssi = iwlagn_calc_rssi, |
273 | .request_scan = iwlagn_request_scan, | 284 | .request_scan = iwlagn_request_scan, |
274 | }; | 285 | }; |