- #include "if_athrate.h"
- #include "net80211/if_athproto.h"
-@@ -347,7 +347,7 @@
- ath_keyprint(__func__, ix, hk, mac); \
- } while (0)
- #else /* defined(AR_DEBUG) */
--#define IFF_DUMPPKTS(sc, _m) netif_msg_dumppkts(&sc->sc_ic)
-+#define IFF_DUMPPKTS(sc, _m) 0
- #define DPRINTF(sc, _m, _fmt, ...)
- #define KEYPRINTF(sc, k, ix, mac)
- #endif /* defined(AR_DEBUG) */
-diff -ur madwifi.old/ath_rate/amrr/amrr.c madwifi.dev/ath_rate/amrr/amrr.c
---- madwifi.old/ath_rate/amrr/amrr.c 2007-02-20 22:50:52.278096536 +0100
-+++ madwifi.dev/ath_rate/amrr/amrr.c 2007-02-20 22:50:31.652232144 +0100
-@@ -67,7 +67,7 @@
+@@ -515,9 +515,11 @@
+ u_int8_t csz;
+
+ sc->devid = devid;
++#ifdef AR_DEBUG
+ ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
+ sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
+ DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
++#endif
+
+ /*
+ * Cache line size is used to size and align various
+@@ -1283,12 +1285,14 @@
+ /* If no default VAP debug flags are passed, allow a few to
+ * transfer down from the driver to new VAPs so we can have load
+ * time debugging for VAPs too. */
++#ifdef AR_DEBUG
+ vap->iv_debug = 0 |
+ ((sc->sc_debug & ATH_DEBUG_RATE) ? IEEE80211_MSG_XRATE : 0) |
+ ((sc->sc_debug & ATH_DEBUG_XMIT) ? IEEE80211_MSG_OUTPUT : 0) |
+ ((sc->sc_debug & ATH_DEBUG_RECV) ? IEEE80211_MSG_INPUT : 0) |
+ 0
+ ;
++#endif
+ }
+ ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
+
+@@ -10290,9 +10294,11 @@
+ /* XXX validate? */
+ sc->sc_ledpin = val;
+ break;
++#ifdef AR_DEBUG
+ case ATH_DEBUG:
+ sc->sc_debug = (val & ~ATH_DEBUG_GLOBAL);
+ ath_debug_global = (val & ATH_DEBUG_GLOBAL);
++#endif
+ break;
+ case ATH_TXANTENNA:
+ /*
+@@ -10703,9 +10709,11 @@
+ }
+
+ /* initialize values */
++#ifdef AR_DEBUG
+ ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
+ sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
+ sc->sc_default_ieee80211_debug = ieee80211_debug;
++#endif
+ sc->sc_txantenna = 0; /* default to auto-selection */
+ sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
+ }
+Index: madwifi-dfs-r2996/ath_rate/amrr/amrr.c
+===================================================================
+--- madwifi-dfs-r2996.orig/ath_rate/amrr/amrr.c 2007-12-01 18:45:14.000000000 +0100
++++ madwifi-dfs-r2996/ath_rate/amrr/amrr.c 2007-12-01 18:53:06.076435466 +0100
+@@ -70,7 +70,7 @@