aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-06-18 14:33:15 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-06-25 18:20:41 -0400
commitcfecc6b492162fb49209a83dc207f182b87ea27a (patch)
tree1d8ab7172cf202196742c8900983138468f06a37 /drivers/net/wireless/iwlwifi/iwl-agn.c
parent0ab84cff8befbea342576cd6dc21026d5c9244df (diff)
iwlwifi: turn on RTS/CTS after aggregation become operational
If RTS/CTS protection is needed for HT, wait until get operational notification from mac80211, then inform uCode to switch to RTS/CTS through RXON command. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c28
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 */
3374static 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
3371static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, 3390static 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);