diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-12-18 03:47:28 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 09:26:56 -0500 |
commit | da58eefa6d16281c063eba6467690325bfb5f372 (patch) | |
tree | db0e052a1492c67339422472d745f16b18e1756f | |
parent | 046db346386661906dffa33f5ed3dfcdccfddc0b (diff) |
iwlwifi: clean up code in AGG
If we take a pointer to the tid_data, then use it.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tx.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index da21328ca8ed..df76881385ae 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -541,9 +541,9 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
541 | spin_lock_bh(&priv->sta_lock); | 541 | spin_lock_bh(&priv->sta_lock); |
542 | 542 | ||
543 | tid_data = &priv->tid_data[sta_id][tid]; | 543 | tid_data = &priv->tid_data[sta_id][tid]; |
544 | txq_id = priv->tid_data[sta_id][tid].agg.txq_id; | 544 | txq_id = tid_data->agg.txq_id; |
545 | 545 | ||
546 | switch (priv->tid_data[sta_id][tid].agg.state) { | 546 | switch (tid_data->agg.state) { |
547 | case IWL_EMPTYING_HW_QUEUE_ADDBA: | 547 | case IWL_EMPTYING_HW_QUEUE_ADDBA: |
548 | /* | 548 | /* |
549 | * This can happen if the peer stops aggregation | 549 | * This can happen if the peer stops aggregation |
@@ -563,9 +563,9 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
563 | case IWL_AGG_ON: | 563 | case IWL_AGG_ON: |
564 | break; | 564 | break; |
565 | default: | 565 | default: |
566 | IWL_WARN(priv, "Stopping AGG while state not ON " | 566 | IWL_WARN(priv, |
567 | "or starting for %d on %d (%d)\n", sta_id, tid, | 567 | "Stopping AGG while state not ON or starting for %d on %d (%d)\n", |
568 | priv->tid_data[sta_id][tid].agg.state); | 568 | sta_id, tid, tid_data->agg.state); |
569 | spin_unlock_bh(&priv->sta_lock); | 569 | spin_unlock_bh(&priv->sta_lock); |
570 | return 0; | 570 | return 0; |
571 | } | 571 | } |
@@ -578,12 +578,11 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
578 | "stopping AGG on STA/TID %d/%d but hwq %d not used\n", | 578 | "stopping AGG on STA/TID %d/%d but hwq %d not used\n", |
579 | sta_id, tid, txq_id); | 579 | sta_id, tid, txq_id); |
580 | } else if (tid_data->agg.ssn != tid_data->next_reclaimed) { | 580 | } else if (tid_data->agg.ssn != tid_data->next_reclaimed) { |
581 | IWL_DEBUG_TX_QUEUES(priv, "Can't proceed: ssn %d, " | 581 | IWL_DEBUG_TX_QUEUES(priv, |
582 | "next_recl = %d\n", | 582 | "Can't proceed: ssn %d, next_recl = %d\n", |
583 | tid_data->agg.ssn, | 583 | tid_data->agg.ssn, |
584 | tid_data->next_reclaimed); | 584 | tid_data->next_reclaimed); |
585 | priv->tid_data[sta_id][tid].agg.state = | 585 | tid_data->agg.state = IWL_EMPTYING_HW_QUEUE_DELBA; |
586 | IWL_EMPTYING_HW_QUEUE_DELBA; | ||
587 | spin_unlock_bh(&priv->sta_lock); | 586 | spin_unlock_bh(&priv->sta_lock); |
588 | return 0; | 587 | return 0; |
589 | } | 588 | } |
@@ -591,8 +590,8 @@ int iwlagn_tx_agg_stop(struct iwl_priv *priv, struct ieee80211_vif *vif, | |||
591 | IWL_DEBUG_TX_QUEUES(priv, "Can proceed: ssn = next_recl = %d\n", | 590 | IWL_DEBUG_TX_QUEUES(priv, "Can proceed: ssn = next_recl = %d\n", |
592 | tid_data->agg.ssn); | 591 | tid_data->agg.ssn); |
593 | turn_off: | 592 | turn_off: |
594 | agg_state = priv->tid_data[sta_id][tid].agg.state; | 593 | agg_state = tid_data->agg.state; |
595 | priv->tid_data[sta_id][tid].agg.state = IWL_AGG_OFF; | 594 | tid_data->agg.state = IWL_AGG_OFF; |
596 | 595 | ||
597 | spin_unlock_bh(&priv->sta_lock); | 596 | spin_unlock_bh(&priv->sta_lock); |
598 | 597 | ||