From owner-p4-projects@FreeBSD.ORG Tue Oct 21 20:19:16 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 75D081065676; Tue, 21 Oct 2008 20:19:16 +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 39B0C1065670 for ; Tue, 21 Oct 2008 20:19:16 +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 28EC68FC21 for ; Tue, 21 Oct 2008 20:19:16 +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 m9LKJGnx058520 for ; Tue, 21 Oct 2008 20:19:16 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9LKJGkF058518 for perforce@freebsd.org; Tue, 21 Oct 2008 20:19:16 GMT (envelope-from sam@freebsd.org) Date: Tue, 21 Oct 2008 20:19:16 GMT Message-Id: <200810212019.m9LKJGkF058518@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 151683 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: Tue, 21 Oct 2008 20:19:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=151683 Change 151683 by sam@sam_ebb on 2008/10/21 20:18:28 o special case debug so we really can get to the complete channel list o fix more cases of indoor/outdoor mis-mapping Affected files ... .. //depot/projects/vap/sys/dev/ath/if_ath.c#113 edit Differences ... ==== //depot/projects/vap/sys/dev/ath/if_ath.c#113 (text+ko) ==== @@ -5982,12 +5982,19 @@ { struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_hal *ah = sc->sc_ah; - u_int32_t ord; + u_int32_t ord, regdomain, cc; int error; (void) ath_hal_getregdomain(ah, &ord); - ath_hal_setregdomain(ah, ath_maprd2sku(rd->regdomain, rd->country)); - error = getchannels(sc, &nchans, chans, rd->country, + regdomain = rd->regdomain; + cc = rd->country; + if (regdomain == SKU_DEBUG && cc == 0) { + /* XXX requires special handling */ + regdomain = 0; + cc = CTRY_DEBUG; + } else + ath_hal_setregdomain(ah, ath_maprd2sku(regdomain, cc)); + error = getchannels(sc, &nchans, chans, cc, rd->ecm ? AH_TRUE : AH_FALSE, rd->location != 'I' ? AH_TRUE : AH_FALSE); if (error != 0) { @@ -5997,7 +6004,7 @@ ath_hal_setregdomain(ah, ord); (void) getchannels(sc, NULL, NULL, ic->ic_regdomain.country, ic->ic_regdomain.ecm ? AH_TRUE : AH_FALSE, - ic->ic_regdomain.location == 'O' ? AH_TRUE : AH_FALSE); + ic->ic_regdomain.location != 'I' ? AH_TRUE : AH_FALSE); return error; } return 0; @@ -6020,7 +6027,7 @@ ath_hal_setregdomain(ah, ord); (void) getchannels(sc, NULL, NULL, ic->ic_regdomain.country, ic->ic_regdomain.ecm ? AH_TRUE : AH_FALSE, - ic->ic_regdomain.location == 'O' ? AH_TRUE : AH_FALSE); + ic->ic_regdomain.location != 'I' ? AH_TRUE : AH_FALSE); } static int