summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/bssdb.h
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2013-01-14 01:29:17 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-21 11:45:00 -0800
commit42e29fded95cbb72b4fb42fb0b36c5b355ce3dad (patch)
tree7f6188730fd5bbe6bfe3460cc788493010305788 /drivers/staging/vt6656/bssdb.h
parent904e718cc7b18ea8db425d51e9601fb21699892e (diff)
staging: vt6656: Fix inconsistent structure packing
commit 1ee4c55fc9620451b2a825d793042a7e0775391b upstream. vt6656 has several headers that use the #pragma pack(1) directive to enable structure packing, but never disable it. The layout of structures defined in other headers can then depend on which order the various headers are included in, breaking the One Definition Rule. In practice this resulted in crashes on x86_64 until the order of header inclusion was changed for some files in commit 11d404cb56ecd ('staging: vt6656: fix headers and add cfg80211.'). But we need a proper fix that won't be affected by future changes to the order of inclusion. This removes the #pragma pack(1) directives and adds __packed to the structure definitions for which packing appears to have been intended. Reported-and-tested-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/bssdb.h')
-rw-r--r--drivers/staging/vt6656/bssdb.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h
index a8f97ebb659b..991ce3eecd8d 100644
--- a/drivers/staging/vt6656/bssdb.h
+++ b/drivers/staging/vt6656/bssdb.h
@@ -92,7 +92,6 @@ typedef struct tagSRSNCapObject {
} SRSNCapObject, *PSRSNCapObject;
// BSS info(AP)
-#pragma pack(1)
typedef struct tagKnownBSS {
// BSS info
BOOL bActive;