20 byte header on SD8686 rx packets

Bing Zhao bzhao at marvell.com
Fri Jul 10 14:00:15 EDT 2009


Hi Bob,

> -----Original Message-----
> From: libertas-dev-bounces at lists.infradead.org [mailto:libertas-dev-bounces at lists.infradead.org] On
> Behalf Of Bob Dunlop
> Sent: Friday, July 10, 2009 9:20 AM
> To: libertas-dev at lists.infradead.org
> Subject: Re: 20 byte header on SD8686 rx packets
> 
> Replying to my own message I know.
> 
> On Fri, Jul 10 at 11:53, Bob Dunlop wrote:
> ...
> > I'll start digging, this mail is just in the hope that someone has seen
> > this before and can point out the step I've missed.
> 
> Well I have a solution that works for me, but given the widespread
> usage of this driver I think I'd better just air it and see what
> others think.
> 
> The problem was a change to the packing of struct rxpd caused when the
> new status union was added.  Try as I might I couldn't get it to pack
> right.  So since only one field was being used in just one place I
> hacked it out.  I know this isn't a good solution, but as I said above
> it works for me.

I added the new status/bss union to support different firmware versions.

I'm more interested in fixing any issue of RxPD structure packing in rx.c.
Could you please enable LIBERTAS_DEBUG and hexdump some data before and after the RxPD is stripped?
Basically I want to locate the place where the problem occurs and find out how it happens on your platform.

Thanks,

Bing

> What does the panel think ?
> 
> 
> diff -u hostcmd.h{-orig,}
> --- hostcmd.h-orig      2009-07-04 18:58:48.000000000 +0100
> +++ hostcmd.h   2009-07-10 16:55:33.000000000 +0100
> @@ -47,17 +47,11 @@
> 
>  /* RxPD Descriptor */
>  struct rxpd {
> -       /* union to cope up with later FW revisions */
> -       union {
> -               /* Current Rx packet status */
> -               __le16 status;
> -               struct {
> -                       /* BSS type: client, AP, etc. */
> -                       u8 bss_type;
> -                       /* BSS number */
> -                       u8 bss_num;
> -               } bss;
> -       } u;
> +       /* Current Rx packet status */
> +       /* BSS type: client, AP, etc. */
> +       u8 bss_type;
> +       /* BSS number */
> +       u8 bss_num;
> 
>         /* SNR */
>         u8 snr;
> diff -u rx.c{-orig,}
> --- rx.c-orig   2009-07-04 18:58:48.000000000 +0100
> +++ rx.c        2009-07-10 16:55:50.000000000 +0100
> @@ -165,7 +165,7 @@
>                         if (p_rx_pd->rx_control & RxPD_MESH_FRAME)
>                                 dev = priv->mesh_dev;
>                 } else if (priv->mesh_fw_ver == MESH_FW_NEW) {
> -                       if (p_rx_pd->u.bss.bss_num == MESH_IFACE_ID)
> +                       if (p_rx_pd->bss_num == MESH_IFACE_ID)
>                                 dev = priv->mesh_dev;
>                 }
>         }
> 
> --
>         Bob Dunlop
>         Guralp Systems Limited
>         http://www.guralp.com
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev



More information about the libertas-dev mailing list