From owner-p4-projects@FreeBSD.ORG Thu Oct 23 19:31:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1BF510656A5; Thu, 23 Oct 2008 19:31:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9463E1065682 for ; Thu, 23 Oct 2008 19:31:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 831808FC13 for ; Thu, 23 Oct 2008 19:31:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9NJV7a4087240 for ; Thu, 23 Oct 2008 19:31:07 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9NJV7kV087238 for perforce@freebsd.org; Thu, 23 Oct 2008 19:31:07 GMT (envelope-from sam@freebsd.org) Date: Thu, 23 Oct 2008 19:31:07 GMT Message-Id: <200810231931.m9NJV7kV087238@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 151823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2008 19:31:08 -0000 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; }