diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2008-10-27 17:35:09 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2008-10-27 17:35:09 +0000 |
| commit | 033022a93b922ff3261c317cb15514263aa6acc2 (patch) | |
| tree | 1315a13fab50b093d417125c0c6806c263ff6f2f /sys/dev/ath | |
| parent | 577eaa6032e1d5d1cc4b66794664c03a1d48b901 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath')
| -rw-r--r-- | sys/dev/ath/if_ath.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 094320fb1379..dca30e982d98 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; } |
