20 byte header on SD8686 rx packets
Bob Dunlop
rdunlop at guralp.com
Fri Jul 10 12:19:37 EDT 2009
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.
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
More information about the libertas-dev
mailing list