diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-10-09 07:33:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 15:04:21 -0400 |
commit | 546adf294e85ca0dcd9c052294ef35b83a6ab2f4 (patch) | |
tree | 5a5dd90fbd94201a88cb42f7cd5ebabe0b0646a9 /drivers/net/wireless/rt2x00/rt2x00queue.c | |
parent | a23c22080345f1748a933f32736986ff11f44d60 (diff) |
rt2x00: Optimize unmapping of skbs
Since no skb will be mapped for RX and TX at the same time we can
simply shortcut the check for SKBDESC_DMA_MAPPED_TX.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index 6d41599a090c..4436ff72c864 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -115,9 +115,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb) | |||
115 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, | 115 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, |
116 | DMA_FROM_DEVICE); | 116 | DMA_FROM_DEVICE); |
117 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_RX; | 117 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_RX; |
118 | } | 118 | } else if (skbdesc->flags & SKBDESC_DMA_MAPPED_TX) { |
119 | |||
120 | if (skbdesc->flags & SKBDESC_DMA_MAPPED_TX) { | ||
121 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, | 119 | dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, |
122 | DMA_TO_DEVICE); | 120 | DMA_TO_DEVICE); |
123 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; | 121 | skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; |