iwlagn: pending frames musn't be incremented if agg is on
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 20 Sep 2011 22:37:26 +0000 (15:37 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 21 Sep 2011 20:19:43 +0000 (16:19 -0400)
During my works on the transport layer I removed code that updated
a local variable (is_agg) that is needed to keep the pending_frames
count up to date. Fix this.

Also, there should be no way to have a packet with TX_CTL_AMPDU set
while the internal aggregation state machine is not in AGG_ON state.
Add a WARN_ON to ensure that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
drivers/net/wireless/iwlwifi/iwl-trans-pcie.c

index abb702da700d16deabb1a6bc7e21d3db53de4baa..8c0f07f56149bf07ea2208e7dace8ad542baf7ef 100644 (file)
@@ -313,6 +313,9 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
                iwl_sta_modify_sleep_tx_count(priv, sta_id, 1);
        }
 
+       if (info->flags & IEEE80211_TX_CTL_AMPDU)
+               is_agg = true;
+
        /* irqs already disabled/saved above when locking priv->shrd->lock */
        spin_lock(&priv->shrd->sta_lock);
 
index dbb7eb3715c42991f5ac00e806645b6ef078c5f5..3e69e877e72cbb8e412aaa1b09df455fc4ac0ed1 100644 (file)
@@ -1096,8 +1096,8 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
                hdr->seq_ctrl |= cpu_to_le16(seq_number);
                seq_number += 0x10;
                /* aggregation is on for this <sta,tid> */
-               if (info->flags & IEEE80211_TX_CTL_AMPDU &&
-                   tid_data->agg.state == IWL_AGG_ON) {
+               if (info->flags & IEEE80211_TX_CTL_AMPDU) {
+                       WARN_ON(tid_data->agg.state != IWL_AGG_ON);
                        txq_id = tid_data->agg.txq_id;
                        is_agg = true;
                }
This page took 0.029157 seconds and 5 git commands to generate.