linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch 1/1] wext: fix 32/64 bit alignment issue for 'point' type
@ 2010-09-30 10:25 Gerrit Renker
  2010-09-30 14:38 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Gerrit Renker @ 2010-09-30 10:25 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless

wireless: fix alignment problem

With the current definition, IW_EV_POINT_PK_LEN is 12 on 64-bit and 8 on 32-bit systems,
due to the way struct iw_event is packed (24 byte on 64-bit systems instead of 20 byte
on 32-bit systems). Furthermore, the iwe_stream_add_point() in include/net/iw_handler.h
also uses IW_EV_LCP_PK_LEN as header length. 

The current definition appears to be a typo (PK_LEN instead of LEN); it causes 
misalignment on 64 bit systems.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 include/linux/wireless.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
	
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -1157,6 +1157,6 @@ struct __compat_iw_event {
 #define IW_EV_PARAM_PK_LEN	(IW_EV_LCP_PK_LEN + sizeof(struct iw_param))
 #define IW_EV_ADDR_PK_LEN	(IW_EV_LCP_PK_LEN + sizeof(struct sockaddr))
 #define IW_EV_QUAL_PK_LEN	(IW_EV_LCP_PK_LEN + sizeof(struct iw_quality))
-#define IW_EV_POINT_PK_LEN	(IW_EV_LCP_LEN + 4)
+#define IW_EV_POINT_PK_LEN	(IW_EV_LCP_PK_LEN + 4)
 
 #endif	/* _LINUX_WIRELESS_H */


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

end of thread, other threads:[~2010-10-12  5:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30 10:25 [Patch 1/1] wext: fix 32/64 bit alignment issue for 'point' type Gerrit Renker
2010-09-30 14:38 ` Johannes Berg
2010-09-30 14:40   ` Johannes Berg
2010-10-01  7:22   ` gerrit
2010-10-01  8:30     ` Johannes Berg
2010-10-11  5:14       ` Gerrit Renker
2010-10-11  9:55         ` Johannes Berg
2010-10-11 11:56           ` gerrit
2010-10-11 12:00             ` Johannes Berg
2010-10-12  5:07               ` [Patch v2 1/1] wext: fix alignment problem in serializing 'struct iw_point' Gerrit Renker

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).