diff options
author | Gertjan van Wingerde <gwingerde@kpnplanet.nl> | 2008-06-16 13:56:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-26 16:49:16 -0400 |
commit | c4da004857056e6ee034c4110ccdcba659077b7e (patch) | |
tree | 641f8d9ddab7b8b6ba41fefc57a517abce15e8e6 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 30caa6e3d586442f7c3ad081260ee1b22bb123de (diff) |
rt2x00: Replace statically allocated DMA buffers with mapped skb's.
The current PCI drivers require a lot of pre-allocated DMA buffers. Reduce this
by using dynamically mapped skb's (using pci_map_single) instead of the pre-
allocated DMA buffers that are allocated at device start-up time.
At the same time move common RX path code into rt2x00lib from rt2x00pci and
rt2x00usb, as the RX paths now are now almost the same.
Signed-off-by: Gertjan van Wingerde <gwingerde@kpnplanet.nl>
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/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 08e8b0a005a6..28c9026bb568 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -601,6 +601,7 @@ enum rt2x00_flags { | |||
601 | DRIVER_REQUIRE_BEACON_GUARD, | 601 | DRIVER_REQUIRE_BEACON_GUARD, |
602 | DRIVER_REQUIRE_ATIM_QUEUE, | 602 | DRIVER_REQUIRE_ATIM_QUEUE, |
603 | DRIVER_REQUIRE_SCHEDULED, | 603 | DRIVER_REQUIRE_SCHEDULED, |
604 | DRIVER_REQUIRE_DMA, | ||
604 | 605 | ||
605 | /* | 606 | /* |
606 | * Driver configuration | 607 | * Driver configuration |
@@ -899,16 +900,33 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate) | |||
899 | } | 900 | } |
900 | 901 | ||
901 | /** | 902 | /** |
902 | * rt2x00queue_alloc_skb - allocate a skb. | 903 | * rt2x00queue_alloc_rxskb - allocate a skb for RX purposes. |
904 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
903 | * @queue: The queue for which the skb will be applicable. | 905 | * @queue: The queue for which the skb will be applicable. |
904 | */ | 906 | */ |
905 | struct sk_buff *rt2x00queue_alloc_skb(struct data_queue *queue); | 907 | struct sk_buff *rt2x00queue_alloc_rxskb(struct rt2x00_dev *rt2x00dev, |
908 | struct queue_entry *entry); | ||
909 | |||
910 | /** | ||
911 | * rt2x00queue_map_txskb - Map a skb into DMA for TX purposes. | ||
912 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
913 | * @skb: The skb to map. | ||
914 | */ | ||
915 | void rt2x00queue_map_txskb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
916 | |||
917 | /** | ||
918 | * rt2x00queue_unmap_skb - Unmap a skb from DMA. | ||
919 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
920 | * @skb: The skb to unmap. | ||
921 | */ | ||
922 | void rt2x00queue_unmap_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); | ||
906 | 923 | ||
907 | /** | 924 | /** |
908 | * rt2x00queue_free_skb - free a skb | 925 | * rt2x00queue_free_skb - free a skb |
926 | * @rt2x00dev: Pointer to &struct rt2x00_dev. | ||
909 | * @skb: The skb to free. | 927 | * @skb: The skb to free. |
910 | */ | 928 | */ |
911 | void rt2x00queue_free_skb(struct sk_buff *skb); | 929 | void rt2x00queue_free_skb(struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); |
912 | 930 | ||
913 | /** | 931 | /** |
914 | * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input | 932 | * rt2x00queue_create_tx_descriptor - Create TX descriptor from mac80211 input |
@@ -977,8 +995,8 @@ void rt2x00queue_index_inc(struct data_queue *queue, enum queue_index index); | |||
977 | void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev); | 995 | void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev); |
978 | void rt2x00lib_txdone(struct queue_entry *entry, | 996 | void rt2x00lib_txdone(struct queue_entry *entry, |
979 | struct txdone_entry_desc *txdesc); | 997 | struct txdone_entry_desc *txdesc); |
980 | void rt2x00lib_rxdone(struct queue_entry *entry, | 998 | void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev, |
981 | struct rxdone_entry_desc *rxdesc); | 999 | struct queue_entry *entry); |
982 | 1000 | ||
983 | /* | 1001 | /* |
984 | * mac80211 handlers. | 1002 | * mac80211 handlers. |