ifieee80211.c (187845) | ifieee80211.c (188038) |
---|---|
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 187845 2009-01-28 19:24:29Z sam $ | 27 * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 188038 2009-02-03 00:15:19Z delphij $ |
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, --- 982 unchanged lines hidden (view full) --- 1018 int first, last, f, c; 1019 1020 tp = strchr(cp, ','); 1021 if (tp != NULL) 1022 *tp++ = '\0'; 1023 switch (sscanf(cp, "%u-%u", &first, &last)) { 1024 case 1: 1025 if (first > IEEE80211_CHAN_MAX) | 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, --- 982 unchanged lines hidden (view full) --- 1018 int first, last, f, c; 1019 1020 tp = strchr(cp, ','); 1021 if (tp != NULL) 1022 *tp++ = '\0'; 1023 switch (sscanf(cp, "%u-%u", &first, &last)) { 1024 case 1: 1025 if (first > IEEE80211_CHAN_MAX) |
1026 errx(-1, "channel %u out of range, max %zu", | 1026 errx(-1, "channel %u out of range, max %u", |
1027 first, IEEE80211_CHAN_MAX); 1028 setbit(chanlist.ic_channels, first); 1029 break; 1030 case 2: 1031 if (first > IEEE80211_CHAN_MAX) | 1027 first, IEEE80211_CHAN_MAX); 1028 setbit(chanlist.ic_channels, first); 1029 break; 1030 case 2: 1031 if (first > IEEE80211_CHAN_MAX) |
1032 errx(-1, "channel %u out of range, max %zu", | 1032 errx(-1, "channel %u out of range, max %u", |
1033 first, IEEE80211_CHAN_MAX); 1034 if (last > IEEE80211_CHAN_MAX) | 1033 first, IEEE80211_CHAN_MAX); 1034 if (last > IEEE80211_CHAN_MAX) |
1035 errx(-1, "channel %u out of range, max %zu", | 1035 errx(-1, "channel %u out of range, max %u", |
1036 last, IEEE80211_CHAN_MAX); 1037 if (first > last) 1038 errx(-1, "void channel range, %u > %u", 1039 first, last); 1040 for (f = first; f <= last; f++) 1041 setbit(chanlist.ic_channels, f); 1042 break; 1043 } --- 3817 unchanged lines hidden --- | 1036 last, IEEE80211_CHAN_MAX); 1037 if (first > last) 1038 errx(-1, "void channel range, %u > %u", 1039 first, last); 1040 for (f = first; f <= last; f++) 1041 setbit(chanlist.ic_channels, f); 1042 break; 1043 } --- 3817 unchanged lines hidden --- |