aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-04-12 17:02:36 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-16 16:53:06 -0400
commit82ca9341763107615a15da6e59b9535d49eb91c3 (patch)
tree8983e0e6129c0c69ad76347cd604d9a80b03dc7b
parent33e6f816105b5cfaafbbf42682807cc317e87cb5 (diff)
iwlwifi: sanity check for turn on aggregation tid
Perform sanity check for turn on aggregation tid. Also remove the option for turn on all the aggregation tids at once since it is deprecated function and not being used. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 5bc406c5c793..8f8d5e3e688d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -294,11 +294,11 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
294 return tl->total; 294 return tl->total;
295} 295}
296 296
297static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv, 297static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
298 struct iwl_lq_sta *lq_data, u8 tid, 298 struct iwl_lq_sta *lq_data, u8 tid,
299 struct ieee80211_sta *sta) 299 struct ieee80211_sta *sta)
300{ 300{
301 int ret; 301 int ret = -EAGAIN;
302 302
303 if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) { 303 if (rs_tl_get_load(lq_data, tid) > IWL_AGG_LOAD_THRESHOLD) {
304 IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n", 304 IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
@@ -312,29 +312,29 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
312 */ 312 */
313 IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n", 313 IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n",
314 tid); 314 tid);
315 ret = ieee80211_stop_tx_ba_session(sta, tid, 315 ieee80211_stop_tx_ba_session(sta, tid,
316 WLAN_BACK_INITIATOR); 316 WLAN_BACK_INITIATOR);
317 } 317 }
318 } 318 } else
319 IWL_ERR(priv, "Fail finding valid aggregation tid: %d\n", tid);
320 return ret;
319} 321}
320 322
321static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid, 323static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
322 struct iwl_lq_sta *lq_data, 324 struct iwl_lq_sta *lq_data,
323 struct ieee80211_sta *sta) 325 struct ieee80211_sta *sta)
324{ 326{
325 if ((tid < TID_MAX_LOAD_COUNT)) 327 if ((tid < TID_MAX_LOAD_COUNT) &&
326 rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta); 328 !rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta)) {
327 else if (tid == IWL_AGG_ALL_TID) 329 if (priv->cfg->use_rts_for_ht) {
328 for (tid = 0; tid < TID_MAX_LOAD_COUNT; tid++) 330 /*
329 rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta); 331 * switch to RTS/CTS if it is the prefer protection
330 if (priv->cfg->use_rts_for_ht) { 332 * method for HT traffic
331 /* 333 */
332 * switch to RTS/CTS if it is the prefer protection method 334 IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n");
333 * for HT traffic 335 priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
334 */ 336 iwlcore_commit_rxon(priv);
335 IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n"); 337 }
336 priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
337 iwlcore_commit_rxon(priv);
338 } 338 }
339} 339}
340 340