All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>, Chr <chunkeey@web.de>
Subject: Re: [PATCH] p54: fix skb->cb tx info conversion
Date: Fri, 30 May 2008 12:15:11 -0400	[thread overview]
Message-ID: <20080530161511.GA24013@tuxdriver.com> (raw)
In-Reply-To: <1211813099.4843.12.camel@johannes.berg>

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

  reply	other threads:[~2008-05-30 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 14:44 [PATCH] p54: fix skb->cb tx info conversion Johannes Berg
2008-05-30 16:15 ` John W. Linville [this message]
2008-05-30 19:03   ` Johannes Berg
2008-05-30 19:07   ` [PATCH v2] " Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080530161511.GA24013@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=chunkeey@web.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.