rt2x00: use correct headroom for transmission
commit b59a52f12e upstream.
Use rt2x00dev->ops->extra_tx_headroom, not rt2x00dev->hw->extra_tx_headroom
in the tx code, as the later may include other headroom not to be used in
the chipset driver.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
99e9e4b6bc
commit
f61fa4b97c
1 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
|
|||
* is also mapped to the DMA so it can be used for transfering
|
||||
* additional descriptor information to the hardware.
|
||||
*/
|
||||
skb_push(skb, rt2x00dev->hw->extra_tx_headroom);
|
||||
skb_push(skb, rt2x00dev->ops->extra_tx_headroom);
|
||||
|
||||
skbdesc->skb_dma =
|
||||
dma_map_single(rt2x00dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
|
||||
|
|
@ -111,7 +111,7 @@ void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
|
|||
/*
|
||||
* Restore data pointer to original location again.
|
||||
*/
|
||||
skb_pull(skb, rt2x00dev->hw->extra_tx_headroom);
|
||||
skb_pull(skb, rt2x00dev->ops->extra_tx_headroom);
|
||||
|
||||
skbdesc->flags |= SKBDESC_DMA_MAPPED_TX;
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb)
|
|||
* by the driver, but it was actually mapped to DMA.
|
||||
*/
|
||||
dma_unmap_single(rt2x00dev->dev, skbdesc->skb_dma,
|
||||
skb->len + rt2x00dev->hw->extra_tx_headroom,
|
||||
skb->len + rt2x00dev->ops->extra_tx_headroom,
|
||||
DMA_TO_DEVICE);
|
||||
skbdesc->flags &= ~SKBDESC_DMA_MAPPED_TX;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue