* [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
* Re: [PATCH] p54: fix skb->cb tx info conversion
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
0 siblings, 2 replies; 4+ messages in thread
From: John W. Linville @ 2008-05-30 16:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Chr
On Mon, May 26, 2008 at 04:44:59PM +0200, Johannes Berg wrote:
> 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.
>=20
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> drivers/net/wireless/p54/p54common.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>=20
> --- everything.orig/drivers/net/wireless/p54/p54common.c 2008-05-26 0=
9: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 =3D priv->rx_start;
> =20
> while (entry !=3D (struct sk_buff *)&priv->tx_queue) {
> - range =3D (struct memrecord *)&entry->cb;
> + struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(entry);
> + range =3D (void *)info->driver_data;
> if (range->start_addr =3D=3D addr) {
> - struct ieee80211_tx_info *info =3D IEEE80211_SKB_CB(entry);
> struct p54_control_hdr *entry_hdr;
> struct p54_tx_control_allocdata *entry_data;
> int pad =3D 0;
> =20
> - if (entry->next !=3D (struct sk_buff *)&priv->tx_queue)
> - freed =3D ((struct memrecord *)&entry->next->cb)->start_addr - l=
ast_addr;
> - else
> + if (entry->next !=3D (struct sk_buff *)&priv->tx_queue) {
> + struct ieee80211_tx_info *ni;
> +
> + ni =3D IEEE80211_SKB_CB(entry->next);
> + freed =3D ((void *)ni->driver_data)->start_addr
> + - last_addr;
> + } else
> freed =3D priv->rx_end - last_addr;
> =20
> last_addr =3D range->end_addr;
CC [M] drivers/net/wireless/p54/p54common.o
drivers/net/wireless/p54/p54common.c: In function =E2=80=98p54_rx_frame=
_sent=E2=80=99:
drivers/net/wireless/p54/p54common.c:406: warning: dereferencing =E2=80=
=98void *=E2=80=99 pointer
drivers/net/wireless/p54/p54common.c:406: error: request for member =E2=
=80=98start_addr=E2=80=99 in something not a structure or union
Looks like you are missing a (struct memrecord *) for the freed
assignment...?
John
--=20
John W. Linville
linville@tuxdriver.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] p54: fix skb->cb tx info conversion
2008-05-30 16:15 ` John W. Linville
@ 2008-05-30 19:03 ` Johannes Berg
2008-05-30 19:07 ` [PATCH v2] " Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2008-05-30 19:03 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Chr
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
> > + 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;
>
> CC [M] drivers/net/wireless/p54/p54common.o
> drivers/net/wireless/p54/p54common.c: In function ‘p54_rx_frame_sent’:
> drivers/net/wireless/p54/p54common.c:406: warning: dereferencing ‘void *’ pointer
> drivers/net/wireless/p54/p54common.c:406: error: request for member ‘start_addr’ in something not a structure or union
>
> Looks like you are missing a (struct memrecord *) for the freed
> assignment...?
Umm, yes, this can't work. I wonder what I did, I sure have compiled
this kernel. Must have backed out the patch accidentally. Sorry, will
follow up with a fixed one.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] p54: fix skb->cb tx info conversion
2008-05-30 16:15 ` John W. Linville
2008-05-30 19:03 ` Johannes Berg
@ 2008-05-30 19:07 ` Johannes Berg
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2008-05-30 19:07 UTC (permalink / raw)
To: John W. 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 | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- everything.orig/drivers/net/wireless/p54/p54common.c 2008-05-26 16:42:52.000000000 +0200
+++ everything/drivers/net/wireless/p54/p54common.c 2008-05-30 21:05:56.000000000 +0200
@@ -392,16 +392,21 @@ 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;
+ struct memrecord *mr;
+
+ ni = IEEE80211_SKB_CB(entry->next);
+ mr = (struct memrecord *)ni->driver_data;
+ freed = mr->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).