mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
rt2x00: use correct headroom for transmission
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>
This commit is contained in:
parent
e12822e1d3
commit
b59a52f12e
@ -104,7 +104,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);
|
||||
@ -112,7 +112,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;
|
||||
}
|
||||
@ -134,7 +134,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…
Reference in New Issue
Block a user