commit 7af729b5d56fbe45abf466b656ccab65aa6f6646 Author: Jiri Slaby Date: Tue Jul 24 08:51:32 2007 +0200 add unaligned access macros diff --git a/ath.c b/ath.c index d2c9214..81cd577 100644 --- a/ath.c +++ b/ath.c @@ -35,6 +35,7 @@ #include #include +#include #include "ath.h" #include "ath5k_reg.h" @@ -43,6 +44,10 @@ #define ATH_DUMP_SKB 0 /* show skb contents */ #define AR_DEBUG 1 +/* unaligned little endian access */ +#define LE_READ_2(_p) (le16_to_cpu(get_unaligned((__le16 *)(_p)))) +#define LE_READ_4(_p) (le32_to_cpu(get_unaligned((__le32 *)(_p)))) + #if AR_DEBUG #define DPRINTF(sc, _m, _fmt...) do { \ if (unlikely(((sc)->debug & (_m)) && net_ratelimit())) \