From dd9f5bba5281e197ce9dcbd612f977afbdb6f31d Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Fri, 20 Jul 2012 00:47:23 +0000 Subject: [PATCH] Prepare for (re)using this header file in userland. Remove the inlined code from the header file if it's compiled in userland. It's not required and it shouldn't be there in the first place. --- sys/dev/ath/ath_rate/sample/sample.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ath/ath_rate/sample/sample.h b/sys/dev/ath/ath_rate/sample/sample.h index bb72c0a2329..2d586b7d5b0 100644 --- a/sys/dev/ath/ath_rate/sample/sample.h +++ b/sys/dev/ath/ath_rate/sample/sample.h @@ -101,6 +101,9 @@ struct sample_node { int packets_since_sample[NUM_PACKET_SIZE_BINS]; unsigned sample_tt[NUM_PACKET_SIZE_BINS]; }; + +#ifdef _KERNEL + #define ATH_NODE_SAMPLE(an) ((struct sample_node *)&(an)[1]) #define IS_RATE_DEFINED(sn, rix) (((sn)->ratemask & (1<<(rix))) != 0) @@ -225,4 +228,7 @@ static unsigned calc_usecs_unicast_packet(struct ath_softc *sc, } return tt; } + +#endif /* _KERNEL */ + #endif /* _DEV_ATH_RATE_SAMPLE_H */