Date: Thu, 23 Oct 2008 19:31:07 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151823 for review Message-ID: <200810231931.m9NJV7kV087238@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151823 Change 151823 by sam@sam_ebb on 2008/10/23 19:30:58 add regdomain debug msgs Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#116 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#116 (text+ko) ==== @@ -260,6 +260,7 @@ 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 }; @@ -5894,6 +5895,9 @@ 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) { @@ -5997,6 +6001,10 @@ regdomain = 0; cc = CTRY_DEBUG; } + DPRINTF(sc, ATH_DEBUG_REGDOMAIN, + "%s: rd %u cc %u location %c ecm %u (mapped rd %u cc %u)\n", + __func__, rd->regdomain, rd->country, rd->location, rd->ecm, + regdomain, cc); ath_hal_setregdomain(ah, ath_maprd2sku(regdomain, cc)); error = getchannels(sc, &nchans, chans, cc, rd->ecm ? AH_TRUE : AH_FALSE, @@ -6023,6 +6031,10 @@ 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); @@ -6074,6 +6086,12 @@ 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810231931.m9NJV7kV087238>