diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-10-09 11:33:43 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-11 19:04:21 (GMT) |
commit | 546adf294e85ca0dcd9c052294ef35b83a6ab2f4 (patch) | |
tree | 5a5dd90fbd94201a88cb42f7cd5ebabe0b0646a9 /drivers | |
parent | a23c22080345f1748a933f32736986ff11f44d60 (diff) | |
download | linux-546adf294e85ca0dcd9c052294ef35b83a6ab2f4.tar.xz |
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')
-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 6d41599..4436ff7 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) dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, DMA_FROM_DEVICE); skbdesc->flags &= ~SKBDESC_DMA_MAPPED_RX; - } - - if (skbdesc->flags & SKBDESC_DMA_MAPPED_TX) { + } else if (skbdesc->flags & SKBDESC_DMA_MAPPED_TX) { dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma, skb->len, DMA_TO_DEVICE); skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX; |