提交 08ecf104 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

iwlagn: pending frames musn't be incremented if agg is on

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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 edb5c2f3
...@@ -313,6 +313,9 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) ...@@ -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); 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 */ /* irqs already disabled/saved above when locking priv->shrd->lock */
spin_lock(&priv->shrd->sta_lock); spin_lock(&priv->shrd->sta_lock);
......
...@@ -1096,8 +1096,8 @@ static int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb, ...@@ -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); hdr->seq_ctrl |= cpu_to_le16(seq_number);
seq_number += 0x10; seq_number += 0x10;
/* aggregation is on for this <sta,tid> */ /* aggregation is on for this <sta,tid> */
if (info->flags & IEEE80211_TX_CTL_AMPDU && if (info->flags & IEEE80211_TX_CTL_AMPDU) {
tid_data->agg.state == IWL_AGG_ON) { WARN_ON(tid_data->agg.state != IWL_AGG_ON);
txq_id = tid_data->agg.txq_id; txq_id = tid_data->agg.txq_id;
is_agg = true; is_agg = true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册