diff options
author | Eliad Peller <eliadx.peller@intel.com> | 2013-12-31 11:54:06 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-01-13 15:17:14 -0500 |
commit | cf9d11888091920e356d085a5fa1644fc5c05429 (patch) | |
tree | 66a223b4a162b24f9ffe4c80933a053d4a7863c1 | |
parent | 2d93aee152b1758a94a18fe15d72153ba73b5679 (diff) |
iwlwifi: mvm: fix tx seq_ctrl debug print
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index a4d3bce48fbf..90378c217bc7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c | |||
@@ -390,7 +390,6 @@ int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
390 | seq_number &= IEEE80211_SCTL_SEQ; | 390 | seq_number &= IEEE80211_SCTL_SEQ; |
391 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | 391 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); |
392 | hdr->seq_ctrl |= cpu_to_le16(seq_number); | 392 | hdr->seq_ctrl |= cpu_to_le16(seq_number); |
393 | seq_number += 0x10; | ||
394 | is_data_qos = true; | 393 | is_data_qos = true; |
395 | is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU; | 394 | is_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU; |
396 | } | 395 | } |
@@ -407,13 +406,13 @@ int iwl_mvm_tx_skb(struct iwl_mvm *mvm, struct sk_buff *skb, | |||
407 | } | 406 | } |
408 | 407 | ||
409 | IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id, | 408 | IWL_DEBUG_TX(mvm, "TX to [%d|%d] Q:%d - seq: 0x%x\n", mvmsta->sta_id, |
410 | tid, txq_id, seq_number); | 409 | tid, txq_id, IEEE80211_SEQ_TO_SN(seq_number)); |
411 | 410 | ||
412 | if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id)) | 411 | if (iwl_trans_tx(mvm->trans, skb, dev_cmd, txq_id)) |
413 | goto drop_unlock_sta; | 412 | goto drop_unlock_sta; |
414 | 413 | ||
415 | if (is_data_qos && !ieee80211_has_morefrags(fc)) | 414 | if (is_data_qos && !ieee80211_has_morefrags(fc)) |
416 | mvmsta->tid_data[tid].seq_number = seq_number; | 415 | mvmsta->tid_data[tid].seq_number = seq_number + 0x10; |
417 | 416 | ||
418 | spin_unlock(&mvmsta->lock); | 417 | spin_unlock(&mvmsta->lock); |
419 | 418 | ||