All of lore.kernel.org
 help / color / mirror / Atom feed
* guidance on struct alignment for rtl8192cu driver
@ 2013-09-14  5:36 Jason Andrews
  2013-09-14 14:08 ` Larry Finger
  0 siblings, 1 reply; 7+ messages in thread
From: Jason Andrews @ 2013-09-14  5:36 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

I'm using an ASUS USB N13 on an ARM platform with the rtl8192cu driver.
Linux kernel is 3.10 so I probably don't have the latest and greatest driver.

When I booted I got an ARM alignment trap caused by the driver.

I determined the cause was the 1st argument to spin_lock_irqsave() has an unaligned address.

By trial-and-error I found that if I edit wifi.h and insert 2 dummy bytes into the rtl_priv struct just above priv (last variable) the locks work and the driver works fine.

What is the recommended way to make sure the last variable in the rtl_priv struct (u8 priv[0]) is aligned on a 4 byte boundary so the driver works on ARM machines?

Regards,
Jason


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

end of thread, other threads:[~2013-09-18  4:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14  5:36 guidance on struct alignment for rtl8192cu driver Jason Andrews
2013-09-14 14:08 ` Larry Finger
2013-09-16 14:35   ` Seth Forshee
2013-09-16 15:33     ` Larry Finger
2013-09-16 19:29       ` Emmanuel Grumbach
2013-09-16 19:40         ` Larry Finger
2013-09-18  4:59           ` Jason Andrews

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.