From 14431664ca7155d92ba2f84fddc6059beda5a308 Mon Sep 17 00:00:00 2001 From: dyoung Date: Tue, 9 Jan 2007 09:36:28 +0000 Subject: [PATCH] Let the compiler know it should both pack the members of the rx/tx descriptors without any padding between, and use 4-byte alignment. --- sys/dev/ic/atwreg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/atwreg.h b/sys/dev/ic/atwreg.h index 71c594783847..75ef7e5ddfb7 100644 --- a/sys/dev/ic/atwreg.h +++ b/sys/dev/ic/atwreg.h @@ -1,4 +1,4 @@ -/* $NetBSD: atwreg.h,v 1.16 2006/11/26 17:31:32 dyoung Exp $ */ +/* $NetBSD: atwreg.h,v 1.17 2007/01/09 09:36:28 dyoung Exp $ */ /* * Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved. @@ -924,7 +924,7 @@ struct atw_txdesc { volatile uint32_t at_flags; volatile uint32_t at_buf1; volatile uint32_t at_buf2; -}; +} __attribute__((__packed__, __aligned__(4))); #define ATW_TXCTL_OWN __BIT(31) /* 1: ready to transmit */ #define ATW_TXCTL_DONE __BIT(30) /* 0: not processed */ @@ -957,7 +957,7 @@ struct atw_rxdesc { volatile uint32_t ar_ctl; volatile uint32_t ar_buf1; volatile uint32_t ar_buf2; -}; +} __attribute__((__packed__, __aligned__(4))); #define ar_rssi ar_ctl