summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-27 17:35:09 +0000
committersam <sam@FreeBSD.org>2008-10-27 17:35:09 +0000
commit0049f895395c41ac212138e6d7056a169ac6395c (patch)
tree1315a13fab50b093d417125c0c6806c263ff6f2f
parent01ab47defe8297ae136a02274992e7115685a15b (diff)
downloadFreeBSD-src-0049f895395c41ac212138e6d7056a169ac6395c.zip
FreeBSD-src-0049f895395c41ac212138e6d7056a169ac6395c.tar.gz
add regdomain debug msgs
-rw-r--r--sys/dev/ath/if_ath.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 094320f..dca30e9 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -259,6 +259,7 @@ enum {
ATH_DEBUG_LED = 0x00100000, /* led management */
ATH_DEBUG_FF = 0x00200000, /* fast frames */
ATH_DEBUG_DFS = 0x00400000, /* DFS processing */
+ ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */
ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */
ATH_DEBUG_ANY = 0xffffffff
};
@@ -5860,6 +5861,9 @@ getchannels(struct ath_softc *sc, int *nchans, struct ieee80211_channel chans[],
HAL_CHANNEL *halchans;
int i, nhalchans, error;
+ DPRINTF(sc, ATH_DEBUG_REGDOMAIN, "%s: cc %u outdoor %u ecm %u\n",
+ __func__, cc, outdoor, ecm);
+
halchans = malloc(IEEE80211_CHAN_MAX * sizeof(HAL_CHANNEL),
M_TEMP, M_NOWAIT | M_ZERO);
if (halchans == NULL) {
@@ -5933,7 +5937,11 @@ ath_setregdomain(struct ieee80211com *ic, struct ieee80211_regdomain *rd,
(void) ath_hal_getregdomain(ah, &ord);
/* XXX map sku->rd */
+ DPRINTF(sc, ATH_DEBUG_REGDOMAIN,
+ "%s: rd %u cc %u location %c ecm %u\n",
+ __func__, rd->regdomain, rd->country, rd->location, rd->ecm);
ath_hal_setregdomain(ah, rd->regdomain);
+
error = getchannels(sc, &nchans, chans, rd->country,
rd->ecm ? AH_TRUE : AH_FALSE,
rd->location == 'O' ? AH_TRUE : AH_FALSE);
@@ -5959,6 +5967,10 @@ ath_getradiocaps(struct ieee80211com *ic,
u_int32_t ord;
(void) ath_hal_getregdomain(ah, &ord);
+
+ DPRINTF(sc, ATH_DEBUG_REGDOMAIN, "%s: use rd %u cc %d, ord %u\n",
+ __func__, 0, CTRY_DEBUG, ord);
+
ath_hal_setregdomain(ah, 0);
/* XXX not quite right but close enough for now */
getchannels(sc, nchans, chans, CTRY_DEBUG, AH_TRUE, AH_FALSE);
@@ -6007,6 +6019,12 @@ ath_getchannels(struct ath_softc *sc)
ic->ic_regdomain.location = 'I';
ic->ic_regdomain.isocc[0] = ' '; /* XXX don't know */
ic->ic_regdomain.isocc[1] = ' ';
+
+ DPRINTF(sc, ATH_DEBUG_REGDOMAIN,
+ "%s: eeprom rd %u cc %u (mapped rd %u cc %u) location %c ecm %u\n",
+ __func__, sc->sc_eerd, sc->sc_eecc,
+ ic->ic_regdomain.regdomain, ic->ic_regdomain.country,
+ ic->ic_regdomain.location, ic->ic_regdomain.ecm);
return 0;
}
OpenPOWER on IntegriCloud