From owner-p4-projects@FreeBSD.ORG Tue Jan 20 11:05:04 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6AFEE1065672; Tue, 20 Jan 2009 11:05:03 +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 2390410656C4 for ; Tue, 20 Jan 2009 11:05:03 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 1121C8FC1F for ; Tue, 20 Jan 2009 11:05:03 +0000 (UTC) (envelope-from weongyo@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 n0KB52rD056504 for ; Tue, 20 Jan 2009 11:05:02 GMT (envelope-from weongyo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n0KB5220056501 for perforce@freebsd.org; Tue, 20 Jan 2009 11:05:02 GMT (envelope-from weongyo@FreeBSD.org) Date: Tue, 20 Jan 2009 11:05:02 GMT Message-Id: <200901201105.n0KB5220056501@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to weongyo@FreeBSD.org using -f From: Weongyo Jeong To: Perforce Change Reviews Cc: Subject: PERFORCE change 156423 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, 20 Jan 2009 11:05:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=156423 Change 156423 by weongyo@weongyo_ws on 2009/01/20 11:04:42 add knobs to set or read `contry code' and `regdomain'. Affected files ... .. //depot/projects/vap/sys/dev/usb/if_uath.c#7 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_uath.c#7 (text+ko) ==== @@ -112,9 +112,18 @@ #include #include +SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW, 0, "USB Atheros"); + +static int uath_countrycode = CTRY_DEFAULT; /* country code */ +SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RW, &uath_countrycode, + 0, "country code"); +TUNABLE_INT("hw.usb.uath.countrycode", &uath_countrycode); +static int uath_regdomain = 0; /* regulatory domain */ +SYSCTL_INT(_hw_usb_uath, OID_AUTO, regdomain, CTLFLAG_RD, &uath_regdomain, + 0, "regulatory domain"); + #ifdef UATH_DEBUG int uath_debug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW, 0, "USB Atheros"); SYSCTL_INT(_hw_usb_uath, OID_AUTO, debug, CTLFLAG_RW, &uath_debug, 0, "uath debug level"); TUNABLE_INT("hw.usb.uath.debug", &uath_debug); @@ -415,6 +424,9 @@ IEEE80211_C_SHSLOT | /* short slot time supported */ IEEE80211_C_WPA; /* 802.11i */ + /* put a regulatory domain to reveal informations. */ + uath_regdomain = sc->sc_devcap.regDomain; + bands = 0; setbit(&bands, IEEE80211_MODE_11B); setbit(&bands, IEEE80211_MODE_11G);