ifieee80211.c (186103) | ifieee80211.c (186104) |
---|---|
1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/* 2 * Copyright 2001 The Aerospace Corporation. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 186103 2008-12-15 01:10:08Z sam $ | 27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 186104 2008-12-15 01:10:52Z sam $ |
28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 1917 unchanged lines hidden (view full) --- 1953static 1954DECL_CMD_FUNC(set80211regdomain, val, d) 1955{ 1956 struct regdata *rdp = getregdata(); 1957 const struct regdomain *rd; 1958 1959 rd = lib80211_regdomain_findbyname(rdp, val); 1960 if (rd == NULL) { | 28 */ 29 30/*- 31 * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. 32 * All rights reserved. 33 * 34 * This code is derived from software contributed to The NetBSD Foundation 35 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, --- 1917 unchanged lines hidden (view full) --- 1953static 1954DECL_CMD_FUNC(set80211regdomain, val, d) 1955{ 1956 struct regdata *rdp = getregdata(); 1957 const struct regdomain *rd; 1958 1959 rd = lib80211_regdomain_findbyname(rdp, val); 1960 if (rd == NULL) { |
1961 rd = lib80211_regdomain_findbysku(rdp, atoi(val)); 1962 if (rd == NULL) | 1961 char *eptr; 1962 long sku = strtol(val, &eptr, 0); 1963 1964 if (eptr != val) 1965 rd = lib80211_regdomain_findbysku(rdp, sku); 1966 if (eptr == val || rd == NULL) |
1963 errx(1, "unknown regdomain %s", val); 1964 } 1965 getregdomain(s); 1966 regdomain.regdomain = rd->sku; 1967 if (regdomain.country == 0 && rd->cc != NULL) { 1968 /* 1969 * No country code setup and there's a default 1970 * one for this regdomain fill it in. --- 2720 unchanged lines hidden --- | 1967 errx(1, "unknown regdomain %s", val); 1968 } 1969 getregdomain(s); 1970 regdomain.regdomain = rd->sku; 1971 if (regdomain.country == 0 && rd->cc != NULL) { 1972 /* 1973 * No country code setup and there's a default 1974 * one for this regdomain fill it in. --- 2720 unchanged lines hidden --- |