Define MIN/MAX macros once

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3754 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
mentor 2008-07-06 02:05:35 +00:00
parent 3b5b743774
commit 77c44c5d03
1 changed files with 7 additions and 8 deletions

View File

@ -103,6 +103,13 @@
#include "ah_os.h" #include "ah_os.h"
#ifndef MAX
# define MAX(a, b) (((a) > (b))? (a) : (b))
#endif
#ifndef MIN
# define MIN(a, b) (((a) < (b))? (a) : (b))
#endif
/* unaligned little endian access */ /* unaligned little endian access */
#define LE_READ_2(p) \ #define LE_READ_2(p) \
((u_int16_t) \ ((u_int16_t) \
@ -4260,10 +4267,6 @@ ath_slottime2timeout(struct ath_softc *sc, int slottime)
return slottime + 18; return slottime + 18;
} }
#ifndef MAX
# define MAX(a, b) (((a) > (b))? (a) : (b))
#endif
static inline int static inline int
ath_default_ctsack_timeout(struct ath_softc *sc) ath_default_ctsack_timeout(struct ath_softc *sc)
{ {
@ -7409,7 +7412,6 @@ static int
ath_tx_start(struct net_device *dev, struct ieee80211_node *ni, ath_tx_start(struct net_device *dev, struct ieee80211_node *ni,
struct ath_buf *bf, struct sk_buff *skb, int nextfraglen) struct ath_buf *bf, struct sk_buff *skb, int nextfraglen)
{ {
#define MIN(a,b) ((a) < (b) ? (a) : (b))
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
struct ieee80211com *ic = ni->ni_ic; struct ieee80211com *ic = ni->ni_ic;
struct ieee80211vap *vap = ni->ni_vap; struct ieee80211vap *vap = ni->ni_vap;
@ -7999,7 +8001,6 @@ ath_tx_start(struct net_device *dev, struct ieee80211_node *ni,
ath_tx_txqaddbuf(sc, PASS_NODE(ni), txq, bf, pktlen); ath_tx_txqaddbuf(sc, PASS_NODE(ni), txq, bf, pktlen);
return 0; return 0;
#undef MIN
} }
/* /*
@ -10105,7 +10106,6 @@ athff_can_aggregate(struct ath_softc *sc, struct ether_header *eh,
u_int32_t txoplimit; u_int32_t txoplimit;
#define US_PER_4MS 4000 #define US_PER_4MS 4000
#define MIN(a,b) ((a) < (b) ? (a) : (b))
*flushq = AH_FALSE; *flushq = AH_FALSE;
@ -10145,7 +10145,6 @@ athff_can_aggregate(struct ath_softc *sc, struct ether_header *eh,
return AH_TRUE; return AH_TRUE;
#undef US_PER_4MS #undef US_PER_4MS
#undef MIN
} }
#endif #endif