Make qca-vendor.h independent of other header files
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 25 Apr 2014 08:41:36 +0000 (11:41 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 25 Apr 2014 08:41:36 +0000 (11:41 +0300)
Move the definitions that depended in common.h into a separate header
file so that qca-vendor.h can be copied and used as-is in other
projects.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/qca-vendor-attr.h [new file with mode: 0644]
src/common/qca-vendor.h
src/drivers/driver_nl80211.c

diff --git a/src/common/qca-vendor-attr.h b/src/common/qca-vendor-attr.h
new file mode 100644 (file)
index 0000000..6f51803
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Qualcomm Atheros vendor specific attribute definitions
+ * Copyright (c) 2014, Qualcomm Atheros, Inc.
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef QCA_VENDOR_ATTR_H
+#define QCA_VENDOR_ATTR_H
+
+/*
+ * This file defines some of the attributes used with Qualcomm Atheros OUI
+ * 00:13:74 in a way that is not suitable for qca-vendor.h, e.g., due to
+ * compiler dependencies.
+ */
+
+struct qca_avoid_freq_range {
+       u32 start_freq;
+       u32 end_freq;
+} __attribute__ ((packed));
+
+struct qca_avoid_freq_list {
+       u32 count;
+       struct qca_avoid_freq_range range[0];
+} __attribute__ ((packed));
+
+#endif /* QCA_VENDOR_ATTR_H */
index 40fb9a1..1bc981b 100644 (file)
@@ -55,16 +55,6 @@ enum qca_nl80211_vendor_subcmds {
 };
 
 
-struct qca_avoid_freq_range {
-       u32 start_freq;
-       u32 end_freq;
-} STRUCT_PACKED;
-
-struct qca_avoid_freq_list {
-       u32 count;
-       struct qca_avoid_freq_range range[0];
-} STRUCT_PACKED;
-
 enum qca_wlan_vendor_attr {
        QCA_WLAN_VENDOR_ATTR_INVALID = 0,
        /* used by QCA_NL80211_VENDOR_SUBCMD_DFS_CAPABILITY */
index 1300703..b47d63f 100644 (file)
@@ -29,6 +29,7 @@
 #include "eloop.h"
 #include "utils/list.h"
 #include "common/qca-vendor.h"
+#include "common/qca-vendor-attr.h"
 #include "common/ieee802_11_defs.h"
 #include "common/ieee802_11_common.h"
 #include "l2_packet/l2_packet.h"