rt2x00: Interface sequence lock doesn't have to disable interrupts.
authorGertjan van Wingerde <gwingerde@gmail.com>
Wed, 18 May 2011 18:25:42 +0000 (20:25 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 1 Jun 2011 19:10:59 +0000 (15:10 -0400)
This lock is only used in the TX path and thus in process context. Therefore
we can use a much lighter spinlock variant.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00queue.c

index ab8c16f8bcafebec3faeecb412669792eab664a0..c7fc9def6bcf7f6933d7b767f352cc922a2c9070 100644 (file)
@@ -206,7 +206,6 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry,
        struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb);
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data;
        struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif);
-       unsigned long irqflags;
 
        if (!(tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
                return;
@@ -227,14 +226,14 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry,
         * sequence counting per-frame, since those will override the
         * sequence counter given by mac80211.
         */
-       spin_lock_irqsave(&intf->seqlock, irqflags);
+       spin_lock(&intf->seqlock);
 
        if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags))
                intf->seqno += 0x10;
        hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
        hdr->seq_ctrl |= cpu_to_le16(intf->seqno);
 
-       spin_unlock_irqrestore(&intf->seqlock, irqflags);
+       spin_unlock(&intf->seqlock);
 
 }