Skip to content

Commit

Permalink
iwlwifi: mvm: fix tx seq_ctrl debug print
Browse files Browse the repository at this point in the history
Since seq_number is incremented right after using
it, so printed seq_ctrl was actually the next
one to be used.

Fix it by incrementing the seq_number only later,
before saving it.

Additionally, use the IEEE80211_SEQ_TO_SN macro
in order to print the actual sequence number.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  • Loading branch information
Eliad Peller authored and Emmanuel Grumbach committed Jan 13, 2014
1 parent 2d93aee commit cf9d118
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wireless/iwlwifi/mvm/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
seq_number &= IEEE80211_SCTL_SEQ;
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
hdr->seq_ctrl |= cpu_to_le16(seq_number);
seq_number += 0x10;
is_data_qos = true;
is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU;
}
Expand All @@ -407,13 +406,13 @@ int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb,
}

IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id,
tid, txq_id, seq_number);
tid, txq_id, IEEE80211_SEQ_TO_SN(seq_number));

if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id))
goto drop_unlock_sta;

if (is_data_qos && !ieee80211_has_morefrags(fc))
mvmsta->tid_data[tid].seq_number = seq_number;
mvmsta->tid_data[tid].seq_number = seq_number + 0x10;

spin_unlock(&mvmsta->lock);

Expand Down

0 comments on commit cf9d118

Please sign in to comment.