diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 7488a68b83b1..3368cfd25a99 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3368,6 +3368,25 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3368 | return ret; | 3368 | return ret; |
3369 | } | 3369 | } |
3370 | 3370 | ||
3371 | /* | ||
3372 | * switch to RTS/CTS for TX | ||
3373 | */ | ||
3374 | static void iwl_enable_rts_cts(struct iwl_priv *priv) | ||
3375 | { | ||
3376 | |||
3377 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | ||
3378 | return; | ||
3379 | |||
3380 | priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN; | ||
3381 | if (!test_bit(STATUS_SCANNING, &priv->status)) { | ||
3382 | IWL_DEBUG_INFO(priv, "use RTS/CTS protection\n"); | ||
3383 | iwlcore_commit_rxon(priv); | ||
3384 | } else { | ||
3385 | /* scanning, defer the request until scan completed */ | ||
3386 | IWL_DEBUG_INFO(priv, "defer setting RTS/CTS protection\n"); | ||
3387 | } | ||
3388 | } | ||
3389 | |||
3371 | static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | 3390 | static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, |
3372 | struct ieee80211_vif *vif, | 3391 | struct ieee80211_vif *vif, |
3373 | enum ieee80211_ampdu_mlme_action action, | 3392 | enum ieee80211_ampdu_mlme_action action, |
@@ -3416,7 +3435,14 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3416 | ret = 0; | 3435 | ret = 0; |
3417 | break; | 3436 | break; |
3418 | case IEEE80211_AMPDU_TX_OPERATIONAL: | 3437 | case IEEE80211_AMPDU_TX_OPERATIONAL: |
3419 | /* do nothing, return value ignored */ | 3438 | if (priv->cfg->use_rts_for_ht) { |
3439 | /* | ||
3440 | * switch to RTS/CTS if it is the prefer protection | ||
3441 | * method for HT traffic | ||
3442 | */ | ||
3443 | iwl_enable_rts_cts(priv); | ||
3444 | } | ||
3445 | ret = 0; | ||
3420 | break; | 3446 | break; |
3421 | } | 3447 | } |
3422 | mutex_unlock(&priv->mutex); | 3448 | mutex_unlock(&priv->mutex); |