aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-05-03 04:20:52 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-05-13 13:43:20 -0400
commitf862a2367b429d46d12362fea07d844c2bf55969 (patch)
treed07880c38425f59e90589093e31319c088871605 /drivers
parentc9696b2b6c36704dbd1eb51fd4465704a395a6ff (diff)
iwl3945: remove sequence number assignment
Unlike agn, where the sequence numbers must match with the TFD index, the driver for 3945 devices can use the sequence numbers provided by mac80211 for QoS frames. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c12
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 858a548330a5..8538af788a73 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -433,7 +433,7 @@ struct iwl_ht_agg {
433 433
434 434
435struct iwl_tid_data { 435struct iwl_tid_data {
436 u16 seq_number; 436 u16 seq_number; /* agn only */
437 u16 tfds_in_queue; 437 u16 tfds_in_queue;
438 struct iwl_ht_agg agg; 438 struct iwl_ht_agg agg;
439}; 439};
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 68b8a1af3be7..445406406bd0 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -473,10 +473,8 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
473 u8 unicast; 473 u8 unicast;
474 u8 sta_id; 474 u8 sta_id;
475 u8 tid = 0; 475 u8 tid = 0;
476 u16 seq_number = 0;
477 __le16 fc; 476 __le16 fc;
478 u8 wait_write_ptr = 0; 477 u8 wait_write_ptr = 0;
479 u8 *qc = NULL;
480 unsigned long flags; 478 unsigned long flags;
481 479
482 spin_lock_irqsave(&priv->lock, flags); 480 spin_lock_irqsave(&priv->lock, flags);
@@ -519,16 +517,10 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
519 IWL_DEBUG_RATE(priv, "station Id %d\n", sta_id); 517 IWL_DEBUG_RATE(priv, "station Id %d\n", sta_id);
520 518
521 if (ieee80211_is_data_qos(fc)) { 519 if (ieee80211_is_data_qos(fc)) {
522 qc = ieee80211_get_qos_ctl(hdr); 520 u8 *qc = ieee80211_get_qos_ctl(hdr);
523 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 521 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
524 if (unlikely(tid >= MAX_TID_COUNT)) 522 if (unlikely(tid >= MAX_TID_COUNT))
525 goto drop; 523 goto drop;
526 seq_number = priv->stations[sta_id].tid[tid].seq_number &
527 IEEE80211_SCTL_SEQ;
528 hdr->seq_ctrl = cpu_to_le16(seq_number) |
529 (hdr->seq_ctrl &
530 cpu_to_le16(IEEE80211_SCTL_FRAG));
531 seq_number += 0x10;
532 } 524 }
533 525
534 /* Descriptor for chosen Tx queue */ 526 /* Descriptor for chosen Tx queue */
@@ -587,8 +579,6 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
587 579
588 if (!ieee80211_has_morefrags(hdr->frame_control)) { 580 if (!ieee80211_has_morefrags(hdr->frame_control)) {
589 txq->need_update = 1; 581 txq->need_update = 1;
590 if (qc)
591 priv->stations[sta_id].tid[tid].seq_number = seq_number;
592 } else { 582 } else {
593 wait_write_ptr = 1; 583 wait_write_ptr = 1;
594 txq->need_update = 0; 584 txq->need_update = 0;