Search Linux Wireless

Re: [PATCH] WAVELAN - compile-time check for struct sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 7 Feb 2008 14:08:42 -0500
"John W. Linville" <linville@xxxxxxxxxxxxx> wrote:

> > With your patch applied and arm allmodconfig, this
> > 
> >         BUILD_BUG_ON(sizeof(ha_t) != HA_SIZE);
> > 
> > triggers
> > 
> > Without your patch applied, these two
> > 
> >         BUILD_BUG_ON(sizeof(mmw_t) != MMW_SIZE);
> >         BUILD_BUG_ON(sizeof(ha_t) != HA_SIZE);
> > 
> > are triggering.
> 
> The ha_t one triggers either way?  Hmmm...
> 
> Russell suggested that the ha_t and psa_t packed attributes were
> unnecessary, so I'll include the reduced version just in case the
> above is a typo.
> 
> ---
> 
> From: John W. Linville <linville@xxxxxxxxxxxxx>
> Subject: [PATCH] wavelan: mark hardware interfacing structures as packed
> 
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>

ha_t is still triggering with this patch.

This incremental patch:

--- a/drivers/net/wireless/wavelan.h~a
+++ a/drivers/net/wireless/wavelan.h
@@ -85,7 +85,7 @@ union hacs_u
 #define		HASR_MMC_INTR		0x0002	/* Interrupt request from MMC */
 #define		HASR_MMC_BUSY		0x0004	/* MMC busy indication */
 #define		HASR_PSA_BUSY		0x0008	/* LAN parameter storage area busy */
-};
+} __attribute__((packed));
 
 typedef struct ha_t	ha_t;
 struct ha_t
_

fixes things up.  If forces `union hacs_u' to be two bytes, not four.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux