aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-mac80211.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-11-21 06:25:31 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-12-16 10:22:57 -0500
commit822e8b2a2d708f99daf1ae4cd9b9e4c9d84069c6 (patch)
tree8f06368ccc9f6104a1766741a5f16eb82098369f /drivers/net/wireless/iwlwifi/iwl-mac80211.c
parent3c69b5954225b41cfa57338b17466816072d55a2 (diff)
iwlwifi: tid_data logic move to upper layer - tx AGG setup
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with tx AGG setup. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-mac80211.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index 4aedd728c55..8074c6eafab 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -611,7 +611,6 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
611 struct iwl_priv *priv = hw->priv; 611 struct iwl_priv *priv = hw->priv;
612 int ret = -EINVAL; 612 int ret = -EINVAL;
613 struct iwl_station_priv *sta_priv = (void *) sta->drv_priv; 613 struct iwl_station_priv *sta_priv = (void *) sta->drv_priv;
614 struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif);
615 614
616 IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n", 615 IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n",
617 sta->addr, tid); 616 sta->addr, tid);
@@ -659,54 +658,7 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
659 } 658 }
660 break; 659 break;
661 case IEEE80211_AMPDU_TX_OPERATIONAL: 660 case IEEE80211_AMPDU_TX_OPERATIONAL:
662 buf_size = min_t(int, buf_size, LINK_QUAL_AGG_FRAME_LIMIT_DEF); 661 ret = iwlagn_tx_agg_oper(priv, vif, sta, tid, buf_size);
663
664 iwl_trans_tx_agg_setup(trans(priv), ctx->ctxid, iwl_sta_id(sta),
665 tid, buf_size);
666
667 /*
668 * If the limit is 0, then it wasn't initialised yet,
669 * use the default. We can do that since we take the
670 * minimum below, and we don't want to go above our
671 * default due to hardware restrictions.
672 */
673 if (sta_priv->max_agg_bufsize == 0)
674 sta_priv->max_agg_bufsize =
675 LINK_QUAL_AGG_FRAME_LIMIT_DEF;
676
677 /*
678 * Even though in theory the peer could have different
679 * aggregation reorder buffer sizes for different sessions,
680 * our ucode doesn't allow for that and has a global limit
681 * for each station. Therefore, use the minimum of all the
682 * aggregation sessions and our default value.
683 */
684 sta_priv->max_agg_bufsize =
685 min(sta_priv->max_agg_bufsize, buf_size);
686
687 if (cfg(priv)->ht_params &&
688 cfg(priv)->ht_params->use_rts_for_aggregation) {
689 /*
690 * switch to RTS/CTS if it is the prefer protection
691 * method for HT traffic
692 */
693
694 sta_priv->lq_sta.lq.general_params.flags |=
695 LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
696 }
697 priv->agg_tids_count++;
698 IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
699 priv->agg_tids_count);
700
701 sta_priv->lq_sta.lq.agg_params.agg_frame_cnt_limit =
702 sta_priv->max_agg_bufsize;
703
704 iwl_send_lq_cmd(priv, iwl_rxon_ctx_from_vif(vif),
705 &sta_priv->lq_sta.lq, CMD_ASYNC, false);
706
707 IWL_INFO(priv, "Tx aggregation enabled on ra = %pM tid = %d\n",
708 sta->addr, tid);
709 ret = 0;
710 break; 662 break;
711 } 663 }
712 mutex_unlock(&priv->shrd->mutex); 664 mutex_unlock(&priv->shrd->mutex);