aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/p54common.c
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2009-01-09 15:06:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:00:19 -0500
commit3cd08b383b2efe163272045afc415c75afc9e9c5 (patch)
treed3877f19282efb5257ca1876687dcda9c31f0144 /drivers/net/wireless/p54/p54common.c
parent63f2dc9f2fd63c8b66f49c53cd26236f3f0785fd (diff)
p54: upgrade memrecord to p54_tx_info
mac80211 reserves 24 bytes in skb->cb for the driver. So far, we only used them to keep track of used and free device memory. But p54spi will need a slice of it, as well as the stuck frame detection. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.c')
-rw-r--r--drivers/net/wireless/p54/p54common.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index c6dcf98aad3e..85aff1685a10 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -700,7 +700,7 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
700{ 700{
701 struct p54_common *priv = dev->priv; 701 struct p54_common *priv = dev->priv;
702 struct ieee80211_tx_info *info; 702 struct ieee80211_tx_info *info;
703 struct memrecord *range; 703 struct p54_tx_info *range;
704 unsigned long flags; 704 unsigned long flags;
705 u32 freed = 0, last_addr = priv->rx_start; 705 u32 freed = 0, last_addr = priv->rx_start;
706 706
@@ -718,18 +718,18 @@ void p54_free_skb(struct ieee80211_hw *dev, struct sk_buff *skb)
718 range = (void *)info->rate_driver_data; 718 range = (void *)info->rate_driver_data;
719 if (skb->prev != (struct sk_buff *)&priv->tx_queue) { 719 if (skb->prev != (struct sk_buff *)&priv->tx_queue) {
720 struct ieee80211_tx_info *ni; 720 struct ieee80211_tx_info *ni;
721 struct memrecord *mr; 721 struct p54_tx_info *mr;
722 722
723 ni = IEEE80211_SKB_CB(skb->prev); 723 ni = IEEE80211_SKB_CB(skb->prev);
724 mr = (struct memrecord *)ni->rate_driver_data; 724 mr = (struct p54_tx_info *)ni->rate_driver_data;
725 last_addr = mr->end_addr; 725 last_addr = mr->end_addr;
726 } 726 }
727 if (skb->next != (struct sk_buff *)&priv->tx_queue) { 727 if (skb->next != (struct sk_buff *)&priv->tx_queue) {
728 struct ieee80211_tx_info *ni; 728 struct ieee80211_tx_info *ni;
729 struct memrecord *mr; 729 struct p54_tx_info *mr;
730 730
731 ni = IEEE80211_SKB_CB(skb->next); 731 ni = IEEE80211_SKB_CB(skb->next);
732 mr = (struct memrecord *)ni->rate_driver_data; 732 mr = (struct p54_tx_info *)ni->rate_driver_data;
733 freed = mr->start_addr - last_addr; 733 freed = mr->start_addr - last_addr;
734 } else 734 } else
735 freed = priv->rx_end - last_addr; 735 freed = priv->rx_end - last_addr;
@@ -771,7 +771,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
771 struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data; 771 struct p54_frame_sent *payload = (struct p54_frame_sent *) hdr->data;
772 struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next; 772 struct sk_buff *entry = (struct sk_buff *) priv->tx_queue.next;
773 u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom; 773 u32 addr = le32_to_cpu(hdr->req_id) - priv->headroom;
774 struct memrecord *range = NULL; 774 struct p54_tx_info *range = NULL;
775 u32 freed = 0; 775 u32 freed = 0;
776 u32 last_addr = priv->rx_start; 776 u32 last_addr = priv->rx_start;
777 unsigned long flags; 777 unsigned long flags;
@@ -793,10 +793,10 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
793 793
794 if (entry->next != (struct sk_buff *)&priv->tx_queue) { 794 if (entry->next != (struct sk_buff *)&priv->tx_queue) {
795 struct ieee80211_tx_info *ni; 795 struct ieee80211_tx_info *ni;
796 struct memrecord *mr; 796 struct p54_tx_info *mr;
797 797
798 ni = IEEE80211_SKB_CB(entry->next); 798 ni = IEEE80211_SKB_CB(entry->next);
799 mr = (struct memrecord *)ni->rate_driver_data; 799 mr = (struct p54_tx_info *)ni->rate_driver_data;
800 freed = mr->start_addr - last_addr; 800 freed = mr->start_addr - last_addr;
801 } else 801 } else
802 freed = priv->rx_end - last_addr; 802 freed = priv->rx_end - last_addr;
@@ -1013,8 +1013,8 @@ EXPORT_SYMBOL_GPL(p54_rx);
1013 * can find some unused memory to upload our packets to. However, data that we 1013 * can find some unused memory to upload our packets to. However, data that we
1014 * want the card to TX needs to stay intact until the card has told us that 1014 * want the card to TX needs to stay intact until the card has told us that
1015 * it is done with it. This function finds empty places we can upload to and 1015 * it is done with it. This function finds empty places we can upload to and
1016 * marks allocated areas as reserved if necessary. p54_rx_frame_sent frees 1016 * marks allocated areas as reserved if necessary. p54_rx_frame_sent or
1017 * allocated areas. 1017 * p54_free_skb frees allocated areas.
1018 */ 1018 */
1019static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb, 1019static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
1020 struct p54_hdr *data, u32 len) 1020 struct p54_hdr *data, u32 len)
@@ -1023,7 +1023,7 @@ static int p54_assign_address(struct ieee80211_hw *dev, struct sk_buff *skb,
1023 struct sk_buff *entry = priv->tx_queue.next; 1023 struct sk_buff *entry = priv->tx_queue.next;
1024 struct sk_buff *target_skb = NULL; 1024 struct sk_buff *target_skb = NULL;
1025 struct ieee80211_tx_info *info; 1025 struct ieee80211_tx_info *info;
1026 struct memrecord *range; 1026 struct p54_tx_info *range;
1027 u32 last_addr = priv->rx_start; 1027 u32 last_addr = priv->rx_start;
1028 u32 largest_hole = 0; 1028 u32 largest_hole = 0;
1029 u32 target_addr = priv->rx_start; 1029 u32 target_addr = priv->rx_start;