linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] p54: fix skb->cb tx info conversion
@ 2008-05-26 14:44 Johannes Berg
  2008-05-30 16:15 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2008-05-26 14:44 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, Chr

When I moved the TX info into skb->cb apparently I forgot to change a
few places to put the p54-internal data into info->driver_data rather
than skb->cb. This should fix it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 drivers/net/wireless/p54/p54common.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- everything.orig/drivers/net/wireless/p54/p54common.c	2008-05-26 09:42:49.000000000 +0200
+++ everything/drivers/net/wireless/p54/p54common.c	2008-05-26 09:44:40.000000000 +0200
@@ -392,16 +392,20 @@ static void p54_rx_frame_sent(struct iee
 	u32 last_addr = priv->rx_start;
 
 	while (entry != (struct sk_buff *)&priv->tx_queue) {
-		range = (struct memrecord *)&entry->cb;
+		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
+		range = (void *)info->driver_data;
 		if (range->start_addr == addr) {
-			struct ieee80211_tx_info *info = IEEE80211_SKB_CB(entry);
 			struct p54_control_hdr *entry_hdr;
 			struct p54_tx_control_allocdata *entry_data;
 			int pad = 0;
 
-			if (entry->next != (struct sk_buff *)&priv->tx_queue)
-				freed = ((struct memrecord *)&entry->next->cb)->start_addr - last_addr;
-			else
+			if (entry->next != (struct sk_buff *)&priv->tx_queue) {
+				struct ieee80211_tx_info *ni;
+
+				ni = IEEE80211_SKB_CB(entry->next);
+				freed = ((void *)ni->driver_data)->start_addr
+						- last_addr;
+			} else
 				freed = priv->rx_end - last_addr;
 
 			last_addr = range->end_addr;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-30 19:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 14:44 [PATCH] p54: fix skb->cb tx info conversion Johannes Berg
2008-05-30 16:15 ` John W. Linville
2008-05-30 19:03   ` Johannes Berg
2008-05-30 19:07   ` [PATCH v2] " Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).