New kernels do this, and some users rely on it.
This allows getting rid of the cfg80211 and ath6kl
patches to include it directly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#define _BACKPORT_LINUX_ETHERDEVICE_H
#include_next <linux/etherdevice.h>
#include <linux/version.h>
+/*
+ * newer kernels include this already and some
+ * users rely on getting this indirectly
+ */
+#include <asm/unaligned.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
#define eth_hw_addr_random LINUX_BACKPORT(eth_hw_addr_random)
+++ /dev/null
---- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
-+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
-@@ -20,6 +20,7 @@
- #include <linux/moduleparam.h>
- #include <linux/inetdevice.h>
- #include <linux/export.h>
-+#include <asm/unaligned.h>
-
- #include "core.h"
- #include "cfg80211.h"
+++ /dev/null
---- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c
-+++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c
-@@ -18,6 +18,10 @@
- #include "debug.h"
- #include "hif-ops.h"
-
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+#include <asm/unaligned.h>
-+#endif
-+
- #define HTC_PACKET_CONTAINER_ALLOCATION 32
- #define HTC_CONTROL_BUFFER_SIZE (HTC_MAX_CTRL_MSG_LEN + HTC_HDR_LENGTH)
-
+++ /dev/null
---- a/net/wireless/util.c
-+++ b/net/wireless/util.c
-@@ -10,6 +10,7 @@
- #include <net/cfg80211.h>
- #include <net/ip.h>
- #include <net/dsfield.h>
-+#include <asm/unaligned.h>
- #include "core.h"
- #include "rdev-ops.h"
-