diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2011-05-18 14:25:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:10:59 -0400 |
commit | 798eefde3097f218849194f1abda1f179a169cc2 (patch) | |
tree | 2d8bd74d48921b0d35b1ea9e8e2ff32142a3452e /drivers/net/wireless/rt2x00/rt2x00queue.c | |
parent | 872834dfb38edc6f72cfc783a5ce78f2a9f36ec5 (diff) |
rt2x00: Interface sequence lock doesn't have to disable interrupts.
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index ab8c16f8bcaf..c7fc9def6bcf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -206,7 +206,6 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, | |||
206 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); | 206 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); |
207 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; | 207 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; |
208 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | 208 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); |
209 | unsigned long irqflags; | ||
210 | 209 | ||
211 | if (!(tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)) | 210 | if (!(tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)) |
212 | return; | 211 | return; |
@@ -227,14 +226,14 @@ static void rt2x00queue_create_tx_descriptor_seq(struct queue_entry *entry, | |||
227 | * sequence counting per-frame, since those will override the | 226 | * sequence counting per-frame, since those will override the |
228 | * sequence counter given by mac80211. | 227 | * sequence counter given by mac80211. |
229 | */ | 228 | */ |
230 | spin_lock_irqsave(&intf->seqlock, irqflags); | 229 | spin_lock(&intf->seqlock); |
231 | 230 | ||
232 | if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) | 231 | if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) |
233 | intf->seqno += 0x10; | 232 | intf->seqno += 0x10; |
234 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | 233 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); |
235 | hdr->seq_ctrl |= cpu_to_le16(intf->seqno); | 234 | hdr->seq_ctrl |= cpu_to_le16(intf->seqno); |
236 | 235 | ||
237 | spin_unlock_irqrestore(&intf->seqlock, irqflags); | 236 | spin_unlock(&intf->seqlock); |
238 | 237 | ||
239 | } | 238 | } |
240 | 239 | ||